@saas-ui/storybook-addon 2.0.3 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/ChakraProviderDecorator.cjs +33 -0
  3. package/dist/ChakraProviderDecorator.cjs.map +1 -0
  4. package/dist/ChakraProviderDecorator.d.cts +3 -0
  5. package/dist/ChakraProviderDecorator.d.ts +1 -3
  6. package/dist/ChakraProviderDecorator.js +8 -47
  7. package/dist/ChakraProviderDecorator.js.map +1 -1
  8. package/dist/{arg-types.mjs → arg-types.cjs} +4 -2
  9. package/dist/arg-types.cjs.map +1 -0
  10. package/dist/arg-types.d.cts +52 -0
  11. package/dist/arg-types.d.ts +1 -1
  12. package/dist/arg-types.js +1 -3
  13. package/dist/arg-types.js.map +1 -1
  14. package/dist/color-mode/ColorModeSync.cjs +11 -0
  15. package/dist/color-mode/ColorModeSync.cjs.map +1 -0
  16. package/dist/color-mode/ColorModeSync.d.cts +6 -0
  17. package/dist/color-mode/ColorModeSync.js +5 -7
  18. package/dist/color-mode/ColorModeSync.js.map +1 -1
  19. package/dist/color-mode/ColorModeTool.cjs +32 -0
  20. package/dist/color-mode/ColorModeTool.cjs.map +1 -0
  21. package/dist/color-mode/ColorModeTool.d.cts +5 -0
  22. package/dist/color-mode/ColorModeTool.js +6 -28
  23. package/dist/color-mode/ColorModeTool.js.map +1 -1
  24. package/dist/{constants.mjs → constants.cjs} +8 -2
  25. package/dist/constants.cjs.map +1 -0
  26. package/dist/constants.d.cts +11 -0
  27. package/dist/constants.js +1 -7
  28. package/dist/constants.js.map +1 -1
  29. package/dist/direction/DirectionTool.cjs +12 -0
  30. package/dist/direction/DirectionTool.cjs.map +1 -0
  31. package/dist/direction/DirectionTool.d.cts +8 -0
  32. package/dist/direction/DirectionTool.js +6 -8
  33. package/dist/direction/DirectionTool.js.map +1 -1
  34. package/dist/direction/useDirection.cjs +10 -0
  35. package/dist/direction/useDirection.cjs.map +1 -0
  36. package/dist/direction/useDirection.d.cts +6 -0
  37. package/dist/direction/useDirection.js +4 -6
  38. package/dist/direction/useDirection.js.map +1 -1
  39. package/dist/{index.mjs → index.cjs} +9 -2
  40. package/dist/index.cjs.map +1 -0
  41. package/dist/index.d.cts +4 -0
  42. package/dist/index.js +1 -8
  43. package/dist/index.js.map +1 -1
  44. package/dist/manager.cjs +31 -0
  45. package/dist/manager.cjs.map +1 -0
  46. package/dist/manager.d.cts +2 -0
  47. package/dist/manager.d.ts +1 -1
  48. package/dist/manager.js +8 -31
  49. package/dist/manager.js.map +1 -1
  50. package/dist/preview.cjs +33 -0
  51. package/dist/preview.cjs.map +1 -0
  52. package/dist/preview.d.cts +5 -0
  53. package/dist/preview.js +8 -47
  54. package/dist/preview.js.map +1 -1
  55. package/dist/theme/ThemeTool.cjs +12 -0
  56. package/dist/theme/ThemeTool.cjs.map +1 -0
  57. package/dist/theme/ThemeTool.d.cts +8 -0
  58. package/dist/theme/ThemeTool.js +6 -29
  59. package/dist/theme/ThemeTool.js.map +1 -1
  60. package/package.json +26 -31
  61. package/dist/ChakraProviderDecorator.mjs +0 -30
  62. package/dist/ChakraProviderDecorator.mjs.map +0 -1
  63. package/dist/arg-types.mjs.map +0 -1
  64. package/dist/color-mode/ColorModeSync.mjs +0 -9
  65. package/dist/color-mode/ColorModeSync.mjs.map +0 -1
  66. package/dist/color-mode/ColorModeTool.mjs +0 -10
  67. package/dist/color-mode/ColorModeTool.mjs.map +0 -1
  68. package/dist/constants.mjs.map +0 -1
  69. package/dist/direction/DirectionTool.mjs +0 -10
  70. package/dist/direction/DirectionTool.mjs.map +0 -1
  71. package/dist/direction/useDirection.mjs +0 -8
  72. package/dist/direction/useDirection.mjs.map +0 -1
  73. package/dist/index.mjs.map +0 -1
  74. package/dist/manager.mjs +0 -12
  75. package/dist/manager.mjs.map +0 -1
  76. package/dist/preview.mjs +0 -30
  77. package/dist/preview.mjs.map +0 -1
  78. package/dist/theme/ThemeTool.mjs +0 -12
  79. package/dist/theme/ThemeTool.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js","../../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../../../node_modules/lodash.mergewith/index.js","../../../node_modules/react-fast-compare/index.js","../../../node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js","../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js","../src/ChakraProviderDecorator.tsx","../src/color-mode/ColorModeSync.tsx","../src/constants.ts","../src/direction/useDirection.tsx","../../../node_modules/@emotion/react/dist/emotion-element-c39617d8.browser.esm.js","../../../node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js","../../../node_modules/stylis/src/Enum.js","../../../node_modules/stylis/src/Utility.js","../../../node_modules/stylis/src/Tokenizer.js","../../../node_modules/stylis/src/Parser.js","../../../node_modules/stylis/src/Serializer.js","../../../node_modules/stylis/src/Middleware.js","../../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../../../node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","../../../node_modules/@babel/runtime/helpers/esm/extends.js","../../../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","../../../node_modules/@emotion/hash/dist/emotion-hash.esm.js","../../../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","../../../node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js","../../../node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js","../../../node_modules/@emotion/react/dist/emotion-react.browser.esm.js","../../../node_modules/@chakra-ui/system/src/use-theme.ts","../../../node_modules/@chakra-ui/color-mode/src/color-mode-context.ts","../../../node_modules/@chakra-ui/system/src/hooks.ts","../../../node_modules/@chakra-ui/shared-utils/dist/index.mjs","../../../node_modules/@chakra-ui/styled-system/dist/index.mjs","../../../node_modules/@chakra-ui/anatomy/src/anatomy.ts","../../../node_modules/@chakra-ui/anatomy/src/components.ts","../../../node_modules/color2k/src/guard.ts","../../../node_modules/color2k/src/ColorError.ts","../../../node_modules/color2k/src/parseToRgba.ts","../../../node_modules/color2k/src/rgba.ts","../../../node_modules/color2k/src/transparentize.ts","../../../node_modules/color2k/src/toHex.ts","../../../node_modules/.pnpm/dlv@1.1.3/node_modules/dlv/index.js","../../../node_modules/@chakra-ui/theme-tools/src/color.ts","../../../node_modules/@chakra-ui/theme-tools/src/component.ts","../../../node_modules/@chakra-ui/theme-tools/src/css-var.ts","../../../node_modules/@chakra-ui/utils/dist/chunk-O3SWHQEE.mjs","../../../node_modules/@chakra-ui/utils/dist/chunk-YTQ3XZ3T.mjs","../../../node_modules/@chakra-ui/utils/dist/chunk-Y5FGD7DM.mjs","../../../node_modules/@chakra-ui/utils/dist/chunk-M3TFMUOL.mjs","../../../node_modules/@chakra-ui/system/src/use-style-config.ts","../../../node_modules/@chakra-ui/system/src/should-forward-prop.ts","../../../node_modules/@chakra-ui/object-utils/dist/chunk-OLTBUDV5.mjs","../../../node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js","../../../node_modules/@emotion/styled/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","../../../node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js","../../../node_modules/@chakra-ui/system/src/system.ts","../../../node_modules/@chakra-ui/system/src/factory.ts","../../../node_modules/@chakra-ui/system/src/forward-ref.tsx","../../../node_modules/@chakra-ui/react-utils/dist/chunk-ITIKTQWJ.mjs","../../../node_modules/@chakra-ui/icon/src/icon.tsx","../../../node_modules/@chakra-ui/icon/src/create-icon.tsx","../../../packages/saas-ui-core/src/icons/icons.tsx","../../../packages/saas-ui-core/src/icons/create-icon.tsx","../../../packages/saas-ui-core/src/command/command.tsx","../../../packages/saas-ui-core/src/typography/br.tsx","../../../packages/saas-ui-core/src/empty-state/empty-state.tsx","../../../packages/saas-ui-core/src/error-boundary/error-boundary.tsx","../../../packages/saas-ui-core/src/provider/saas-provider.tsx","../../../packages/saas-ui-theme/src/anatomy/index.ts","../../../packages/saas-ui-theme/src/saas-ui/theme.ts","../../../packages/saas-ui-theme/src/base/theme.ts","../../../packages/saas-ui-theme/src/base/components/nav-item.ts","../../../packages/saas-ui-theme/src/base/components/app-shell.ts","../../../packages/saas-ui-theme/src/base/components/banner.ts","../../../packages/saas-ui-theme/src/base/components/command.ts","../../../packages/saas-ui-theme/src/base/components/empty-state.ts","../../../packages/saas-ui-theme/src/base/components/form.ts","../../../packages/saas-ui-theme/src/base/components/form-layout.ts","../../../packages/saas-ui-theme/src/base/components/form-legend.ts","../../../packages/saas-ui-theme/src/base/components/hotkeys.ts","../../../packages/saas-ui-theme/src/base/components/loading-overlay.ts","../../../packages/saas-ui-theme/src/base/components/nav-group.ts","../../../packages/saas-ui-theme/src/base/components/nprogress.ts","../../../packages/saas-ui-theme/src/base/components/persona.ts","../../../packages/saas-ui-theme/src/base/components/property.ts","../../../packages/saas-ui-theme/src/base/components/search-input.ts","../../../packages/saas-ui-theme/src/base/components/sidebar.ts","../../../node_modules/@chakra-ui/theme/src/components/badge.ts","../../../node_modules/@chakra-ui/theme/src/components/input.ts","../../../packages/saas-ui-theme/src/base/components/select.ts","../../../packages/saas-ui-theme/src/base/components/structured-list.ts","../../../packages/saas-ui-theme/src/base/components/timeline.ts","../../../packages/saas-ui-theme/src/base/components/icon-badge.ts","../../../packages/saas-ui-theme/src/base/components/navbar.ts","../../../packages/saas-ui-theme/src/base/components/index.ts","../../../packages/saas-ui-theme/src/saas-ui/styles.ts","../../../packages/saas-ui-theme/src/saas-ui/foundations/colors.ts","../../../packages/saas-ui-theme/src/saas-ui/foundations/typography.ts","../../../packages/saas-ui-theme/src/saas-ui/foundations/sizes.ts","../../../packages/saas-ui-theme/src/saas-ui/foundations/shadows.ts","../../../packages/saas-ui-theme/src/saas-ui/foundations/semantic-tokens.ts","../../../packages/saas-ui-theme/src/saas-ui/foundations/index.ts","../../../packages/saas-ui-theme/src/saas-ui/components/alert.ts","../../../packages/saas-ui-theme/src/saas-ui/components/badge.ts","../../../packages/saas-ui-theme/src/saas-ui/components/button.ts","../../../packages/saas-ui-theme/src/saas-ui/components/card.ts","../../../packages/saas-ui-theme/src/saas-ui/components/checkbox.ts","../../../packages/saas-ui-theme/src/saas-ui/components/close-button.ts","../../../packages/saas-ui-theme/src/saas-ui/components/form.ts","../../../packages/saas-ui-theme/src/saas-ui/components/select.ts","../../../packages/saas-ui-theme/src/saas-ui/components/heading.ts","../../../packages/saas-ui-theme/src/saas-ui/components/kbd.ts","../../../packages/saas-ui-theme/src/saas-ui/components/menu.ts","../../../packages/saas-ui-theme/src/saas-ui/components/modal.ts","../../../packages/saas-ui-theme/src/saas-ui/components/progress.ts","../../../packages/saas-ui-theme/src/saas-ui/components/radio.ts","../../../packages/saas-ui-theme/src/saas-ui/components/slider.ts","../../../packages/saas-ui-theme/src/saas-ui/components/switch.ts","../../../packages/saas-ui-theme/src/saas-ui/components/tooltip.ts","../../../packages/saas-ui-theme/src/saas-ui/components/stepper.ts","../../../packages/saas-ui-theme/src/saas-ui/components/empty-state.ts","../../../packages/saas-ui-theme/src/saas-ui/components/nprogress.ts","../../../packages/saas-ui-theme/src/saas-ui/components/property.ts","../../../packages/saas-ui-theme/src/saas-ui/components/index.ts","../../../packages/saas-ui-core/src/provider/use-link.tsx","../../../packages/saas-ui-core/src/app-shell/app-shell.tsx","../../../packages/saas-ui-core/src/app-shell/app-shell-context.ts","../../../packages/saas-ui-core/src/banner/banner.tsx","../../../packages/saas-ui-core/src/banner/icons.tsx","../../../node_modules/framer-motion/dist/es/motion/index.mjs","../../../node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","../../../node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","../../../node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","../../../node_modules/framer-motion/dist/es/context/PresenceContext.mjs","../../../node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs","../../../node_modules/framer-motion/dist/es/utils/is-browser.mjs","../../../node_modules/framer-motion/dist/es/context/LazyContext.mjs","../../../node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","../../../node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","../../../node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","../../../node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs","../../../node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","../../../node_modules/framer-motion/dist/es/render/utils/variant-props.mjs","../../../node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs","../../../node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","../../../node_modules/framer-motion/dist/es/motion/features/definitions.mjs","../../../node_modules/framer-motion/dist/es/motion/features/load-features.mjs","../../../node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs","../../../node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs","../../../node_modules/framer-motion/dist/es/motion/utils/symbol.mjs","../../../node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs","../../../node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs","../../../node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs","../../../node_modules/framer-motion/dist/es/render/dom/use-render.mjs","../../../node_modules/framer-motion/dist/es/render/html/use-props.mjs","../../../node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs","../../../node_modules/framer-motion/dist/es/render/html/utils/transform.mjs","../../../node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","../../../node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs","../../../node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs","../../../node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs","../../../node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs","../../../node_modules/framer-motion/dist/es/utils/clamp.mjs","../../../node_modules/framer-motion/dist/es/value/types/numbers/index.mjs","../../../node_modules/framer-motion/dist/es/value/types/utils.mjs","../../../node_modules/framer-motion/dist/es/value/types/numbers/units.mjs","../../../node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs","../../../node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs","../../../node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs","../../../node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","../../../node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","../../../node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","../../../node_modules/framer-motion/dist/es/render/svg/use-props.mjs","../../../node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs","../../../node_modules/framer-motion/dist/es/render/svg/utils/path.mjs","../../../node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","../../../node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs","../../../node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs","../../../node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","../../../node_modules/framer-motion/dist/es/render/html/utils/render.mjs","../../../node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","../../../node_modules/framer-motion/dist/es/render/svg/utils/render.mjs","../../../node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","../../../node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","../../../node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","../../../node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs","../../../node_modules/framer-motion/dist/es/utils/use-constant.mjs","../../../node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","../../../node_modules/framer-motion/dist/es/utils/resolve-value.mjs","../../../node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs","../../../node_modules/framer-motion/dist/es/utils/noop.mjs","../../../node_modules/framer-motion/dist/es/frameloop/render-step.mjs","../../../node_modules/framer-motion/dist/es/frameloop/batcher.mjs","../../../node_modules/framer-motion/dist/es/frameloop/frame.mjs","../../../node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","../../../node_modules/framer-motion/dist/es/render/html/config-motion.mjs","../../../node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs","../../../node_modules/framer-motion/dist/es/events/add-dom-event.mjs","../../../node_modules/framer-motion/dist/es/events/utils/is-primary-pointer.mjs","../../../node_modules/framer-motion/dist/es/events/event-info.mjs","../../../node_modules/framer-motion/dist/es/events/add-pointer-event.mjs","../../../node_modules/framer-motion/dist/es/utils/pipe.mjs","../../../node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs","../../../node_modules/framer-motion/dist/es/motion/features/Feature.mjs","../../../node_modules/framer-motion/dist/es/gestures/hover.mjs","../../../node_modules/framer-motion/dist/es/gestures/focus.mjs","../../../node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs","../../../node_modules/framer-motion/dist/es/gestures/press.mjs","../../../node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","../../../node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs","../../../node_modules/framer-motion/dist/es/motion/features/gestures.mjs","../../../node_modules/framer-motion/dist/es/utils/shallow-compare.mjs","../../../node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs","../../../node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs","../../../node_modules/framer-motion/dist/es/utils/errors.mjs","../../../node_modules/framer-motion/dist/es/utils/time-conversion.mjs","../../../node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs","../../../node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs","../../../node_modules/framer-motion/dist/es/animation/animators/waapi/easing.mjs","../../../node_modules/framer-motion/dist/es/animation/animators/waapi/index.mjs","../../../node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs","../../../node_modules/framer-motion/dist/es/easing/cubic-bezier.mjs","../../../node_modules/framer-motion/dist/es/easing/ease.mjs","../../../node_modules/framer-motion/dist/es/easing/utils/is-easing-array.mjs","../../../node_modules/framer-motion/dist/es/easing/modifiers/mirror.mjs","../../../node_modules/framer-motion/dist/es/easing/modifiers/reverse.mjs","../../../node_modules/framer-motion/dist/es/easing/circ.mjs","../../../node_modules/framer-motion/dist/es/easing/back.mjs","../../../node_modules/framer-motion/dist/es/easing/anticipate.mjs","../../../node_modules/framer-motion/dist/es/easing/utils/map.mjs","../../../node_modules/framer-motion/dist/es/value/types/color/utils.mjs","../../../node_modules/framer-motion/dist/es/value/types/color/rgba.mjs","../../../node_modules/framer-motion/dist/es/value/types/color/hex.mjs","../../../node_modules/framer-motion/dist/es/value/types/color/hsla.mjs","../../../node_modules/framer-motion/dist/es/value/types/color/index.mjs","../../../node_modules/framer-motion/dist/es/utils/mix.mjs","../../../node_modules/framer-motion/dist/es/utils/hsla-to-rgba.mjs","../../../node_modules/framer-motion/dist/es/utils/mix-color.mjs","../../../node_modules/framer-motion/dist/es/value/types/complex/index.mjs","../../../node_modules/framer-motion/dist/es/utils/mix-complex.mjs","../../../node_modules/framer-motion/dist/es/utils/progress.mjs","../../../node_modules/framer-motion/dist/es/utils/interpolate.mjs","../../../node_modules/framer-motion/dist/es/utils/offsets/fill.mjs","../../../node_modules/framer-motion/dist/es/utils/offsets/default.mjs","../../../node_modules/framer-motion/dist/es/utils/offsets/time.mjs","../../../node_modules/framer-motion/dist/es/animation/generators/keyframes.mjs","../../../node_modules/framer-motion/dist/es/utils/velocity-per-second.mjs","../../../node_modules/framer-motion/dist/es/animation/generators/utils/velocity.mjs","../../../node_modules/framer-motion/dist/es/animation/generators/spring/find.mjs","../../../node_modules/framer-motion/dist/es/animation/generators/spring/index.mjs","../../../node_modules/framer-motion/dist/es/animation/generators/inertia.mjs","../../../node_modules/framer-motion/dist/es/animation/animators/js/driver-frameloop.mjs","../../../node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs","../../../node_modules/framer-motion/dist/es/animation/animators/js/index.mjs","../../../node_modules/framer-motion/dist/es/utils/memo.mjs","../../../node_modules/framer-motion/dist/es/animation/animators/waapi/create-accelerated-animation.mjs","../../../node_modules/framer-motion/dist/es/animation/animators/instant.mjs","../../../node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs","../../../node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs","../../../node_modules/framer-motion/dist/es/value/types/complex/filter.mjs","../../../node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs","../../../node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs","../../../node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs","../../../node_modules/framer-motion/dist/es/animation/utils/is-none.mjs","../../../node_modules/framer-motion/dist/es/animation/utils/keyframes.mjs","../../../node_modules/framer-motion/dist/es/animation/utils/transitions.mjs","../../../node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs","../../../node_modules/framer-motion/dist/es/value/use-will-change/is.mjs","../../../node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs","../../../node_modules/framer-motion/dist/es/utils/array.mjs","../../../node_modules/framer-motion/dist/es/utils/subscription-manager.mjs","../../../node_modules/framer-motion/dist/es/value/index.mjs","../../../node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs","../../../node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs","../../../node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs","../../../node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs","../../../node_modules/framer-motion/dist/es/render/utils/setters.mjs","../../../node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs","../../../node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs","../../../node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs","../../../node_modules/framer-motion/dist/es/render/utils/animation-state.mjs","../../../node_modules/framer-motion/dist/es/motion/features/animation/index.mjs","../../../node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs","../../../node_modules/framer-motion/dist/es/motion/features/animations.mjs","../../../node_modules/framer-motion/dist/es/utils/distance.mjs","../../../node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs","../../../node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs","../../../node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs","../../../node_modules/framer-motion/dist/es/projection/geometry/models.mjs","../../../node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs","../../../node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs","../../../node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs","../../../node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs","../../../node_modules/framer-motion/dist/es/projection/utils/measure.mjs","../../../node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs","../../../node_modules/framer-motion/dist/es/gestures/drag/index.mjs","../../../node_modules/framer-motion/dist/es/gestures/pan/index.mjs","../../../node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs","../../../node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","../../../node_modules/framer-motion/dist/es/projection/node/state.mjs","../../../node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs","../../../node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs","../../../node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs","../../../node_modules/framer-motion/dist/es/projection/geometry/copy.mjs","../../../node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs","../../../node_modules/framer-motion/dist/es/projection/geometry/utils.mjs","../../../node_modules/framer-motion/dist/es/projection/shared/stack.mjs","../../../node_modules/framer-motion/dist/es/projection/styles/transform.mjs","../../../node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs","../../../node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs","../../../node_modules/framer-motion/dist/es/utils/delay.mjs","../../../node_modules/framer-motion/dist/es/debug/record.mjs","../../../node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs","../../../node_modules/framer-motion/dist/es/animation/interfaces/single-value.mjs","../../../node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs","../../../node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs","../../../node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs","../../../node_modules/framer-motion/dist/es/motion/features/drag.mjs","../../../node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs","../../../node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs","../../../node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.mjs","../../../node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs","../../../node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs","../../../node_modules/framer-motion/dist/es/render/utils/motion-values.mjs","../../../node_modules/framer-motion/dist/es/render/store.mjs","../../../node_modules/framer-motion/dist/es/render/VisualElement.mjs","../../../node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs","../../../node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs","../../../node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs","../../../node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs","../../../node_modules/framer-motion/dist/es/motion/features/layout.mjs","../../../node_modules/framer-motion/dist/es/render/dom/motion.mjs","../../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs","../../../node_modules/framer-motion/dist/es/utils/use-force-update.mjs","../../../node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs","../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs","../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs","../../../node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs","../../../packages/saas-ui-core/src/banner/banner-transition.tsx","../../../node_modules/@chakra-ui/transition/src/scale-fade.tsx","../../../node_modules/@chakra-ui/transition/src/slide-fade.tsx","../../../packages/saas-ui-core/src/collapse/use-collapse.ts","../../../packages/saas-ui-core/src/structured-list/list.tsx","../../../node_modules/@zag-js/dom-utils/dist/chunk-G2LDCPYT.mjs","../../../packages/saas-ui-core/src/link/link.tsx","../../../packages/saas-ui-core/src/loading-overlay/loading-overlay.tsx","../../../packages/saas-ui-core/src/menu/overflow-menu.tsx","../../../packages/saas-ui-core/src/menu/icons.tsx","../../../packages/saas-ui-core/src/menu/context-menu.tsx","../../../node_modules/@react-aria/interactions/node_modules/clsx/dist/clsx.mjs","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useLayoutEffect.ts","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useEffectEvent.ts","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useId.ts","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/chain.ts","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/domHelpers.ts","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/mergeProps.ts","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/focusWithoutScrolling.ts","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/platform.ts","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/openLink.tsx","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/runAfterTransition.ts","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useGlobalListeners.ts","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useSyncRef.ts","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useViewportSize.ts","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useDescription.ts","../../../node_modules/@react-aria/interactions/node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/isVirtualEvent.ts","../../../node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js","../../../node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js","../../../node_modules/@swc/helpers/esm/_class_private_field_get.js","../../../node_modules/@swc/helpers/esm/_check_private_redeclaration.js","../../../node_modules/@swc/helpers/esm/_class_private_field_init.js","../../../node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js","../../../node_modules/@swc/helpers/esm/_class_private_field_set.js","../../../node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/textSelection.ts","../../../node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/context.ts","../../../node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/usePress.ts","../../../node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/useFocusVisible.ts","../../../node_modules/@react-aria/interactions/dist/packages/@react-aria/interactions/src/useLongPress.ts","../../../node_modules/@zag-js/dom-event/src/get-event-point.ts","../../../packages/saas-ui-core/src/persona/persona.tsx","../../../packages/saas-ui-core/src/property/property.tsx","../../../packages/saas-ui-core/src/navbar/use-navbar.ts","../../../node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useLayoutEffect.ts","../../../node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useId.ts","../../../node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/focusWithoutScrolling.ts","../../../node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/platform.ts","../../../node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/openLink.tsx","../../../node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/runAfterTransition.ts","../../../node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useResizeObserver.ts","../../../node_modules/@react-aria/utils/dist/packages/@react-aria/utils/src/useViewportSize.ts","../../../packages/saas-ui-hooks/src/use-promise.tsx","../../../packages/saas-ui-hooks/src/use-local-storage.ts","../../../packages/saas-ui-hooks/src/use-steps.ts","../../../packages/saas-ui-hooks/src/use-script.ts","../../../packages/saas-ui-hooks/src/use-scroll-position.ts","../../../node_modules/@chakra-ui/react-context/src/index.ts","../../../packages/saas-ui-core/src/navbar/navbar.tsx","../../../packages/saas-ui-react-utils/src/use-responsive-value.ts","../../../packages/saas-ui-react-utils/src/get-child-of-type.ts","../../../packages/saas-ui-react-utils/src/get-children-of-type.ts","../../../packages/saas-ui-core/src/navbar/navbar-brand.tsx","../../../packages/saas-ui-core/src/navbar/navbar-content.tsx","../../../packages/saas-ui-core/src/navbar/navbar-item.tsx","../../../packages/saas-ui-core/src/navbar/navbar-link.tsx","../../../packages/saas-ui-core/src/sidebar/sidebar.tsx","../../../packages/saas-ui-core/src/sidebar/nav.tsx","../../../packages/saas-ui-core/src/sidebar/nav-group.tsx","../../../packages/saas-ui-core/src/sidebar/nav-item.tsx","../../../packages/saas-ui-core/src/search-input/search-input.tsx","../../../packages/saas-ui-core/src/snackbar/use-snackbar.tsx","../../../packages/saas-ui-core/src/snackbar/standalone.tsx","../../../packages/saas-ui-core/src/stepper/steps.tsx","../../../packages/saas-ui-core/src/stepper/use-stepper.tsx","../../../packages/saas-ui-core/src/web3-address/address.tsx","../../../packages/saas-ui-core/src/timeline/timeline.tsx","../../../packages/saas-ui-core/src/icon-badge/icon-badge.tsx","../../../packages/saas-ui-core/src/sidebar/sidebar-utils.ts","../../../node_modules/@chakra-ui/transition/src/transition-utils.ts","../../../packages/saas-ui-core/src/navbar/navbar-context.ts","../../../packages/saas-ui-core/src/sidebar/use-sidebar.ts","../../../packages/saas-ui-core/src/sidebar/sidebar-context.tsx","../../../packages/saas-ui-core/src/sidebar/nav-context.tsx","../../../packages/saas-ui-theme-glass/src/theme.ts","../../../packages/saas-ui-theme-glass/src/foundations/colors.ts","../../../packages/saas-ui-theme-glass/src/foundations/typography.ts","../../../packages/saas-ui-theme-glass/src/foundations/sizes.ts","../../../packages/saas-ui-theme-glass/src/foundations/shadows.ts","../../../packages/saas-ui-theme-glass/src/foundations/semantic-tokens.ts","../../../packages/saas-ui-theme-glass/src/components/alert.ts","../../../packages/saas-ui-theme-glass/src/components/button.ts","../../../packages/saas-ui-theme-glass/src/components/card.ts","../../../packages/saas-ui-theme-glass/src/components/checkbox.ts","../../../packages/saas-ui-theme-glass/src/components/close-button.ts","../../../packages/saas-ui-theme-glass/src/components/drawer.ts","../../../packages/saas-ui-theme-glass/src/components/heading.ts","../../../packages/saas-ui-theme-glass/src/components/kbd.ts","../../../packages/saas-ui-theme-glass/src/components/menu.ts","../../../packages/saas-ui-theme-glass/src/components/modal.ts","../../../packages/saas-ui-theme-glass/src/components/progress.ts","../../../packages/saas-ui-theme-glass/src/components/popover.ts","../../../packages/saas-ui-theme-glass/src/components/radio.ts","../../../packages/saas-ui-theme-glass/src/components/slider.ts","../../../packages/saas-ui-theme-glass/src/components/switch.ts","../../../packages/saas-ui-theme-glass/src/components/tooltip.ts","../../../packages/saas-ui-theme-glass/src/components/form.ts","../../../packages/saas-ui-theme-glass/src/components/index.ts"],"names":["require_react_is_production_min","__commonJSMin","exports","b","c","d","e","f","g","h","k","l","m","n","p","q","r","t","v","w","x","y","z","a","u","A","require_react_is","module","require_hoist_non_react_statics_cjs","reactIs","REACT_STATICS","KNOWN_STATICS","FORWARD_REF_STATICS","MEMO_STATICS","TYPE_STATICS","getStatics","component","defineProperty","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","keys","targetStatics","sourceStatics","i","key","descriptor","require_lodash","LARGE_ARRAY_SIZE","HASH_UNDEFINED","HOT_COUNT","HOT_SPAN","MAX_SAFE_INTEGER","argsTag","arrayTag","asyncTag","boolTag","dateTag","errorTag","funcTag","genTag","mapTag","numberTag","nullTag","objectTag","proxyTag","regexpTag","setTag","stringTag","undefinedTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reRegExpChar","reIsHostCtor","reIsUint","typedArrayTags","freeGlobal","freeSelf","root","freeExports","freeModule","moduleExports","freeProcess","nodeUtil","types","nodeIsTypedArray","apply","func","thisArg","args","baseTimes","iteratee","index","result","baseUnary","value","getValue","object","overArg","transform","arg","arrayProto","funcProto","objectProto","coreJsData","funcToString","hasOwnProperty","maskSrcKey","uid","nativeObjectToString","objectCtorString","reIsNative","Buffer","Symbol","Uint8Array","allocUnsafe","getPrototype","objectCreate","propertyIsEnumerable","splice","symToStringTag","getNative","nativeIsBuffer","nativeMax","nativeNow","Map","nativeCreate","baseCreate","proto","isObject","Hash","entries","length","entry","hashClear","hashDelete","hashGet","data","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","lastIndex","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","size","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","arrayLikeKeys","inherited","isArr","isArray","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","isIndex","assignMergeValue","eq","baseAssignValue","assignValue","objValue","array","baseFor","createBaseFor","baseGetTag","getRawTag","objectToString","baseIsArguments","isObjectLike","baseIsNative","isMasked","pattern","isFunction","toSource","baseIsTypedArray","isLength","baseKeysIn","nativeKeysIn","isProto","isPrototype","baseMerge","source","srcIndex","customizer","stack","srcValue","baseMergeDeep","newValue","safeGet","keysIn","mergeFunc","stacked","isCommon","isTyped","isArrayLikeObject","copyArray","cloneBuffer","cloneTypedArray","isPlainObject","toPlainObject","initCloneObject","baseRest","start","setToString","overRest","identity","baseSetToString","string","constant","buffer","isDeep","cloneArrayBuffer","arrayBuffer","typedArray","copyObject","props","isNew","createAssigner","assigner","sources","guard","isIterateeCall","fromRight","keysFunc","iterable","map","isKeyable","isOwn","tag","unmasked","type","isArrayLike","Ctor","otherArgs","shortOut","count","lastCalled","stamp","remaining","other","stubFalse","mergeWith","require_react_fast_compare","hasElementType","hasMap","hasSet","hasArrayBuffer","equal","it","error","memoize","fn","cache","memoize_browser_esm_default","init_memoize_browser_esm","__esmMin","is_prop_valid_browser_esm_exports","__export","is_prop_valid_browser_esm_default","reactPropsRegex","init_is_prop_valid_browser_esm","prop","React","extendTheme","makeDecorator","addons","useEffect","useColorMode","ADDON_ID","COLOR_MODE_TOOL_ID","DIRECTION_TOOL_ID","THEME_TOOL_ID","EVENTS","ColorModeSync","setColorMode","channel","colorModeToolCallback","useState","useDirection","initialDirection","direction","setDirection","callback","useContext","forwardRef","sheetForTag","createStyleElement","options","StyleSheet","_this","before","_proto","nodes","rule","isImportRule","sheet","MS","MOZ","WEBKIT","COMMENT","RULESET","DECLARATION","IMPORT","KEYFRAMES","LAYER","abs","from","assign","hash","charat","trim","match","replace","replacement","indexof","search","substr","begin","end","strlen","sizeof","append","combine","line","column","position","character","characters","node","parent","children","copy","char","prev","next","peek","caret","slice","token","alloc","dealloc","delimit","delimiter","whitespace","escaping","commenter","identifier","compile","parse","rules","rulesets","pseudo","points","declarations","offset","atrule","property","previous","variable","scanning","ampersand","reference","comment","declaration","ruleset","post","j","serialize","output","stringify","element","middleware","collection","rulesheet","identifierWithPointTracking","toRules","parsed","getRules","fixedElements","compat","isImplicitRule","parentRules","removeLabel","prefix","prefixer","defaultStylisPlugins","createCache","ssrStyles","dataEmotionAttribute","stylisPlugins","inserted","container","nodesToHydrate","attrib","_insert","omnipresentPlugins","currentSheet","finalizingPlugins","serializer","stylis","styles","selector","serialized","shouldCache","_extends","target","isBrowser","getRegisteredStyles","registered","registeredStyles","classNames","rawClassName","className","registerStyles","isStringTag","insertStyles","current","murmur2","str","len","unitlessKeys","hyphenateRegex","animationRegex","isCustomProperty","isProcessableValue","processStyleName","styleName","processStyleValue","p1","p2","cursor","handleInterpolation","mergedProps","interpolation","createStringFromObject","previousCursor","matched","replaced","cached","obj","_key","_i","interpolated","labelPattern","serializeStyles","stringMode","strings","sourceMap","identifierName","name","syncFallback","create","useInsertionEffect","useInsertionEffectAlwaysWithSyncFallback","EmotionCacheContext","CacheProvider","withEmotionCache","ref","ThemeContext","import_hoist_non_react_statics","useTheme","theme","createContext","ColorModeContext","context","useChakra","colorModeResult","__spreadProps","__spreadValues","runIfFn","valueOrFn","import_lodash","isImportant","withoutImportant","tokenToCSSVar","scale","valueStr","important","valueWithoutImportant","transformed","createTransform","transform2","compose","_a","_value","pipe","fns","toConfig","getRtl","rtl","ltr","logical","transformTemplate","getTransformTemplate","getTransformGpuTemplate","filterTemplate","backdropFilterTemplate","getRingTemplate","flexDirectionTemplate","directionMap","valueSet","globalSet","trimSpace","parseGradient","isCSSFunction","results","values","_type","maybeDirection","stops","_values","stop","firstStop","_color","_stop","_stopOrFunc","color2","gradientTransform","isCssVar","analyzeCSSValue","num","unit","wrap","transformFunctions","unitless","isNoneOrZero","space2","divide2","background","border","color","effect","filter","flexbox","grid","interactivity","layout","_b","_c","list","get","path","fallback","memoizedGet","srOnly","srFocusable","getWithPriority","others","ring","space","textDecoration","transition","typography","scroll","resolveReference","operand","toExpression","operator","operands","add","subtract","multiply","divide","negate","calc","replaceWhiteSpace","replaceValue","escape","escapeSymbol","escapeDot","addPrefix","toVarReference","toVarDefinition","cssVar","cssVarPrefix","cssVariable","defineCssVars","scope","keys2","vars","analyzeCSSValue2","px","toMediaQueryString","min","max","query","state","toGroup","merge","toPeer","selectors","pseudoSelectors","pseudoPropNames","systemProps","mergeWith2","layoutSystem","layoutPropNames","propNames","styleProps","isStyleProp","expandResponsive","isResponsive","toArrayValue","medias","computedStyles","queries","media","splitByComma","chunks","chunk","inParens","isCssVar2","isCSSVariableTokenValue","resolveTokenValue","getVar","val","_a2","_b2","tokenValue","fallbackValue","getCss","configs","pseudos","css2","stylesOrFn","nested","_styles","config","mergeWith3","rawValue","configProperty","staticStyles","css","createMultiStyleConfigHelpers","parts","normalize2","toArray","getNextIndex","createResolver","breakpointUtil","normalized","isSingle","isMultipart","nextKey","part","mergeWith4","resolveStyleConfig","variant","recipe","anatomy","called","assert","toPart","extend","classnames","accordionAnatomy","alertAnatomy","avatarAnatomy","breadcrumbAnatomy","buttonAnatomy","checkboxAnatomy","circularProgressAnatomy","drawerAnatomy","editableAnatomy","formAnatomy","formErrorAnatomy","inputAnatomy","listAnatomy","menuAnatomy","modalAnatomy","numberInputAnatomy","pinInputAnatomy","popoverAnatomy","progressAnatomy","radioAnatomy","selectAnatomy","sliderAnatomy","statAnatomy","switchAnatomy","tableAnatomy","tabsAnatomy","tagAnatomy","cardAnatomy","stepperAnatomy","low","high","Math","ColorError","Error","constructor","ColorError$1","parseToRgba","toLowerCase","normalizedColor","namedColorRegex","test","nameToHex","reducedHexMatch","reducedHexRegex","exec","arr","Array","parseInt","hexMatch","hexRegex","rgbaMatch","rgbaRegex","parseFloat","hslaMatch","hslaRegex","s","hslToRgb","Number","isNaN","charCodeAt","colorToInt","compressedColorMap","split","reduce","acc","substring","hex","toString","normalizedColorName","amount","join","RegExp","roundColor","round","hue","saturation","lightness","huePrime","chroma","secondComponent","red","green","blue","lightnessModification","finalRed","finalGreen","finalBlue","rgba","alpha","toFixed","transparentize","toHex","dlv_es_default","def","undef","getColor","opacity","raw","mode","light","dark","isDecimal","toVarRef","toVar","getFallback","dataAttr","condition","cx","omit","objectFilter","filterUndefined","callAllHandlers","event","import_react_fast_compare","useRef","useStyleConfigImpl","themeKey","styleConfigProp","rest","__objRest","colorMode","themeStyleConfig","styleConfig","default2","stylesRef","isEqual","useStyleConfig","allPropNames","validHTMLProps","shouldForwardProp","assignAfter","nextSource","isPropValid","testOmitPropsOnStringTag","testOmitPropsOnComponent","getDefaultShouldForwardProp","composeShouldForwardProps","isReal","optionsShouldForwardProp","propName","Insertion","_ref","createStyled","baseTag","targetClassName","defaultShouldForwardProp","shouldUseAs","Styled","FinalTag","classInterpolations","finalShouldForwardProp","newProps","nextTag","nextOptions","tags","newStyled","tagName","emotion_styled","toCSSObject","baseStyle","cssProp","__css","sx","_","finalBaseStyle","finalStyles","computedCSS","styled","styledOptions","styleObject","Component","forced","factory","argArray","chakra","forwardReactRef","createReactContext","useReactContext","strict","errorMessage","Context","jsx","jsxs","Children","fallbackIcon","Icon","viewBox","focusable","_className","customStyles","shared","_viewBox","_path","createIcon","pathDefinition","displayName","defaultProps","Comp","ChevronUpIcon","ChevronDownIcon","ChevronLeftIcon","ChevronRightIcon","HamburgerIcon","CloseIcon","FilterIcon","CalendarIcon","PlusIcon","MinusIcon","ViewOffIcon","ViewIcon","SearchIcon","CheckIcon","Kbd","Fragment","omitThemingProps","useMultiStyleConfig","ButtonGroup","createStylesContext","ChakraProvider","appShellAnatomy","emptyStateAnatomy","bannerAnatomy","hotkeysAnantomy","loadingOverlayAnatomy","navGroupAnatomy","navItemAnatomy","nprogressAnatomy","personaAnatomy","searchInputAnatomy","sidebarAnatomy","structuredListAnatomy","propertyAnatomy","timelineAnatomy","withDefaultColorScheme","baseTheme","definePartsStyle","defineMultiStyleConfig","appShellTheme","variantSubtle","variantSolid","bannerTheme","commandTheme","variantCentered","emptyStateTheme","horizontalVariant","formTheme","formLayoutTheme","formLegendTheme","hotkeysTheme","variantFill","variantFullscreen","variantOverlay","loadingOverlayTheme","navGroupTheme","variantNeutral","_active","variantLeftAccent","_d","navItemTheme","nprogressTheme","baseStyleLabel","sizes","personaTheme","propertyTheme","searchInputTheme","variantDefault","variantCondensed","sidebarTheme","darkBg","variantOutline","darkColor","variants","badgeTheme","$height","$fontSize","$padding","$borderRadius","getDefaults","fc","ec","variantFilled","variantFlushed","variantUnstyled","inputTheme","selectTheme","structuredListTheme","$rowStart","$rowEnd","$colStart","$colEnd","timelineTheme","iconBadgeTheme","colorScheme","$bg","$color","$linkBg","accessibleColors","navbarTheme","components","colors","colors_default","fonts","fontSizes","textStyles","sizes_default","shadows","shadows_default","semantic_tokens_default","foundations","variantSnackbar","alertTheme","getStateColors","accessibleColorMap","base","hover","active","bg","hoverBg","activeBg","variantElevated","variantGhost","darkHoverBg","darkActiveBg","bgColor","variantLink","variantPrimary","variantSecondary","variantTertiary","buttonTheme","$shadow","$radius","$border","$borderColor","cardTheme","checkboxTheme","closeButtonTheme","inputSizes","outlineVariant","Input","formLabelTheme","numberInputTheme","pinInputTheme","textareaTheme","nativeSelectTheme","headingTheme","kbdTheme","variantDialog","menuTheme","modalTheme","progressTheme","radioTheme","sliderTheme","switchTheme","$fg","$arrowBg","tooltipTheme","$size","$accentColor","$verticalSeperatorOffset","stepperTheme","Flex","useBreakpointValue","useDisclosure","CloseButton","useId","MotionConfigContext","MotionContext","PresenceContext","useLayoutEffect","useIsomorphicLayoutEffect","LazyContext","useVisualElement","visualState","createVisualElement","lazyContext","presenceContext","reducedMotionConfig","visualElementRef","visualElement","canHandoff","useCallback","isRefObject","useMotionRef","externalRef","instance","useMemo","isVariantLabel","isAnimationControls","variantPriorityOrder","variantProps","isControllingVariants","isVariantNode","getCurrentTreeVariants","initial","animate","useCreateMotionContext","variantLabelsAsDependency","featureProps","featureDefinitions","loadFeatures","features","LayoutGroupContext","SwitchLayoutGroupContext","motionComponentSymbol","createMotionComponent","preloadedFeatures","useRender","useVisualState","MotionComponent","MeasureLayout","configAndProps","useLayoutId","isStatic","initialLayoutGroupConfig","isStrict","ForwardRefComponent","layoutId","layoutGroupId","createMotionProxy","createConfig","custom","customMotionComponentConfig","componentCache","_target","lowercaseSVGElements","isSVGComponent","createElement","scaleCorrectors","addScaleCorrector","correctors","transformPropOrder","transformProps","isForcedMotionValue","isMotionValue","translateAlias","numTransforms","buildTransform","enableHardwareAcceleration","allowTransformNone","transformIsDefault","transformString","transformName","checkStringStartsWith","isCSSVariableName","isCSSVariableToken","cssVariableRegex","getValueAsType","clamp","number","sanitize","floatRegex","colorRegex","singleColorRegex","isString","createUnitType","degrees","percent","vh","vw","progressPercentage","int","numberValueTypes","buildHTMLStyles","latestValues","style","transformOrigin","hasTransform","hasTransformOrigin","transformIsNone","valueType","valueAsType","originX","originY","originZ","createHtmlRenderState","copyRawValuesOnly","useInitialMotionValues","useStyle","styleProp","useHTMLProps","htmlProps","validMotionProps","isValidMotionProp","shouldForward","loadExternalIsValidProp","isValidProp","filterProps","isDom","forwardMotionProps","filteredProps","calcOrigin","origin","calcSVGTransformOrigin","dimensions","pxOriginX","pxOriginY","dashKeys","camelKeys","buildSVGPath","attrs","spacing","useDashCase","pathLength","pathSpacing","buildSVGAttrs","isSVGTag","attrX","attrY","attrScale","pathOffset","latest","createSvgRenderState","useSVGProps","_isStatic","visualProps","rawStyles","createUseRender","elementProps","renderedChildren","camelToDash","renderHTML","projection","camelCaseAttributes","renderSVG","renderState","_styleProp","scrapeMotionValuesFromProps","prevProps","newValues","targetKey","resolveVariantFromProps","definition","currentValues","currentVelocity","useConstant","init","isKeyframesTarget","isCustomValue","resolveFinalValueInKeyframes","resolveMotionValue","unwrappedValue","makeState","createRenderState","onMount","makeLatestValues","makeUseVisualState","make","scrapeMotionValues","motionValues","isControllingVariants$1","isVariantNode$1","isInitialAnimationBlocked","variantToSet","resolved","transitionEnd","valueTarget","noop","any","Queue","process","createRenderStep","runNextFrame","thisFrame","nextFrame","numToRun","isProcessing","flushNextFrame","toKeepAlive","step","keepAlive","immediate","addToCurrentFrame","queue","frameData","stepsOrder","maxElapsed","createRenderBatcher","scheduleNextBatch","allowKeepAlive","useDefaultElapsed","steps","processStep","stepId","processBatch","timestamp","wake","frame","cancelFrame","svgMotionConfig","htmlMotionConfig","createDomMotionConfig","baseConfig","addDomEvent","eventName","handler","isPrimaryPointer","extractEventInfo","pointType","addPointerInfo","addPointerEvent","combineFunctions","transformers","createLock","lock","openLock","globalHorizontalLock","globalVerticalLock","getGlobalLock","drag","openHorizontal","openVertical","isDragActive","openGestureLock","Feature","addHoverEvent","isActive","callbackName","handleEvent","info","HoverGesture","FocusGesture","isFocusVisible","isNodeOrChild","child","fireSyntheticPointerEvent","syntheticPointerEvent","PressGesture","startEvent","startInfo","removePointerUpListener","endEvent","endInfo","onTap","onTapCancel","removePointerCancelListener","cancelEvent","cancelInfo","handleKeydown","keydownEvent","handleKeyup","keyupEvent","removeKeydownListener","handleBlur","removeBlurListener","onTapStart","whileTap","removePointerListener","removeFocusListener","observerCallbacks","observers","fireObserverCallback","fireAllObserverCallbacks","initIntersectionObserver","lookupRoot","rootObservers","observeIntersection","rootInteresectionObserver","thresholdNames","InViewFeature","viewport","rootMargin","once","onIntersectionUpdate","isIntersecting","onViewportEnter","onViewportLeave","hasViewportOptionChanged","prevViewport","gestureAnimations","shallowCompare","prevLength","getCurrent","getVelocity","velocity","resolveVariant","optimizedAppearDataId","optimizedAppearDataAttribute","warning","invariant","secondsToMilliseconds","seconds","millisecondsToSeconds","milliseconds","instantAnimationState","isBezierDefinition","easing","isWaapiSupportedEasing","supportedWaapiEasing","cubicBezierAsString","mapEasingToNativeEasing","animateStyle","valueName","keyframes","delay","duration","repeat","repeatType","ease","times","keyframeOptions","getFinalKeyframe","calcBezier","a1","a2","subdivisionPrecision","subdivisionMaxIterations","binarySubdivide","lowerBound","upperBound","mX1","mX2","currentX","currentT","cubicBezier","mY1","mY2","getTForX","aX","easeIn","easeOut","easeInOut","isEasingArray","mirrorEasing","reverseEasing","circIn","circOut","circInOut","backOut","backIn","backInOut","anticipate","easingLookup","easingDefinitionToFunction","x1","y1","x2","y2","isColorString","testProp","splitColor","aName","bName","cName","clampRgbUnit","rgbUnit","alpha$1","parseHex","hsla","mix","to","progress","hueToRgb","hslaToRgba","mixLinearColor","fromExpo","colorTypes","getColorType","asRGBA","model","mixColor","fromRGBA","toRGBA","blended","cssVarTokeniser","colorTokeniser","numberTokeniser","tokenise","regex","countKey","matches","analyseComplexValue","originalValue","parseComplexValue","createTransformer","numColors","numVars","tokenised","numValues","convertNumbersToZero","getAnimatableNone","complex","mixImmediate","getMixer","mixComplex","mixArray","blendValue","fromThis","mixObject","template","originStats","targetStats","toFromDifference","mixNumber","detectMixerFactory","createMixers","customMixer","mixers","mixerFactory","numMixers","mixer","easingFunction","interpolate","input","isClamp","inputLength","interpolator","progressInRange","fillOffset","offsetProgress","defaultOffset","convertOffsetToTimes","o","defaultEasing","keyframeValues","easingFunctions","absoluteTimes","mapTimeToKeyframe","velocityPerSecond","frameDuration","velocitySampleDuration","calcGeneratorVelocity","resolveValue","prevT","safeMin","minDuration","maxDuration","minDamping","maxDamping","findSpring","bounce","mass","envelope","derivative","dampingRatio","undampedFreq","exponentialDecay","delta","calcAngularFreq","initialGuess","approximateRoot","stiffness","rootIterations","durationKeys","physicsKeys","isSpringType","getSpringOptions","springOptions","derived","spring","restDelta","restSpeed","damping","isResolvedFromDuration","initialVelocity","initialDelta","undampedAngularFreq","isGranularScale","resolveSpring","angularFreq","dampedAngularFreq","freqForT","isBelowVelocityThreshold","isBelowDisplacementThreshold","inertia","power","timeConstant","bounceDamping","bounceStiffness","modifyTarget","isOutOfBounds","nearestBoundary","amplitude","ideal","calcDelta","calcLatest","applyFriction","timeReachedBoundary","spring$1","checkCatchBoundary","hasUpdatedFrame","frameloopDriver","update","passTimestamp","calcGeneratorDuration","generator","timeStep","animateValue","autoplay","driver","keyframes$1","repeatDelay","onPlay","onStop","onComplete","onUpdate","speed","hasStopped","resolveFinishedPromise","currentFinishedPromise","updateFinishedPromise","resolve","animationDriver","generatorFactory","mapNumbersToKeyframes","mirroredGenerator","playState","holdTime","startTime","cancelTime","calculatedDuration","resolvedDuration","totalDuration","currentTime","tick","timeWithoutDelay","isInDelayPhase","elapsed","frameGenerator","currentIteration","iterationProgress","iterationIsOdd","done","isAnimationFinished","finish","stopAnimationDriver","cancel","play","now","controls","reject","newTime","newSpeed","memo","supportsWaapi","acceleratedValues","sampleDelta","requiresPregeneratedKeyframes","createAcceleratedAnimation","sampleAnimation","pregeneratedKeyframes","animation","cancelAnimation","safeCancel","timeline","createInstantAnimation","setValue","underDampedSpring","criticallyDampedSpring","keyframesTransition","getDefaultTransition","valueKey","isAnimatable","maxDefaults","applyDefaultFilter","defaultValue","functionRegex","functions","defaultValueTypes","getDefaultValueType","defaultValueType","isZeroValueString","isNone","getKeyframes","isTargetAnimatable","defaultOrigin","animatableTemplateValue","noneKeyframeIndexes","isTransitionDefined","when","_delay","delayChildren","staggerChildren","staggerDirection","getValueTransition","animateMotionValue","valueTransition","originKeyframe","targetKeyframe","isOriginAnimatable","acceleratedAnimation","isWillChangeMotionValue","isNumericalString","addUniqueItem","item","removeItem","SubscriptionManager","numSubscriptions","isFloat","collectMotionValues","MotionValue","render","subscription","unsubscribe","eventManagers","passiveEffect","stopPassiveEffect","startAnimation","motionValue","testValueType","auto","dimensionValueTypes","findDimensionValueType","valueTypes","findValueType","setMotionValue","setTarget","checkTargetForNewValues","newValueKeys","numNewValues","targetValue","getOriginFromTransition","getOrigin","transitionOrigin","shouldBlockAnimation","protectedKeys","needsAnimating","shouldBlock","animateTarget","transitionOverride","willChange","animations","animationTypeState","appearId","animateVariant","getAnimation","getChildAnimations","forwardDelay","animateChildren","first","last","maxStaggerDuration","generateStaggerDuration","sortByTreeOrder","animateVisualElement","resolvedDefinition","reversePriorityOrder","numAnimationTypes","animateList","createAnimationState","createState","isInitialRender","buildResolvedTypeValues","setAnimateFunction","makeAnimator","animateChanges","changedActiveType","removedKeys","encounteredKeys","removedVariantIndex","typeState","propIsVariant","activeDelta","isInherited","variantDidChange","checkVariantsDidChange","shouldAnimateType","definitionList","resolvedValues","prevResolvedValues","allKeys","markToAnimate","fallbackAnimation","fallbackTarget","shouldAnimate","setActive","createTypeState","AnimationFeature","prevAnimate","id","ExitAnimationFeature","isPresent","onExitComplete","prevIsPresent","exitAnimation","register","distance","distance2D","xDelta","yDelta","__pow","PanSession","handlers","transformPagePoint","getPanInfo","isPanStarted","isDistancePastThreshold","point","onStart","onMove","transformPoint","onEnd","onSessionEnd","panInfo","initialInfo","onSessionStart","subtractPoint","history","lastDevicePoint","startDevicePoint","timeDelta","timestampedPoint","lastPoint","time","calcLength","axis","isNear","maxDistance","calcAxisDelta","calcBoxDelta","calcRelativeAxis","relative","calcRelativeBox","calcRelativeAxisPosition","calcRelativePosition","applyConstraints","elastic","calcRelativeAxisConstraints","calcRelativeConstraints","layoutBox","top","left","bottom","right","calcViewportAxisConstraints","layoutAxis","constraintsAxis","calcViewportConstraints","constraintsBox","sourceLength","targetLength","rebaseAxisConstraints","constraints","relativeConstraints","defaultElastic","resolveDragElastic","dragElastic","resolveAxisElastic","minLabel","maxLabel","resolvePointElastic","label","createAxisDelta","createDelta","createAxis","createBox","eachAxis","convertBoundingBoxToBox","convertBoxToBoundingBox","transformBoxPoints","topLeft","bottomRight","isIdentityScale","hasScale","scaleX","scaleY","has2DTranslate","is2DTranslate","scalePoint","originPoint","distanceFromOrigin","scaled","applyPointDelta","translate","boxScale","applyAxisDelta","applyBoxDelta","box","applyTreeDeltas","treeScale","treePath","isSharedTransition","treeLength","transformBox","snapToDefault","translateAxis","transformAxis","transforms","scaleKey","originKey","axisOrigin","xKeys","yKeys","measureViewportBox","measurePageBox","rootProjectionNode","viewportBox","elementDragControls","VisualElementDragControls","originEvent","snapToCursor","dragPropagation","onDragStart","measuredAxis","animationState","dragDirectionLock","onDirectionLock","onDrag","getCurrentDirection","isDragging","onDragEnd","_point","shouldDrag","axisValue","dragConstraints","prevConstraints","onMeasureDragConstraints","constraintsElement","measuredConstraints","userConstraints","dragMomentum","dragTransition","dragSnapToOrigin","onDragTransitionEnd","momentumAnimations","dragKey","externalMotionValue","boxProgress","stopPointerListener","dragListener","measureDragConstraints","stopMeasureLayoutListener","stopResizeListener","stopLayoutUpdateListener","hasLayoutChanged","currentDirection","lockThreshold","DragGesture","dragControls","asyncHandler","PanGesture","pointerDownEvent","onPanSessionStart","onPanStart","onPan","onPanEnd","React__default","usePresence","globalProjectionState","pixelsToPercent","pixels","correctBorderRadius","correctBoxShadow","projectionDelta","original","shadow","xScale","yScale","averageScale","MeasureLayoutWithContext","layoutGroup","switchLayoutGroup","defaultScaleCorrectors","layoutDependency","promoteContext","safeToRemove","borders","numBorders","asNumber","isPx","mixValues","follow","lead","shouldCrossfadeOpacity","isOnlyMember","easeCrossfadeIn","easeCrossfadeOut","borderLabel","followRadius","getRadius","leadRadius","radiusName","compress","copyAxisInto","originAxis","copyBoxInto","originBox","removePointDelta","removeAxisDelta","sourceAxis","removeAxisTransforms","removeBoxTransforms","sourceBox","isAxisDeltaZero","isDeltaZero","boxEquals","boxEqualsRounded","aspectRatio","NodeStack","prevLead","indexOfNode","member","preserveFollowOpacity","crossfade","resumingFrom","buildProjectionTransform","latestTransform","xTranslate","yTranslate","rotate","rotateX","rotateY","elementScaleX","elementScaleY","compareByDepth","FlatTree","timeout","checkElapsed","record","isSVGElement","animateSingleValue","motionValue$1","transformAxes","animationTarget","projectionFrameData","createProjectionNode","attachResizeListener","defaultParent","measureScroll","checkIsScrollRoot","resetTransform","propagateDirtyNodes","resolveTargetDelta","calcProjection","cleanDirtyNodes","subscriptionManager","isLayoutDirty","cancelDelay","resizeUnblockUpdate","finishAnimation","hasRelativeTargetChanged","newLayout","layoutTransition","defaultLayoutTransition","onLayoutAnimationStart","onLayoutAnimationComplete","targetChanged","hasOnlyRelativeTargetChanged","animationOptions","resetRotation","shouldNotifyListeners","clearMeasurements","clearIsLayoutDirty","resetTransformStyle","updateLayout","notifyLayoutUpdate","clearSnapshot","removeLeadSnapshots","prevLayout","phase","needsMeasurement","isResetRequested","hasProjection","transformTemplateValue","transformTemplateHasChanged","removeTransform","pageBox","roundBox","boxWithoutScroll","rootScroll","transformOnly","withTransforms","boxWithoutTransform","nodeBox","forceRecalculation","isShared","relativeParent","canSkip","prevTreeScaleX","prevTreeScaleY","prevProjectionTransform","notifyAll","snapshot","snapshotLatestValues","mixedValues","targetDelta","relativeLayout","snapshotSource","layoutSource","isSharedLayoutAnimation","hasOpacityCrossfade","prevRelativeTarget","mixAxisDelta","mixBox","targetWithTransforms","shouldAnimatePositionOnly","xLength","yLength","needsReset","hasRotate","resetValues","emptyStyles","valuesToRender","correct","applyTo","corrected","measuredLayout","animationType","axisSnapshot","layoutDelta","visualDelta","parentSnapshot","parentLayout","relativeSnapshot","mixAxis","userAgentContains","roundPoint","roundAxis","DocumentProjectionNode","notify","HTMLProjectionNode","documentNode","splitCSSVariableRegex","parseCSSVariable","maxDepth","getVariableValue","depth","trimmed","resolveCSSVariables","positionalKeys","isPositionalKey","hasPositionalKey","isNumOrPxType","getPosFromMatrix","matrix","pos","getTranslateFromMatrix","pos2","pos3","_bbox","matrix3d","transformKeys","nonTranslationalTransformKeys","removeNonTranslationalTransform","removedTransforms","positionalValues","paddingLeft","paddingRight","paddingTop","paddingBottom","convertChangedValueTypes","changedKeys","originBbox","elementComputedStyle","display","targetBbox","checkAndConvertChangedValueTypes","targetPositionalKeys","removedTransformValues","hasAttemptedToRemoveTransformValues","changedValueTypeKeys","fromType","toType","numKeyframes","fromIndex","scrollY","convertedTarget","unitConversion","parseDomVariant","prefersReducedMotion","hasReducedMotionListener","initPrefersReducedMotion","motionMediaQuery","setReducedMotionPreferences","updateMotionValuesFromProps","nextValue","prevValue","existingValue","latestValue","visualElementStore","featureNames","numFeatures","propEventHandlers","numVariantProps","VisualElement","initialMotionValues","_props","_prevProps","remove","valueIsTransform","removeOnChange","removeOnRenderRequest","renderedProps","ProjectionNodeConstructor","isEnabled","FeatureConstructor","ProjectionNode","MeasureLayoutComponent","layoutScroll","layoutRoot","feature","canMutate","listener","startAtParent","closestVariantNode","valueFromInitial","DOMVisualElement","transformValues","isMounted","getComputedStyle","HTMLVisualElement","defaultType","computedStyle","SVGVisualElement","createDomVisualElement","motion","cloneElement","isValidElement","useIsMounted","useForceUpdate","forcedRenderCount","setForcedRenderCount","forceRender","PopChildMeasure","PopChild","width","height","PresenceChild","presenceAffectsLayout","presenceChildren","newChildrenMap","childId","isComplete","useUnmountEffect","getChildKey","updateChildLookup","allChildren","onlyElements","filtered","AnimatePresence","exitBeforeEnter","filteredChildren","childrenToRender","exitingChildren","presentChildren","presentKeys","targetKeys","numPresent","insertionIndex","exitingComponent","onExit","leftOverKeys","childKey","leftOverKey","presentChild","presentChildKey","useColorModeValue","useMergeRefs","queryAll","itemById","indexOfId","nextById","loop","idx","prevById","ChakraLink","Spinner","fadeConfig","Menu","MenuButton","MenuList","IconButton","MenuItem","useMenuContext","useEventListener","useOutsideClick","clsx","clsx_default","$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c","$12uGp$react","$8ae05eaa5c114e9c$export$7f54fc3180508a52","$12uGp$useRef","$12uGp$useCallback","$bdb11010cef70236$var$canUseDOM","$bdb11010cef70236$var$idsUpdaterMap","$bdb11010cef70236$export$cd8c9cb68f842629","idA","idB","setIdA","setIdB","$ff5963eb1fccf552$export$e08e3b67e392101e","callbacks","$431fbd86ca7dc216$export$b204af158042fbac","el","_el_ownerDocument","$431fbd86ca7dc216$export$f21a1ffae260145a","$3ef42575df84b30b$export$9d1611c77c2fe928","$7215afc6de606d6b$export$de79e2c695e052f3","$7215afc6de606d6b$var$supportsPreventScroll","scrollableElements","$7215afc6de606d6b$var$getScrollableElements","$7215afc6de606d6b$var$restoreScrollPosition","$7215afc6de606d6b$var$supportsPreventScrollCached","focusElem","rootScrollingElement","scrollTop","scrollLeft","$c87311424ea30a05$var$testUserAgent","re","_window_navigator_userAgentData","brand","$c87311424ea30a05$var$testPlatform","$c87311424ea30a05$export$9ac100e40613ea10","$c87311424ea30a05$export$186c6964ca17d99","$c87311424ea30a05$export$7bef049ce92e4224","$c87311424ea30a05$export$fedb369cb70207f1","$c87311424ea30a05$export$78551043582a6a98","$c87311424ea30a05$export$6446a186d09e379e","$c87311424ea30a05$export$a11b0059900ceec8","$c87311424ea30a05$export$b7d78993b74f766d","$ea8dcbcb9ea1b556$export$95185d699e05d4d7","modifiers","setOpening","_window_event_type","_window_event","metaKey","ctrlKey","altKey","shiftKey","$bbed8b41f857bcc0$var$transitionsByElement","$bbed8b41f857bcc0$var$transitionCallbacks","$bbed8b41f857bcc0$var$setupGlobalEvents","onTransitionStart","transitions","onTransitionEnd","properties","cb","$bbed8b41f857bcc0$export$24490316f764c430","$03deb23ff14920c4$export$4eaf04e54aa8eed6","globalListeners","addGlobalListener","eventTarget","removeGlobalListener","_globalListeners_current_get","removeAllGlobalListeners","$12uGp$useEffect","$e7801be82b4b2a53$export$4debdb1a3f0fa79e","$5df64b3807dc15ee$var$visualViewport","$ef06256079686ba0$var$descriptionId","$ef06256079686ba0$var$descriptionNodes","$ef06256079686ba0$export$f8aeda7b10753fa1","description","setId","$12uGp$useState","desc","$6a7db85432448f7f$export$60278871457622de","$6a7db85432448f7f$export$29bf1b5f2c56cf63","_class_apply_descriptor_get","receiver","_class_extract_field_descriptor","privateMap","action","_class_private_field_get","_check_private_redeclaration","privateCollection","_class_private_field_init","_class_apply_descriptor_set","_class_private_field_set","$14c0b72509d70225$var$state","$14c0b72509d70225$var$savedUserSelect","$14c0b72509d70225$var$modifiedElementMap","$14c0b72509d70225$export$16a4697467175487","documentObject","$14c0b72509d70225$export$b0d6fa1ab32e3295","targetOldUserSelect","$ae1eeba8b9eafd08$export$5165eccb35aaadb5","$bx7SL$react","$f6c31cce2adf654f$var$usePressResponderContext","$bx7SL$useContext","contextProps","$f6c31cce2adf654f$var$_shouldStopPropagation","$f6c31cce2adf654f$var$PressEvent","pointerType","originalEvent","$f6c31cce2adf654f$var$LINK_CLICKED","$f6c31cce2adf654f$export$45712eceda6fad21","onPress","onPressChange","onPressStart","onPressEnd","onPressUp","isDisabled","isPressedProp","preventFocusOnPress","shouldCancelOnPointerExit","allowTextSelectionOnPress","domProps","isPressed","setPressed","$bx7SL$useState","$bx7SL$useRef","triggerPressStart","shouldStopPropagation","triggerPressEnd","wasPressed","triggerPressUp","$f6c31cce2adf654f$var$createEvent","cancelOnPointerExit","pressProps","$bx7SL$useMemo","$f6c31cce2adf654f$var$isValidKeyboardEvent","_state_metaKeyEvents","$f6c31cce2adf654f$var$shouldPreventDefaultKeyboard","onKeyUp","stopPressStart","stopPressUp","stopPressEnd","_state_metaKeyEvents1","$f6c31cce2adf654f$var$isHTMLAnchorLink","_state_target","events","$f6c31cce2adf654f$var$shouldPreventDefault","onPointerMove","onPointerUp","onPointerCancel","$f6c31cce2adf654f$var$isOverTarget","onMouseUp","touch","$f6c31cce2adf654f$var$getTouchFromEvent","onScroll","$f6c31cce2adf654f$var$getTouchById","$bx7SL$useEffect","_ref_current_target","currentTarget","code","role","$f6c31cce2adf654f$var$isValidInputKey","targetTouches","pointerId","changedTouches","$f6c31cce2adf654f$var$getPointClientRect","offsetX","offsetY","$f6c31cce2adf654f$var$areRectanglesOverlapping","rect","pointRect","$f6c31cce2adf654f$var$nonTextInputTypes","$507fabe10e71c6fb$var$currentModality","$507fabe10e71c6fb$var$changeHandlers","$507fabe10e71c6fb$var$hasSetupGlobalListeners","$507fabe10e71c6fb$var$hasEventBeforeFocus","$507fabe10e71c6fb$var$hasBlurredWindowRecently","$507fabe10e71c6fb$var$triggerChangeHandlers","modality","$507fabe10e71c6fb$var$isValidKey","$507fabe10e71c6fb$var$handleKeyboardEvent","$507fabe10e71c6fb$var$handlePointerEvent","$507fabe10e71c6fb$var$handleClickEvent","$507fabe10e71c6fb$var$handleFocusEvent","$507fabe10e71c6fb$var$handleWindowBlur","$507fabe10e71c6fb$var$setupGlobalFocusEvents","focus","$8a26561d2877236e$var$DEFAULT_THRESHOLD","$8a26561d2877236e$export$c24ed0104d07eab9","onLongPressStart","onLongPressEnd","onLongPress","threshold","accessibilityDescription","timeRef","onContextMenu","descriptionProps","pointFromTouch","pointFromMouse","isTouchEvent","getEventPoint","Avatar","AvatarBadge","Tooltip","List","useImperativeHandle","$9daab02d461809db$var$hasResizeObserver","$9daab02d461809db$export$683480f191c0e3ea","onResize","resizeObserverInstance","getChildOfType","getChildrenOfType","normalize","useResponsiveValue","Portal","Collapse","InputGroup","InputLeftElement","InputRightElement","useControllableState","useToast","Alert","AlertIcon","AlertTitle","AlertDescription","createStandaloneToast","Stepper","StepSeparator","Step","StepIndicator","StepStatus","StepIcon","StepNumber","Box","StepTitle","StepDescription","StylesProvider","useStyles","EmptyState","icon","title","actions","footer","EmptyStateContainer","EmptyStateBody","EmptyStateIcon","EmptyStateTitle","EmptyStateDescription","EmptyStateActions","EmptyStateFooter","containerProps","containerStyles","iconStyles","titleStyles","descriptionStyles","bodyStyles","SaasContext","SaasProvider","linkComponent","onError","theme2","useSaas","Link","useLink","ErrorBoundary","errorInfo","getBreakpoints","breakpoint","AppShellProvider","useAppShellContext","useAppShell","disclosure","breakpoints","isMobile","AppShell","navbar","sidebar","aside","mainRef","innerStyles","mainStyles","isSidebar","InfoIcon","WarningIcon","TRANSITION_EASINGS","TRANSITION_DEFAULTS","withDelay","reverse","initialScale","scaleFadeConfig","ScaleFade","unmountOnExit","isOpen","show","slideFadeConfig","SlideFade","defaultTransition","Motion","BannerTransition","motionPreset","preset","motionProps","STATUSES","BannerProvider","useBannerContext","Banner","status","onClose","BannerContent","BannerTitle","BannerDescription","BannerActions","BannerIcon","statusIcon","BannerCloseButton","onClick","CollapseProvider","useCollapseContext","useCollapse","isCollapsible","onToggle","onOpen","getToggleProps","getCollapseProps","StructuredListProvider","useStructuredListContext","queryAllItems","useStructuredList","focusId","setFocusId","StructuredList","items","listProps","content","StructuredListItem","listStyles","StructuredListHeader","level","headerStyles","href","as","isButton","ContentWrapper","StructuredListButton","disablePadding","itemStyles","useStructuredListButton","containerId","containerRef","buttonId","isFocused","keyMap","buttonProps","buttonStyles","StructuredListIcon","_icon","StructuredListCell","LinkComponent","LoadingOverlay","isLoading","overlayStyles","animateInitial","MoreIcon","OverflowMenu","menuListProps","ContextMenuProvider","useContextMenuContext","useContextMenu","closeOnBlur","setIsOpen","anchor","setAnchor","triggerRef","menuRef","ContextMenu","ctx","fnProps","generateClientRect","useContextMenuTrigger","menu","popper","openAndFocusFirstItem","longPressProps","anchorRef","ContextMenuTrigger","triggerProps","ContextMenuList","Presence","defaultPresenceTokens","Persona","presence","presenceIcon","isOutOfOffice","secondaryLabel","tertiaryLabel","hideDetails","getInitials","iconLabel","ignoreFallback","loading","src","srcSet","isComposed","PersonaContainer","PersonaAvatar","PersonaDetails","PersonaLabel","PersonaSecondaryLabel","PersonaTertiaryLabel","_e","presenceLabel","badgeSize","badgeProps","badge","semantic","detailsStyles","Property","labelWidth","propertyStyles","PropertyLabel","PropertyValue","noOfLines","minWidth","labelStyles","valueStyles","PropertyList","getScrollPosition","useScrollPosition","elementRef","throttleTimeout","currPos","handleScroll","useNavbar","parentRef","shouldHideOnScroll","disableScrollHandler","onScrollPositionChange","prevWidth","navHeight","isHidden","setIsHidden","updateWidth","prevPos","getErrorMessage","hook","provider","hookName","providerName","NavbarProvider","useNavbarContext","NavBarStylesProvider","useNavBarStyles","MotionBox","Navbar","otherProps","NavbarBrand","NavbarContent","contentStyles","NavbarItem","NavbarLink","SidebarProvider","useSidebarContext","useSidebarToggleButton","appShellContext","getButtonProps","SidebarStylesProvider","useSidebarStyles","motionPresets","Sidebar","isCondensed","toggleBreakpoint","isOpenProp","onOpenProp","onCloseProp","appShell","isMobileInitial","isInitial","isControlled","SidebarToggleButton","isRound","btnStyles","SidebarSection","sectionStyles","Nav","orientation","NavGroupStylesProvider","useNavGroupStyles","NavItemStylesProvider","useNavItemStyles","NavGroupIcon","_children","NavGroupTitle","leftIcon","collapseIcon","toggleProps","NavGroupContent","NavGroup","defaultIsOpen","collapse","header","NavItemLabel","NavItemIcon","clone","NavItem","inset","tooltipProps","sidebarVariant","isCompact","tooltipLabel","link","SearchInput","placeholder","valueProp","defaultValueProp","resetIcon","rightElement","onChangeProp","onResetProp","onKeyDownProp","inputProps","inputRef","onChange","onKeyDown","onReset","btnSize","StepperProvider","useStepperContext","useStepper","activeIndex","setIndex","stepsRef","registerStep","newSteps","unregisterStep","setStep","nextStep","prevStep","useStep","isCompleted","activeStep","Steps","stepperProps","isVertical","StepsItem","elements","StepsContent","completed","StepsCompleted","hasContent","completedStyles","Web3Address","address","startLength","endLength","Timeline","timelineStyles","TimelineItem","TimelineContent","TimelineSeparator","separatorStyles","TimelineDot","dotStyles","TimelineIcon","TimelineTrack","IconBadge","ariaLabel","itemProps","setItem","getItem","serializeJSON","deserializeJSON","triggerCustomEvent","detail","useLocalStorage","deserialize","initRef","isCustom","eventKey","serializedValue","$b","getBg","getBorder","alert_default","hoverColor","button_default","variantShadow","isHoverable","card_default","checkbox_default","close_button_default","baseStyleOverlay","baseStyleDialog","baseStyleHeader","baseStyleCloseButton","baseStyleBody","baseStyleFooter","drawer_default","heading_default","kbd_default","baseStyleList","baseStyleItem","baseStyleGroupTitle","baseStyleButton","baseStyleDivider","menu_default","modal_default","progress_default","$popperBg","$arrowShadowColor","baseStyleContent","popoverTheme","popover_default","radio_default","slider_default","baseStyleTrack","baseStyleThumb","switch_default","tooltip_default","components_default","glassTheme","useThemeSync","themeId","setTheme","themeCallback","ChakraProviderDecorator","getStory","parameters","saasuiParams","globalDirection","getTheme","baseTheme2","themeOverride","chakraTheme","themeWithDirectionOverride"],"mappings":"wrCAAA,IAAAA,GAAAC,GAAAC,GAAA,cASa,IAAIC,GAAe,OAAO,QAApB,YAA4B,OAAO,IAAIC,GAAED,GAAE,OAAO,IAAI,eAAe,EAAE,MAAME,GAAEF,GAAE,OAAO,IAAI,cAAc,EAAE,MAAMG,GAAEH,GAAE,OAAO,IAAI,gBAAgB,EAAE,MAAMI,GAAEJ,GAAE,OAAO,IAAI,mBAAmB,EAAE,MAAMK,GAAEL,GAAE,OAAO,IAAI,gBAAgB,EAAE,MAAMM,GAAEN,GAAE,OAAO,IAAI,gBAAgB,EAAE,MAAMO,GAAEP,GAAE,OAAO,IAAI,eAAe,EAAE,MAAMQ,GAAER,GAAE,OAAO,IAAI,kBAAkB,EAAE,MAAMS,GAAET,GAAE,OAAO,IAAI,uBAAuB,EAAE,MAAMU,GAAEV,GAAE,OAAO,IAAI,mBAAmB,EAAE,MAAMW,GAAEX,GAAE,OAAO,IAAI,gBAAgB,EAAE,MAAMY,GAAEZ,GACpf,OAAO,IAAI,qBAAqB,EAAE,MAAMa,GAAEb,GAAE,OAAO,IAAI,YAAY,EAAE,MAAMc,GAAEd,GAAE,OAAO,IAAI,YAAY,EAAE,MAAMe,GAAEf,GAAE,OAAO,IAA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UACP,IAAO,SACT,EACA,IAAK,CACH,GAAM,UACN,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,SACT,EACA,OAAQ,CACN,GAAM,UACN,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,SACT,EACA,OAAQ,CACN,GAAM,UACN,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,SACT,EACA,MAAO,CACL,GAAM,UACN,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,SACT,EACA,KAAM,CACJ,GAAM,UACN,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,SACT,EACA,KAAM,CACJ,GAAM,UACN,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,SACT,EACA,KAAM,CACJ,GAAM,UACN,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,SACT,EACA,OAAQ,CACN,GAAM,UACN,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,SACT,CACF,EAEOC,GAAQve,EAAA,CACb,QAASse,GAAO,OAChB,UAAWA,GAAO,MACfA,IC3IQE,GAAQ,CACnB,QAAS,mCACT,KAAM,kCACR,EAEaC,GAAY,CACvB,MAAO,UACP,MAAO,WACP,GAAI,UACJ,GAAI,YACJ,GAAI,WACJ,GAAI,OACJ,GAAI,WACJ,MAA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,QAAS,CAAE,CAAChhF,EAAiB,EAAGihF,CAAgB,CAClD,EAAI/0E,EAEEw0E,EAAUD,GAAa,EAEvBS,EAAiB,eAAY,IAAM,CACvC,OAAQR,EAAS,CACf,IAAK,IACH,OAAOzW,GACT,IAAK,IACH,OAAOuW,GACT,QACE,OAAOW,EACX,CACF,EAAG,CAACT,CAAO,CAAC,EAEN30E,GAAQi1E,GAAA,YAAAA,EAAc,QAASE,EAAS,EACxCE,EAAgB,CAAC,EAACJ,GAAA,MAAAA,EAAc,OAEhCK,EAAcL,GAAA,MAAAA,EAAc,MAC9B,OAAOA,EAAa,OAAU,WAC5BA,EAAa,MAAM90E,CAAO,EAC1B80E,EAAa,MACfj1E,EACErL,EAAYF,GAAaygF,IAAmBI,GAAA,YAAAA,EAAa,UAAS,EAClEC,EAAmC,WACvC,IACE7hF,GACE,CACE,UAAAiB,EACA,OAAQ,CACN,OAAQ,CACN,KAAM,CACJ,UAAW,kBACb,CACF,CACF,CACF,EACA2gF,CACF,EACF,CAACA,EAAa3gF,CAAS,CACzB,EAEA,OACE6iB,GAACumD,GAAAz9D,EAAAC,EAAA,GAAiB00E,GAAjB,CAA+B,MAAOM,EACrC,UAAAh+D,GAACnjB,GAAA,EAAc,EACd2gF,EAAS50E,CAAO,IACnB,CAEJ,CACF,CAAC","sourcesContent":["/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/**\n * Lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeMax = Math.max,\n nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = mergeWith;\n","/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.3\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n // START: Modifications:\n // Apply guards for `Object.create(null)` handling. See:\n // - https://github.com/FormidableLabs/react-fast-compare/issues/64\n // - https://github.com/epoberezkin/fast-deep-equal/issues/49\n if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();\n // END: Modifications\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (((error.message || '').match(/stack|recursion/i))) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n","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","import * as React from 'react'\n\nimport { extendTheme } from '@chakra-ui/react'\nimport { makeDecorator, addons } from '@storybook/preview-api'\nimport { ColorModeSync } from './color-mode/ColorModeSync'\nimport { useDirection } from './direction/useDirection'\nimport { EVENTS, DIRECTION_TOOL_ID } from './constants'\n\nimport { SaasProvider, useLocalStorage } from '@saas-ui/react'\n\nimport { baseTheme, theme as suiTheme } from '@saas-ui/theme'\nimport { theme as baseGlassTheme } from '@saas-ui/theme-glass'\n\nconst glassTheme = extendTheme(baseGlassTheme, suiTheme)\n\nconst useThemeSync = () => {\n const [themeId, setTheme] = useLocalStorage('storybook.theme', '1')\n\n React.useEffect(() => {\n const channel = addons.getChannel()\n const themeCallback = (value: string) => {\n setTheme(value)\n }\n channel.on(EVENTS.SET_THEME, themeCallback)\n\n return () => {\n channel.removeListener(EVENTS.SET_THEME, themeCallback)\n }\n }, [setTheme])\n\n return themeId\n}\n\nexport const ChakraProviderDecorator = makeDecorator({\n name: 'ChakraProviderDecorator',\n parameterName: 'chakra',\n skipIfNoParametersOrOptions: false,\n wrapper: (getStory, context, { parameters }) => {\n const {\n parameters: { saasui: saasuiParams },\n globals: { [DIRECTION_TOOL_ID]: globalDirection },\n } = context\n\n const themeId = useThemeSync()\n\n const getTheme = React.useCallback(() => {\n switch (themeId) {\n case '1':\n return suiTheme\n case '2':\n return glassTheme\n default:\n return baseTheme\n }\n }, [themeId])\n\n const theme = saasuiParams?.theme || getTheme()\n const themeOverride = !!saasuiParams?.theme\n\n const chakraTheme = saasuiParams?.theme\n ? typeof saasuiParams.theme === 'function'\n ? saasuiParams.theme(context)\n : saasuiParams.theme\n : theme\n const direction = useDirection(globalDirection || chakraTheme?.direction)\n const themeWithDirectionOverride = React.useMemo(\n () =>\n extendTheme(\n {\n direction,\n styles: {\n global: {\n body: {\n minHeight: 'var(--chakra-vh)',\n },\n },\n },\n },\n chakraTheme\n ),\n [chakraTheme, direction]\n )\n\n return (\n <SaasProvider {...saasuiParams} theme={themeWithDirectionOverride}>\n <ColorModeSync />\n {getStory(context)}\n </SaasProvider>\n )\n },\n})\n","import { useEffect } from 'react'\nimport { useColorMode } from '@chakra-ui/react'\nimport { addons } from '@storybook/preview-api'\nimport { EVENTS } from '../constants'\n\n/**\n * Render <ColorModeSync /> to sync the storybook color mode with Chakra UI\n */\nexport function ColorModeSync() {\n const { setColorMode } = useColorMode()\n\n useEffect(() => {\n const channel = addons.getChannel()\n\n const colorModeToolCallback = (value: string) => setColorMode(value)\n channel.on(EVENTS.TOGGLE_COLOR_MODE, colorModeToolCallback)\n\n return () => {\n channel.removeListener(EVENTS.TOGGLE_COLOR_MODE, colorModeToolCallback)\n }\n }, [setColorMode])\n\n return null\n}\n","export const ADDON_ID = '@saas-ui/storybook-addon2'\nexport const COLOR_MODE_TOOL_ID = `${ADDON_ID}/color-mode-tool`\nexport const DIRECTION_TOOL_ID = `${ADDON_ID}/direction-tool`\nexport const THEME_TOOL_ID = `${ADDON_ID}/theme-tool`\n\nexport const EVENTS = {\n TOGGLE_COLOR_MODE: `${ADDON_ID}/toggleColorMode`,\n TOGGLE_DIRECTION: `${ADDON_ID}/toggleDirection`,\n SET_THEME: `${ADDON_ID}/setTheme`,\n}\n","import { useEffect, useState } from 'react'\nimport { addons } from '@storybook/preview-api'\nimport { EVENTS } from '../constants'\n\n/**\n * Sync the layout direction to the html element\n */\nexport const useDirection = (initialDirection: 'ltr' | 'rtl' = 'ltr') => {\n const [direction, setDirection] = useState(initialDirection.toLowerCase())\n\n useEffect(() => {\n document.documentElement.dir = direction\n }, [direction])\n\n useEffect(() => {\n const channel = addons.getChannel()\n const callback = (value: string) => setDirection(value)\n channel.on(EVENTS.TOGGLE_DIRECTION, callback)\n return () => {\n channel.removeListener(EVENTS.TOGGLE_DIRECTION, callback)\n }\n }, [setDirection])\n\n return direction\n}\n","import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar isBrowser = \"object\" !== 'undefined';\nvar hasOwnProperty = {}.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nif (process.env.NODE_ENV !== 'production') {\n EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nif (!isBrowser) {\n withEmotionCache = function withEmotionCache(func) {\n return function (props) {\n var cache = useContext(EmotionCacheContext);\n\n if (cache === null) {\n // yes, we're potentially creating this on every render\n // it doesn't actually matter though since it's only on the server\n // so there will only every be a single render\n // that could change in the future because of suspense and etc. but for now,\n // this works and i don't want to optimise for a future thing that we aren't sure about\n cache = createCache({\n key: 'css'\n });\n return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {\n value: cache\n }, func(props, cache));\n } else {\n return func(props, cache);\n }\n };\n };\n}\n\nvar ThemeContext = /* #__PURE__ */React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production' && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n\n return mergedTheme;\n }\n\n if (process.env.NODE_ENV !== 'production' && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/React.forwardRef(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar getLastPart = function getLastPart(functionName) {\n // The match may be something like 'Object.createEmotionProps' or\n // 'Loader.prototype.render'\n var parts = functionName.split('.');\n return parts[parts.length - 1];\n};\n\nvar getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {\n // V8\n var match = /^\\s+at\\s+([A-Za-z0-9$.]+)\\s/.exec(line);\n if (match) return getLastPart(match[1]); // Safari / Firefox\n\n match = /^([A-Za-z0-9$.]+)@/.exec(line);\n if (match) return getLastPart(match[1]);\n return undefined;\n};\n\nvar internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS\n// identifiers, thus we only need to replace what is a valid character for JS,\n// but not for CSS.\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {\n if (!stackTrace) return undefined;\n var lines = stackTrace.split('\\n');\n\n for (var i = 0; i < lines.length; i++) {\n var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just \"Error\"\n\n if (!functionName) continue; // If we reach one of these, we have gone too far and should quit\n\n if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an\n // uppercase letter\n\n if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);\n }\n\n return undefined;\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when\n // the label hasn't already been computed\n\n if (process.env.NODE_ENV !== 'production' && !!props.css && (typeof props.css !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {\n var label = getLabelFromStackTrace(new Error().stack);\n if (label) newProps[labelPropName] = label;\n }\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nvar Emotion$1 = Emotion;\n\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwnProperty as h, isBrowser as i, useTheme as u, withEmotionCache as w };\n","/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n // $FlowFixMe\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n // $FlowFixMe\n return document.styleSheets[i];\n }\n }\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (process.env.NODE_ENV !== 'production') {\n var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;\n\n if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {\n // this would only cause problem in speedy mode\n // but we don't want enabling speedy to affect the observable behavior\n // so we report this error at all times\n console.error(\"You're attempting to insert the following rule:\\n\" + rule + '\\n\\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');\n }\n this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;\n }\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {\n console.error(\"There was a problem inserting the following rule: \\\"\" + rule + \"\\\"\", e);\n }\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n // $FlowFixMe\n this.tags.forEach(function (tag) {\n return tag.parentNode && tag.parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n\n if (process.env.NODE_ENV !== 'production') {\n this._alreadyInsertedOrderInsensitiveRule = false;\n }\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, COMMENT, rulesheet, middleware, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value,\n parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\nvar ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';\n\nvar isIgnoringComment = function isIgnoringComment(element) {\n return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;\n};\n\nvar createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {\n return function (element, index, children) {\n if (element.type !== 'rule' || cache.compat) return;\n var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);\n\n if (unsafePseudoClasses) {\n var isNested = !!element.parent; // in nested rules comments become children of the \"auto-inserted\" rule and that's always the `element.parent`\n //\n // considering this input:\n // .a {\n // .b /* comm */ {}\n // color: hotpink;\n // }\n // we get output corresponding to this:\n // .a {\n // & {\n // /* comm */\n // color: hotpink;\n // }\n // .b {}\n // }\n\n var commentContainer = isNested ? element.parent.children : // global rule at the root level\n children;\n\n for (var i = commentContainer.length - 1; i >= 0; i--) {\n var node = commentContainer[i];\n\n if (node.line < element.line) {\n break;\n } // it is quite weird but comments are *usually* put at `column: element.column - 1`\n // so we seek *from the end* for the node that is earlier than the rule's `element` and check that\n // this will also match inputs like this:\n // .a {\n // /* comm */\n // .b {}\n // }\n //\n // but that is fine\n //\n // it would be the easiest to change the placement of the comment to be the first child of the rule:\n // .a {\n // .b { /* comm */ }\n // }\n // with such inputs we wouldn't have to search for the comment at all\n // TODO: consider changing this comment placement in the next major version\n\n\n if (node.column < element.column) {\n if (isIgnoringComment(node)) {\n return;\n }\n\n break;\n }\n }\n\n unsafePseudoClasses.forEach(function (unsafePseudoClass) {\n console.error(\"The pseudo class \\\"\" + unsafePseudoClass + \"\\\" is potentially unsafe when doing server-side rendering. Try changing it to \\\"\" + unsafePseudoClass.split('-child')[0] + \"-of-type\\\".\");\n });\n }\n };\n};\n\nvar isImportRule = function isImportRule(element) {\n return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;\n};\n\nvar isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {\n for (var i = index - 1; i >= 0; i--) {\n if (!isImportRule(children[i])) {\n return true;\n }\n }\n\n return false;\n}; // use this to remove incorrect elements from further processing\n// so they don't get handed to the `sheet` (or anything else)\n// as that could potentially lead to additional logs which in turn could be overhelming to the user\n\n\nvar nullifyElement = function nullifyElement(element) {\n element.type = '';\n element.value = '';\n element[\"return\"] = '';\n element.children = '';\n element.props = '';\n};\n\nvar incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {\n if (!isImportRule(element)) {\n return;\n }\n\n if (element.parent) {\n console.error(\"`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.\");\n nullifyElement(element);\n } else if (isPrependedWithRegularRules(index, children)) {\n console.error(\"`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.\");\n nullifyElement(element);\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return WEBKIT + value + MS + value + value;\n }\n\n return value;\n}\n\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function createCache(options) {\n var key = options.key;\n\n if (process.env.NODE_ENV !== 'production' && !key) {\n throw new Error(\"You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\\n\" + \"If multiple caches share the same key they might \\\"fight\\\" for each other's style elements.\");\n }\n\n if (key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe\n if (/[^a-z-]/.test(key)) {\n throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n }\n }\n\n var inserted = {};\n var container;\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' '); // $FlowFixMe\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n\n var omnipresentPlugins = [compat, removeLabel];\n\n if (process.env.NODE_ENV !== 'production') {\n omnipresentPlugins.push(createUnsafeSelectorsAlarm({\n get compat() {\n return cache.compat;\n }\n\n }), incorrectImportAlarm);\n }\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {\n if (!element.root) {\n if (element[\"return\"]) {\n currentSheet.insert(element[\"return\"]);\n } else if (element.value && element.type !== COMMENT) {\n // insert empty rule in non-production environments\n // so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet\n currentSheet.insert(element.value + \"{}\");\n }\n }\n } : rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n\n if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {\n currentSheet = {\n insert: function insert(rule) {\n sheet.insert(rule + serialized.map);\n }\n };\n }\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport { createCache as default };\n","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","var isBrowser = \"object\" !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nif (process.env.NODE_ENV !== 'production') {\n var contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\\(|(no-)?(open|close)-quote/;\n var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];\n var oldProcessStyleValue = processStyleValue;\n var msPattern = /^-ms-/;\n var hyphenPattern = /-(.)/g;\n var hyphenatedCache = {};\n\n processStyleValue = function processStyleValue(key, value) {\n if (key === 'content') {\n if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n throw new Error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n }\n }\n\n var processed = oldProcessStyleValue(key, value);\n\n if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {\n hyphenatedCache[key] = true;\n console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {\n return _char.toUpperCase();\n }) + \"?\");\n }\n\n return processed;\n };\n}\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n if (interpolation.__emotion_styles !== undefined) {\n if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {\n throw new Error(noComponentSelectorMessage);\n }\n\n return interpolation;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n if (interpolation.anim === 1) {\n cursor = {\n name: interpolation.name,\n styles: interpolation.styles,\n next: cursor\n };\n return interpolation.name;\n }\n\n if (interpolation.styles !== undefined) {\n var next = interpolation.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = interpolation.styles + \";\";\n\n if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {\n styles += interpolation.map;\n }\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Functions that are interpolated in css calls will be stringified.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n }\n\n break;\n }\n\n case 'string':\n if (process.env.NODE_ENV !== 'production') {\n var matched = [];\n var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {\n var fakeVarName = \"animation\" + matched.length;\n matched.push(\"const \" + fakeVarName + \" = keyframes`\" + p2.replace(/^@keyframes animation-\\w+/, '') + \"`\");\n return \"${\" + fakeVarName + \"}\";\n });\n\n if (matched.length) {\n console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\\n\\n' + 'Instead of doing this:\\n\\n' + [].concat(matched, [\"`\" + replaced + \"`\"]).join('\\n') + '\\n\\nYou should wrap it with `css` like this:\\n\\n' + (\"css`\" + replaced + \"`\"));\n }\n }\n\n break;\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n if (registered == null) {\n return interpolation;\n }\n\n var cached = registered[interpolation];\n return cached !== undefined ? cached : interpolation;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var _key in obj) {\n var value = obj[_key];\n\n if (typeof value !== 'object') {\n if (registered != null && registered[value] !== undefined) {\n string += _key + \"{\" + registered[value] + \"}\";\n } else if (isProcessableValue(value)) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n }\n } else {\n if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (_key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(_key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {\n console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);\n }\n\n string += _key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*(;|$)/g;\nvar sourceMapPattern;\n\nif (process.env.NODE_ENV !== 'production') {\n sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//g;\n} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[i];\n }\n }\n\n var sourceMap;\n\n if (process.env.NODE_ENV !== 'production') {\n styles = styles.replace(sourceMapPattern, function (match) {\n sourceMap = match;\n return '';\n });\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + // $FlowFixMe we know it's not null\n match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)\n return {\n name: name,\n styles: styles,\n map: sourceMap,\n next: cursor,\n toString: function toString() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n }\n };\n }\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n};\n\nexport { serializeStyles };\n","import * as React from 'react';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n","import { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isBrowser$1 } from './emotion-element-c39617d8.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-c39617d8.browser.esm.js';\nimport * as React from 'react';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { serializeStyles } from '@emotion/serialize';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport 'hoist-non-react-statics';\n\nvar pkg = {\n\tname: \"@emotion/react\",\n\tversion: \"11.11.1\",\n\tmain: \"dist/emotion-react.cjs.js\",\n\tmodule: \"dist/emotion-react.esm.js\",\n\tbrowser: {\n\t\t\"./dist/emotion-react.esm.js\": \"./dist/emotion-react.browser.esm.js\"\n\t},\n\texports: {\n\t\t\".\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./dist/emotion-react.worker.esm.js\",\n\t\t\t\tbrowser: \"./dist/emotion-react.browser.esm.js\",\n\t\t\t\t\"default\": \"./dist/emotion-react.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./dist/emotion-react.cjs.mjs\",\n\t\t\t\"default\": \"./dist/emotion-react.cjs.js\"\n\t\t},\n\t\t\"./jsx-runtime\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js\",\n\t\t\t\tbrowser: \"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js\",\n\t\t\t\t\"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs\",\n\t\t\t\"default\": \"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js\"\n\t\t},\n\t\t\"./_isolated-hnrs\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js\",\n\t\t\t\tbrowser: \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js\",\n\t\t\t\t\"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs\",\n\t\t\t\"default\": \"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js\"\n\t\t},\n\t\t\"./jsx-dev-runtime\": {\n\t\t\tmodule: {\n\t\t\t\tworker: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js\",\n\t\t\t\tbrowser: \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js\",\n\t\t\t\t\"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js\"\n\t\t\t},\n\t\t\t\"import\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs\",\n\t\t\t\"default\": \"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js\"\n\t\t},\n\t\t\"./package.json\": \"./package.json\",\n\t\t\"./types/css-prop\": \"./types/css-prop.d.ts\",\n\t\t\"./macro\": {\n\t\t\ttypes: {\n\t\t\t\t\"import\": \"./macro.d.mts\",\n\t\t\t\t\"default\": \"./macro.d.ts\"\n\t\t\t},\n\t\t\t\"default\": \"./macro.js\"\n\t\t}\n\t},\n\ttypes: \"types/index.d.ts\",\n\tfiles: [\n\t\t\"src\",\n\t\t\"dist\",\n\t\t\"jsx-runtime\",\n\t\t\"jsx-dev-runtime\",\n\t\t\"_isolated-hnrs\",\n\t\t\"types/*.d.ts\",\n\t\t\"macro.*\"\n\t],\n\tsideEffects: false,\n\tauthor: \"Emotion Contributors\",\n\tlicense: \"MIT\",\n\tscripts: {\n\t\t\"test:typescript\": \"dtslint types\"\n\t},\n\tdependencies: {\n\t\t\"@babel/runtime\": \"^7.18.3\",\n\t\t\"@emotion/babel-plugin\": \"^11.11.0\",\n\t\t\"@emotion/cache\": \"^11.11.0\",\n\t\t\"@emotion/serialize\": \"^1.1.2\",\n\t\t\"@emotion/use-insertion-effect-with-fallbacks\": \"^1.0.1\",\n\t\t\"@emotion/utils\": \"^1.2.1\",\n\t\t\"@emotion/weak-memoize\": \"^0.3.1\",\n\t\t\"hoist-non-react-statics\": \"^3.3.1\"\n\t},\n\tpeerDependencies: {\n\t\treact: \">=16.8.0\"\n\t},\n\tpeerDependenciesMeta: {\n\t\t\"@types/react\": {\n\t\t\toptional: true\n\t\t}\n\t},\n\tdevDependencies: {\n\t\t\"@definitelytyped/dtslint\": \"0.0.112\",\n\t\t\"@emotion/css\": \"11.11.0\",\n\t\t\"@emotion/css-prettifier\": \"1.1.3\",\n\t\t\"@emotion/server\": \"11.11.0\",\n\t\t\"@emotion/styled\": \"11.11.0\",\n\t\t\"html-tag-names\": \"^1.1.2\",\n\t\treact: \"16.14.0\",\n\t\t\"svg-tag-names\": \"^1.1.1\",\n\t\ttypescript: \"^4.5.5\"\n\t},\n\trepository: \"https://github.com/emotion-js/emotion/tree/main/packages/react\",\n\tpublishConfig: {\n\t\taccess: \"public\"\n\t},\n\t\"umd:main\": \"dist/emotion-react.umd.min.js\",\n\tpreconstruct: {\n\t\tentrypoints: [\n\t\t\t\"./index.js\",\n\t\t\t\"./jsx-runtime.js\",\n\t\t\t\"./jsx-dev-runtime.js\",\n\t\t\t\"./_isolated-hnrs.js\"\n\t\t],\n\t\tumdName: \"emotionReact\",\n\t\texports: {\n\t\t\tenvConditions: [\n\t\t\t\t\"browser\",\n\t\t\t\t\"worker\"\n\t\t\t],\n\t\t\textra: {\n\t\t\t\t\"./types/css-prop\": \"./types/css-prop.d.ts\",\n\t\t\t\t\"./macro\": {\n\t\t\t\t\ttypes: {\n\t\t\t\t\t\t\"import\": \"./macro.d.mts\",\n\t\t\t\t\t\t\"default\": \"./macro.d.ts\"\n\t\t\t\t\t},\n\t\t\t\t\t\"default\": \"./macro.js\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar jsx = function jsx(type, props) {\n var args = arguments;\n\n if (props == null || !hasOwnProperty.call(props, 'css')) {\n // $FlowFixMe\n return React.createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n } // $FlowFixMe\n\n\n return React.createElement.apply(null, createElementArgArray);\n};\n\nvar warnedAboutCssPropForGlobal = false; // maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is\n // probably using the custom createElement which\n // means it will be turned into a className prop\n // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n props.className || props.css)) {\n console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n warnedAboutCssPropForGlobal = true;\n }\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));\n\n if (!isBrowser$1) {\n var _ref;\n\n var serializedNames = serialized.name;\n var serializedStyles = serialized.styles;\n var next = serialized.next;\n\n while (next !== undefined) {\n serializedNames += ' ' + next.name;\n serializedStyles += next.styles;\n next = next.next;\n }\n\n var shouldCache = cache.compat === true;\n var rules = cache.insert(\"\", {\n name: serializedNames,\n styles: serializedStyles\n }, cache.sheet, shouldCache);\n\n if (shouldCache) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"style\", (_ref = {}, _ref[\"data-emotion\"] = cache.key + \"-global \" + serializedNames, _ref.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref.nonce = cache.sheet.nonce, _ref));\n } // yes, i know these hooks are used conditionally\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = React.useRef();\n useInsertionEffectWithLayoutFallback(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false; // $FlowFixMe\n\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Global.displayName = 'EmotionGlobal';\n}\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nvar keyframes = function keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {\n console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.');\n }\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n useInsertionEffectAlwaysWithSyncFallback(function () {\n\n for (var i = 0; i < serializedArr.length; i++) {\n insertStyles(cache, serializedArr[i], false);\n }\n });\n\n return null;\n};\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n\n var css = function css() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n});\n\nif (process.env.NODE_ENV !== 'production') {\n ClassNames.displayName = 'EmotionClassNames';\n}\n\nif (process.env.NODE_ENV !== 'production') {\n var isBrowser = \"object\" !== 'undefined'; // #1727, #2905 for some reason Jest and Vitest evaluate modules twice if some consuming module gets mocked\n\n var isTestEnv = typeof jest !== 'undefined' || typeof vi !== 'undefined';\n\n if (isBrowser && !isTestEnv) {\n // globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later\n var globalContext = // $FlowIgnore\n typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef\n : isBrowser ? window : global;\n var globalKey = \"__EMOTION_REACT_\" + pkg.version.split('.')[0] + \"__\";\n\n if (globalContext[globalKey]) {\n console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');\n }\n\n globalContext[globalKey] = true;\n }\n}\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","import { WithCSSVar } from \"@chakra-ui/styled-system\"\nimport { Dict } from \"@chakra-ui/utils\"\nimport { ThemeContext } from \"@emotion/react\"\nimport { useContext } from \"react\"\n\n/**\n * `useTheme` is a custom hook used to get the theme object from context.\n *\n * @see Docs https://chakra-ui.com/docs/hooks/use-theme\n */\nexport function useTheme<T extends object = Dict>() {\n const theme = useContext(\n ThemeContext as unknown as React.Context<T | undefined>,\n )\n if (!theme) {\n throw Error(\n \"useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`\",\n )\n }\n\n return theme as WithCSSVar<T>\n}\n","import { createContext, useContext } from \"react\"\nimport { ColorModeContextType } from \"./color-mode-types\"\n\nexport const ColorModeContext = createContext({} as ColorModeContextType)\n\nColorModeContext.displayName = \"ColorModeContext\"\n\n/**\n * React hook that reads from `ColorModeProvider` context\n * Returns the color mode and function to toggle it\n */\nexport function useColorMode() {\n const context = useContext(ColorModeContext)\n if (context === undefined) {\n throw new Error(\"useColorMode must be used within a ColorModeProvider\")\n }\n return context\n}\n\n/**\n * Change value based on color mode.\n *\n * @param light the light mode value\n * @param dark the dark mode value\n *\n * @example\n *\n * ```js\n * const Icon = useColorModeValue(MoonIcon, SunIcon)\n * ```\n */\nexport function useColorModeValue<TLight = unknown, TDark = unknown>(\n light: TLight,\n dark: TDark,\n) {\n const { colorMode } = useColorMode()\n return colorMode === \"dark\" ? dark : light\n}\n","import { useColorMode } from \"@chakra-ui/color-mode\"\nimport { Dict, StringOrNumber } from \"@chakra-ui/utils\"\nimport { useTheme } from \"./use-theme\"\n\nexport function useChakra<T extends Dict = Dict>() {\n const colorModeResult = useColorMode()\n const theme = useTheme() as T\n return { ...colorModeResult, theme }\n}\n\nfunction getBreakpointValue<T extends StringOrNumber>(\n theme: Dict,\n value: T,\n fallback: any,\n) {\n if (value == null) return value\n const getValue = (val: T) => theme.__breakpoints?.asArray?.[val]\n return getValue(value) ?? getValue(fallback) ?? fallback\n}\n\nfunction getTokenValue<T extends StringOrNumber>(\n theme: Dict,\n value: T,\n fallback: any,\n) {\n if (value == null) return value\n const getValue = (val: T) => theme.__cssMap?.[val]?.value\n return getValue(value) ?? getValue(fallback) ?? fallback\n}\n\n/**\n * `useToken` is a custom hook used to resolve design tokens from the theme.\n *\n * @see Docs https://chakra-ui.com/docs/hooks/use-token\n */\nexport function useToken<T extends StringOrNumber | StringOrNumber[]>(\n scale: string,\n token: T,\n fallback?: T,\n) {\n const theme = useTheme()\n return getToken(scale, token, fallback)(theme)\n}\n\nexport function getToken<T extends StringOrNumber | StringOrNumber[]>(\n scale: string,\n token: T,\n fallback?: T,\n): (theme: Dict) => T {\n const _token = Array.isArray(token) ? token : [token]\n const _fallback = Array.isArray(fallback) ? fallback : [fallback]\n return (theme: Dict<any>) => {\n const fallbackArr = _fallback.filter(Boolean) as T[]\n const result = _token.map((token, index) => {\n if (scale === \"breakpoints\") {\n return getBreakpointValue(theme, token, fallbackArr[index] ?? token)\n }\n const path = `${scale}.${token}`\n return getTokenValue(theme, path, fallbackArr[index] ?? token)\n })\n return Array.isArray(token) ? result : result[0]\n }\n}\n","// src/index.ts\nvar cx = (...classNames) => classNames.filter(Boolean).join(\" \");\nfunction isDev() {\n return process.env.NODE_ENV !== \"production\";\n}\nfunction isObject(value) {\n const type = typeof value;\n return value != null && (type === \"object\" || type === \"function\") && !Array.isArray(value);\n}\nvar warn = (options) => {\n const { condition, message } = options;\n if (condition && isDev()) {\n console.warn(message);\n }\n};\nfunction runIfFn(valueOrFn, ...args) {\n return isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;\n}\nvar isFunction = (value) => typeof value === \"function\";\nvar dataAttr = (condition) => condition ? \"\" : void 0;\nvar ariaAttr = (condition) => condition ? true : void 0;\nfunction callAllHandlers(...fns) {\n return function func(event) {\n fns.some((fn) => {\n fn == null ? void 0 : fn(event);\n return event == null ? void 0 : event.defaultPrevented;\n });\n };\n}\nfunction callAll(...fns) {\n return function mergedFn(arg) {\n fns.forEach((fn) => {\n fn == null ? void 0 : fn(arg);\n });\n };\n}\nexport {\n ariaAttr,\n callAll,\n callAllHandlers,\n cx,\n dataAttr,\n isObject,\n runIfFn,\n warn\n};\n","// src/utils/create-transform.ts\nimport { isObject } from \"@chakra-ui/shared-utils\";\nvar isImportant = (value) => /!(important)?$/.test(value);\nvar withoutImportant = (value) => typeof value === \"string\" ? value.replace(/!(important)?$/, \"\").trim() : value;\nvar tokenToCSSVar = (scale, value) => (theme) => {\n const valueStr = String(value);\n const important = isImportant(valueStr);\n const valueWithoutImportant = withoutImportant(valueStr);\n const key = scale ? `${scale}.${valueWithoutImportant}` : valueWithoutImportant;\n let transformed = isObject(theme.__cssMap) && key in theme.__cssMap ? theme.__cssMap[key].varRef : value;\n transformed = withoutImportant(transformed);\n return important ? `${transformed} !important` : transformed;\n};\nfunction createTransform(options) {\n const { scale, transform: transform2, compose } = options;\n const fn = (value, theme) => {\n var _a;\n const _value = tokenToCSSVar(scale, value)(theme);\n let result = (_a = transform2 == null ? void 0 : transform2(_value, theme)) != null ? _a : _value;\n if (compose) {\n result = compose(result, theme);\n }\n return result;\n };\n return fn;\n}\n\n// src/utils/pipe.ts\nvar pipe = (...fns) => (v) => fns.reduce((a, b) => b(a), v);\n\n// src/utils/prop-config.ts\nfunction toConfig(scale, transform2) {\n return (property) => {\n const result = { property, scale };\n result.transform = createTransform({\n scale,\n transform: transform2\n });\n return result;\n };\n}\nvar getRtl = ({ rtl, ltr }) => (theme) => theme.direction === \"rtl\" ? rtl : ltr;\nfunction logical(options) {\n const { property, scale, transform: transform2 } = options;\n return {\n scale,\n property: getRtl(property),\n transform: scale ? createTransform({\n scale,\n compose: transform2\n }) : transform2\n };\n}\n\n// src/utils/templates.ts\nvar transformTemplate = [\n \"rotate(var(--chakra-rotate, 0))\",\n \"scaleX(var(--chakra-scale-x, 1))\",\n \"scaleY(var(--chakra-scale-y, 1))\",\n \"skewX(var(--chakra-skew-x, 0))\",\n \"skewY(var(--chakra-skew-y, 0))\"\n];\nfunction getTransformTemplate() {\n return [\n \"translateX(var(--chakra-translate-x, 0))\",\n \"translateY(var(--chakra-translate-y, 0))\",\n ...transformTemplate\n ].join(\" \");\n}\nfunction getTransformGpuTemplate() {\n return [\n \"translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)\",\n ...transformTemplate\n ].join(\" \");\n}\nvar filterTemplate = {\n \"--chakra-blur\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-brightness\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-contrast\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-grayscale\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-hue-rotate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-invert\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-saturate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-sepia\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-drop-shadow\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n filter: [\n \"var(--chakra-blur)\",\n \"var(--chakra-brightness)\",\n \"var(--chakra-contrast)\",\n \"var(--chakra-grayscale)\",\n \"var(--chakra-hue-rotate)\",\n \"var(--chakra-invert)\",\n \"var(--chakra-saturate)\",\n \"var(--chakra-sepia)\",\n \"var(--chakra-drop-shadow)\"\n ].join(\" \")\n};\nvar backdropFilterTemplate = {\n backdropFilter: [\n \"var(--chakra-backdrop-blur)\",\n \"var(--chakra-backdrop-brightness)\",\n \"var(--chakra-backdrop-contrast)\",\n \"var(--chakra-backdrop-grayscale)\",\n \"var(--chakra-backdrop-hue-rotate)\",\n \"var(--chakra-backdrop-invert)\",\n \"var(--chakra-backdrop-opacity)\",\n \"var(--chakra-backdrop-saturate)\",\n \"var(--chakra-backdrop-sepia)\"\n ].join(\" \"),\n \"--chakra-backdrop-blur\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-brightness\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-contrast\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-grayscale\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-hue-rotate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-invert\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-opacity\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-saturate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-sepia\": \"var(--chakra-empty,/*!*/ /*!*/)\"\n};\nfunction getRingTemplate(value) {\n return {\n \"--chakra-ring-offset-shadow\": `var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)`,\n \"--chakra-ring-shadow\": `var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)`,\n \"--chakra-ring-width\": value,\n boxShadow: [\n `var(--chakra-ring-offset-shadow)`,\n `var(--chakra-ring-shadow)`,\n `var(--chakra-shadow, 0 0 #0000)`\n ].join(\", \")\n };\n}\nvar flexDirectionTemplate = {\n \"row-reverse\": {\n space: \"--chakra-space-x-reverse\",\n divide: \"--chakra-divide-x-reverse\"\n },\n \"column-reverse\": {\n space: \"--chakra-space-y-reverse\",\n divide: \"--chakra-divide-y-reverse\"\n }\n};\n\n// src/utils/parse-gradient.ts\nvar directionMap = {\n \"to-t\": \"to top\",\n \"to-tr\": \"to top right\",\n \"to-r\": \"to right\",\n \"to-br\": \"to bottom right\",\n \"to-b\": \"to bottom\",\n \"to-bl\": \"to bottom left\",\n \"to-l\": \"to left\",\n \"to-tl\": \"to top left\"\n};\nvar valueSet = new Set(Object.values(directionMap));\nvar globalSet = /* @__PURE__ */ new Set([\n \"none\",\n \"-moz-initial\",\n \"inherit\",\n \"initial\",\n \"revert\",\n \"unset\"\n]);\nvar trimSpace = (str) => str.trim();\nfunction parseGradient(value, theme) {\n if (value == null || globalSet.has(value))\n return value;\n const prevent = isCSSFunction(value) || globalSet.has(value);\n if (!prevent)\n return `url('${value}')`;\n const regex = /(^[a-z-A-Z]+)\\((.*)\\)/g;\n const results = regex.exec(value);\n const type = results == null ? void 0 : results[1];\n const values = results == null ? void 0 : results[2];\n if (!type || !values)\n return value;\n const _type = type.includes(\"-gradient\") ? type : `${type}-gradient`;\n const [maybeDirection, ...stops] = values.split(\",\").map(trimSpace).filter(Boolean);\n if ((stops == null ? void 0 : stops.length) === 0)\n return value;\n const direction = maybeDirection in directionMap ? directionMap[maybeDirection] : maybeDirection;\n stops.unshift(direction);\n const _values = stops.map((stop) => {\n if (valueSet.has(stop))\n return stop;\n const firstStop = stop.indexOf(\" \");\n const [_color, _stop] = firstStop !== -1 ? [stop.substr(0, firstStop), stop.substr(firstStop + 1)] : [stop];\n const _stopOrFunc = isCSSFunction(_stop) ? _stop : _stop && _stop.split(\" \");\n const key = `colors.${_color}`;\n const color2 = key in theme.__cssMap ? theme.__cssMap[key].varRef : _color;\n return _stopOrFunc ? [\n color2,\n ...Array.isArray(_stopOrFunc) ? _stopOrFunc : [_stopOrFunc]\n ].join(\" \") : color2;\n });\n return `${_type}(${_values.join(\", \")})`;\n}\nvar isCSSFunction = (value) => {\n return typeof value === \"string\" && value.includes(\"(\") && value.includes(\")\");\n};\nvar gradientTransform = (value, theme) => parseGradient(value, theme != null ? theme : {});\n\n// src/utils/transform-functions.ts\nfunction isCssVar(value) {\n return /^var\\(--.+\\)$/.test(value);\n}\nvar analyzeCSSValue = (value) => {\n const num = parseFloat(value.toString());\n const unit = value.toString().replace(String(num), \"\");\n return { unitless: !unit, value: num, unit };\n};\nvar wrap = (str) => (value) => `${str}(${value})`;\nvar transformFunctions = {\n filter(value) {\n return value !== \"auto\" ? value : filterTemplate;\n },\n backdropFilter(value) {\n return value !== \"auto\" ? value : backdropFilterTemplate;\n },\n ring(value) {\n return getRingTemplate(transformFunctions.px(value));\n },\n bgClip(value) {\n return value === \"text\" ? { color: \"transparent\", backgroundClip: \"text\" } : { backgroundClip: value };\n },\n transform(value) {\n if (value === \"auto\")\n return getTransformTemplate();\n if (value === \"auto-gpu\")\n return getTransformGpuTemplate();\n return value;\n },\n vh(value) {\n return value === \"$100vh\" ? \"var(--chakra-vh)\" : value;\n },\n px(value) {\n if (value == null)\n return value;\n const { unitless } = analyzeCSSValue(value);\n return unitless || typeof value === \"number\" ? `${value}px` : value;\n },\n fraction(value) {\n return !(typeof value === \"number\") || value > 1 ? value : `${value * 100}%`;\n },\n float(value, theme) {\n const map = { left: \"right\", right: \"left\" };\n return theme.direction === \"rtl\" ? map[value] : value;\n },\n degree(value) {\n if (isCssVar(value) || value == null)\n return value;\n const unitless = typeof value === \"string\" && !value.endsWith(\"deg\");\n return typeof value === \"number\" || unitless ? `${value}deg` : value;\n },\n gradient: gradientTransform,\n blur: wrap(\"blur\"),\n opacity: wrap(\"opacity\"),\n brightness: wrap(\"brightness\"),\n contrast: wrap(\"contrast\"),\n dropShadow: wrap(\"drop-shadow\"),\n grayscale: wrap(\"grayscale\"),\n hueRotate: (value) => wrap(\"hue-rotate\")(transformFunctions.degree(value)),\n invert: wrap(\"invert\"),\n saturate: wrap(\"saturate\"),\n sepia: wrap(\"sepia\"),\n bgImage(value) {\n if (value == null)\n return value;\n const prevent = isCSSFunction(value) || globalSet.has(value);\n return !prevent ? `url(${value})` : value;\n },\n outline(value) {\n const isNoneOrZero = String(value) === \"0\" || String(value) === \"none\";\n return value !== null && isNoneOrZero ? { outline: \"2px solid transparent\", outlineOffset: \"2px\" } : { outline: value };\n },\n flexDirection(value) {\n var _a;\n const { space: space2, divide: divide2 } = (_a = flexDirectionTemplate[value]) != null ? _a : {};\n const result = { flexDirection: value };\n if (space2)\n result[space2] = 1;\n if (divide2)\n result[divide2] = 1;\n return result;\n }\n};\n\n// src/utils/index.ts\nvar t = {\n borderWidths: toConfig(\"borderWidths\"),\n borderStyles: toConfig(\"borderStyles\"),\n colors: toConfig(\"colors\"),\n borders: toConfig(\"borders\"),\n gradients: toConfig(\"gradients\", transformFunctions.gradient),\n radii: toConfig(\"radii\", transformFunctions.px),\n space: toConfig(\"space\", pipe(transformFunctions.vh, transformFunctions.px)),\n spaceT: toConfig(\"space\", pipe(transformFunctions.vh, transformFunctions.px)),\n degreeT(property) {\n return { property, transform: transformFunctions.degree };\n },\n prop(property, scale, transform2) {\n return {\n property,\n scale,\n ...scale && {\n transform: createTransform({ scale, transform: transform2 })\n }\n };\n },\n propT(property, transform2) {\n return { property, transform: transform2 };\n },\n sizes: toConfig(\"sizes\", pipe(transformFunctions.vh, transformFunctions.px)),\n sizesT: toConfig(\"sizes\", pipe(transformFunctions.vh, transformFunctions.fraction)),\n shadows: toConfig(\"shadows\"),\n logical,\n blur: toConfig(\"blur\", transformFunctions.blur)\n};\n\n// src/config/background.ts\nvar background = {\n background: t.colors(\"background\"),\n backgroundColor: t.colors(\"backgroundColor\"),\n backgroundImage: t.gradients(\"backgroundImage\"),\n backgroundSize: true,\n backgroundPosition: true,\n backgroundRepeat: true,\n backgroundAttachment: true,\n backgroundClip: { transform: transformFunctions.bgClip },\n bgSize: t.prop(\"backgroundSize\"),\n bgPosition: t.prop(\"backgroundPosition\"),\n bg: t.colors(\"background\"),\n bgColor: t.colors(\"backgroundColor\"),\n bgPos: t.prop(\"backgroundPosition\"),\n bgRepeat: t.prop(\"backgroundRepeat\"),\n bgAttachment: t.prop(\"backgroundAttachment\"),\n bgGradient: t.gradients(\"backgroundImage\"),\n bgClip: { transform: transformFunctions.bgClip }\n};\nObject.assign(background, {\n bgImage: background.backgroundImage,\n bgImg: background.backgroundImage\n});\n\n// src/config/border.ts\nvar border = {\n border: t.borders(\"border\"),\n borderWidth: t.borderWidths(\"borderWidth\"),\n borderStyle: t.borderStyles(\"borderStyle\"),\n borderColor: t.colors(\"borderColor\"),\n borderRadius: t.radii(\"borderRadius\"),\n borderTop: t.borders(\"borderTop\"),\n borderBlockStart: t.borders(\"borderBlockStart\"),\n borderTopLeftRadius: t.radii(\"borderTopLeftRadius\"),\n borderStartStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderTopLeftRadius\",\n rtl: \"borderTopRightRadius\"\n }\n }),\n borderEndStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderBottomLeftRadius\",\n rtl: \"borderBottomRightRadius\"\n }\n }),\n borderTopRightRadius: t.radii(\"borderTopRightRadius\"),\n borderStartEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderTopRightRadius\",\n rtl: \"borderTopLeftRadius\"\n }\n }),\n borderEndEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderBottomRightRadius\",\n rtl: \"borderBottomLeftRadius\"\n }\n }),\n borderRight: t.borders(\"borderRight\"),\n borderInlineEnd: t.borders(\"borderInlineEnd\"),\n borderBottom: t.borders(\"borderBottom\"),\n borderBlockEnd: t.borders(\"borderBlockEnd\"),\n borderBottomLeftRadius: t.radii(\"borderBottomLeftRadius\"),\n borderBottomRightRadius: t.radii(\"borderBottomRightRadius\"),\n borderLeft: t.borders(\"borderLeft\"),\n borderInlineStart: {\n property: \"borderInlineStart\",\n scale: \"borders\"\n },\n borderInlineStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: [\"borderTopLeftRadius\", \"borderBottomLeftRadius\"],\n rtl: [\"borderTopRightRadius\", \"borderBottomRightRadius\"]\n }\n }),\n borderInlineEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: [\"borderTopRightRadius\", \"borderBottomRightRadius\"],\n rtl: [\"borderTopLeftRadius\", \"borderBottomLeftRadius\"]\n }\n }),\n borderX: t.borders([\"borderLeft\", \"borderRight\"]),\n borderInline: t.borders(\"borderInline\"),\n borderY: t.borders([\"borderTop\", \"borderBottom\"]),\n borderBlock: t.borders(\"borderBlock\"),\n borderTopWidth: t.borderWidths(\"borderTopWidth\"),\n borderBlockStartWidth: t.borderWidths(\"borderBlockStartWidth\"),\n borderTopColor: t.colors(\"borderTopColor\"),\n borderBlockStartColor: t.colors(\"borderBlockStartColor\"),\n borderTopStyle: t.borderStyles(\"borderTopStyle\"),\n borderBlockStartStyle: t.borderStyles(\"borderBlockStartStyle\"),\n borderBottomWidth: t.borderWidths(\"borderBottomWidth\"),\n borderBlockEndWidth: t.borderWidths(\"borderBlockEndWidth\"),\n borderBottomColor: t.colors(\"borderBottomColor\"),\n borderBlockEndColor: t.colors(\"borderBlockEndColor\"),\n borderBottomStyle: t.borderStyles(\"borderBottomStyle\"),\n borderBlockEndStyle: t.borderStyles(\"borderBlockEndStyle\"),\n borderLeftWidth: t.borderWidths(\"borderLeftWidth\"),\n borderInlineStartWidth: t.borderWidths(\"borderInlineStartWidth\"),\n borderLeftColor: t.colors(\"borderLeftColor\"),\n borderInlineStartColor: t.colors(\"borderInlineStartColor\"),\n borderLeftStyle: t.borderStyles(\"borderLeftStyle\"),\n borderInlineStartStyle: t.borderStyles(\"borderInlineStartStyle\"),\n borderRightWidth: t.borderWidths(\"borderRightWidth\"),\n borderInlineEndWidth: t.borderWidths(\"borderInlineEndWidth\"),\n borderRightColor: t.colors(\"borderRightColor\"),\n borderInlineEndColor: t.colors(\"borderInlineEndColor\"),\n borderRightStyle: t.borderStyles(\"borderRightStyle\"),\n borderInlineEndStyle: t.borderStyles(\"borderInlineEndStyle\"),\n borderTopRadius: t.radii([\"borderTopLeftRadius\", \"borderTopRightRadius\"]),\n borderBottomRadius: t.radii([\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\"\n ]),\n borderLeftRadius: t.radii([\"borderTopLeftRadius\", \"borderBottomLeftRadius\"]),\n borderRightRadius: t.radii([\n \"borderTopRightRadius\",\n \"borderBottomRightRadius\"\n ])\n};\nObject.assign(border, {\n rounded: border.borderRadius,\n roundedTop: border.borderTopRadius,\n roundedTopLeft: border.borderTopLeftRadius,\n roundedTopRight: border.borderTopRightRadius,\n roundedTopStart: border.borderStartStartRadius,\n roundedTopEnd: border.borderStartEndRadius,\n roundedBottom: border.borderBottomRadius,\n roundedBottomLeft: border.borderBottomLeftRadius,\n roundedBottomRight: border.borderBottomRightRadius,\n roundedBottomStart: border.borderEndStartRadius,\n roundedBottomEnd: border.borderEndEndRadius,\n roundedLeft: border.borderLeftRadius,\n roundedRight: border.borderRightRadius,\n roundedStart: border.borderInlineStartRadius,\n roundedEnd: border.borderInlineEndRadius,\n borderStart: border.borderInlineStart,\n borderEnd: border.borderInlineEnd,\n borderTopStartRadius: border.borderStartStartRadius,\n borderTopEndRadius: border.borderStartEndRadius,\n borderBottomStartRadius: border.borderEndStartRadius,\n borderBottomEndRadius: border.borderEndEndRadius,\n borderStartRadius: border.borderInlineStartRadius,\n borderEndRadius: border.borderInlineEndRadius,\n borderStartWidth: border.borderInlineStartWidth,\n borderEndWidth: border.borderInlineEndWidth,\n borderStartColor: border.borderInlineStartColor,\n borderEndColor: border.borderInlineEndColor,\n borderStartStyle: border.borderInlineStartStyle,\n borderEndStyle: border.borderInlineEndStyle\n});\n\n// src/config/color.ts\nvar color = {\n color: t.colors(\"color\"),\n textColor: t.colors(\"color\"),\n fill: t.colors(\"fill\"),\n stroke: t.colors(\"stroke\")\n};\n\n// src/config/effect.ts\nvar effect = {\n boxShadow: t.shadows(\"boxShadow\"),\n mixBlendMode: true,\n blendMode: t.prop(\"mixBlendMode\"),\n backgroundBlendMode: true,\n bgBlendMode: t.prop(\"backgroundBlendMode\"),\n opacity: true\n};\nObject.assign(effect, {\n shadow: effect.boxShadow\n});\n\n// src/config/filter.ts\nvar filter = {\n filter: { transform: transformFunctions.filter },\n blur: t.blur(\"--chakra-blur\"),\n brightness: t.propT(\"--chakra-brightness\", transformFunctions.brightness),\n contrast: t.propT(\"--chakra-contrast\", transformFunctions.contrast),\n hueRotate: t.propT(\"--chakra-hue-rotate\", transformFunctions.hueRotate),\n invert: t.propT(\"--chakra-invert\", transformFunctions.invert),\n saturate: t.propT(\"--chakra-saturate\", transformFunctions.saturate),\n dropShadow: t.propT(\"--chakra-drop-shadow\", transformFunctions.dropShadow),\n backdropFilter: { transform: transformFunctions.backdropFilter },\n backdropBlur: t.blur(\"--chakra-backdrop-blur\"),\n backdropBrightness: t.propT(\n \"--chakra-backdrop-brightness\",\n transformFunctions.brightness\n ),\n backdropContrast: t.propT(\"--chakra-backdrop-contrast\", transformFunctions.contrast),\n backdropHueRotate: t.propT(\n \"--chakra-backdrop-hue-rotate\",\n transformFunctions.hueRotate\n ),\n backdropInvert: t.propT(\"--chakra-backdrop-invert\", transformFunctions.invert),\n backdropSaturate: t.propT(\"--chakra-backdrop-saturate\", transformFunctions.saturate)\n};\n\n// src/config/flexbox.ts\nvar flexbox = {\n alignItems: true,\n alignContent: true,\n justifyItems: true,\n justifyContent: true,\n flexWrap: true,\n flexDirection: { transform: transformFunctions.flexDirection },\n flex: true,\n flexFlow: true,\n flexGrow: true,\n flexShrink: true,\n flexBasis: t.sizes(\"flexBasis\"),\n justifySelf: true,\n alignSelf: true,\n order: true,\n placeItems: true,\n placeContent: true,\n placeSelf: true,\n gap: t.space(\"gap\"),\n rowGap: t.space(\"rowGap\"),\n columnGap: t.space(\"columnGap\")\n};\nObject.assign(flexbox, {\n flexDir: flexbox.flexDirection\n});\n\n// src/config/grid.ts\nvar grid = {\n gridGap: t.space(\"gridGap\"),\n gridColumnGap: t.space(\"gridColumnGap\"),\n gridRowGap: t.space(\"gridRowGap\"),\n gridColumn: true,\n gridRow: true,\n gridAutoFlow: true,\n gridAutoColumns: true,\n gridColumnStart: true,\n gridColumnEnd: true,\n gridRowStart: true,\n gridRowEnd: true,\n gridAutoRows: true,\n gridTemplate: true,\n gridTemplateColumns: true,\n gridTemplateRows: true,\n gridTemplateAreas: true,\n gridArea: true\n};\n\n// src/config/interactivity.ts\nvar interactivity = {\n appearance: true,\n cursor: true,\n resize: true,\n userSelect: true,\n pointerEvents: true,\n outline: { transform: transformFunctions.outline },\n outlineOffset: true,\n outlineColor: t.colors(\"outlineColor\")\n};\n\n// src/config/layout.ts\nvar layout = {\n width: t.sizesT(\"width\"),\n inlineSize: t.sizesT(\"inlineSize\"),\n height: t.sizes(\"height\"),\n blockSize: t.sizes(\"blockSize\"),\n boxSize: t.sizes([\"width\", \"height\"]),\n minWidth: t.sizes(\"minWidth\"),\n minInlineSize: t.sizes(\"minInlineSize\"),\n minHeight: t.sizes(\"minHeight\"),\n minBlockSize: t.sizes(\"minBlockSize\"),\n maxWidth: t.sizes(\"maxWidth\"),\n maxInlineSize: t.sizes(\"maxInlineSize\"),\n maxHeight: t.sizes(\"maxHeight\"),\n maxBlockSize: t.sizes(\"maxBlockSize\"),\n overflow: true,\n overflowX: true,\n overflowY: true,\n overscrollBehavior: true,\n overscrollBehaviorX: true,\n overscrollBehaviorY: true,\n display: true,\n aspectRatio: true,\n hideFrom: {\n scale: \"breakpoints\",\n transform: (value, theme) => {\n var _a, _b, _c;\n const breakpoint = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b.minW) != null ? _c : value;\n const mq = `@media screen and (min-width: ${breakpoint})`;\n return { [mq]: { display: \"none\" } };\n }\n },\n hideBelow: {\n scale: \"breakpoints\",\n transform: (value, theme) => {\n var _a, _b, _c;\n const breakpoint = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b._minW) != null ? _c : value;\n const mq = `@media screen and (max-width: ${breakpoint})`;\n return { [mq]: { display: \"none\" } };\n }\n },\n verticalAlign: true,\n boxSizing: true,\n boxDecorationBreak: true,\n float: t.propT(\"float\", transformFunctions.float),\n objectFit: true,\n objectPosition: true,\n visibility: true,\n isolation: true\n};\nObject.assign(layout, {\n w: layout.width,\n h: layout.height,\n minW: layout.minWidth,\n maxW: layout.maxWidth,\n minH: layout.minHeight,\n maxH: layout.maxHeight,\n overscroll: layout.overscrollBehavior,\n overscrollX: layout.overscrollBehaviorX,\n overscrollY: layout.overscrollBehaviorY\n});\n\n// src/config/list.ts\nvar list = {\n listStyleType: true,\n listStylePosition: true,\n listStylePos: t.prop(\"listStylePosition\"),\n listStyleImage: true,\n listStyleImg: t.prop(\"listStyleImage\")\n};\n\n// src/get.ts\nfunction get(obj, path, fallback, index) {\n const key = typeof path === \"string\" ? path.split(\".\") : [path];\n for (index = 0; index < key.length; index += 1) {\n if (!obj)\n break;\n obj = obj[key[index]];\n }\n return obj === void 0 ? fallback : obj;\n}\nvar memoize = (fn) => {\n const cache = /* @__PURE__ */ new WeakMap();\n const memoizedFn = (obj, path, fallback, index) => {\n if (typeof obj === \"undefined\") {\n return fn(obj, path, fallback);\n }\n if (!cache.has(obj)) {\n cache.set(obj, /* @__PURE__ */ new Map());\n }\n const map = cache.get(obj);\n if (map.has(path)) {\n return map.get(path);\n }\n const value = fn(obj, path, fallback, index);\n map.set(path, value);\n return value;\n };\n return memoizedFn;\n};\nvar memoizedGet = memoize(get);\n\n// src/config/others.ts\nvar srOnly = {\n border: \"0px\",\n clip: \"rect(0, 0, 0, 0)\",\n width: \"1px\",\n height: \"1px\",\n margin: \"-1px\",\n padding: \"0px\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\"\n};\nvar srFocusable = {\n position: \"static\",\n width: \"auto\",\n height: \"auto\",\n clip: \"auto\",\n padding: \"0\",\n margin: \"0\",\n overflow: \"visible\",\n whiteSpace: \"normal\"\n};\nvar getWithPriority = (theme, key, styles) => {\n const result = {};\n const obj = memoizedGet(theme, key, {});\n for (const prop in obj) {\n const isInStyles = prop in styles && styles[prop] != null;\n if (!isInStyles)\n result[prop] = obj[prop];\n }\n return result;\n};\nvar others = {\n srOnly: {\n transform(value) {\n if (value === true)\n return srOnly;\n if (value === \"focusable\")\n return srFocusable;\n return {};\n }\n },\n layerStyle: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, `layerStyles.${value}`, styles)\n },\n textStyle: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, `textStyles.${value}`, styles)\n },\n apply: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, value, styles)\n }\n};\n\n// src/config/position.ts\nvar position = {\n position: true,\n pos: t.prop(\"position\"),\n zIndex: t.prop(\"zIndex\", \"zIndices\"),\n inset: t.spaceT(\"inset\"),\n insetX: t.spaceT([\"left\", \"right\"]),\n insetInline: t.spaceT(\"insetInline\"),\n insetY: t.spaceT([\"top\", \"bottom\"]),\n insetBlock: t.spaceT(\"insetBlock\"),\n top: t.spaceT(\"top\"),\n insetBlockStart: t.spaceT(\"insetBlockStart\"),\n bottom: t.spaceT(\"bottom\"),\n insetBlockEnd: t.spaceT(\"insetBlockEnd\"),\n left: t.spaceT(\"left\"),\n insetInlineStart: t.logical({\n scale: \"space\",\n property: { ltr: \"left\", rtl: \"right\" }\n }),\n right: t.spaceT(\"right\"),\n insetInlineEnd: t.logical({\n scale: \"space\",\n property: { ltr: \"right\", rtl: \"left\" }\n })\n};\nObject.assign(position, {\n insetStart: position.insetInlineStart,\n insetEnd: position.insetInlineEnd\n});\n\n// src/config/ring.ts\nvar ring = {\n ring: { transform: transformFunctions.ring },\n ringColor: t.colors(\"--chakra-ring-color\"),\n ringOffset: t.prop(\"--chakra-ring-offset-width\"),\n ringOffsetColor: t.colors(\"--chakra-ring-offset-color\"),\n ringInset: t.prop(\"--chakra-ring-inset\")\n};\n\n// src/config/space.ts\nvar space = {\n margin: t.spaceT(\"margin\"),\n marginTop: t.spaceT(\"marginTop\"),\n marginBlockStart: t.spaceT(\"marginBlockStart\"),\n marginRight: t.spaceT(\"marginRight\"),\n marginInlineEnd: t.spaceT(\"marginInlineEnd\"),\n marginBottom: t.spaceT(\"marginBottom\"),\n marginBlockEnd: t.spaceT(\"marginBlockEnd\"),\n marginLeft: t.spaceT(\"marginLeft\"),\n marginInlineStart: t.spaceT(\"marginInlineStart\"),\n marginX: t.spaceT([\"marginInlineStart\", \"marginInlineEnd\"]),\n marginInline: t.spaceT(\"marginInline\"),\n marginY: t.spaceT([\"marginTop\", \"marginBottom\"]),\n marginBlock: t.spaceT(\"marginBlock\"),\n padding: t.space(\"padding\"),\n paddingTop: t.space(\"paddingTop\"),\n paddingBlockStart: t.space(\"paddingBlockStart\"),\n paddingRight: t.space(\"paddingRight\"),\n paddingBottom: t.space(\"paddingBottom\"),\n paddingBlockEnd: t.space(\"paddingBlockEnd\"),\n paddingLeft: t.space(\"paddingLeft\"),\n paddingInlineStart: t.space(\"paddingInlineStart\"),\n paddingInlineEnd: t.space(\"paddingInlineEnd\"),\n paddingX: t.space([\"paddingInlineStart\", \"paddingInlineEnd\"]),\n paddingInline: t.space(\"paddingInline\"),\n paddingY: t.space([\"paddingTop\", \"paddingBottom\"]),\n paddingBlock: t.space(\"paddingBlock\")\n};\nObject.assign(space, {\n m: space.margin,\n mt: space.marginTop,\n mr: space.marginRight,\n me: space.marginInlineEnd,\n marginEnd: space.marginInlineEnd,\n mb: space.marginBottom,\n ml: space.marginLeft,\n ms: space.marginInlineStart,\n marginStart: space.marginInlineStart,\n mx: space.marginX,\n my: space.marginY,\n p: space.padding,\n pt: space.paddingTop,\n py: space.paddingY,\n px: space.paddingX,\n pb: space.paddingBottom,\n pl: space.paddingLeft,\n ps: space.paddingInlineStart,\n paddingStart: space.paddingInlineStart,\n pr: space.paddingRight,\n pe: space.paddingInlineEnd,\n paddingEnd: space.paddingInlineEnd\n});\n\n// src/config/text-decoration.ts\nvar textDecoration = {\n textDecorationColor: t.colors(\"textDecorationColor\"),\n textDecoration: true,\n textDecor: { property: \"textDecoration\" },\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationThickness: true,\n textUnderlineOffset: true,\n textShadow: t.shadows(\"textShadow\")\n};\n\n// src/config/transform.ts\nvar transform = {\n clipPath: true,\n transform: t.propT(\"transform\", transformFunctions.transform),\n transformOrigin: true,\n translateX: t.spaceT(\"--chakra-translate-x\"),\n translateY: t.spaceT(\"--chakra-translate-y\"),\n skewX: t.degreeT(\"--chakra-skew-x\"),\n skewY: t.degreeT(\"--chakra-skew-y\"),\n scaleX: t.prop(\"--chakra-scale-x\"),\n scaleY: t.prop(\"--chakra-scale-y\"),\n scale: t.prop([\"--chakra-scale-x\", \"--chakra-scale-y\"]),\n rotate: t.degreeT(\"--chakra-rotate\")\n};\n\n// src/config/transition.ts\nvar transition = {\n transition: true,\n transitionDelay: true,\n animation: true,\n willChange: true,\n transitionDuration: t.prop(\"transitionDuration\", \"transition.duration\"),\n transitionProperty: t.prop(\"transitionProperty\", \"transition.property\"),\n transitionTimingFunction: t.prop(\n \"transitionTimingFunction\",\n \"transition.easing\"\n )\n};\n\n// src/config/typography.ts\nvar typography = {\n fontFamily: t.prop(\"fontFamily\", \"fonts\"),\n fontSize: t.prop(\"fontSize\", \"fontSizes\", transformFunctions.px),\n fontWeight: t.prop(\"fontWeight\", \"fontWeights\"),\n lineHeight: t.prop(\"lineHeight\", \"lineHeights\"),\n letterSpacing: t.prop(\"letterSpacing\", \"letterSpacings\"),\n textAlign: true,\n fontStyle: true,\n textIndent: true,\n wordBreak: true,\n overflowWrap: true,\n textOverflow: true,\n textTransform: true,\n whiteSpace: true,\n isTruncated: {\n transform(value) {\n if (value === true) {\n return {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\"\n };\n }\n }\n },\n noOfLines: {\n static: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n display: \"-webkit-box\",\n WebkitBoxOrient: \"vertical\",\n //@ts-ignore\n WebkitLineClamp: \"var(--chakra-line-clamp)\"\n },\n property: \"--chakra-line-clamp\"\n }\n};\n\n// src/config/scroll.ts\nvar scroll = {\n scrollBehavior: true,\n scrollSnapAlign: true,\n scrollSnapStop: true,\n scrollSnapType: true,\n // scroll margin\n scrollMargin: t.spaceT(\"scrollMargin\"),\n scrollMarginTop: t.spaceT(\"scrollMarginTop\"),\n scrollMarginBottom: t.spaceT(\"scrollMarginBottom\"),\n scrollMarginLeft: t.spaceT(\"scrollMarginLeft\"),\n scrollMarginRight: t.spaceT(\"scrollMarginRight\"),\n scrollMarginX: t.spaceT([\"scrollMarginLeft\", \"scrollMarginRight\"]),\n scrollMarginY: t.spaceT([\"scrollMarginTop\", \"scrollMarginBottom\"]),\n // scroll padding\n scrollPadding: t.spaceT(\"scrollPadding\"),\n scrollPaddingTop: t.spaceT(\"scrollPaddingTop\"),\n scrollPaddingBottom: t.spaceT(\"scrollPaddingBottom\"),\n scrollPaddingLeft: t.spaceT(\"scrollPaddingLeft\"),\n scrollPaddingRight: t.spaceT(\"scrollPaddingRight\"),\n scrollPaddingX: t.spaceT([\"scrollPaddingLeft\", \"scrollPaddingRight\"]),\n scrollPaddingY: t.spaceT([\"scrollPaddingTop\", \"scrollPaddingBottom\"])\n};\n\n// src/create-theme-vars/calc.ts\nimport { isObject as isObject2 } from \"@chakra-ui/shared-utils\";\nfunction resolveReference(operand) {\n if (isObject2(operand) && operand.reference) {\n return operand.reference;\n }\n return String(operand);\n}\nvar toExpression = (operator, ...operands) => operands.map(resolveReference).join(` ${operator} `).replace(/calc/g, \"\");\nvar add = (...operands) => `calc(${toExpression(\"+\", ...operands)})`;\nvar subtract = (...operands) => `calc(${toExpression(\"-\", ...operands)})`;\nvar multiply = (...operands) => `calc(${toExpression(\"*\", ...operands)})`;\nvar divide = (...operands) => `calc(${toExpression(\"/\", ...operands)})`;\nvar negate = (x) => {\n const value = resolveReference(x);\n if (value != null && !Number.isNaN(parseFloat(value))) {\n return String(value).startsWith(\"-\") ? String(value).slice(1) : `-${value}`;\n }\n return multiply(value, -1);\n};\nvar calc = Object.assign(\n (x) => ({\n add: (...operands) => calc(add(x, ...operands)),\n subtract: (...operands) => calc(subtract(x, ...operands)),\n multiply: (...operands) => calc(multiply(x, ...operands)),\n divide: (...operands) => calc(divide(x, ...operands)),\n negate: () => calc(negate(x)),\n toString: () => x.toString()\n }),\n {\n add,\n subtract,\n multiply,\n divide,\n negate\n }\n);\n\n// src/create-theme-vars/css-var.ts\nfunction replaceWhiteSpace(value, replaceValue = \"-\") {\n return value.replace(/\\s+/g, replaceValue);\n}\nfunction escape(value) {\n const valueStr = replaceWhiteSpace(value.toString());\n return escapeSymbol(escapeDot(valueStr));\n}\nfunction escapeDot(value) {\n if (value.includes(\"\\\\.\"))\n return value;\n const isDecimal = !Number.isInteger(parseFloat(value.toString()));\n return isDecimal ? value.replace(\".\", `\\\\.`) : value;\n}\nfunction escapeSymbol(value) {\n return value.replace(/[!-,/:-@[-^`{-~]/g, \"\\\\$&\");\n}\nfunction addPrefix(value, prefix = \"\") {\n return [prefix, value].filter(Boolean).join(\"-\");\n}\nfunction toVarReference(name, fallback) {\n return `var(${name}${fallback ? `, ${fallback}` : \"\"})`;\n}\nfunction toVarDefinition(value, prefix = \"\") {\n return escape(`--${addPrefix(value, prefix)}`);\n}\nfunction cssVar(name, fallback, cssVarPrefix) {\n const cssVariable = toVarDefinition(name, cssVarPrefix);\n return {\n variable: cssVariable,\n reference: toVarReference(cssVariable, fallback)\n };\n}\nfunction defineCssVars(scope, keys2) {\n const vars = {};\n for (const key of keys2) {\n if (Array.isArray(key)) {\n const [name, fallback] = key;\n vars[name] = cssVar(`${scope}-${name}`, fallback);\n continue;\n }\n vars[key] = cssVar(`${scope}-${key}`);\n }\n return vars;\n}\n\n// ../../utilities/breakpoint-utils/src/breakpoint.ts\nimport { isObject as isObject3 } from \"@chakra-ui/shared-utils\";\nfunction getLastItem(array) {\n const length = array == null ? 0 : array.length;\n return length ? array[length - 1] : void 0;\n}\nfunction analyzeCSSValue2(value) {\n const num = parseFloat(value.toString());\n const unit = value.toString().replace(String(num), \"\");\n return { unitless: !unit, value: num, unit };\n}\nfunction px(value) {\n if (value == null)\n return value;\n const { unitless } = analyzeCSSValue2(value);\n return unitless || typeof value === \"number\" ? `${value}px` : value;\n}\nvar sortByBreakpointValue = (a, b) => parseInt(a[1], 10) > parseInt(b[1], 10) ? 1 : -1;\nvar sortBps = (breakpoints) => Object.fromEntries(Object.entries(breakpoints).sort(sortByBreakpointValue));\nfunction normalize(breakpoints) {\n const sorted = sortBps(breakpoints);\n return Object.assign(Object.values(sorted), sorted);\n}\nfunction keys(breakpoints) {\n const value = Object.keys(sortBps(breakpoints));\n return new Set(value);\n}\nfunction subtract2(value) {\n var _a;\n if (!value)\n return value;\n value = (_a = px(value)) != null ? _a : value;\n const OFFSET = -0.02;\n return typeof value === \"number\" ? `${value + OFFSET}` : value.replace(/(\\d+\\.?\\d*)/u, (m) => `${parseFloat(m) + OFFSET}`);\n}\nfunction toMediaQueryString(min, max) {\n const query = [\"@media screen\"];\n if (min)\n query.push(\"and\", `(min-width: ${px(min)})`);\n if (max)\n query.push(\"and\", `(max-width: ${px(max)})`);\n return query.join(\" \");\n}\nfunction analyzeBreakpoints(breakpoints) {\n var _a;\n if (!breakpoints)\n return null;\n breakpoints.base = (_a = breakpoints.base) != null ? _a : \"0px\";\n const normalized = normalize(breakpoints);\n const queries = Object.entries(breakpoints).sort(sortByBreakpointValue).map(([breakpoint, minW], index, entry) => {\n var _a2;\n let [, maxW] = (_a2 = entry[index + 1]) != null ? _a2 : [];\n maxW = parseFloat(maxW) > 0 ? subtract2(maxW) : void 0;\n return {\n _minW: subtract2(minW),\n breakpoint,\n minW,\n maxW,\n maxWQuery: toMediaQueryString(null, maxW),\n minWQuery: toMediaQueryString(minW),\n minMaxQuery: toMediaQueryString(minW, maxW)\n };\n });\n const _keys = keys(breakpoints);\n const _keysArr = Array.from(_keys.values());\n return {\n keys: _keys,\n normalized,\n isResponsive(test) {\n const keys2 = Object.keys(test);\n return keys2.length > 0 && keys2.every((key) => _keys.has(key));\n },\n asObject: sortBps(breakpoints),\n asArray: normalize(breakpoints),\n details: queries,\n get(key) {\n return queries.find((q) => q.breakpoint === key);\n },\n media: [\n null,\n ...normalized.map((minW) => toMediaQueryString(minW)).slice(1)\n ],\n /**\n * Converts the object responsive syntax to array syntax\n *\n * @example\n * toArrayValue({ base: 1, sm: 2, md: 3 }) // => [1, 2, 3]\n */\n toArrayValue(test) {\n if (!isObject3(test)) {\n throw new Error(\"toArrayValue: value must be an object\");\n }\n const result = _keysArr.map((bp) => {\n var _a2;\n return (_a2 = test[bp]) != null ? _a2 : null;\n });\n while (getLastItem(result) === null) {\n result.pop();\n }\n return result;\n },\n /**\n * Converts the array responsive syntax to object syntax\n *\n * @example\n * toObjectValue([1, 2, 3]) // => { base: 1, sm: 2, md: 3 }\n */\n toObjectValue(test) {\n if (!Array.isArray(test)) {\n throw new Error(\"toObjectValue: value must be an array\");\n }\n return test.reduce((acc, value, index) => {\n const key = _keysArr[index];\n if (key != null && value != null)\n acc[key] = value;\n return acc;\n }, {});\n }\n };\n}\n\n// src/create-theme-vars/create-theme-vars.ts\nimport { isObject as isObject4 } from \"@chakra-ui/shared-utils\";\n\n// src/pseudos.ts\nvar state = {\n hover: (str, post) => `${str}:hover ${post}, ${str}[data-hover] ${post}`,\n focus: (str, post) => `${str}:focus ${post}, ${str}[data-focus] ${post}`,\n focusVisible: (str, post) => `${str}:focus-visible ${post}`,\n focusWithin: (str, post) => `${str}:focus-within ${post}`,\n active: (str, post) => `${str}:active ${post}, ${str}[data-active] ${post}`,\n disabled: (str, post) => `${str}:disabled ${post}, ${str}[data-disabled] ${post}`,\n invalid: (str, post) => `${str}:invalid ${post}, ${str}[data-invalid] ${post}`,\n checked: (str, post) => `${str}:checked ${post}, ${str}[data-checked] ${post}`,\n indeterminate: (str, post) => `${str}:indeterminate ${post}, ${str}[aria-checked=mixed] ${post}, ${str}[data-indeterminate] ${post}`,\n readOnly: (str, post) => `${str}:read-only ${post}, ${str}[readonly] ${post}, ${str}[data-read-only] ${post}`,\n expanded: (str, post) => `${str}:read-only ${post}, ${str}[aria-expanded=true] ${post}, ${str}[data-expanded] ${post}`,\n placeholderShown: (str, post) => `${str}:placeholder-shown ${post}`\n};\nvar toGroup = (fn) => merge((v) => fn(v, \"&\"), \"[role=group]\", \"[data-group]\", \".group\");\nvar toPeer = (fn) => merge((v) => fn(v, \"~ &\"), \"[data-peer]\", \".peer\");\nvar merge = (fn, ...selectors) => selectors.map(fn).join(\", \");\nvar pseudoSelectors = {\n /**\n * Styles for CSS selector `&:hover`\n */\n _hover: \"&:hover, &[data-hover]\",\n /**\n * Styles for CSS Selector `&:active`\n */\n _active: \"&:active, &[data-active]\",\n /**\n * Styles for CSS selector `&:focus`\n *\n */\n _focus: \"&:focus, &[data-focus]\",\n /**\n * Styles for the highlighted state.\n */\n _highlighted: \"&[data-highlighted]\",\n /**\n * Styles to apply when a child of this element has received focus\n * - CSS Selector `&:focus-within`\n */\n _focusWithin: \"&:focus-within\",\n /**\n * Styles to apply when this element has received focus via tabbing\n * - CSS Selector `&:focus-visible`\n */\n _focusVisible: \"&:focus-visible, &[data-focus-visible]\",\n /**\n * Styles to apply when this element is disabled. The passed styles are applied to these CSS selectors:\n * - `&[aria-disabled=true]`\n * - `&:disabled`\n * - `&[data-disabled]`\n * - `&[disabled]`\n */\n _disabled: \"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]\",\n /**\n * Styles for CSS Selector `&:readonly`\n */\n _readOnly: \"&[aria-readonly=true], &[readonly], &[data-readonly]\",\n /**\n * Styles for CSS selector `&::before`\n *\n * NOTE:When using this, ensure the `content` is wrapped in a backtick.\n * @example\n * ```jsx\n * <Box _before={{content:`\"\"` }}/>\n * ```\n */\n _before: \"&::before\",\n /**\n * Styles for CSS selector `&::after`\n *\n * NOTE:When using this, ensure the `content` is wrapped in a backtick.\n * @example\n * ```jsx\n * <Box _after={{content:`\"\"` }}/>\n * ```\n */\n _after: \"&::after\",\n /**\n * Styles for CSS selector `&:empty`\n */\n _empty: \"&:empty\",\n /**\n * Styles to apply when the ARIA attribute `aria-expanded` is `true`\n * - CSS selector `&[aria-expanded=true]`\n */\n _expanded: \"&[aria-expanded=true], &[data-expanded]\",\n /**\n * Styles to apply when the ARIA attribute `aria-checked` is `true`\n * - CSS selector `&[aria-checked=true]`\n */\n _checked: \"&[aria-checked=true], &[data-checked]\",\n /**\n * Styles to apply when the ARIA attribute `aria-grabbed` is `true`\n * - CSS selector `&[aria-grabbed=true]`\n */\n _grabbed: \"&[aria-grabbed=true], &[data-grabbed]\",\n /**\n * Styles for CSS Selector `&[aria-pressed=true]`\n * Typically used to style the current \"pressed\" state of toggle buttons\n */\n _pressed: \"&[aria-pressed=true], &[data-pressed]\",\n /**\n * Styles to apply when the ARIA attribute `aria-invalid` is `true`\n * - CSS selector `&[aria-invalid=true]`\n */\n _invalid: \"&[aria-invalid=true], &[data-invalid]\",\n /**\n * Styles for the valid state\n * - CSS selector `&[data-valid], &[data-state=valid]`\n */\n _valid: \"&[data-valid], &[data-state=valid]\",\n /**\n * Styles for CSS Selector `&[aria-busy=true]` or `&[data-loading=true]`.\n * Useful for styling loading states\n */\n _loading: \"&[data-loading], &[aria-busy=true]\",\n /**\n * Styles to apply when the ARIA attribute `aria-selected` is `true`\n *\n * - CSS selector `&[aria-selected=true]`\n */\n _selected: \"&[aria-selected=true], &[data-selected]\",\n /**\n * Styles for CSS Selector `[hidden=true]`\n */\n _hidden: \"&[hidden], &[data-hidden]\",\n /**\n * Styles for CSS Selector `&:-webkit-autofill`\n */\n _autofill: \"&:-webkit-autofill\",\n /**\n * Styles for CSS Selector `&:nth-child(even)`\n */\n _even: \"&:nth-of-type(even)\",\n /**\n * Styles for CSS Selector `&:nth-child(odd)`\n */\n _odd: \"&:nth-of-type(odd)\",\n /**\n * Styles for CSS Selector `&:first-of-type`\n */\n _first: \"&:first-of-type\",\n /**\n * Styles for CSS selector `&::first-letter`\n *\n * NOTE: This selector is only applied for block-level elements and not preceded by an image or table.\n * @example\n * ```jsx\n * <Text _firstLetter={{ textDecoration: 'underline' }}>Once upon a time</Text>\n * ```\n */\n _firstLetter: \"&::first-letter\",\n /**\n * Styles for CSS Selector `&:last-of-type`\n */\n _last: \"&:last-of-type\",\n /**\n * Styles for CSS Selector `&:not(:first-of-type)`\n */\n _notFirst: \"&:not(:first-of-type)\",\n /**\n * Styles for CSS Selector `&:not(:last-of-type)`\n */\n _notLast: \"&:not(:last-of-type)\",\n /**\n * Styles for CSS Selector `&:visited`\n */\n _visited: \"&:visited\",\n /**\n * Used to style the active link in a navigation\n * Styles for CSS Selector `&[aria-current=page]`\n */\n _activeLink: \"&[aria-current=page]\",\n /**\n * Used to style the current step within a process\n * Styles for CSS Selector `&[aria-current=step]`\n */\n _activeStep: \"&[aria-current=step]\",\n /**\n * Styles to apply when the ARIA attribute `aria-checked` is `mixed`\n * - CSS selector `&[aria-checked=mixed]`\n */\n _indeterminate: \"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]\",\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is hovered\n */\n _groupHover: toGroup(state.hover),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is hovered\n */\n _peerHover: toPeer(state.hover),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is focused\n */\n _groupFocus: toGroup(state.focus),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is focused\n */\n _peerFocus: toPeer(state.focus),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` has visible focus\n */\n _groupFocusVisible: toGroup(state.focusVisible),\n /**\n * Styles to apply when a sibling element with `.peer`or `data-peer` has visible focus\n */\n _peerFocusVisible: toPeer(state.focusVisible),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is active\n */\n _groupActive: toGroup(state.active),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is active\n */\n _peerActive: toPeer(state.active),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is disabled\n */\n _groupDisabled: toGroup(state.disabled),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is disabled\n */\n _peerDisabled: toPeer(state.disabled),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is invalid\n */\n _groupInvalid: toGroup(state.invalid),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is invalid\n */\n _peerInvalid: toPeer(state.invalid),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is checked\n */\n _groupChecked: toGroup(state.checked),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is checked\n */\n _peerChecked: toPeer(state.checked),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` has focus within\n */\n _groupFocusWithin: toGroup(state.focusWithin),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` has focus within\n */\n _peerFocusWithin: toPeer(state.focusWithin),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` has placeholder shown\n */\n _peerPlaceholderShown: toPeer(state.placeholderShown),\n /**\n * Styles for CSS Selector `&::placeholder`.\n */\n _placeholder: \"&::placeholder\",\n /**\n * Styles for CSS Selector `&:placeholder-shown`.\n */\n _placeholderShown: \"&:placeholder-shown\",\n /**\n * Styles for CSS Selector `&:fullscreen`.\n */\n _fullScreen: \"&:fullscreen\",\n /**\n * Styles for CSS Selector `&::selection`\n */\n _selection: \"&::selection\",\n /**\n * Styles for CSS Selector `[dir=rtl] &`\n * It is applied when a parent element or this element has `dir=\"rtl\"`\n */\n _rtl: \"[dir=rtl] &, &[dir=rtl]\",\n /**\n * Styles for CSS Selector `[dir=ltr] &`\n * It is applied when a parent element or this element has `dir=\"ltr\"`\n */\n _ltr: \"[dir=ltr] &, &[dir=ltr]\",\n /**\n * Styles for CSS Selector `@media (prefers-color-scheme: dark)`\n * It is used when the user has requested the system use a light or dark color theme.\n */\n _mediaDark: \"@media (prefers-color-scheme: dark)\",\n /**\n * Styles for CSS Selector `@media (prefers-reduced-motion: reduce)`\n * It is used when the user has requested the system to reduce the amount of animations.\n */\n _mediaReduceMotion: \"@media (prefers-reduced-motion: reduce)\",\n /**\n * Styles for when `data-theme` is applied to any parent of\n * this component or element.\n */\n _dark: \".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]\",\n /**\n * Styles for when `data-theme` is applied to any parent of\n * this component or element.\n */\n _light: \".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]\",\n /**\n * Styles for the CSS Selector `&[data-orientation=horizontal]`\n */\n _horizontal: \"&[data-orientation=horizontal]\",\n /**\n * Styles for the CSS Selector `&[data-orientation=vertical]`\n */\n _vertical: \"&[data-orientation=vertical]\"\n};\nvar pseudoPropNames = Object.keys(\n pseudoSelectors\n);\n\n// src/create-theme-vars/create-theme-vars.ts\nimport mergeWith from \"lodash.mergewith\";\nfunction tokenToCssVar(token, prefix) {\n return cssVar(String(token).replace(/\\./g, \"-\"), void 0, prefix);\n}\nfunction createThemeVars(flatTokens, options) {\n let cssVars = {};\n const cssMap = {};\n for (const [token, tokenValue] of Object.entries(flatTokens)) {\n const { isSemantic, value } = tokenValue;\n const { variable, reference } = tokenToCssVar(token, options == null ? void 0 : options.cssVarPrefix);\n if (!isSemantic) {\n if (token.startsWith(\"space\")) {\n const keys2 = token.split(\".\");\n const [firstKey, ...referenceKeys] = keys2;\n const negativeLookupKey = `${firstKey}.-${referenceKeys.join(\".\")}`;\n const negativeValue = calc.negate(value);\n const negatedReference = calc.negate(reference);\n cssMap[negativeLookupKey] = {\n value: negativeValue,\n var: variable,\n varRef: negatedReference\n };\n }\n cssVars[variable] = value;\n cssMap[token] = {\n value,\n var: variable,\n varRef: reference\n };\n continue;\n }\n const lookupToken = (maybeToken) => {\n const scale = String(token).split(\".\")[0];\n const withScale = [scale, maybeToken].join(\".\");\n const resolvedTokenValue = flatTokens[withScale];\n if (!resolvedTokenValue)\n return maybeToken;\n const { reference: reference2 } = tokenToCssVar(withScale, options == null ? void 0 : options.cssVarPrefix);\n return reference2;\n };\n const normalizedValue = isObject4(value) ? value : { default: value };\n cssVars = mergeWith(\n cssVars,\n Object.entries(normalizedValue).reduce(\n (acc, [conditionAlias, conditionValue]) => {\n var _a, _b;\n if (!conditionValue)\n return acc;\n const tokenReference = lookupToken(`${conditionValue}`);\n if (conditionAlias === \"default\") {\n acc[variable] = tokenReference;\n return acc;\n }\n const conditionSelector = (_b = (_a = pseudoSelectors) == null ? void 0 : _a[conditionAlias]) != null ? _b : conditionAlias;\n acc[conditionSelector] = { [variable]: tokenReference };\n return acc;\n },\n {}\n )\n );\n cssMap[token] = {\n value: reference,\n var: variable,\n varRef: reference\n };\n }\n return {\n cssVars,\n cssMap\n };\n}\n\n// ../../utilities/object-utils/src/omit.ts\nfunction omit(object, keysToOmit = []) {\n const clone = Object.assign({}, object);\n for (const key of keysToOmit) {\n if (key in clone) {\n delete clone[key];\n }\n }\n return clone;\n}\n\n// ../../utilities/object-utils/src/pick.ts\nfunction pick(object, keysToPick) {\n const result = {};\n for (const key of keysToPick) {\n if (key in object) {\n result[key] = object[key];\n }\n }\n return result;\n}\n\n// ../../utilities/object-utils/src/walk-object.ts\nfunction isObject5(value) {\n return typeof value === \"object\" && value != null && !Array.isArray(value);\n}\nfunction walkObject(target, predicate, options = {}) {\n const { stop, getKey } = options;\n function inner(value, path = []) {\n var _a;\n if (isObject5(value) || Array.isArray(value)) {\n const result = {};\n for (const [prop, child] of Object.entries(value)) {\n const key = (_a = getKey == null ? void 0 : getKey(prop)) != null ? _a : prop;\n const childPath = [...path, key];\n if (stop == null ? void 0 : stop(value, childPath)) {\n return predicate(value, path);\n }\n result[key] = inner(child, childPath);\n }\n return result;\n }\n return predicate(value, path);\n }\n return inner(target);\n}\n\n// src/create-theme-vars/theme-tokens.ts\nvar tokens = [\n \"colors\",\n \"borders\",\n \"borderWidths\",\n \"borderStyles\",\n \"fonts\",\n \"fontSizes\",\n \"fontWeights\",\n \"gradients\",\n \"letterSpacings\",\n \"lineHeights\",\n \"radii\",\n \"space\",\n \"shadows\",\n \"sizes\",\n \"zIndices\",\n \"transition\",\n \"blur\",\n \"breakpoints\"\n];\nfunction extractTokens(theme) {\n const _tokens = tokens;\n return pick(theme, _tokens);\n}\nfunction extractSemanticTokens(theme) {\n return theme.semanticTokens;\n}\nfunction omitVars(rawTheme) {\n const { __cssMap, __cssVars, __breakpoints, ...cleanTheme } = rawTheme;\n return cleanTheme;\n}\n\n// src/create-theme-vars/flatten-tokens.ts\nvar isSemanticCondition = (key) => pseudoPropNames.includes(key) || \"default\" === key;\nfunction flattenTokens({\n tokens: tokens2,\n semanticTokens\n}) {\n const result = {};\n walkObject(tokens2, (value, path) => {\n if (value == null)\n return;\n result[path.join(\".\")] = { isSemantic: false, value };\n });\n walkObject(\n semanticTokens,\n (value, path) => {\n if (value == null)\n return;\n result[path.join(\".\")] = { isSemantic: true, value };\n },\n {\n stop: (value) => Object.keys(value).every(isSemanticCondition)\n }\n );\n return result;\n}\n\n// src/create-theme-vars/to-css-var.ts\nfunction toCSSVar(rawTheme) {\n var _a;\n const theme = omitVars(rawTheme);\n const tokens2 = extractTokens(theme);\n const semanticTokens = extractSemanticTokens(theme);\n const flatTokens = flattenTokens({ tokens: tokens2, semanticTokens });\n const cssVarPrefix = (_a = theme.config) == null ? void 0 : _a.cssVarPrefix;\n const {\n /**\n * This is more like a dictionary of tokens users will type `green.500`,\n * and their equivalent css variable.\n */\n cssMap,\n /**\n * The extracted css variables will be stored here, and used in\n * the emotion's <Global/> component to attach variables to `:root`\n */\n cssVars\n } = createThemeVars(flatTokens, { cssVarPrefix });\n const defaultCssVars = {\n \"--chakra-ring-inset\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-ring-offset-width\": \"0px\",\n \"--chakra-ring-offset-color\": \"#fff\",\n \"--chakra-ring-color\": \"rgba(66, 153, 225, 0.6)\",\n \"--chakra-ring-offset-shadow\": \"0 0 #0000\",\n \"--chakra-ring-shadow\": \"0 0 #0000\",\n \"--chakra-space-x-reverse\": \"0\",\n \"--chakra-space-y-reverse\": \"0\"\n };\n Object.assign(theme, {\n __cssVars: { ...defaultCssVars, ...cssVars },\n __cssMap: cssMap,\n __breakpoints: analyzeBreakpoints(theme.breakpoints)\n });\n return theme;\n}\n\n// src/css.ts\nimport { isObject as isObject7, runIfFn as runIfFn2 } from \"@chakra-ui/shared-utils\";\nimport mergeWith3 from \"lodash.mergewith\";\n\n// src/system.ts\nimport mergeWith2 from \"lodash.mergewith\";\nvar systemProps = mergeWith2(\n {},\n background,\n border,\n color,\n flexbox,\n layout,\n filter,\n ring,\n interactivity,\n grid,\n others,\n position,\n effect,\n space,\n scroll,\n typography,\n textDecoration,\n transform,\n list,\n transition\n);\nvar layoutSystem = Object.assign({}, space, layout, flexbox, grid, position);\nvar layoutPropNames = Object.keys(\n layoutSystem\n);\nvar propNames = [...Object.keys(systemProps), ...pseudoPropNames];\nvar styleProps = { ...systemProps, ...pseudoSelectors };\nvar isStyleProp = (prop) => prop in styleProps;\n\n// src/utils/expand-responsive.ts\nimport { isObject as isObject6, runIfFn } from \"@chakra-ui/shared-utils\";\nvar expandResponsive = (styles) => (theme) => {\n if (!theme.__breakpoints)\n return styles;\n const { isResponsive, toArrayValue, media: medias } = theme.__breakpoints;\n const computedStyles = {};\n for (const key in styles) {\n let value = runIfFn(styles[key], theme);\n if (value == null)\n continue;\n value = isObject6(value) && isResponsive(value) ? toArrayValue(value) : value;\n if (!Array.isArray(value)) {\n computedStyles[key] = value;\n continue;\n }\n const queries = value.slice(0, medias.length).length;\n for (let index = 0; index < queries; index += 1) {\n const media = medias == null ? void 0 : medias[index];\n if (!media) {\n computedStyles[key] = value[index];\n continue;\n }\n computedStyles[media] = computedStyles[media] || {};\n if (value[index] == null) {\n continue;\n }\n computedStyles[media][key] = value[index];\n }\n }\n return computedStyles;\n};\n\n// src/utils/split-by-comma.ts\nfunction splitByComma(value) {\n const chunks = [];\n let chunk = \"\";\n let inParens = false;\n for (let i = 0; i < value.length; i++) {\n const char = value[i];\n if (char === \"(\") {\n inParens = true;\n chunk += char;\n } else if (char === \")\") {\n inParens = false;\n chunk += char;\n } else if (char === \",\" && !inParens) {\n chunks.push(chunk);\n chunk = \"\";\n } else {\n chunk += char;\n }\n }\n chunk = chunk.trim();\n if (chunk) {\n chunks.push(chunk);\n }\n return chunks;\n}\n\n// src/css.ts\nfunction isCssVar2(value) {\n return /^var\\(--.+\\)$/.test(value);\n}\nvar isCSSVariableTokenValue = (key, value) => key.startsWith(\"--\") && typeof value === \"string\" && !isCssVar2(value);\nvar resolveTokenValue = (theme, value) => {\n var _a, _b;\n if (value == null)\n return value;\n const getVar = (val) => {\n var _a2, _b2;\n return (_b2 = (_a2 = theme.__cssMap) == null ? void 0 : _a2[val]) == null ? void 0 : _b2.varRef;\n };\n const getValue = (val) => {\n var _a2;\n return (_a2 = getVar(val)) != null ? _a2 : val;\n };\n const [tokenValue, fallbackValue] = splitByComma(value);\n value = (_b = (_a = getVar(tokenValue)) != null ? _a : getValue(fallbackValue)) != null ? _b : getValue(value);\n return value;\n};\nfunction getCss(options) {\n const { configs = {}, pseudos = {}, theme } = options;\n const css2 = (stylesOrFn, nested = false) => {\n var _a, _b, _c;\n const _styles = runIfFn2(stylesOrFn, theme);\n const styles = expandResponsive(_styles)(theme);\n let computedStyles = {};\n for (let key in styles) {\n const valueOrFn = styles[key];\n let value = runIfFn2(valueOrFn, theme);\n if (key in pseudos) {\n key = pseudos[key];\n }\n if (isCSSVariableTokenValue(key, value)) {\n value = resolveTokenValue(theme, value);\n }\n let config = configs[key];\n if (config === true) {\n config = { property: key };\n }\n if (isObject7(value)) {\n computedStyles[key] = (_a = computedStyles[key]) != null ? _a : {};\n computedStyles[key] = mergeWith3(\n {},\n computedStyles[key],\n css2(value, true)\n );\n continue;\n }\n let rawValue = (_c = (_b = config == null ? void 0 : config.transform) == null ? void 0 : _b.call(config, value, theme, _styles)) != null ? _c : value;\n rawValue = (config == null ? void 0 : config.processResult) ? css2(rawValue, true) : rawValue;\n const configProperty = runIfFn2(config == null ? void 0 : config.property, theme);\n if (!nested && (config == null ? void 0 : config.static)) {\n const staticStyles = runIfFn2(config.static, theme);\n computedStyles = mergeWith3({}, computedStyles, staticStyles);\n }\n if (configProperty && Array.isArray(configProperty)) {\n for (const property of configProperty) {\n computedStyles[property] = rawValue;\n }\n continue;\n }\n if (configProperty) {\n if (configProperty === \"&\" && isObject7(rawValue)) {\n computedStyles = mergeWith3({}, computedStyles, rawValue);\n } else {\n computedStyles[configProperty] = rawValue;\n }\n continue;\n }\n if (isObject7(rawValue)) {\n computedStyles = mergeWith3({}, computedStyles, rawValue);\n continue;\n }\n computedStyles[key] = rawValue;\n }\n return computedStyles;\n };\n return css2;\n}\nvar css = (styles) => (theme) => {\n const cssFn = getCss({\n theme,\n pseudos: pseudoSelectors,\n configs: systemProps\n });\n return cssFn(styles);\n};\n\n// src/define-styles.ts\nfunction defineStyle(styles) {\n return styles;\n}\nfunction defineStyleConfig(config) {\n return config;\n}\nfunction createMultiStyleConfigHelpers(parts) {\n return {\n definePartsStyle(config) {\n return config;\n },\n defineMultiStyleConfig(config) {\n return { parts, ...config };\n }\n };\n}\n\n// src/style-config.ts\nimport { runIfFn as runIfFn3, isObject as isObject8 } from \"@chakra-ui/shared-utils\";\nimport mergeWith4 from \"lodash.mergewith\";\nfunction normalize2(value, toArray) {\n if (Array.isArray(value))\n return value;\n if (isObject8(value))\n return toArray(value);\n if (value != null)\n return [value];\n}\nfunction getNextIndex(values, i) {\n for (let j = i + 1; j < values.length; j++) {\n if (values[j] != null)\n return j;\n }\n return -1;\n}\nfunction createResolver(theme) {\n const breakpointUtil = theme.__breakpoints;\n return function resolver(config, prop, value, props) {\n var _a, _b;\n if (!breakpointUtil)\n return;\n const result = {};\n const normalized = normalize2(value, breakpointUtil.toArrayValue);\n if (!normalized)\n return result;\n const len = normalized.length;\n const isSingle = len === 1;\n const isMultipart = !!config.parts;\n for (let i = 0; i < len; i++) {\n const key = breakpointUtil.details[i];\n const nextKey = breakpointUtil.details[getNextIndex(normalized, i)];\n const query = toMediaQueryString(key.minW, nextKey == null ? void 0 : nextKey._minW);\n const styles = runIfFn3((_a = config[prop]) == null ? void 0 : _a[normalized[i]], props);\n if (!styles)\n continue;\n if (isMultipart) {\n (_b = config.parts) == null ? void 0 : _b.forEach((part) => {\n mergeWith4(result, {\n [part]: isSingle ? styles[part] : { [query]: styles[part] }\n });\n });\n continue;\n }\n if (!isMultipart) {\n if (isSingle)\n mergeWith4(result, styles);\n else\n result[query] = styles;\n continue;\n }\n result[query] = styles;\n }\n return result;\n };\n}\nfunction resolveStyleConfig(config) {\n return (props) => {\n var _a;\n const { variant, size, theme } = props;\n const recipe = createResolver(theme);\n return mergeWith4(\n {},\n runIfFn3((_a = config.baseStyle) != null ? _a : {}, props),\n recipe(config, \"sizes\", size, props),\n recipe(config, \"variants\", variant, props)\n );\n };\n}\n\n// src/get-css-var.ts\nfunction getCSSVar(theme, scale, value) {\n var _a, _b, _c;\n return (_c = (_b = (_a = theme.__cssMap) == null ? void 0 : _a[`${scale}.${value}`]) == null ? void 0 : _b.varRef) != null ? _c : value;\n}\n\n// src/theming-props.ts\nfunction omitThemingProps(props) {\n return omit(props, [\"styleConfig\", \"size\", \"variant\", \"colorScheme\"]);\n}\nexport {\n addPrefix,\n background,\n border,\n calc,\n color,\n createMultiStyleConfigHelpers,\n css,\n cssVar,\n defineCssVars,\n defineStyle,\n defineStyleConfig,\n effect,\n filter,\n flattenTokens,\n flexbox,\n getCSSVar,\n getCss,\n grid,\n interactivity,\n isStyleProp,\n layout,\n layoutPropNames,\n list,\n omitThemingProps,\n others,\n position,\n propNames,\n pseudoPropNames,\n pseudoSelectors,\n resolveStyleConfig,\n ring,\n scroll,\n space,\n systemProps,\n textDecoration,\n toCSSVar,\n toVarDefinition,\n toVarReference,\n tokenToCSSVar,\n transform,\n transition,\n typography\n};\n","/**\n * Used to define the anatomy/parts of a component in a way that provides\n * a consistent API for `className`, css selector and `theming`.\n */\nexport function anatomy<T extends string = string>(\n name: string,\n map = {} as Record<T, Part>,\n): Anatomy<T> {\n let called = false\n\n /**\n * Prevents user from calling `.parts` multiple times.\n * It should only be called once.\n */\n function assert() {\n if (!called) {\n called = true\n return\n }\n\n throw new Error(\n \"[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?\",\n )\n }\n\n /**\n * Add the core parts of the components\n */\n function parts<V extends string>(...values: V[]) {\n assert()\n for (const part of values) {\n ;(map as any)[part] = toPart(part)\n }\n return anatomy(name, map) as unknown as Omit<Anatomy<V>, \"parts\">\n }\n\n /**\n * Extend the component anatomy to includes new parts\n */\n function extend<U extends string>(...parts: U[]) {\n for (const part of parts) {\n if (part in map) continue\n ;(map as any)[part] = toPart(part)\n }\n return anatomy(name, map) as unknown as Omit<Anatomy<T | U>, \"parts\">\n }\n\n /**\n * Get all selectors for the component anatomy\n */\n function selectors() {\n const value = Object.fromEntries(\n Object.entries(map).map(([key, part]) => [key, (part as any).selector]),\n )\n return value as Record<T, string>\n }\n\n /**\n * Get all classNames for the component anatomy\n */\n function classnames() {\n const value = Object.fromEntries(\n Object.entries(map).map(([key, part]) => [key, (part as any).className]),\n )\n return value as Record<T, string>\n }\n\n /**\n * Creates the part object for the given part\n */\n function toPart(part: string) {\n const el = [\"container\", \"root\"].includes(part ?? \"\")\n ? [name]\n : [name, part]\n const attr = el.filter(Boolean).join(\"__\")\n const className = `chakra-${attr}`\n\n const partObj = {\n className,\n selector: `.${className}`,\n toString: () => part,\n }\n\n return partObj as typeof partObj & string\n }\n\n /**\n * Used to get the derived type of the anatomy\n */\n const __type = {} as T\n\n return {\n parts,\n toPart,\n extend,\n selectors,\n classnames,\n get keys(): T[] {\n return Object.keys(map) as T[]\n },\n __type,\n }\n}\n\ntype Part = {\n className: string\n selector: string\n toString: () => string\n}\n\ntype Anatomy<T extends string> = {\n parts: <V extends string>(...values: V[]) => Omit<Anatomy<V>, \"parts\">\n toPart: (part: string) => Part\n extend: <U extends string>(...parts: U[]) => Omit<Anatomy<T | U>, \"parts\">\n selectors: () => Record<T, string>\n classnames: () => Record<T, string>\n keys: T[]\n __type: T\n}\n","import { anatomy } from \"./anatomy\"\n\n/**\n * **Accordion anatomy**\n * - Root: the root container of the accordion\n * - Container: the accordion item contains the button and panel\n * - Button: the button is the trigger for the panel\n * - Panel: the panel is the content of the accordion item\n * - Icon: the expanded/collapsed icon\n */\nexport const accordionAnatomy = anatomy(\"accordion\")\n .parts(\"root\", \"container\", \"button\", \"panel\")\n .extend(\"icon\")\n\n/**\n * **Alert anatomy**\n * - Title: the alert's title\n * - Description: the alert's description\n * - Icon: the alert's icon\n */\nexport const alertAnatomy = anatomy(\"alert\")\n .parts(\"title\", \"description\", \"container\")\n .extend(\"icon\", \"spinner\")\n\n/**\n * **Avatar anatomy**\n * - Container: the container for the avatar\n * - Label: the avatar initials text\n * - Excess Label: the label or text that represents excess avatar count.\n * Typically used in avatar groups.\n * - Group: the container for the avatar group\n */\nexport const avatarAnatomy = anatomy(\"avatar\")\n .parts(\"label\", \"badge\", \"container\")\n .extend(\"excessLabel\", \"group\")\n\n/**\n * **Breadcrumb anatomy**\n * - Item: the container for a breadcrumb item\n * - Link: the element that represents the breadcrumb link\n * - Container: the container for the breadcrumb items\n * - Separator: the separator between breadcrumb items\n */\nexport const breadcrumbAnatomy = anatomy(\"breadcrumb\")\n .parts(\"link\", \"item\", \"container\")\n .extend(\"separator\")\n\nexport const buttonAnatomy = anatomy(\"button\").parts()\n\nexport const checkboxAnatomy = anatomy(\"checkbox\")\n .parts(\"control\", \"icon\", \"container\")\n .extend(\"label\")\n\nexport const circularProgressAnatomy = anatomy(\"progress\")\n .parts(\"track\", \"filledTrack\")\n .extend(\"label\")\n\nexport const drawerAnatomy = anatomy(\"drawer\")\n .parts(\"overlay\", \"dialogContainer\", \"dialog\")\n .extend(\"header\", \"closeButton\", \"body\", \"footer\")\n\nexport const editableAnatomy = anatomy(\"editable\").parts(\n \"preview\",\n \"input\",\n \"textarea\",\n)\n\nexport const formAnatomy = anatomy(\"form\").parts(\n \"container\",\n \"requiredIndicator\",\n \"helperText\",\n)\n\nexport const formErrorAnatomy = anatomy(\"formError\").parts(\"text\", \"icon\")\n\nexport const inputAnatomy = anatomy(\"input\").parts(\n \"addon\",\n \"field\",\n \"element\",\n \"group\",\n)\n\nexport const listAnatomy = anatomy(\"list\").parts(\"container\", \"item\", \"icon\")\n\nexport const menuAnatomy = anatomy(\"menu\")\n .parts(\"button\", \"list\", \"item\")\n .extend(\"groupTitle\", \"icon\", \"command\", \"divider\")\n\nexport const modalAnatomy = anatomy(\"modal\")\n .parts(\"overlay\", \"dialogContainer\", \"dialog\")\n .extend(\"header\", \"closeButton\", \"body\", \"footer\")\n\nexport const numberInputAnatomy = anatomy(\"numberinput\").parts(\n \"root\",\n \"field\",\n \"stepperGroup\",\n \"stepper\",\n)\n\nexport const pinInputAnatomy = anatomy(\"pininput\").parts(\"field\")\n\nexport const popoverAnatomy = anatomy(\"popover\")\n .parts(\"content\", \"header\", \"body\", \"footer\")\n .extend(\"popper\", \"arrow\", \"closeButton\")\n\nexport const progressAnatomy = anatomy(\"progress\").parts(\n \"label\",\n \"filledTrack\",\n \"track\",\n)\n\nexport const radioAnatomy = anatomy(\"radio\").parts(\n \"container\",\n \"control\",\n \"label\",\n)\n\nexport const selectAnatomy = anatomy(\"select\").parts(\"field\", \"icon\")\n\nexport const sliderAnatomy = anatomy(\"slider\").parts(\n \"container\",\n \"track\",\n \"thumb\",\n \"filledTrack\",\n \"mark\",\n)\n\nexport const statAnatomy = anatomy(\"stat\").parts(\n \"container\",\n \"label\",\n \"helpText\",\n \"number\",\n \"icon\",\n)\n\nexport const switchAnatomy = anatomy(\"switch\").parts(\n \"container\",\n \"track\",\n \"thumb\",\n \"label\",\n)\n\nexport const tableAnatomy = anatomy(\"table\").parts(\n \"table\",\n \"thead\",\n \"tbody\",\n \"tr\",\n \"th\",\n \"td\",\n \"tfoot\",\n \"caption\",\n)\n\nexport const tabsAnatomy = anatomy(\"tabs\").parts(\n \"root\",\n \"tab\",\n \"tablist\",\n \"tabpanel\",\n \"tabpanels\",\n \"indicator\",\n)\n\n/**\n * **Tag anatomy**\n * - Container: the container for the tag\n * - Label: the text content of the tag\n * - closeButton: the close button for the tag\n */\nexport const tagAnatomy = anatomy(\"tag\").parts(\n \"container\",\n \"label\",\n \"closeButton\",\n)\n\nexport const cardAnatomy = anatomy(\"card\").parts(\n \"container\",\n \"header\",\n \"body\",\n \"footer\",\n)\n\nexport const stepperAnatomy = anatomy(\"stepper\").parts(\n \"stepper\",\n \"step\",\n \"title\",\n \"description\",\n \"indicator\",\n \"separator\",\n \"icon\",\n \"number\",\n)\n","/**\n * A simple guard function:\n *\n * ```js\n * Math.min(Math.max(low, value), high)\n * ```\n */\nfunction guard(low: number, high: number, value: number): number {\n return Math.min(Math.max(low, value), high);\n}\n\nexport default guard;\n","class ColorError extends Error {\n constructor(color: string) {\n super(`Failed to parse color: \"${color}\"`);\n }\n}\n\nexport default ColorError;\n","import guard from './guard';\nimport ColorError from './ColorError';\n\n/**\n * Parses a color into red, gree, blue, alpha parts\n *\n * @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color\n */\nfunction parseToRgba(color: string): [number, number, number, number] {\n if (typeof color !== 'string') throw new ColorError(color);\n if (color.trim().toLowerCase() === 'transparent') return [0, 0, 0, 0];\n\n let normalizedColor = color.trim();\n normalizedColor = namedColorRegex.test(color) ? nameToHex(color) : color;\n\n const reducedHexMatch = reducedHexRegex.exec(normalizedColor);\n if (reducedHexMatch) {\n const arr = Array.from(reducedHexMatch).slice(1);\n return [\n ...arr.slice(0, 3).map((x) => parseInt(r(x, 2), 16)),\n parseInt(r(arr[3] || 'f', 2), 16) / 255,\n ] as [number, number, number, number];\n }\n\n const hexMatch = hexRegex.exec(normalizedColor);\n if (hexMatch) {\n const arr = Array.from(hexMatch).slice(1);\n return [\n ...arr.slice(0, 3).map((x) => parseInt(x, 16)),\n parseInt(arr[3] || 'ff', 16) / 255,\n ] as [number, number, number, number];\n }\n\n const rgbaMatch = rgbaRegex.exec(normalizedColor);\n if (rgbaMatch) {\n const arr = Array.from(rgbaMatch).slice(1);\n return [\n ...arr.slice(0, 3).map((x) => parseInt(x, 10)),\n parseFloat(arr[3] || '1'),\n ] as [number, number, number, number];\n }\n\n const hslaMatch = hslaRegex.exec(normalizedColor);\n if (hslaMatch) {\n const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);\n if (guard(0, 100, s) !== s) throw new ColorError(color);\n if (guard(0, 100, l) !== l) throw new ColorError(color);\n return [...hslToRgb(h, s, l), Number.isNaN(a) ? 1 : a] as [\n number,\n number,\n number,\n number\n ];\n }\n\n throw new ColorError(color);\n}\n\nfunction hash(str: string) {\n let hash = 5381;\n let i = str.length;\n\n while (i) {\n hash = (hash * 33) ^ str.charCodeAt(--i);\n }\n\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */\n return (hash >>> 0) % 2341;\n}\n\nconst colorToInt = (x: string) => parseInt(x.replace(/_/g, ''), 36);\n\nconst compressedColorMap =\n '1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm'\n .split(' ')\n .reduce((acc, next) => {\n const key = colorToInt(next.substring(0, 3));\n const hex = colorToInt(next.substring(3)).toString(16);\n\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n let prefix = '';\n for (let i = 0; i < 6 - hex.length; i++) {\n prefix += '0';\n }\n\n acc[key] = `${prefix}${hex}`;\n return acc;\n }, {} as { [key: string]: string });\n\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n */\nfunction nameToHex(color: string): string {\n const normalizedColorName = color.toLowerCase().trim();\n const result = compressedColorMap[hash(normalizedColorName)];\n if (!result) throw new ColorError(color);\n return `#${result}`;\n}\n\nconst r = (str: string, amount: number) =>\n Array.from(Array(amount))\n .map(() => str)\n .join('');\n\nconst reducedHexRegex = new RegExp(`^#${r('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');\nconst hexRegex = new RegExp(`^#${r('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');\nconst rgbaRegex = new RegExp(\n `^rgba?\\\\(\\\\s*(\\\\d+)\\\\s*${r(\n ',\\\\s*(\\\\d+)\\\\s*',\n 2\n )}(?:,\\\\s*([\\\\d.]+))?\\\\s*\\\\)$`,\n 'i'\n);\nconst hslaRegex =\n /^hsla?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)%\\s*,\\s*([\\d.]+)%(?:\\s*,\\s*([\\d.]+))?\\s*\\)$/i;\nconst namedColorRegex = /^[a-z]+$/i;\n\nconst roundColor = (color: number): number => {\n return Math.round(color * 255);\n};\n\nconst hslToRgb = (\n hue: number,\n saturation: number,\n lightness: number\n): [number, number, number] => {\n let l = lightness / 100;\n if (saturation === 0) {\n // achromatic\n return [l, l, l].map(roundColor) as [number, number, number];\n }\n\n // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n const huePrime = (((hue % 360) + 360) % 360) / 60;\n const chroma = (1 - Math.abs(2 * l - 1)) * (saturation / 100);\n const secondComponent = chroma * (1 - Math.abs((huePrime % 2) - 1));\n\n let red = 0;\n let green = 0;\n let blue = 0;\n\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n\n const lightnessModification = l - chroma / 2;\n const finalRed = red + lightnessModification;\n const finalGreen = green + lightnessModification;\n const finalBlue = blue + lightnessModification;\n\n return [finalRed, finalGreen, finalBlue].map(roundColor) as [\n number,\n number,\n number\n ];\n};\n\nexport default parseToRgba;\n","import guard from './guard';\n\n/**\n * Takes in rgba parts and returns an rgba string\n *\n * @param red The amount of red in the red channel, given in a number between 0 and 255 inclusive\n * @param green The amount of green in the red channel, given in a number between 0 and 255 inclusive\n * @param blue The amount of blue in the red channel, given in a number between 0 and 255 inclusive\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction rgba(red: number, green: number, blue: number, alpha: number): string {\n return `rgba(${guard(0, 255, red).toFixed()}, ${guard(\n 0,\n 255,\n green\n ).toFixed()}, ${guard(0, 255, blue).toFixed()}, ${parseFloat(\n guard(0, 1, alpha).toFixed(3)\n )})`;\n}\n\nexport default rgba;\n","import parseToRgba from './parseToRgba';\nimport rgba from './rgba';\n\n/**\n * Takes in a color and makes it more transparent by convert to `rgba` and\n * decreasing the amount in the alpha channel.\n *\n * @param amount The amount to increase the transparency by, given as a decimal between 0 and 1\n */\nfunction transparentize(color: string, amount: number): string {\n const [r, g, b, a] = parseToRgba(color);\n return rgba(r, g, b, a - amount);\n}\n\nexport default transparentize;\n","import parseToRgba from './parseToRgba';\nimport guard from './guard';\n\n/**\n * Takes in any color and returns it as a hex code.\n */\nfunction toHex(color: string): string {\n const [r, g, b, a] = parseToRgba(color);\n\n let hex = (x: number) => {\n const h = guard(0, 255, x).toString(16);\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n return h.length === 1 ? `0${h}` : h;\n };\n\n return `#${hex(r)}${hex(g)}${hex(b)}${a < 1 ? hex(Math.round(a * 255)) : ''}`;\n}\n\nexport default toHex;\n","export default function dlv(obj, key, def, p, undef) {\n\tkey = key.split ? key.split('.') : key;\n\tfor (p = 0; p < key.length; p++) {\n\t\tobj = obj ? obj[key[p]] : undef;\n\t}\n\treturn obj === undef ? def : obj;\n}\n","import { getCSSVar } from \"@chakra-ui/styled-system\"\nimport {\n toHex,\n parseToRgba,\n transparentize as setTransparency,\n mix,\n darken as reduceLightness,\n lighten as increaseLightness,\n getContrast,\n parseToHsla,\n hsla,\n getLuminance,\n} from \"color2k\"\n\nimport get from \"dlv\"\n\ntype Dict = { [key: string]: any }\nconst isEmptyObject = (obj: any) => Object.keys(obj).length === 0\n\n/**\n * Get the color raw value from theme\n * @param theme - the theme object\n * @param color - the color path (\"green.200\")\n * @param fallback - the fallback color\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const getColor = (theme: Dict, color: string, fallback?: string) => {\n const hex = get(theme, `colors.${color}`, color)\n try {\n toHex(hex)\n return hex\n } catch {\n // returning black to stay consistent with TinyColor behaviour so as to prevent breaking change\n return fallback ?? \"#000000\"\n }\n}\n\n/**\n * Get the color css variable from theme\n */\nexport const getColorVar = (theme: Dict, color: string, fallback?: string) => {\n return getCSSVar(theme, \"colors\", color) ?? fallback\n}\n\nconst getBrightness = (color: string) => {\n const [r, g, b] = parseToRgba(color)\n // http://www.w3.org/TR/AERT#color-contrast\n return (r * 299 + g * 587 + b * 114) / 1000\n}\n\n/**\n * Determines if the tone of given color is \"light\" or \"dark\"\n * @param color - the color in hex, rgb, or hsl\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const tone = (color: string) => (theme: Dict) => {\n const hex = getColor(theme, color)\n const brightness = getBrightness(hex)\n const isDark = brightness < 128\n return isDark ? \"dark\" : \"light\"\n}\n\n/**\n * Determines if a color tone is \"dark\"\n * @param color - the color in hex, rgb, or hsl\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const isDark = (color: string) => (theme: Dict) =>\n tone(color)(theme) === \"dark\"\n\n/**\n * Determines if a color tone is \"light\"\n * @param color - the color in hex, rgb, or hsl\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const isLight = (color: string) => (theme: Dict) =>\n tone(color)(theme) === \"light\"\n\n/**\n * Make a color transparent\n * @param color - the color in hex, rgb, or hsl\n * @param opacity - the amount of opacity the color should have (0-1)\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const transparentize =\n (color: string, opacity: number) => (theme: Dict) => {\n const raw = getColor(theme, color)\n return setTransparency(raw, 1 - opacity)\n }\n\n/**\n * Add white to a color\n * @param color - the color in hex, rgb, or hsl\n * @param amount - the amount white to add (0-100)\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const whiten = (color: string, amount: number) => (theme: Dict) => {\n const raw = getColor(theme, color)\n return toHex(mix(raw, \"#fff\", amount))\n}\n\n/**\n * Add black to a color\n * @param color - the color in hex, rgb, or hsl\n * @param amount - the amount black to add (0-100)\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const blacken = (color: string, amount: number) => (theme: Dict) => {\n const raw = getColor(theme, color)\n return toHex(mix(raw, \"#000\", amount / 100))\n}\n\n/**\n * Darken a specified color\n * @param color - the color in hex, rgb, or hsl\n * @param amount - the amount to darken (0-100)\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const darken = (color: string, amount: number) => (theme: Dict) => {\n const raw = getColor(theme, color)\n return toHex(reduceLightness(raw, amount / 100))\n}\n\n/**\n * Lighten a specified color\n * @param color - the color in hex, rgb, or hsl\n * @param amount - the amount to lighten (0-100)\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const lighten = (color: string, amount: number) => (theme: Dict) => {\n const raw = getColor(theme, color)\n toHex(increaseLightness(raw, amount / 100))\n}\n\n/**\n * Checks the contract ratio of between 2 colors,\n * based on the Web Content Accessibility Guidelines (Version 2.0).\n *\n * @param fg - the foreground or text color\n * @param bg - the background color\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const contrast = (fg: string, bg: string) => (theme: Dict) =>\n getContrast(getColor(theme, bg), getColor(theme, fg))\n\ninterface WCAG2Params {\n level?: \"AA\" | \"AAA\"\n size?: \"large\" | \"small\"\n}\n\n/**\n * Checks if a color meets the Web Content Accessibility\n * Guidelines (Version 2.0) for contrast ratio.\n *\n * @param textColor - the foreground or text color\n * @param bgColor - the background color\n * @param options\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const isAccessible =\n (textColor: string, bgColor: string, options?: WCAG2Params) =>\n (theme: Dict) =>\n isReadable(getColor(theme, bgColor), getColor(theme, textColor), options)\n\nexport function isReadable(\n color1: string,\n color2: string,\n wcag2: WCAG2Params = { level: \"AA\", size: \"small\" },\n): boolean {\n const readabilityLevel = readability(color1, color2)\n switch ((wcag2.level ?? \"AA\") + (wcag2.size ?? \"small\")) {\n case \"AAsmall\":\n case \"AAAlarge\":\n return readabilityLevel >= 4.5\n case \"AAlarge\":\n return readabilityLevel >= 3\n case \"AAAsmall\":\n return readabilityLevel >= 7\n default:\n return false\n }\n}\n\nexport function readability(color1: string, color2: string): number {\n return (\n (Math.max(getLuminance(color1), getLuminance(color2)) + 0.05) /\n (Math.min(getLuminance(color1), getLuminance(color2)) + 0.05)\n )\n}\n/**\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const complementary = (color: string) => (theme: Dict) => {\n const raw = getColor(theme, color)\n const hsl = parseToHsla(raw)\n const complementHsl: [number, number, number, number] = Object.assign(hsl, [\n (hsl[0] + 180) % 360,\n ])\n return toHex(hsla(...complementHsl))\n}\n\nexport function generateStripe(\n size = \"1rem\",\n color = \"rgba(255, 255, 255, 0.15)\",\n) {\n return {\n backgroundImage: `linear-gradient(\n 45deg,\n ${color} 25%,\n transparent 25%,\n transparent 50%,\n ${color} 50%,\n ${color} 75%,\n transparent 75%,\n transparent\n )`,\n backgroundSize: `${size} ${size}`,\n }\n}\n\ninterface RandomColorOptions {\n /**\n * If passed, string will be used to generate\n * random color\n */\n string?: string\n /**\n * List of colors to pick from at random\n */\n colors?: string[]\n}\n\nconst randomHex = () =>\n `#${Math.floor(Math.random() * 0xffffff)\n .toString(16)\n .padEnd(6, \"0\")}`\n\nexport function randomColor(opts?: RandomColorOptions) {\n const fallback = randomHex()\n\n if (!opts || isEmptyObject(opts)) {\n return fallback\n }\n\n if (opts.string && opts.colors) {\n return randomColorFromList(opts.string, opts.colors)\n }\n\n if (opts.string && !opts.colors) {\n return randomColorFromString(opts.string)\n }\n\n if (opts.colors && !opts.string) {\n return randomFromList(opts.colors)\n }\n\n return fallback\n}\n\nfunction randomColorFromString(str: string) {\n let hash = 0\n if (str.length === 0) return hash.toString()\n for (let i = 0; i < str.length; i += 1) {\n hash = str.charCodeAt(i) + ((hash << 5) - hash)\n hash = hash & hash\n }\n let color = \"#\"\n for (let j = 0; j < 3; j += 1) {\n const value = (hash >> (j * 8)) & 255\n color += `00${value.toString(16)}`.substr(-2)\n }\n return color\n}\n\nfunction randomColorFromList(str: string, list: string[]) {\n let index = 0\n if (str.length === 0) return list[0]\n for (let i = 0; i < str.length; i += 1) {\n index = str.charCodeAt(i) + ((index << 5) - index)\n index = index & index\n }\n index = ((index % list.length) + list.length) % list.length\n return list[index]\n}\n\nfunction randomFromList(list: string[]) {\n return list[Math.floor(Math.random() * list.length)]\n}\n","import type {\n SystemStyleObject,\n StyleFunctionProps,\n SystemStyleInterpolation,\n} from \"@chakra-ui/styled-system\"\n\nexport type {\n StyleConfig,\n MultiStyleConfig,\n SystemStyleObject,\n // StyleFunctionProps,\n SystemStyleFunction,\n SystemStyleInterpolation,\n PartsStyleObject,\n PartsStyleFunction,\n PartsStyleInterpolation,\n} from \"@chakra-ui/styled-system\"\n\n/* -----------------------------------------------------------------------------\n * Global Style object definitions\n * -----------------------------------------------------------------------------*/\n\nexport type GlobalStyleProps = StyleFunctionProps\n\nexport type GlobalStyles = {\n global?: SystemStyleInterpolation\n}\n\nexport type JSXElementStyles = {\n [K in keyof JSX.IntrinsicElements]?: SystemStyleObject\n}\n\nexport type Styles = GlobalStyles & JSXElementStyles\n\nexport function mode<T>(light: T, dark: T) {\n return (props: Record<string, any> | StyleFunctionProps) =>\n props.colorMode === \"dark\" ? dark : light\n}\n\nexport function orient<T>(options: {\n orientation?: \"vertical\" | \"horizontal\"\n vertical: T\n horizontal: T\n}) {\n const { orientation, vertical, horizontal } = options\n if (!orientation) return {}\n return orientation === \"vertical\" ? vertical : horizontal\n}\n\nexport type { StyleFunctionProps }\n","export function isDecimal(value: any) {\n return !Number.isInteger(parseFloat(value.toString()))\n}\n\nfunction replaceWhiteSpace(value: string, replaceValue = \"-\") {\n return value.replace(/\\s+/g, replaceValue)\n}\n\nfunction escape(value: string | number) {\n const valueStr = replaceWhiteSpace(value.toString())\n if (valueStr.includes(\"\\\\.\")) return value\n return isDecimal(value) ? valueStr.replace(\".\", `\\\\.`) : value\n}\n\nexport function addPrefix(value: string, prefix = \"\") {\n return [prefix, escape(value)].filter(Boolean).join(\"-\")\n}\n\nexport function toVarRef(name: string, fallback?: string) {\n return `var(${escape(name)}${fallback ? `, ${fallback}` : \"\"})`\n}\n\nexport function toVar(value: string, prefix = \"\") {\n return `--${addPrefix(value, prefix)}`\n}\n\nexport type CSSVar = {\n variable: string\n reference: string\n}\n\nexport type CSSVarOptions = {\n fallback?: string | CSSVar\n prefix?: string\n}\n\nexport function cssVar(name: string, options?: CSSVarOptions) {\n const cssVariable = toVar(name, options?.prefix)\n return {\n variable: cssVariable,\n reference: toVarRef(cssVariable, getFallback(options?.fallback)),\n }\n}\n\nfunction getFallback(fallback?: string | CSSVar) {\n if (typeof fallback === \"string\") return fallback\n return fallback?.reference\n}\n","// src/dom.ts\nfunction isElement(el) {\n return el != null && typeof el == \"object\" && \"nodeType\" in el && el.nodeType === Node.ELEMENT_NODE;\n}\nfunction isHTMLElement(el) {\n var _a;\n if (!isElement(el)) {\n return false;\n }\n const win = (_a = el.ownerDocument.defaultView) != null ? _a : window;\n return el instanceof win.HTMLElement;\n}\nfunction getOwnerWindow(node) {\n var _a, _b;\n return isElement(node) ? (_b = (_a = getOwnerDocument(node)) == null ? void 0 : _a.defaultView) != null ? _b : window : window;\n}\nfunction getOwnerDocument(node) {\n var _a;\n return isElement(node) ? (_a = node.ownerDocument) != null ? _a : document : document;\n}\nfunction getEventWindow(event) {\n var _a;\n return (_a = event.view) != null ? _a : window;\n}\nfunction canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n}\nvar isBrowser = /* @__PURE__ */ canUseDOM();\nvar dataAttr = (condition) => condition ? \"\" : void 0;\nvar ariaAttr = (condition) => condition ? true : void 0;\nvar cx = (...classNames) => classNames.filter(Boolean).join(\" \");\nfunction getActiveElement(node) {\n const doc = getOwnerDocument(node);\n return doc == null ? void 0 : doc.activeElement;\n}\nfunction contains(parent, child) {\n if (!parent)\n return false;\n return parent === child || parent.contains(child);\n}\nfunction addDomEvent(target, eventName, handler, options) {\n target.addEventListener(eventName, handler, options);\n return () => {\n target.removeEventListener(eventName, handler, options);\n };\n}\nfunction normalizeEventKey(event) {\n const { key, keyCode } = event;\n const isArrowKey = keyCode >= 37 && keyCode <= 40 && key.indexOf(\"Arrow\") !== 0;\n const eventKey = isArrowKey ? `Arrow${key}` : key;\n return eventKey;\n}\nfunction getRelatedTarget(event) {\n var _a, _b;\n const target = (_a = event.target) != null ? _a : event.currentTarget;\n const activeElement = getActiveElement(target);\n return (_b = event.relatedTarget) != null ? _b : activeElement;\n}\nfunction isRightClick(event) {\n return event.button !== 0;\n}\n\nexport {\n isElement,\n isHTMLElement,\n getOwnerWindow,\n getOwnerDocument,\n getEventWindow,\n canUseDOM,\n isBrowser,\n dataAttr,\n ariaAttr,\n cx,\n getActiveElement,\n contains,\n addDomEvent,\n normalizeEventKey,\n getRelatedTarget,\n isRightClick\n};\n","// src/object.ts\nimport { default as default2 } from \"lodash.mergewith\";\nfunction omit(object, keys) {\n const result = {};\n Object.keys(object).forEach((key) => {\n if (keys.includes(key))\n return;\n result[key] = object[key];\n });\n return result;\n}\nfunction pick(object, keys) {\n const result = {};\n keys.forEach((key) => {\n if (key in object) {\n result[key] = object[key];\n }\n });\n return result;\n}\nfunction split(object, keys) {\n const picked = {};\n const omitted = {};\n Object.keys(object).forEach((key) => {\n if (keys.includes(key)) {\n picked[key] = object[key];\n } else {\n omitted[key] = object[key];\n }\n });\n return [picked, omitted];\n}\nfunction get(obj, path, fallback, index) {\n const key = typeof path === \"string\" ? path.split(\".\") : [path];\n for (index = 0; index < key.length; index += 1) {\n if (!obj)\n break;\n obj = obj[key[index]];\n }\n return obj === void 0 ? fallback : obj;\n}\nvar memoize = (fn) => {\n const cache = /* @__PURE__ */ new WeakMap();\n const memoizedFn = (obj, path, fallback, index) => {\n if (typeof obj === \"undefined\") {\n return fn(obj, path, fallback);\n }\n if (!cache.has(obj)) {\n cache.set(obj, /* @__PURE__ */ new Map());\n }\n const map = cache.get(obj);\n if (map.has(path)) {\n return map.get(path);\n }\n const value = fn(obj, path, fallback, index);\n map.set(path, value);\n return value;\n };\n return memoizedFn;\n};\nvar memoizedGet = memoize(get);\nfunction getWithDefault(path, scale) {\n return memoizedGet(scale, path, path);\n}\nfunction objectFilter(object, fn) {\n const result = {};\n Object.keys(object).forEach((key) => {\n const value = object[key];\n const shouldPass = fn(value, key, object);\n if (shouldPass) {\n result[key] = value;\n }\n });\n return result;\n}\nvar filterUndefined = (object) => objectFilter(object, (val) => val !== null && val !== void 0);\nvar objectKeys = (obj) => Object.keys(obj);\nvar fromEntries = (entries) => entries.reduce((carry, [key, value]) => {\n carry[key] = value;\n return carry;\n}, {});\nvar getCSSVar = (theme, scale, value) => {\n var _a, _b, _c;\n return (_c = (_b = (_a = theme.__cssMap) == null ? void 0 : _a[`${scale}.${value}`]) == null ? void 0 : _b.varRef) != null ? _c : value;\n};\n\nexport {\n omit,\n pick,\n split,\n get,\n memoize,\n memoizedGet,\n getWithDefault,\n objectFilter,\n filterUndefined,\n objectKeys,\n fromEntries,\n getCSSVar,\n default2 as default\n};\n","// src/assertion.ts\nfunction isNumber(value) {\n return typeof value === \"number\";\n}\nfunction isNotNumber(value) {\n return typeof value !== \"number\" || Number.isNaN(value) || !Number.isFinite(value);\n}\nfunction isNumeric(value) {\n return value != null && value - parseFloat(value) + 1 >= 0;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isEmptyArray(value) {\n return isArray(value) && value.length === 0;\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\nfunction isDefined(value) {\n return typeof value !== \"undefined\" && value !== void 0;\n}\nfunction isUndefined(value) {\n return typeof value === \"undefined\" || value === void 0;\n}\nfunction isObject(value) {\n const type = typeof value;\n return value != null && (type === \"object\" || type === \"function\") && !isArray(value);\n}\nfunction isEmptyObject(value) {\n return isObject(value) && Object.keys(value).length === 0;\n}\nfunction isNotEmptyObject(value) {\n return value && !isEmptyObject(value);\n}\nfunction isNull(value) {\n return value == null;\n}\nfunction isString(value) {\n return Object.prototype.toString.call(value) === \"[object String]\";\n}\nfunction isCssVar(value) {\n return /^var\\(--.+\\)$/.test(value);\n}\nfunction isEmpty(value) {\n if (isArray(value))\n return isEmptyArray(value);\n if (isObject(value))\n return isEmptyObject(value);\n if (value == null || value === \"\")\n return true;\n return false;\n}\nvar __DEV__ = process.env.NODE_ENV !== \"production\";\nvar __TEST__ = process.env.NODE_ENV === \"test\";\nfunction isRefObject(val) {\n return \"current\" in val;\n}\nfunction isInputEvent(value) {\n return value && isObject(value) && isObject(value.target);\n}\n\nexport {\n isNumber,\n isNotNumber,\n isNumeric,\n isArray,\n isEmptyArray,\n isFunction,\n isDefined,\n isUndefined,\n isObject,\n isEmptyObject,\n isNotEmptyObject,\n isNull,\n isString,\n isCssVar,\n isEmpty,\n __DEV__,\n __TEST__,\n isRefObject,\n isInputEvent\n};\n","import {\n __DEV__,\n isFunction,\n isNumber\n} from \"./chunk-Y5FGD7DM.mjs\";\n\n// src/function.ts\nfunction runIfFn(valueOrFn, ...args) {\n return isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;\n}\nfunction callAllHandlers(...fns) {\n return function func(event) {\n fns.some((fn) => {\n fn == null ? void 0 : fn(event);\n return event == null ? void 0 : event.defaultPrevented;\n });\n };\n}\nfunction callAll(...fns) {\n return function mergedFn(arg) {\n fns.forEach((fn) => {\n fn == null ? void 0 : fn(arg);\n });\n };\n}\nvar compose = (fn1, ...fns) => fns.reduce(\n (f1, f2) => (...args) => f1(f2(...args)),\n fn1\n);\nfunction once(fn) {\n let result;\n return function func(...args) {\n if (fn) {\n result = fn.apply(this, args);\n fn = null;\n }\n return result;\n };\n}\nvar noop = () => {\n};\nvar warn = /* @__PURE__ */ once((options) => () => {\n const { condition, message } = options;\n if (condition && __DEV__) {\n console.warn(message);\n }\n});\nvar error = /* @__PURE__ */ once((options) => () => {\n const { condition, message } = options;\n if (condition && __DEV__) {\n console.error(message);\n }\n});\nvar pipe = (...fns) => (v) => fns.reduce((a, b) => b(a), v);\nvar distance1D = (a, b) => Math.abs(a - b);\nvar isPoint = (point) => \"x\" in point && \"y\" in point;\nfunction distance(a, b) {\n if (isNumber(a) && isNumber(b)) {\n return distance1D(a, b);\n }\n if (isPoint(a) && isPoint(b)) {\n const xDelta = distance1D(a.x, b.x);\n const yDelta = distance1D(a.y, b.y);\n return Math.sqrt(xDelta ** 2 + yDelta ** 2);\n }\n return 0;\n}\n\nexport {\n runIfFn,\n callAllHandlers,\n callAll,\n compose,\n once,\n noop,\n warn,\n error,\n pipe,\n distance\n};\n","import {\n resolveStyleConfig,\n SystemStyleObject,\n ThemingProps,\n} from \"@chakra-ui/styled-system\"\nimport { mergeThemeOverride } from \"@chakra-ui/theme-utils\"\nimport {\n Dict,\n filterUndefined,\n memoizedGet as get,\n mergeWith,\n omit,\n} from \"@chakra-ui/utils\"\nimport { useRef } from \"react\"\nimport isEqual from \"react-fast-compare\"\nimport { useChakra } from \"./hooks\"\n\ntype StylesRef = SystemStyleObject | Record<string, SystemStyleObject>\n\nfunction useStyleConfigImpl(\n themeKey: string | null,\n props: ThemingProps & Dict = {},\n) {\n const { styleConfig: styleConfigProp, ...rest } = props\n\n const { theme, colorMode } = useChakra()\n\n const themeStyleConfig = themeKey\n ? get(theme, `components.${themeKey}`)\n : undefined\n\n const styleConfig = styleConfigProp || themeStyleConfig\n\n const mergedProps = mergeWith(\n { theme, colorMode },\n styleConfig?.defaultProps ?? {},\n filterUndefined(omit(rest, [\"children\"])),\n )\n\n /**\n * Store the computed styles in a `ref` to avoid unneeded re-computation\n */\n const stylesRef = useRef<StylesRef>({})\n\n if (styleConfig) {\n const getStyles = resolveStyleConfig(styleConfig)\n const styles = getStyles(mergedProps)\n\n const isStyleEqual = isEqual(stylesRef.current, styles)\n\n if (!isStyleEqual) {\n stylesRef.current = styles\n }\n }\n\n return stylesRef.current\n}\n\nexport function useStyleConfig(\n themeKey: string,\n props: ThemingProps & Dict = {},\n) {\n return useStyleConfigImpl(themeKey, props) as SystemStyleObject\n}\n\nexport function useMultiStyleConfig(\n themeKey: string,\n props: ThemingProps & Dict = {},\n) {\n return useStyleConfigImpl(themeKey, props) as Record<\n string,\n SystemStyleObject\n >\n}\n\ntype MultipartStyles = Record<string, SystemStyleObject>\n\nexport function useComponentStyles__unstable(\n themeKey: string,\n props: ThemingProps & { baseConfig: any },\n) {\n const { baseConfig, ...restProps } = props\n const { theme } = useChakra()\n\n const overrides = theme.components?.[themeKey]\n\n const styleConfig = overrides\n ? mergeThemeOverride(overrides, baseConfig)\n : baseConfig\n\n return useStyleConfigImpl(null, {\n ...restProps,\n styleConfig,\n }) as MultipartStyles\n}\n","import { propNames } from \"@chakra-ui/styled-system\"\n\n/**\n * List of props for emotion to omit from DOM.\n * It mostly consists of Chakra props\n */\nconst allPropNames = new Set([\n ...propNames,\n \"textStyle\",\n \"layerStyle\",\n \"apply\",\n \"noOfLines\",\n \"focusBorderColor\",\n \"errorBorderColor\",\n \"as\",\n \"__css\",\n \"css\",\n \"sx\",\n])\n\n/**\n * htmlWidth and htmlHeight is used in the <Image />\n * component to support the native `width` and `height` attributes\n *\n * https://github.com/chakra-ui/chakra-ui/issues/149\n */\nconst validHTMLProps = new Set([\n \"htmlWidth\",\n \"htmlHeight\",\n \"htmlSize\",\n \"htmlTranslate\",\n])\n\nexport function shouldForwardProp(prop: string): boolean {\n return validHTMLProps.has(prop) || !allPropNames.has(prop)\n}\n","// src/assign-after.ts\nfunction assignAfter(target, ...sources) {\n if (target == null) {\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n const result = { ...target };\n for (const nextSource of sources) {\n if (nextSource == null)\n continue;\n for (const nextKey in nextSource) {\n if (!Object.prototype.hasOwnProperty.call(nextSource, nextKey))\n continue;\n if (nextKey in result)\n delete result[nextKey];\n result[nextKey] = nextSource[nextKey];\n }\n }\n return result;\n}\n\nexport {\n assignAfter\n};\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport * as React from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\nimport { withEmotionCache, ThemeContext } from '@emotion/react';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {\n return key !== 'theme';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {\n return typeof tag === 'string' && // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\nvar composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {\n var shouldForwardProp;\n\n if (options) {\n var optionsShouldForwardProp = options.shouldForwardProp;\n shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {\n return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);\n } : optionsShouldForwardProp;\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp;\n }\n\n return shouldForwardProp;\n};\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar createStyled = function createStyled(tag, options) {\n if (process.env.NODE_ENV !== 'production') {\n if (tag === undefined) {\n throw new Error('You are trying to create a styled element with an undefined component.\\nYou may have forgotten to import it.');\n }\n }\n\n var isReal = tag.__emotion_real === tag;\n var baseTag = isReal && tag.__emotion_base || tag;\n var identifierName;\n var targetClassName;\n\n if (options !== undefined) {\n identifierName = options.label;\n targetClassName = options.target;\n }\n\n var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);\n var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n var shouldUseAs = !defaultShouldForwardProp('as');\n return function () {\n var args = arguments;\n var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n if (identifierName !== undefined) {\n styles.push(\"label:\" + identifierName + \";\");\n }\n\n if (args[0] == null || args[0].raw === undefined) {\n styles.push.apply(styles, args);\n } else {\n if (process.env.NODE_ENV !== 'production' && args[0][0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles.push(args[0][0]);\n var len = args.length;\n var i = 1;\n\n for (; i < len; i++) {\n if (process.env.NODE_ENV !== 'production' && args[0][i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles.push(args[i], args[0][i]);\n }\n } // $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class\n\n\n var Styled = withEmotionCache(function (props, cache, ref) {\n var FinalTag = shouldUseAs && props.as || baseTag;\n var className = '';\n var classInterpolations = [];\n var mergedProps = props;\n\n if (props.theme == null) {\n mergedProps = {};\n\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n\n mergedProps.theme = React.useContext(ThemeContext);\n }\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, classInterpolations, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);\n className += cache.key + \"-\" + serialized.name;\n\n if (targetClassName !== undefined) {\n className += \" \" + targetClassName;\n }\n\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;\n var newProps = {};\n\n for (var _key in props) {\n if (shouldUseAs && _key === 'as') continue;\n\n if ( // $FlowFixMe\n finalShouldForwardProp(_key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps.className = className;\n newProps.ref = ref;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof FinalTag === 'string'\n }), /*#__PURE__*/React.createElement(FinalTag, newProps));\n });\n Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n Styled.defaultProps = tag.defaultProps;\n Styled.__emotion_real = Styled;\n Styled.__emotion_base = baseTag;\n Styled.__emotion_styles = styles;\n Styled.__emotion_forwardProp = shouldForwardProp;\n Object.defineProperty(Styled, 'toString', {\n value: function value() {\n if (targetClassName === undefined && process.env.NODE_ENV !== 'production') {\n return 'NO_COMPONENT_SELECTOR';\n } // $FlowFixMe: coerce undefined to string\n\n\n return \".\" + targetClassName;\n }\n });\n\n Styled.withComponent = function (nextTag, nextOptions) {\n return createStyled(nextTag, _extends({}, options, nextOptions, {\n shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)\n })).apply(void 0, styles);\n };\n\n return Styled;\n };\n};\n\nexport { createStyled as default };\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|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|enterKeyHint|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|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|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 isPropValid = /* #__PURE__ */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 { isPropValid as default };\n","import createStyled from '../base/dist/emotion-styled-base.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport 'react';\nimport '@emotion/is-prop-valid';\nimport '@emotion/react';\nimport '@emotion/utils';\nimport '@emotion/serialize';\nimport '@emotion/use-insertion-effect-with-fallbacks';\n\nvar tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\nvar newStyled = createStyled.bind();\ntags.forEach(function (tagName) {\n // $FlowFixMe: we can ignore this because its exposed type is defined by the CreateStyled type\n newStyled[tagName] = newStyled(tagName);\n});\n\nexport { newStyled as default };\n","import { useColorMode } from \"@chakra-ui/color-mode\"\nimport {\n css,\n isStyleProp,\n StyleProps,\n SystemStyleObject,\n} from \"@chakra-ui/styled-system\"\nimport { Dict, filterUndefined, objectFilter, runIfFn } from \"@chakra-ui/utils\"\nimport { assignAfter } from \"@chakra-ui/object-utils\"\nimport createStyled, { CSSObject, FunctionInterpolation } from \"@emotion/styled\"\nimport React from \"react\"\nimport { shouldForwardProp } from \"./should-forward-prop\"\nimport { As, ChakraComponent, ChakraProps, PropsOf } from \"./system.types\"\nimport { DOMElements } from \"./system.utils\"\n\nconst emotion_styled = ((createStyled as any).default ??\n createStyled) as typeof createStyled\n\ntype StyleResolverProps = SystemStyleObject & {\n __css?: SystemStyleObject\n sx?: SystemStyleObject\n theme: any\n css?: CSSObject\n}\n\ninterface GetStyleObject {\n (options: {\n baseStyle?:\n | SystemStyleObject\n | ((props: StyleResolverProps) => SystemStyleObject)\n }): FunctionInterpolation<StyleResolverProps>\n}\n\n/**\n * Style resolver function that manages how style props are merged\n * in combination with other possible ways of defining styles.\n *\n * For example, take a component defined this way:\n * ```jsx\n * <Box fontSize=\"24px\" sx={{ fontSize: \"40px\" }}></Box>\n * ```\n *\n * We want to manage the priority of the styles properly to prevent unwanted\n * behaviors. Right now, the `sx` prop has the highest priority so the resolved\n * fontSize will be `40px`\n */\nexport const toCSSObject: GetStyleObject =\n ({ baseStyle }) =>\n (props) => {\n const { theme, css: cssProp, __css, sx, ...rest } = props\n const styleProps = objectFilter(rest, (_, prop) => isStyleProp(prop))\n const finalBaseStyle = runIfFn(baseStyle, props)\n const finalStyles = assignAfter(\n {},\n __css,\n finalBaseStyle,\n filterUndefined(styleProps),\n sx,\n )\n const computedCSS = css(finalStyles)(props.theme)\n return cssProp ? [computedCSS, cssProp] : computedCSS\n }\n\nexport interface ChakraStyledOptions extends Dict {\n shouldForwardProp?(prop: string): boolean\n label?: string\n baseStyle?:\n | SystemStyleObject\n | ((props: StyleResolverProps) => SystemStyleObject)\n}\n\nexport function styled<T extends As, P extends object = {}>(\n component: T,\n options?: ChakraStyledOptions,\n) {\n const { baseStyle, ...styledOptions } = options ?? {}\n\n if (!styledOptions.shouldForwardProp) {\n styledOptions.shouldForwardProp = shouldForwardProp\n }\n\n const styleObject = toCSSObject({ baseStyle })\n const Component = emotion_styled(\n component as React.ComponentType<any>,\n styledOptions,\n )(styleObject)\n\n const chakraComponent = React.forwardRef(function ChakraComponent(\n props,\n ref,\n ) {\n const { colorMode, forced } = useColorMode()\n return React.createElement(Component, {\n ref,\n \"data-theme\": forced ? colorMode : undefined,\n ...props,\n })\n })\n\n return chakraComponent as ChakraComponent<T, P>\n}\n\nexport type HTMLChakraComponents = {\n [Tag in DOMElements]: ChakraComponent<Tag, {}>\n}\n\nexport type HTMLChakraProps<T extends As> = Omit<\n PropsOf<T>,\n \"ref\" | keyof StyleProps\n> &\n ChakraProps & { as?: As }\n","import { DOMElements } from \"./system.utils\"\nimport { ChakraStyledOptions, HTMLChakraComponents, styled } from \"./system\"\nimport { As, ChakraComponent } from \"./system.types\"\n\ntype ChakraFactory = {\n <T extends As, P extends object = {}>(\n component: T,\n options?: ChakraStyledOptions,\n ): ChakraComponent<T, P>\n}\n\nfunction factory() {\n const cache = new Map<DOMElements, ChakraComponent<DOMElements>>()\n\n return new Proxy(styled, {\n /**\n * @example\n * const Div = chakra(\"div\")\n * const WithChakra = chakra(AnotherComponent)\n */\n apply(target, thisArg, argArray: [DOMElements, ChakraStyledOptions]) {\n return styled(...argArray)\n },\n /**\n * @example\n * <chakra.div />\n */\n get(_, element: DOMElements) {\n if (!cache.has(element)) {\n cache.set(element, styled(element))\n }\n return cache.get(element)\n },\n }) as ChakraFactory & HTMLChakraComponents\n}\n/**\n * The Chakra factory serves as an object of chakra enabled JSX elements,\n * and also a function that can be used to enable custom component receive chakra's style props.\n *\n * @see Docs https://chakra-ui.com/docs/styled-system/chakra-factory\n */\nexport const chakra = factory()\n","/**\n * All credit goes to Chance (Reach UI), Haz (Reakit) and (fluentui)\n * for creating the base type definitions upon which we improved on\n */\nimport { forwardRef as forwardReactRef } from \"react\"\nimport { As, ComponentWithAs, PropsOf, RightJoinProps } from \"./system.types\"\n\nexport function forwardRef<Props extends object, Component extends As>(\n component: React.ForwardRefRenderFunction<\n any,\n RightJoinProps<PropsOf<Component>, Props> & {\n as?: As\n }\n >,\n) {\n return forwardReactRef(component) as unknown as ComponentWithAs<\n Component,\n Props\n >\n}\n","// src/context.ts\nimport {\n createContext as createReactContext,\n useContext as useReactContext\n} from \"react\";\nfunction createContext(options = {}) {\n const {\n strict = true,\n errorMessage = \"useContext: `context` is undefined. Seems you forgot to wrap component within the Provider\",\n name\n } = options;\n const Context = createReactContext(void 0);\n Context.displayName = name;\n function useContext() {\n var _a;\n const context = useReactContext(Context);\n if (!context && strict) {\n const error = new Error(errorMessage);\n error.name = \"ContextError\";\n (_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, error, useContext);\n throw error;\n }\n return context;\n }\n return [\n Context.Provider,\n useContext,\n Context\n ];\n}\n\nexport {\n createContext\n};\n","import {\n chakra,\n ChakraProps,\n forwardRef,\n SystemStyleObject,\n useStyleConfig,\n} from \"@chakra-ui/system\"\nimport { cx } from \"@chakra-ui/shared-utils\"\n\nconst fallbackIcon = {\n path: (\n <g stroke=\"currentColor\" strokeWidth=\"1.5\">\n <path\n strokeLinecap=\"round\"\n fill=\"none\"\n d=\"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25\"\n />\n <path\n fill=\"currentColor\"\n strokeLinecap=\"round\"\n d=\"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0\"\n />\n <circle fill=\"none\" strokeMiterlimit=\"10\" cx=\"12\" cy=\"12\" r=\"11.25\" />\n </g>\n ),\n viewBox: \"0 0 24 24\",\n}\n\ntype Orientation = \"vertical\" | \"horizontal\"\n\nexport interface IconProps\n extends Omit<React.SVGAttributes<SVGElement>, keyof ChakraProps>,\n ChakraProps {\n orientation?: Orientation\n}\n\n/**\n * The Icon component renders as an svg element to help define your own custom components.\n *\n * @see Docs https://chakra-ui.com/docs/components/icon#using-the-icon-component\n */\nexport const Icon = forwardRef<IconProps, \"svg\">((props, ref) => {\n const {\n as: element,\n viewBox,\n color = \"currentColor\",\n focusable = false,\n children,\n className,\n __css,\n ...rest\n } = props\n\n const _className = cx(\"chakra-icon\", className)\n const customStyles = useStyleConfig(\"Icon\", props)\n\n const styles: SystemStyleObject = {\n w: \"1em\",\n h: \"1em\",\n display: \"inline-block\",\n lineHeight: \"1em\",\n flexShrink: 0,\n color,\n ...__css,\n ...customStyles,\n }\n\n const shared: any = {\n ref,\n focusable,\n className: _className,\n __css: styles,\n }\n\n const _viewBox = viewBox ?? fallbackIcon.viewBox\n\n /**\n * If you're using an icon library like `react-icons`.\n * Note: anyone passing the `as` prop, should manage the `viewBox` from the external component\n */\n if (element && typeof element !== \"string\") {\n return <chakra.svg as={element} {...shared} {...rest} />\n }\n\n const _path = (children ?? fallbackIcon.path) as React.ReactNode\n\n return (\n <chakra.svg verticalAlign=\"middle\" viewBox={_viewBox} {...shared} {...rest}>\n {_path}\n </chakra.svg>\n )\n})\n\nIcon.displayName = \"Icon\"\n\nexport default Icon\n","import { forwardRef } from \"@chakra-ui/system\"\nimport { Children } from \"react\"\nimport { Icon, IconProps } from \"./icon\"\n\ninterface CreateIconOptions {\n /**\n * The icon `svg` viewBox\n * @default \"0 0 24 24\"\n */\n viewBox?: string\n /**\n * The `svg` path or group element\n * @type React.ReactElement | React.ReactElement[]\n */\n path?: React.ReactElement | React.ReactElement[]\n /**\n * If the `svg` has a single path, simply copy the path's `d` attribute\n */\n d?: string\n /**\n * The display name useful in the dev tools\n */\n displayName?: string\n /**\n * Default props automatically passed to the component; overwritable\n */\n defaultProps?: IconProps\n}\n\nexport function createIcon(options: CreateIconOptions) {\n const {\n viewBox = \"0 0 24 24\",\n d: pathDefinition,\n displayName,\n defaultProps = {},\n } = options\n const path = Children.toArray(options.path)\n\n const Comp = forwardRef<IconProps, \"svg\">((props, ref) => (\n <Icon ref={ref} viewBox={viewBox} {...defaultProps} {...props}>\n {path.length ? path : <path fill=\"currentColor\" d={pathDefinition} />}\n </Icon>\n ))\n\n Comp.displayName = displayName\n\n return Comp\n}\n","import * as React from 'react'\nimport { createIcon } from './create-icon'\n\nexport const ChevronUpIcon = createIcon({\n displayName: 'ChevronUpIcon',\n path: <polyline points=\"18 15 12 9 6 15\"></polyline>,\n})\n\nexport const ChevronDownIcon = createIcon({\n displayName: 'ChevronDownIcon',\n path: <polyline points=\"6 9 12 15 18 9\"></polyline>,\n})\n\nexport const ChevronLeftIcon = createIcon({\n displayName: 'ChevronLeftIcon',\n path: <polyline points=\"15 18 9 12 15 6\"></polyline>,\n})\n\nexport const ChevronRightIcon = createIcon({\n displayName: 'ChevronRightIcon',\n path: <polyline points=\"9 18 15 12 9 6\"></polyline>,\n})\n\nexport const HamburgerIcon = createIcon({\n displayName: 'ChevronDownIcon',\n path: (\n <g fill=\"none\">\n <line x1=\"3\" y1=\"12\" x2=\"21\" y2=\"12\"></line>\n <line x1=\"3\" y1=\"6\" x2=\"21\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"18\" x2=\"21\" y2=\"18\"></line>\n </g>\n ),\n})\n\nexport const CloseIcon = createIcon({\n displayName: 'CloseIcon',\n path: (\n <g>\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </g>\n ),\n})\n\nexport const FilterIcon = createIcon({\n displayName: 'FilterIcon',\n path: (\n <polygon points=\"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3\"></polygon>\n ),\n})\n\nexport const CalendarIcon = createIcon({\n displayName: 'CalendarIcon',\n path: (\n <g>\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"></line>\n </g>\n ),\n})\n\nexport const PlusIcon = createIcon({\n displayName: 'PlusIcon',\n path: (\n <g>\n <line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\"></line>\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line>\n </g>\n ),\n})\n\nexport const MinusIcon = createIcon({\n displayName: 'MinusIcon',\n path: (\n <g>\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line>\n </g>\n ),\n})\n\nexport const ViewOffIcon = createIcon({\n displayName: 'ViewOffIcon',\n path: (\n <g>\n <path d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24\"></path>\n <line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\"></line>\n </g>\n ),\n})\n\nexport const ViewIcon = createIcon({\n displayName: 'ViewOffIcon',\n path: (\n <g>\n <path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\"></path>\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n </g>\n ),\n})\n\nexport const SearchIcon = createIcon({\n displayName: 'SearchIcon',\n path: (\n <g>\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </g>\n ),\n})\n\nexport const CheckIcon = createIcon({\n displayName: 'CheckIcon',\n path: (\n <g>\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </g>\n ),\n})\n","import { createIcon as _createIcon, IconProps } from '@chakra-ui/icon'\n\ninterface CreateIconOptions {\n /**\n * The icon `svg` viewBox\n * @default \"0 0 24 24\"\n */\n viewBox?: string\n /**\n * The `svg` path or group element\n * @type React.ReactElement | React.ReactElement[]\n */\n path?: React.ReactElement | React.ReactElement[]\n /**\n * If the `svg` has a single path, simply copy the path's `d` attribute\n */\n d?: string\n /**\n * The display name useful in the dev tools\n */\n displayName?: string\n /**\n * Default props automatically passed to the component; overwriteable\n */\n defaultProps?: IconProps\n}\n\nexport const createIcon = (props: CreateIconOptions) => {\n return _createIcon({\n viewBox: '0 0 24 24',\n defaultProps: {\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: '2',\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n },\n ...props,\n })\n}\n","import * as React from 'react'\n\nimport { chakra, Kbd, HTMLChakraProps, useStyleConfig } from '@chakra-ui/react'\nimport { cx } from '@chakra-ui/utils'\n\nconst Key: React.FC<HTMLChakraProps<'span'>> = ({ children }) => {\n if (typeof children !== 'string') {\n return <>{children}</>\n }\n\n if (['then', 'or', '+'].includes(children)) {\n return <chakra.span>{children}</chakra.span>\n }\n\n return <Kbd>{children}</Kbd>\n}\n\n/**\n * Command\n * A command is used to show which key or combination of keys performs a given action.\n *\n * All single letters A-Z are uppercase.\n * For non-letter keys such as enter, esc and shift, stick to lowercase.\n * Use symbols (⌥ ⇧ ⌃ ⌘) as opposed to spelling things out.\n */\nexport const Command: React.FC<HTMLChakraProps<'span'>> = (props) => {\n const { children, className, ...rest } = props\n if (typeof children !== 'string') {\n return <>{children}</>\n }\n const keys = children.split(/\\s|\\+/)\n\n const styles = useStyleConfig('SuiCommand')\n\n const commandStyles = {\n '& > *:not(style) ~ *:not(style)': { marginEnd: 1 },\n color: 'muted',\n ...styles,\n }\n\n return (\n <chakra.span\n className={cx('sui-command', className)}\n __css={commandStyles}\n {...rest}\n >\n {keys.map((key) => (\n <Key key={key}>{key}</Key>\n ))}\n </chakra.span>\n )\n}\n","import * as React from 'react'\nimport { chakra, HTMLChakraProps } from '@chakra-ui/react'\n\nexport const Br: React.FC<HTMLChakraProps<'span'>> = (props) => {\n return (\n <chakra.span {...props}>\n <br />\n </chakra.span>\n )\n}\n","import * as React from 'react'\nimport {\n forwardRef,\n Icon,\n chakra,\n As,\n ThemingProps,\n omitThemingProps,\n useMultiStyleConfig,\n ButtonGroup,\n IconProps,\n SystemProps,\n SystemStyleObject,\n HTMLChakraProps,\n TextProps,\n ButtonGroupProps,\n createStylesContext,\n} from '@chakra-ui/react'\n\nimport { cx } from '@chakra-ui/utils'\n\nconst [StylesProvider, useStyles] = createStylesContext('SuiEmptyState')\n\nexport const useEmptyStateStyles = useStyles\n\nexport interface EmptyStateProps\n extends Omit<EmptyStateContainerProps, 'title'> {\n title?: React.ReactNode\n description?: React.ReactNode\n icon?: As\n actions?: React.ReactNode\n footer?: React.ReactNode\n children?: React.ReactNode\n spacing?: SystemProps['margin']\n}\n/**\n * Display actionable feedback when no data is available.\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/empty-state\n */\nexport const EmptyState: React.FC<EmptyStateProps> = (props) => {\n const {\n children,\n spacing,\n icon,\n title,\n description,\n actions,\n footer,\n ...rest\n } = props\n\n return (\n <EmptyStateContainer {...rest}>\n <EmptyStateBody spacing={spacing}>\n {icon && <EmptyStateIcon as={icon} />}\n <chakra.div>\n {title && <EmptyStateTitle>{title}</EmptyStateTitle>}\n {description && (\n <EmptyStateDescription>{description}</EmptyStateDescription>\n )}\n </chakra.div>\n {children}\n\n {actions && <EmptyStateActions>{actions}</EmptyStateActions>}\n {footer && <EmptyStateFooter>{footer}</EmptyStateFooter>}\n </EmptyStateBody>\n </EmptyStateContainer>\n )\n}\n\nEmptyState.displayName = 'EmptyState'\n\nexport interface EmptyStateContainerProps\n extends HTMLChakraProps<'div'>,\n ThemingProps<'SuiEmptyState'> {\n children?: React.ReactNode\n spacing?: SystemProps['margin']\n}\n\nexport const EmptyStateContainer: React.FC<EmptyStateContainerProps> = (\n props\n) => {\n const { children, spacing, ...rest } = props\n const styles = useMultiStyleConfig('SuiEmptyState', props)\n\n const containerProps = omitThemingProps(rest)\n\n const containerStyles: SystemStyleObject = {\n display: 'flex',\n flex: 1,\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n ...styles.container,\n }\n\n return (\n <StylesProvider value={styles}>\n <chakra.div\n {...containerProps}\n __css={containerStyles}\n className={cx('sui-empty-state', props.className)}\n >\n {children}\n </chakra.div>\n </StylesProvider>\n )\n}\n\nEmptyStateContainer.displayName = 'EmptyStateContainer'\n\nexport const EmptyStateIcon = forwardRef<IconProps, typeof Icon>(\n (props, ref) => {\n const styles = useStyles()\n\n const iconStyles: SystemStyleObject = {\n boxSize: 10,\n ...styles.icon,\n }\n\n return (\n <Icon\n ref={ref}\n role=\"presentation\"\n sx={iconStyles}\n {...props}\n className={cx('sui-empty-state__icon', props.className)}\n />\n )\n }\n)\n\nEmptyStateIcon.displayName = 'EmptyStateIcon'\n\nexport interface EmptyStateTitleProps extends HTMLChakraProps<'h3'> {}\n\nexport const EmptyStateTitle: React.FC<EmptyStateTitleProps> = (props) => {\n const styles = useStyles()\n\n const titleStyles = {\n mb: 1,\n ...styles.title,\n }\n\n return (\n <chakra.h3\n __css={titleStyles}\n {...props}\n className={cx('sui-empty-state__title', props.className)}\n />\n )\n}\n\nEmptyStateTitle.displayName = 'EmptyStateTitle'\n\nexport const EmptyStateDescription: React.FC<TextProps> = (props) => {\n const styles = useStyles()\n\n const descriptionStyles: SystemStyleObject = {\n color: 'muted',\n fontSize: 'md',\n ...styles.description,\n }\n\n return (\n <chakra.p\n __css={descriptionStyles}\n {...props}\n className={cx('sui-empty-state__description', props.className)}\n />\n )\n}\n\nEmptyStateDescription.displayName = 'EmptyStateDescription'\n\nexport interface EmptyStateBodyProps extends HTMLChakraProps<'div'> {\n spacing?: SystemProps['margin']\n}\n\nexport const EmptyStateBody: React.FC<EmptyStateBodyProps> = (props) => {\n const { spacing = 8, ...rest } = props\n const styles = useStyles()\n\n const bodyStyles: SystemStyleObject = {\n ...styles.body,\n }\n\n return (\n <chakra.div\n __css={bodyStyles}\n {...rest}\n className={cx('sui-empty-state__body', props.className)}\n />\n )\n}\n\nEmptyStateBody.displayName = 'EmptyStateBody'\n\nexport const EmptyStateActions: React.FC<ButtonGroupProps> = (props) => {\n const styles = useStyles()\n return (\n <ButtonGroup\n sx={styles.actions}\n {...props}\n className={cx('sui-empty-state__actions', props.className)}\n />\n )\n}\n\nEmptyStateActions.displayName = 'EmptyStateActions'\n\nexport const EmptyStateFooter: React.FC<HTMLChakraProps<'footer'>> = (\n props\n) => {\n const styles = useStyles()\n return (\n <chakra.footer\n __css={styles.footer}\n {...props}\n className={cx('sui-empty-state__footer', props.className)}\n />\n )\n}\n\nEmptyStateFooter.displayName = 'EmptyStateFooter'\n","import * as React from 'react'\n\nimport { SaasContext } from '../provider'\n\nexport interface ErrorBoundaryProps {\n fallback?: React.ReactNode\n children: React.ReactNode\n onError?: (error: Error, errorInfo: React.ErrorInfo) => void\n}\n\nexport interface ErrorBoundaryState {\n error?: Error | null\n errorInfo?: any\n}\n/**\n * A container component that catches errors and displays a fallback UI.\n *\n * @see Docs https://saas-ui.dev/docs/components/utils/error-boundary\n */\nexport class ErrorBoundary extends React.Component<ErrorBoundaryProps> {\n state: ErrorBoundaryState\n\n static contextType = SaasContext\n\n declare context: React.ContextType<typeof SaasContext>\n\n constructor(props: ErrorBoundaryProps) {\n super(props)\n this.state = { error: null }\n }\n\n static getDerivedStateFromError(error: Error) {\n return { error }\n }\n\n onError = (error: Error, errorInfo: any) => {\n this.props.onError?.(error, errorInfo)\n this.context.onError?.(error, errorInfo)\n }\n\n componentDidCatch(error: Error, errorInfo: any) {\n this.onError(error, errorInfo)\n }\n\n render() {\n if (this.state.error) {\n return this.props.fallback || <h1>Something went wrong.</h1>\n }\n\n return this.props.children\n }\n}\n","import * as React from 'react'\n\nimport { ChakraProvider, ChakraProviderProps } from '@chakra-ui/react'\n\nimport { theme as defaultTheme } from '@saas-ui/theme'\nimport { Dict } from '@chakra-ui/utils'\n\nexport interface SaasContextValue {\n linkComponent?: React.ElementType<any>\n onError?: (error: Error, errorInfo: React.ErrorInfo) => void\n}\n\nexport const SaasContext = React.createContext<SaasContextValue>({})\n\nexport interface SaasProviderProps extends ChakraProviderProps {\n theme?: Dict\n linkComponent?: React.ElementType<any>\n children: React.ReactNode\n onError?: (error: Error, errorInfo: React.ErrorInfo) => void\n}\n\nexport function SaasProvider(props: SaasProviderProps) {\n const { theme, linkComponent, onError, children, ...rest } = props\n\n const context = {\n linkComponent,\n onError,\n }\n\n return (\n <SaasContext.Provider value={context}>\n <ChakraProvider {...rest} theme={theme || defaultTheme}>\n {children}\n </ChakraProvider>\n </SaasContext.Provider>\n )\n}\n\nexport const useSaas = (): SaasContextValue => React.useContext(SaasContext)\n","import { anatomy } from '@chakra-ui/theme-tools'\n\nexport const appShellAnatomy = anatomy('app-shell').parts(\n 'container',\n 'inner',\n 'main'\n)\n\nexport const emptyStateAnatomy = anatomy('emptystate').parts(\n 'container',\n 'body',\n 'icon',\n 'title',\n 'descripton',\n 'actions',\n 'footer'\n)\n\nexport const bannerAnatomy = anatomy('banner').parts(\n 'container',\n 'icon',\n 'content',\n 'title',\n 'description',\n 'actions',\n 'close'\n)\n\nexport const hotkeysAnantomy = anatomy('hotkeys').parts(\n 'container',\n 'group',\n 'groupTitle',\n 'item',\n 'command',\n 'then'\n)\n\nexport const loadingOverlayAnatomy = anatomy('loading-overlay').parts(\n 'overlay',\n 'text'\n)\n\nexport const navGroupAnatomy = anatomy('nav-group').parts(\n 'container',\n 'title',\n 'icon',\n 'content'\n)\n\nexport const navItemAnatomy = anatomy('nav-item').parts(\n 'item',\n 'link',\n 'inner',\n 'icon',\n 'label'\n)\n\nexport const nprogressAnatomy = anatomy('nprogress').parts('container', 'bar')\n\nexport const personaAnatomy = anatomy('persona').parts(\n 'container',\n 'details',\n 'avatar',\n 'label',\n 'secondaryLabel',\n 'tertiaryLabel'\n)\n\nexport const searchInputAnatomy = anatomy('search-input').parts(\n 'input',\n 'reset'\n)\n\nexport const sidebarAnatomy = anatomy('sidebar').parts(\n 'container',\n 'overlay',\n 'section',\n 'toggleWrapper',\n 'toggle'\n)\n\nexport const stepperAnatomy = anatomy('stepper').parts(\n 'container',\n 'steps',\n 'icon',\n 'content',\n 'title',\n 'separator'\n)\n\nexport const structuredListAnatomy = anatomy('structured-list').parts(\n 'list',\n 'item',\n 'button',\n 'header',\n 'cell',\n 'icon'\n)\n\nexport const propertyAnatomy = anatomy('property').parts(\n 'property',\n 'label',\n 'value'\n)\n\nexport const selectAnatomy = anatomy('select').parts(\n 'addon',\n 'field',\n 'element'\n)\n\nexport const timelineAnatomy = anatomy('timeline').parts(\n 'container',\n 'item',\n 'separator',\n 'icon',\n 'dot',\n 'track',\n 'content'\n)\n","import { extendTheme, withDefaultColorScheme } from '@chakra-ui/react'\n\nimport { baseTheme } from '../base/theme'\n\nimport { styles } from './styles'\nimport { foundations } from './foundations'\nimport { components } from './components'\n\nexport const theme = extendTheme(\n {\n ...foundations,\n styles,\n components,\n },\n withDefaultColorScheme({\n colorScheme: 'primary',\n components: ['Radio', 'Switch', 'Checkbox'],\n }),\n baseTheme\n)\n","import { theme, extendTheme, ChakraTheme } from '@chakra-ui/react'\n\nimport { components } from './components'\n\nexport const baseTheme = extendTheme({\n colors: {\n primary: theme.colors.blue,\n },\n semanticTokens: {\n colors: {\n 'presence.online': 'green.500',\n 'presence.offline': 'gray.400',\n 'presence.busy': 'orange.500',\n 'presence.dnd': 'red.500',\n 'presence.away': 'gray.400',\n },\n },\n components,\n}) as ChakraTheme\n","import { transparentize } from '@chakra-ui/theme-tools'\nimport { theme as baseTheme } from '@chakra-ui/react'\n\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { navItemAnatomy } from '../../anatomy'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(navItemAnatomy.keys)\n\nconst baseStyle = definePartsStyle((props) => {\n return {\n item: {\n my: '2px',\n color: 'gray.900',\n minW: 1,\n _dark: {\n color: 'whiteAlpha.900',\n },\n },\n link: {\n display: 'flex',\n rounded: 'md',\n justifyContent: 'flex-start',\n alignItems: 'center',\n textDecoration: 'none',\n transitionProperty: 'common',\n transitionDuration: 'normal',\n minW: 1,\n _hover: {\n textDecoration: 'none',\n },\n _focusVisible: {\n outline: 'none',\n boxShadow: 'outline',\n },\n },\n inner: {\n display: 'flex',\n flex: 1,\n w: '100%',\n alignItems: 'center',\n minW: 1,\n },\n label: {\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n },\n icon: {\n display: 'flex',\n transitionProperty: 'common',\n transitionDuration: 'normal',\n alignItems: 'center',\n justifyContent: 'center',\n width: '4',\n ml: '-0.25rem',\n color: 'currentColor',\n },\n }\n})\n\n// &[aria-current=page] styles are used for ReactRouter and Remix NavLink components\n\nconst variantNeutral = definePartsStyle((props) => {\n const _active = {\n bg: 'blackAlpha.200',\n _dark: {\n bg: `whiteAlpha.300`,\n },\n }\n return {\n link: {\n _hover: {\n bg: 'blackAlpha.100',\n _dark: {\n bg: `whiteAlpha.200`,\n },\n },\n _active,\n ['&[aria-current=page]']: _active,\n },\n icon: {\n opacity: 0.8,\n '[data-active] &': {\n opacity: 1,\n },\n },\n }\n})\n\nconst variantSubtle = definePartsStyle((props) => {\n const { colorScheme: c, theme } = props\n\n const _active = {\n bg: transparentize(`${c}.500`, 0.3)(theme),\n fontWeight: 'semibold',\n color: `${c}.600`,\n _dark: {\n bg: transparentize(`${c}.500`, 0.3)(theme),\n color: `${c}.100`,\n },\n }\n\n return {\n link: {\n _hover: {\n bg: `blackAlpha.100`,\n _dark: {\n bg: `whiteAlpha.200`,\n },\n },\n _active,\n ['&[aria-current=page]']: _active,\n },\n }\n})\n\nconst variantSolid = definePartsStyle((props) => {\n const { colorScheme: c } = props\n const _active = {\n bg: `${c}.500`,\n }\n return {\n link: {\n _hover: {\n bg: 'blackAlpha.100',\n _dark: {\n bg: `whiteAlpha.200`,\n },\n },\n _active,\n ['&[aria-current=page]']: _active,\n color: 'white',\n },\n icon: {\n color: 'white',\n },\n label: {},\n }\n})\n\nconst variantLeftAccent = definePartsStyle((props) => {\n const { colorScheme: c } = props\n const _active = {\n _before: {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: -3,\n width: '3px',\n bg: `${c}.500`,\n },\n }\n return {\n item: {\n position: 'relative',\n },\n link: {\n _hover: {\n color: 'inherit',\n bg: 'blackAlpha.100',\n _dark: {\n bg: `whiteAlpha.200`,\n },\n },\n _active,\n ['&[aria-current=page]']: _active,\n },\n icon: {\n '[data-active] &': {\n color: 'currentColor',\n },\n },\n label: {},\n }\n})\n\nexport const navItemTheme = defineMultiStyleConfig({\n defaultProps: {\n size: 'sm',\n colorScheme: 'primary',\n variant: 'neutral',\n },\n baseStyle,\n sizes: {\n xs: {\n link: baseTheme.components.Button.sizes?.xs,\n icon: {\n me: 1,\n fontSize: 'xs',\n },\n },\n sm: {\n link: baseTheme.components.Button.sizes?.sm,\n icon: {\n me: 2,\n fontSize: 'sm',\n },\n },\n md: {\n link: baseTheme.components.Button.sizes?.md,\n icon: {\n me: 2,\n fontSize: 'md',\n },\n },\n lg: {\n link: baseTheme.components.Button.sizes?.lg,\n icon: {\n me: 3,\n fontSize: 'lg',\n },\n },\n },\n variants: {\n neutral: variantNeutral,\n subtle: variantSubtle,\n solid: variantSolid,\n 'left-accent': variantLeftAccent,\n },\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { appShellAnatomy } from '../../anatomy'\n\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(appShellAnatomy.keys)\n\nconst baseStyle = definePartsStyle({\n container: {},\n inner: {},\n main: {},\n})\n\nexport const appShellTheme = defineMultiStyleConfig({\n defaultProps: {\n variant: 'fullscreen',\n },\n variants: {\n static: {},\n fullscreen: {\n container: {\n position: 'absolute',\n inset: 0,\n },\n },\n },\n baseStyle,\n})\n","import { transparentize } from '@chakra-ui/theme-tools'\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { bannerAnatomy } from '../../anatomy'\n\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(bannerAnatomy.keys)\n\nconst baseStyle = definePartsStyle({\n container: {\n px: 4,\n py: 3,\n },\n content: {\n display: 'flex',\n flex: 1,\n flexDirection: ['column', null, 'row'],\n },\n title: {\n fontWeight: 'bold',\n lineHeight: 6,\n marginEnd: 2,\n },\n description: {\n lineHeight: 6,\n marginEnd: 2,\n },\n actions: {\n marginEnd: 2,\n },\n icon: {\n flexShrink: 0,\n marginEnd: 3,\n w: 5,\n h: 6,\n },\n})\n\nconst variantSubtle = definePartsStyle((props) => {\n const { theme, colorScheme: c } = props\n return {\n container: {\n bg: `${c}.100`,\n _dark: { bg: transparentize(`${c}.200`, 0.16)(theme) },\n },\n icon: { color: `${c}.500`, _dark: { color: `${c}.200` } },\n }\n})\n\nconst variantSolid = definePartsStyle((props) => {\n const { colorScheme: c } = props\n return {\n container: {\n bg: `${c}.500`,\n color: 'white',\n },\n }\n})\n\nexport const bannerTheme = defineMultiStyleConfig({\n baseStyle,\n variants: {\n subtle: variantSubtle,\n solid: variantSolid,\n },\n defaultProps: {\n variant: 'subtle',\n colorScheme: 'blue',\n },\n})\n","export const commandTheme = {\n baseStyle: {\n fontSize: 'xs',\n '[role=tooltip] > &': {\n ms: 1,\n _before: {\n content: '\"•\"',\n me: 1,\n fontSize: 'xs',\n },\n },\n },\n}\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\n\nimport { emptyStateAnatomy } from '../../anatomy'\n\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(emptyStateAnatomy.keys)\n\nconst baseStyle = definePartsStyle((props) => {\n const { colorScheme: c } = props\n return {\n icon: {\n boxSize: [10, null, 12],\n color: `${c}.500`,\n _dark: {\n color: `${c}.200`,\n },\n },\n title: {\n mt: 8,\n fontWeight: 'bold',\n fontSize: 'xl',\n },\n actions: {\n mt: 8,\n },\n }\n})\n\nconst variantCentered = definePartsStyle((props) => {\n return {\n body: {\n display: 'flex',\n flexDirection: 'column',\n textAlign: 'center',\n alignItems: 'center',\n },\n }\n})\n\nexport const emptyStateTheme = defineMultiStyleConfig({\n baseStyle,\n variants: {\n centered: variantCentered,\n },\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { formAnatomy } from '@chakra-ui/anatomy'\n\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(formAnatomy.keys)\n\nconst horizontalVariant = definePartsStyle({\n container: {\n display: 'flex',\n alignItems: 'center',\n flexDirection: 'row-reverse',\n justifyContent: 'flex-end',\n },\n})\n\nexport const formTheme = defineMultiStyleConfig({\n variants: {\n horizontal: horizontalVariant,\n },\n})\n","import { defineStyleConfig } from '@chakra-ui/styled-system'\n\nexport const formLayoutTheme = defineStyleConfig({\n defaultProps: {\n /* @ts-expect-error */\n spacing: 4, // Chakra UI officially doesn't support custom default props yet, but this works.\n },\n})\n","import { defineStyleConfig } from '@chakra-ui/styled-system'\n\nexport const formLegendTheme = defineStyleConfig({\n baseStyle: {\n fontWeight: 'semibold',\n mb: 4,\n },\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { hotkeysAnantomy } from '../../anatomy'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(hotkeysAnantomy.keys)\n\nexport const hotkeysTheme = defineMultiStyleConfig({\n baseStyle: {\n container: {\n fontSize: 'md',\n },\n group: {\n my: 2,\n py: 2,\n },\n groupTitle: { py: 2, fontWeight: 'semibold', fontSize: 'sm' },\n item: {\n display: 'flex',\n alignItems: 'center',\n textAlign: 'start',\n flex: '0 0 auto',\n py: 2,\n },\n then: {\n mr: 1,\n fontSize: 'sm',\n color: 'muted',\n },\n },\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { loadingOverlayAnatomy } from '../../anatomy'\n\nconst { defineMultiStyleConfig, definePartsStyle } =\n createMultiStyleConfigHelpers(loadingOverlayAnatomy.keys)\n\nconst baseStyle = definePartsStyle({\n overlay: {\n p: 4,\n },\n text: {},\n})\n\nconst variantFill = definePartsStyle(() => {\n return {\n overlay: {\n flex: 1,\n height: '100%',\n bg: 'whiteAlpha.400',\n _dark: {\n bg: 'blackAlpha.400',\n },\n },\n }\n})\n\nconst variantFullscreen = definePartsStyle(() => {\n return {\n overlay: {\n position: 'fixed',\n inset: 0,\n zIndex: 'modal',\n bg: 'white',\n _dark: {\n bg: 'gray.800',\n },\n },\n }\n})\n\nconst variantOverlay = definePartsStyle(() => {\n return {\n overlay: {\n position: 'absolute',\n inset: 0,\n bg: 'whiteAlpha.300',\n _dark: {\n bg: 'blackAlpha.300',\n },\n },\n }\n})\n\nexport const loadingOverlayTheme = defineMultiStyleConfig({\n defaultProps: {\n variant: 'fill',\n },\n baseStyle,\n variants: {\n fill: variantFill,\n fullscreen: variantFullscreen,\n overlay: variantOverlay,\n },\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { navGroupAnatomy } from '../../anatomy'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(navGroupAnatomy.keys)\n\nconst baseStyle = definePartsStyle((props) => {\n return {\n container: {\n '&:not(:last-of-type)': {\n mb: 4,\n },\n },\n title: {\n display: 'flex',\n alignItems: 'center',\n px: 3,\n my: 1,\n height: 6,\n fontSize: 'sm',\n fontWeight: 'medium',\n color: 'muted',\n transitionProperty: 'common',\n transitionDuration: 'normal',\n '&.sui-collapse-toggle .chakra-icon': {\n opacity: 0,\n },\n '&.sui-collapse-toggle': {\n cursor: 'pointer',\n borderRadius: 'md',\n _hover: {\n bg: 'blackAlpha.100',\n '& .chakra-icon': {\n opacity: 1,\n },\n _dark: {\n bg: 'whiteAlpha.200',\n },\n },\n },\n '[data-compact] &': {\n opacity: 0,\n },\n },\n content: {},\n }\n})\n\nexport const navGroupTheme = defineMultiStyleConfig({\n baseStyle,\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { nprogressAnatomy } from '../../anatomy'\n\nexport const { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(nprogressAnatomy.keys)\n\nconst baseStyle = definePartsStyle((props) => {\n const { colorScheme: c } = props\n return {\n bar: {\n bg: `${c}.500`,\n _dark: {\n bg: `${c}.300`,\n },\n },\n }\n})\n\nexport const nprogressTheme = defineMultiStyleConfig({\n defaultProps: {\n colorScheme: 'teal',\n },\n baseStyle,\n})\n","import {\n createMultiStyleConfigHelpers,\n defineStyle,\n} from '@chakra-ui/styled-system'\nimport { personaAnatomy } from '../../anatomy'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(personaAnatomy.keys)\n\nconst baseStyleLabel = defineStyle((props) => {\n return {\n color: 'gray.500',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n minW: 0,\n _dark: {\n color: 'whiteAlpha.600',\n },\n }\n})\n\nconst baseStyle = definePartsStyle((props) => {\n return {\n details: {\n minW: 0,\n },\n secondaryLabel: baseStyleLabel(props),\n tertiaryLabel: baseStyleLabel(props),\n }\n})\n\nconst sizes = {\n '2xs': definePartsStyle({\n details: { ms: 2 },\n label: {\n fontSize: 'xs',\n },\n secondaryLabel: { display: 'none' },\n tertiaryLabel: { display: 'none' },\n }),\n xs: definePartsStyle({\n details: { ms: 2 },\n label: {\n fontSize: 'md',\n },\n secondaryLabel: { display: 'none' },\n tertiaryLabel: { display: 'none' },\n }),\n sm: definePartsStyle({\n details: { ms: 2 },\n label: { fontSize: 'md' },\n secondaryLabel: { fontSize: 'sm' },\n tertiaryLabel: { display: 'none' },\n }),\n md: definePartsStyle({\n details: { ms: 2 },\n label: {\n fontSize: 'md',\n },\n secondaryLabel: {\n fontSize: 'sm',\n },\n tertiaryLabel: { display: 'none' },\n }),\n lg: definePartsStyle({\n details: { ms: 3 },\n label: {\n fontSize: 'md',\n },\n secondaryLabel: {\n fontSize: 'sm',\n },\n tertiaryLabel: {\n fontSize: 'sm',\n },\n }),\n xl: definePartsStyle({\n details: { ms: 3 },\n label: {\n fontSize: 'xl',\n },\n secondaryLabel: {\n fontSize: 'md',\n },\n tertiaryLabel: { fontSize: 'md' },\n }),\n '2xl': definePartsStyle({\n details: { ms: 4 },\n label: {\n fontSize: '2xl',\n },\n secondaryLabel: {\n fontSize: 'lg',\n },\n tertiaryLabel: { fontSize: 'lg' },\n }),\n}\n\nexport const personaTheme = defineMultiStyleConfig({\n defaultProps: {\n size: 'md',\n },\n baseStyle,\n sizes,\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { propertyAnatomy } from '../../anatomy'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(propertyAnatomy.keys)\n\nexport const propertyTheme = defineMultiStyleConfig({\n baseStyle: {\n label: {\n display: 'flex',\n flexDirection: 'row',\n minWidth: '100px',\n width: '30%',\n marginEnd: 2,\n py: 2,\n color: 'gray.500',\n _dark: {\n color: 'gray.400',\n },\n },\n },\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { searchInputAnatomy } from '../../anatomy'\nconst { defineMultiStyleConfig } = createMultiStyleConfigHelpers(\n searchInputAnatomy.keys\n)\n\nexport const searchInputTheme = defineMultiStyleConfig({\n baseStyle: {\n input: {\n pr: 8,\n },\n },\n sizes: {\n sm: {\n reset: {\n fontSize: '0.7em',\n },\n },\n lg: {\n input: {\n pr: 10,\n },\n },\n },\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { sidebarAnatomy } from '../../anatomy'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(sidebarAnatomy.keys)\n\nconst baseStyle = definePartsStyle((props) => {\n const { colorScheme: c } = props\n\n return {\n container: {\n bg: c ? `${c}.500` : 'white',\n display: 'flex',\n flexDirection: 'column',\n borderRightWidth: '1px',\n _dark: {\n bg: c ? `${c}.500` : 'gray.800',\n },\n },\n overlay: {\n bg: 'blackAlpha.200',\n },\n }\n})\n\nconst variantDefault = definePartsStyle((props) => {\n return {\n container: {\n width: '280px',\n maxWidth: ['100vw', '320px'],\n minWidth: '220px',\n py: 3,\n '&[data-collapsible]': {\n pt: 14,\n },\n },\n section: {\n px: 3,\n },\n toggleWrapper: {\n h: 8,\n mb: 4,\n display: 'none',\n '[data-collapsible] &': {\n display: 'block',\n },\n },\n }\n})\n\nconst variantCondensed = definePartsStyle((props) => {\n return {\n container: {\n width: '14',\n py: 3,\n },\n section: {\n px: 3,\n },\n toggleWrapper: {\n display: 'none',\n },\n }\n})\n\nexport const sidebarTheme = defineMultiStyleConfig({\n defaultProps: {\n variant: 'default',\n },\n baseStyle,\n variants: {\n default: variantDefault,\n compact: variantCondensed,\n },\n})\n","import {\n defineCssVars,\n defineStyle,\n defineStyleConfig,\n} from \"@chakra-ui/styled-system\"\nimport { transparentize } from \"@chakra-ui/theme-tools\"\n\nconst vars = defineCssVars(\"badge\", [\"bg\", \"color\", \"shadow\"])\n\nconst baseStyle = defineStyle({\n px: 1,\n textTransform: \"uppercase\",\n fontSize: \"xs\",\n borderRadius: \"sm\",\n fontWeight: \"bold\",\n bg: vars.bg.reference,\n color: vars.color.reference,\n boxShadow: vars.shadow.reference,\n})\n\nconst variantSolid = defineStyle((props) => {\n const { colorScheme: c, theme } = props\n const dark = transparentize(`${c}.500`, 0.6)(theme)\n return {\n [vars.bg.variable]: `colors.${c}.500`,\n [vars.color.variable]: `colors.white`,\n _dark: {\n [vars.bg.variable]: dark,\n [vars.color.variable]: `colors.whiteAlpha.800`,\n },\n }\n})\n\nconst variantSubtle = defineStyle((props) => {\n const { colorScheme: c, theme } = props\n const darkBg = transparentize(`${c}.200`, 0.16)(theme)\n return {\n [vars.bg.variable]: `colors.${c}.100`,\n [vars.color.variable]: `colors.${c}.800`,\n _dark: {\n [vars.bg.variable]: darkBg,\n [vars.color.variable]: `colors.${c}.200`,\n },\n }\n})\n\nconst variantOutline = defineStyle((props) => {\n const { colorScheme: c, theme } = props\n const darkColor = transparentize(`${c}.200`, 0.8)(theme)\n return {\n [vars.color.variable]: `colors.${c}.500`,\n _dark: {\n [vars.color.variable]: darkColor,\n },\n [vars.shadow.variable]: `inset 0 0 0px 1px ${vars.color.reference}`,\n }\n})\n\nconst variants = {\n solid: variantSolid,\n subtle: variantSubtle,\n outline: variantOutline,\n}\n\nexport const badgeTheme = defineStyleConfig({\n baseStyle,\n variants,\n defaultProps: {\n variant: \"subtle\",\n colorScheme: \"gray\",\n },\n})\n\nexport { vars as badgeVars }\n","import { inputAnatomy as parts } from \"@chakra-ui/anatomy\"\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle,\n} from \"@chakra-ui/styled-system\"\nimport { getColor, mode } from \"@chakra-ui/theme-tools\"\n\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst $height = cssVar(\"input-height\")\nconst $fontSize = cssVar(\"input-font-size\")\nconst $padding = cssVar(\"input-padding\")\nconst $borderRadius = cssVar(\"input-border-radius\")\n\nconst baseStyle = definePartsStyle({\n addon: {\n height: $height.reference,\n fontSize: $fontSize.reference,\n px: $padding.reference,\n borderRadius: $borderRadius.reference,\n },\n field: {\n width: \"100%\",\n height: $height.reference,\n fontSize: $fontSize.reference,\n px: $padding.reference,\n borderRadius: $borderRadius.reference,\n minWidth: 0,\n outline: 0,\n position: \"relative\",\n appearance: \"none\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\",\n },\n },\n})\n\nconst size = {\n lg: defineStyle({\n [$fontSize.variable]: \"fontSizes.lg\",\n [$padding.variable]: \"space.4\",\n [$borderRadius.variable]: \"radii.md\",\n [$height.variable]: \"sizes.12\",\n }),\n md: defineStyle({\n [$fontSize.variable]: \"fontSizes.md\",\n [$padding.variable]: \"space.4\",\n [$borderRadius.variable]: \"radii.md\",\n [$height.variable]: \"sizes.10\",\n }),\n sm: defineStyle({\n [$fontSize.variable]: \"fontSizes.sm\",\n [$padding.variable]: \"space.3\",\n [$borderRadius.variable]: \"radii.sm\",\n [$height.variable]: \"sizes.8\",\n }),\n xs: defineStyle({\n [$fontSize.variable]: \"fontSizes.xs\",\n [$padding.variable]: \"space.2\",\n [$borderRadius.variable]: \"radii.sm\",\n [$height.variable]: \"sizes.6\",\n }),\n}\n\nconst sizes = {\n lg: definePartsStyle({\n field: size.lg,\n group: size.lg,\n }),\n md: definePartsStyle({\n field: size.md,\n group: size.md,\n }),\n sm: definePartsStyle({\n field: size.sm,\n group: size.sm,\n }),\n xs: definePartsStyle({\n field: size.xs,\n group: size.xs,\n }),\n}\n\nfunction getDefaults(props: Record<string, any>) {\n const { focusBorderColor: fc, errorBorderColor: ec } = props\n return {\n focusBorderColor: fc || mode(\"blue.500\", \"blue.300\")(props),\n errorBorderColor: ec || mode(\"red.500\", \"red.300\")(props),\n }\n}\n\nconst variantOutline = definePartsStyle((props) => {\n const { theme } = props\n const { focusBorderColor: fc, errorBorderColor: ec } = getDefaults(props)\n\n return {\n field: {\n border: \"1px solid\",\n borderColor: \"inherit\",\n bg: \"inherit\",\n _hover: {\n borderColor: mode(\"gray.300\", \"whiteAlpha.400\")(props),\n },\n _readOnly: {\n boxShadow: \"none !important\",\n userSelect: \"all\",\n },\n _invalid: {\n borderColor: getColor(theme, ec),\n boxShadow: `0 0 0 1px ${getColor(theme, ec)}`,\n },\n _focusVisible: {\n zIndex: 1,\n borderColor: getColor(theme, fc),\n boxShadow: `0 0 0 1px ${getColor(theme, fc)}`,\n },\n },\n addon: {\n border: \"1px solid\",\n borderColor: mode(\"inherit\", \"whiteAlpha.50\")(props),\n bg: mode(\"gray.100\", \"whiteAlpha.300\")(props),\n },\n }\n})\n\nconst variantFilled = definePartsStyle((props) => {\n const { theme } = props\n const { focusBorderColor: fc, errorBorderColor: ec } = getDefaults(props)\n\n return {\n field: {\n border: \"2px solid\",\n borderColor: \"transparent\",\n bg: mode(\"gray.100\", \"whiteAlpha.50\")(props),\n _hover: {\n bg: mode(\"gray.200\", \"whiteAlpha.100\")(props),\n },\n _readOnly: {\n boxShadow: \"none !important\",\n userSelect: \"all\",\n },\n _invalid: {\n borderColor: getColor(theme, ec),\n },\n _focusVisible: {\n bg: \"transparent\",\n borderColor: getColor(theme, fc),\n },\n },\n addon: {\n border: \"2px solid\",\n borderColor: \"transparent\",\n bg: mode(\"gray.100\", \"whiteAlpha.50\")(props),\n },\n }\n})\n\nconst variantFlushed = definePartsStyle((props) => {\n const { theme } = props\n const { focusBorderColor: fc, errorBorderColor: ec } = getDefaults(props)\n\n return {\n field: {\n borderBottom: \"1px solid\",\n borderColor: \"inherit\",\n borderRadius: \"0\",\n px: \"0\",\n bg: \"transparent\",\n _readOnly: {\n boxShadow: \"none !important\",\n userSelect: \"all\",\n },\n _invalid: {\n borderColor: getColor(theme, ec),\n boxShadow: `0px 1px 0px 0px ${getColor(theme, ec)}`,\n },\n _focusVisible: {\n borderColor: getColor(theme, fc),\n boxShadow: `0px 1px 0px 0px ${getColor(theme, fc)}`,\n },\n },\n addon: {\n borderBottom: \"2px solid\",\n borderColor: \"inherit\",\n borderRadius: \"0\",\n px: \"0\",\n bg: \"transparent\",\n },\n }\n})\n\nconst variantUnstyled = definePartsStyle({\n field: {\n bg: \"transparent\",\n px: \"0\",\n height: \"auto\",\n },\n addon: {\n bg: \"transparent\",\n px: \"0\",\n height: \"auto\",\n },\n})\n\nconst variants = {\n outline: variantOutline,\n filled: variantFilled,\n flushed: variantFlushed,\n unstyled: variantUnstyled,\n}\n\nexport const inputTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n variants,\n defaultProps: {\n size: \"md\",\n variant: \"outline\",\n },\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { Input } from '@chakra-ui/theme/components'\nimport { selectAnatomy } from '../../anatomy'\n\nconst { defineMultiStyleConfig } = createMultiStyleConfigHelpers(\n selectAnatomy.keys\n)\n\nexport const selectTheme = defineMultiStyleConfig({\n defaultProps: Input.defaultProps,\n baseStyle: Input.baseStyle,\n sizes: Input.sizes,\n variants: Input.variants,\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { structuredListAnatomy } from '../../anatomy'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(structuredListAnatomy.keys)\n\nconst baseStyle = definePartsStyle((props) => {\n return {\n item: {\n py: 2,\n px: 4,\n },\n button: {\n transitionProperty: 'common',\n transitionDuration: 'normal',\n borderRadius: 'inherit',\n outline: 'none',\n _hover: {\n bg: 'blackAlpha.50',\n _dark: {\n bg: 'whiteAlpha.50',\n },\n },\n _focusVisible: {\n boxShadow: 'outline',\n },\n _focus: {\n bg: 'blackAlpha.50',\n _dark: {\n bg: 'whiteAlpha.50',\n },\n },\n _active: {\n bg: 'blackAlpha.100',\n _dark: {\n bg: 'whiteAlpha.100',\n },\n },\n },\n }\n})\n\nexport const structuredListTheme = defineMultiStyleConfig({\n defaultProps: {\n size: 'md',\n },\n baseStyle,\n sizes: {\n sm: {\n item: {\n py: 1,\n px: 1,\n },\n button: {\n py: 1,\n px: 1,\n },\n cell: {\n px: 1,\n },\n icon: {\n px: 1,\n },\n },\n md: {\n item: {\n py: 2,\n px: 2,\n },\n button: { py: 2, px: 2 },\n cell: {\n px: 2,\n },\n icon: {\n px: 2,\n },\n },\n },\n})\n","import {\n createMultiStyleConfigHelpers,\n cssVar,\n defineCssVars,\n} from '@chakra-ui/styled-system'\n\nimport { timelineAnatomy } from '../../anatomy'\n\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(timelineAnatomy.keys)\n\nconst $rowStart = cssVar('timeline-row-start', 'minmax(0,1fr)')\nconst $rowEnd = cssVar('timeline-row-end', 'minmax(0,1fr)')\n\nconst $colStart = cssVar('timeline-col-start', 'minmax(0,1fr)')\nconst $colEnd = cssVar('timeline-col-end', 'minmax(0,1fr)')\n\nconst baseStyle = definePartsStyle((props) => {\n return {\n container: {\n display: 'flex',\n [$rowStart.variable]: 'minmax(0,1fr)',\n [$rowEnd.variable]: 'minmax(0,1fr)',\n [$colStart.variable]: 'auto',\n [$colEnd.variable]: '2fr',\n flexDirection: 'column',\n justifyItems: 'center',\n },\n item: {\n display: 'grid',\n alignItems: 'center',\n justifyItems: 'start',\n gridTemplateRows: `${$rowStart.reference}`,\n gridTemplateColumns: `${$colStart.reference} ${$colEnd.reference}`,\n position: 'relative',\n },\n separator: {\n mx: 1,\n minW: '24px',\n flexShrink: 0,\n gridColumnStart: 1,\n gap: 2,\n height: '100%',\n _before: {\n content: '\"\"',\n display: 'block',\n flex: 1,\n minH: '0.5em',\n },\n _after: {\n content: '\"\"',\n display: 'block',\n flex: 1,\n minH: '0.5em',\n },\n\n '&:has(.sui-timeline__track:first-of-type):before': {\n display: 'none',\n },\n '&:has(.sui-timeline__track:last-of-type):after': {\n display: 'none',\n },\n },\n icon: {\n color: 'gray.300',\n _dark: {\n color: 'gray.600',\n },\n },\n dot: {\n width: '9px',\n height: '9px',\n bg: 'currentColor',\n borderRadius: 'full',\n },\n track: {\n bg: 'gray.300',\n width: '1px',\n flex: 1,\n minH: '0.5em',\n _dark: {\n bg: 'gray.600',\n },\n },\n content: {\n px: '2',\n _first: {\n gridColumnStart: 1,\n },\n _last: {\n gridColumnStart: 2,\n justifySelf: 'start',\n },\n },\n }\n})\n\nconst variantSolid = definePartsStyle((props) => {\n return {\n icon: {},\n }\n})\n\nconst variantOutline = definePartsStyle((props) => {\n return {\n dot: {\n bg: 'transparent',\n borderColor: 'currentColor',\n borderWidth: '2px',\n },\n }\n})\n\nexport const timelineTheme = defineMultiStyleConfig({\n defaultProps: { variant: 'solid', size: 'sm' },\n baseStyle,\n variants: {\n solid: variantSolid,\n outline: variantOutline,\n },\n sizes: {\n sm: {\n icon: {\n minH: '8px',\n minW: '8px',\n },\n },\n },\n})\n","import { defineStyleConfig } from '@chakra-ui/styled-system'\n\nexport const iconBadgeTheme = defineStyleConfig({\n baseStyle: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n variants: {\n outline: ({ colorScheme }) => {\n return {\n borderWidth: '1px',\n borderColor: colorScheme ? `${colorScheme}.500` : 'chakra-border-color',\n color: colorScheme ? `${colorScheme}.500` : 'currentColor',\n }\n },\n solid: ({ colorScheme = 'gray' }) => {\n return {\n bg: `${colorScheme}.500`,\n color: 'white',\n }\n },\n },\n sizes: {\n sm: {\n borderRadius: 'sm',\n fontSize: '0.9em',\n w: 6,\n h: 6,\n },\n md: {\n borderRadius: 'md',\n fontSize: '1.1em',\n w: 8,\n h: 8,\n },\n lg: {\n borderRadius: 'md',\n fontSize: '1.3em',\n w: 10,\n h: 10,\n },\n },\n defaultProps: {\n variant: 'outline',\n size: 'md',\n },\n})\n","import { anatomy } from '@chakra-ui/anatomy'\nimport { createMultiStyleConfigHelpers, cssVar } from '@chakra-ui/styled-system'\n\nconst parts = anatomy('navbar').parts(\n 'container',\n 'inner',\n 'brand',\n 'content',\n 'item',\n 'link'\n)\n\nconst { defineMultiStyleConfig, definePartsStyle } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst $bg = cssVar('navbar-bg')\nconst $color = cssVar('navbar-text-color', 'currentColor')\nconst $linkBg = cssVar('navbar-link-bg', 'transparent')\n\nconst accessibleColors = ['yellow', 'cyan']\n\nexport const navbarTheme = defineMultiStyleConfig({\n baseStyle: definePartsStyle(({ colorScheme }) => {\n let color = 'currentColor'\n if (colorScheme) {\n color = accessibleColors.includes(colorScheme)\n ? 'colors.black'\n : 'colors.white'\n }\n\n return {\n container: {\n display: 'flex',\n [$bg.variable]: colorScheme\n ? `colors.${colorScheme}.500`\n : 'chakra-body-bg',\n [$color.variable]: color,\n bg: $bg.reference,\n color: $color.reference,\n zIndex: 'overlay',\n width: 'full',\n height: 'auto',\n alignItems: 'center',\n justifyContent: 'center',\n data: {\n '& [data-menu-open=true]': {\n border: 'none',\n },\n },\n },\n inner: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: 'full',\n height: 'var(--navbar-height)',\n px: {\n base: 4,\n lg: 6,\n },\n gap: 4,\n flexWrap: 'nowrap',\n },\n toggle: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 6,\n height: 'full',\n outline: 'none',\n borderRadius: 'sm',\n },\n brand: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n height: 'full',\n bg: 'transparent',\n textDecoration: 'none',\n color: 'inherit',\n whiteSpace: 'nowrap',\n boxSizing: 'border-box',\n },\n content: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n flex: 1,\n listStyle: 'none',\n },\n item: {\n display: 'inline-flex',\n p: 0,\n },\n link: {\n bg: $linkBg.reference,\n color: 'current',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n textDecoration: 'none',\n whiteSpace: 'nowrap',\n boxSizing: 'border-box',\n borderRadius: 'md',\n transitionProperty: 'common',\n transitionDuration: 'normal',\n lineHeight: 1,\n px: 3,\n h: 8,\n _focusVisible: {\n outline: 'none',\n boxShadow: 'outline',\n },\n _hover: {\n [$linkBg.variable]: `colors.blackAlpha.100`,\n textDecoration: 'none',\n _dark: {\n [$linkBg.variable]: `colors.whiteAlpha.200`,\n },\n },\n _active: {\n fontWeight: 'semibold',\n },\n },\n }\n }),\n})\n","import { appShellTheme } from './app-shell'\nimport { bannerTheme } from './banner'\nimport { commandTheme } from './command'\nimport { emptyStateTheme } from './empty-state'\nimport { formTheme } from './form'\nimport { formLayoutTheme } from './form-layout'\nimport { formLegendTheme } from './form-legend'\nimport { hotkeysTheme } from './hotkeys'\nimport { loadingOverlayTheme } from './loading-overlay'\nimport { navGroupTheme } from './nav-group'\nimport { navItemTheme } from './nav-item'\nimport { nprogressTheme } from './nprogress'\nimport { personaTheme } from './persona'\nimport { propertyTheme } from './property'\nimport { searchInputTheme } from './search-input'\nimport { sidebarTheme } from './sidebar'\nimport { selectTheme } from './select'\nimport { structuredListTheme } from './structured-list'\nimport { timelineTheme } from './timeline'\nimport { iconBadgeTheme } from './icon-badge'\nimport { navbarTheme } from './navbar'\n\nexport { appShellTheme as SuiAppShell } from './app-shell'\nexport { bannerTheme as SuiBanner } from './banner'\nexport { commandTheme as SuiCommand } from './command'\nexport { emptyStateTheme as SuiEmptyState } from './empty-state'\nexport { formLayoutTheme as SuiFormLayout } from './form-layout'\nexport { formTheme as SuiForm } from './form'\nexport { formLegendTheme as SuiFormLegend } from './form-legend'\nexport { hotkeysTheme as SuiHotkeys } from './hotkeys'\nexport { loadingOverlayTheme as SuiLoadingOverlay } from './loading-overlay'\nexport { navGroupTheme as SuiNavGroup } from './nav-group'\nexport { navItemTheme as SuiNavItem } from './nav-item'\nexport { personaTheme as SuiPersona } from './persona'\nexport { propertyTheme as SuiProperty } from './property'\nexport { nprogressTheme as SuiNProgress } from './nprogress'\nexport { searchInputTheme as SuiSearchInput } from './search-input'\nexport { selectTheme as SuiSelect } from './select'\nexport { sidebarTheme as SuiSidebar } from './sidebar'\nexport { structuredListTheme as SuiStructuredList } from './structured-list'\nexport { timelineTheme as SuiTimeline } from './timeline'\nexport { iconBadgeTheme as SuiIconBadge } from './icon-badge'\nexport { navbarTheme as SuiNavbarTheme } from './navbar'\n\nexport const components = {\n SuiAppShell: appShellTheme,\n SuiBanner: bannerTheme,\n SuiCommand: commandTheme,\n SuiEmptyState: emptyStateTheme,\n SuiFormLayout: formLayoutTheme,\n SuiForm: formTheme,\n SuiFormLegend: formLegendTheme,\n SuiHotkeys: hotkeysTheme,\n SuiStructuredList: structuredListTheme,\n SuiLoadingOverlay: loadingOverlayTheme,\n SuiNavGroup: navGroupTheme,\n SuiNavItem: navItemTheme,\n SuiPersona: personaTheme,\n SuiProperty: propertyTheme,\n SuiNProgress: nprogressTheme,\n SuiSearchInput: searchInputTheme,\n SuiSelect: selectTheme,\n SuiSidebar: sidebarTheme,\n SuiTimeline: timelineTheme,\n SuiIconBadge: iconBadgeTheme,\n SuiNavbar: navbarTheme,\n}\n","import { Styles } from '@chakra-ui/theme-tools'\n\nexport const styles: Styles = {\n global: (props) => ({\n body: {\n WebkitFontSmoothing: 'antialiased',\n TextRendering: 'optimizelegibility',\n },\n }),\n}\n","const colors = {\n black: '#0e1012',\n gray: {\n '50': '#f9fafa',\n '100': '#f1f1f2',\n '200': '#e7e7e8',\n '300': '#d3d4d5',\n '400': '#abadaf',\n '500': '#7d7f83',\n '600': '#52555a',\n '700': '#33373d',\n '800': '#1d2025',\n '900': '#171a1d',\n },\n purple: {\n '50': '#f9f6fd',\n '100': '#e5daf8',\n '200': '#d3bef4',\n '300': '#b795ec',\n '400': '#a379e7',\n '500': '#8952e0',\n '600': '#7434db',\n '700': '#6023c0',\n '800': '#4f1d9e',\n '900': '#3b1676',\n },\n pink: {\n '50': '#fdf5f9',\n '100': '#f8d9e7',\n '200': '#f3b9d3',\n '300': '#eb8db8',\n '400': '#e56ba2',\n '500': '#dc3882',\n '600': '#c4246c',\n '700': '#a01d58',\n '800': '#7d1745',\n '900': '#5d1133',\n },\n red: {\n '50': '#fdf6f5',\n '100': '#f8d9d8',\n '200': '#f1b8b4',\n '300': '#e98d87',\n '400': '#e4726c',\n '500': '#dc4a41',\n '600': '#d2140a',\n '700': '#ac0900',\n '800': '#930800',\n '900': '#6d0600',\n },\n orange: {\n '50': '#fdfaf6',\n '100': '#f9ebdb',\n '200': '#f1d4b1',\n '300': '#e6b273',\n '400': '#dc9239',\n '500': '#c37b24',\n '600': '#a5681e',\n '700': '#835318',\n '800': '#674113',\n '900': '#553610',\n },\n yellow: {\n '50': '#fffefb',\n '100': '#fff8e9',\n '200': '#feecbd',\n '300': '#fddc87',\n '400': '#fbc434',\n '500': '#d2a01e',\n '600': '#a88018',\n '700': '#836413',\n '800': '#624b0e',\n '900': '#513e0c',\n },\n green: {\n '50': '#f7fdfb',\n '100': '#d2f2e7',\n '200': '#9fe3cd',\n '300': '#64d2ad',\n '400': '#1dbd88',\n '500': '#0ea371',\n '600': '#0c875e',\n '700': '#096949',\n '800': '#07563c',\n '900': '#064731',\n },\n teal: {\n '50': '#f1fcfc',\n '100': '#c0f1f4',\n '200': '#84e4e9',\n '300': '#2dd1da',\n '400': '#22b2ba',\n '500': '#1d979e',\n '600': '#187b80',\n '700': '#125f64',\n '800': '#0f5053',\n '900': '#0d4244',\n },\n cyan: {\n '50': '#f4fbfd',\n '100': '#d0eef7',\n '200': '#bae7f3',\n '300': '#a2deee',\n '400': '#53c2e1',\n '500': '#2ab4d9',\n '600': '#24a2c4',\n '700': '#1e86a2',\n '800': '#196e85',\n '900': '#135567',\n },\n blue: {\n '50': '#f1f6fd',\n '100': '#cde0f6',\n '200': '#a8c8f0',\n '300': '#7fafe8',\n '400': '#5896e1',\n '500': '#347fdb',\n '600': '#236abf',\n '700': '#1b5192',\n '800': '#164278',\n '900': '#123662',\n },\n indigo: {\n '50': '#f8f7fc',\n '100': '#e1ddf5',\n '200': '#c8c0ec',\n '300': '#a89de2',\n '400': '#9789dc',\n '500': '#7f6ed4',\n '600': '#6a58c9',\n '700': '#5546a1',\n '800': '#483c88',\n '900': '#342b62',\n },\n}\n\nexport default {\n primary: colors.purple,\n secondary: colors.cyan,\n ...colors,\n}\n","export const fonts = {\n heading: 'InterVariable, Inter, sans-serif',\n body: 'InterVariable, Inter, sans-serif',\n}\n\nexport const fontSizes = {\n '3xs': '0.45rem',\n '2xs': '0.625rem',\n xs: '0.75rem',\n sm: '0.8125rem',\n md: '0.875rem',\n lg: '1rem',\n xl: '1.125rem',\n '2xl': '1.25rem',\n '3xl': '1.5rem',\n '4xl': '1.875rem',\n '5xl': '2.25rem',\n '6xl': '3rem',\n '7xl': '3.75rem',\n '8xl': '4.5rem',\n '9xl': '6rem',\n}\n\nexport const textStyles = {\n h1: {\n fontSize: ['5xl', '6xl', '7xl'],\n fontWeight: 'extrabold',\n lineHeight: '1.2',\n letterSpacing: '-2%',\n },\n h2: {\n fontSize: ['3xl', '4xl', '5xl'],\n fontWeight: 'extrabold',\n lineHeight: '1.1',\n letterSpacing: '-1%',\n },\n h3: {\n fontSize: ['lg', 'xl'],\n fontWeight: 'extrabold',\n lineHeight: '1.1',\n letterSpacing: '-1%',\n },\n subtitle: {\n fontSize: ['lg', null, '2xl'],\n fontWeight: 'normal',\n },\n}\n","const sizes = {\n container: {\n sm: '30em',\n md: '48em',\n lg: '62em',\n xl: '80em',\n '2xl': '96em',\n },\n}\n\nexport default sizes\n","import { transparentize } from '@chakra-ui/theme-tools'\n\nimport colors from './colors'\n\nconst shadows = {\n outline: `0 0 0 2px ${transparentize(colors.primary[500], 0.6)({ colors })}`,\n}\n\nexport default shadows\n","export default {\n colors: {\n 'chakra-border-color': { _light: 'gray.200', _dark: 'whiteAlpha.200' },\n muted: {\n default: 'gray.500',\n _dark: 'gray.400',\n },\n neutral: {\n default: 'black',\n _dark: 'white',\n },\n 'neutral-fg': {\n default: 'white',\n _dark: 'black',\n },\n },\n}\n","import colors from './colors'\nimport { fonts, fontSizes, textStyles } from './typography'\nimport sizes from './sizes'\nimport shadows from './shadows'\nimport semanticTokens from './semantic-tokens'\n\nexport const foundations = {\n colors,\n fonts,\n fontSizes,\n textStyles,\n sizes,\n shadows,\n semanticTokens,\n}\n","import { alertAnatomy } from '@chakra-ui/anatomy'\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\n\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(alertAnatomy.keys)\n\nconst variantSnackbar = definePartsStyle((props) => {\n const { colorScheme: c } = props\n\n return {\n container: {\n bg: `white`,\n _dark: {\n bg: `black`,\n },\n borderWidth: '1px',\n },\n icon: {\n color: `${c}.500`,\n _dark: {\n color: `${c}.500`,\n },\n '& .chakra-spinner': {\n color: `black`,\n _dark: {\n color: `white`,\n },\n },\n },\n title: { fontWeight: 'semibold', fontSize: 'md' },\n description: {\n fontSize: 'sm',\n color: `gray.500`,\n _dark: {\n color: `gray.400`,\n },\n },\n }\n})\n\nconst baseStyle = definePartsStyle({\n container: {\n borderRadius: 'md',\n },\n})\n\nexport const alertTheme = defineMultiStyleConfig({\n defaultProps: {\n size: 'sm',\n },\n baseStyle,\n variants: {\n snackbar: variantSnackbar,\n },\n})\n","import { defineCssVars, defineStyleConfig } from '@chakra-ui/styled-system'\n\nimport { Badge } from '@chakra-ui/theme/components'\n\nconst vars = defineCssVars('badge', ['bg', 'color', 'shadow', 'border'])\n\nexport const badgeTheme = defineStyleConfig({\n variants: {\n outline: (props) => {\n const styles = Badge.variants?.outline(props)\n\n return {\n ...styles,\n _dark: {\n ...styles?._dark,\n [vars.shadow.variable]: `inset 0 0 0px 1px ${vars.border.reference}`,\n [vars.color.variable]: `colors.${props.colorScheme}.200`,\n [vars.border.variable]: `colors.${props.colorScheme}.500`,\n },\n }\n },\n ghost: (props) => {\n const styles = Badge.variants?.outline(props)\n\n return {\n ...styles,\n shadow: 'none',\n _dark: {\n ...styles?._dark,\n [vars.color.variable]: `colors.${props.colorScheme}.200`,\n },\n }\n },\n },\n})\n","import { defineStyle, defineStyleConfig } from '@chakra-ui/styled-system'\nimport { mode, transparentize } from '@chakra-ui/theme-tools'\n\ntype Dict = Record<string, any>\n\nexport const getStateColors = (props: Dict) => {\n const { colorScheme: c } = props\n\n if (c === 'gray') {\n return {\n base: mode('gray.100', 'whiteAlpha.300')(props),\n hover: mode('gray.200', 'whiteAlpha.400')(props),\n active: mode('gray.300', 'whiteAlpha.500')(props),\n }\n }\n\n if (c === 'white') {\n return {\n base: 'whiteAlpha.900',\n hover: 'whiteAlpha.700',\n active: 'whiteAlpha.500',\n }\n }\n\n return {\n base: mode(`${c}.500`, `${c}.500`)(props),\n hover: mode(`${c}.600`, `${c}.600`)(props),\n active: mode(`${c}.700`, `${c}.700`)(props),\n }\n}\n\ntype AccessibleColor = {\n bg?: string\n color?: string\n hoverBg?: string\n activeBg?: string\n}\n\n/** Accessible color overrides for less accessible colors. */\nconst accessibleColorMap: { [key: string]: AccessibleColor } = {\n yellow: {\n bg: 'yellow.400',\n hoverBg: 'yellow.500',\n activeBg: 'yellow.600',\n color: 'black',\n },\n\n cyan: {\n bg: 'cyan.400',\n color: 'black',\n hoverBg: 'cyan.500',\n activeBg: 'cyan.600',\n },\n}\n\nconst variantSolid = defineStyle((props) => {\n const { colorScheme: c, colorMode } = props\n\n if (c === 'white') {\n return {\n bg: 'white',\n color: 'black',\n _hover: {\n bg: `whiteAlpha.900`,\n _dark: {\n bg: `whiteAlpha.900`,\n },\n _disabled: {\n bg: 'white',\n },\n },\n _active: {\n bg: `whiteAlpha.800`,\n _dark: {\n bg: `whiteAlpha.800`,\n },\n },\n _disabled: {\n color: 'blackAlpha.700',\n },\n }\n }\n\n if (c === 'neutral') {\n return {\n bg: 'black',\n color: 'white',\n _dark: {\n bg: 'white',\n color: 'black',\n },\n _hover: {\n bg: `blackAlpha.800`,\n _disabled: {\n bg: 'black',\n },\n _dark: {\n bg: 'whiteAlpha.800',\n _disabled: {\n bg: 'white',\n },\n },\n },\n _active: {\n bg: `blackAlpha.800`,\n _dark: {\n bg: 'whiteAlpha.800',\n },\n },\n _disabled: {\n color: 'blackAlpha.700',\n _dark: {\n color: 'whiteAlpha.700',\n },\n },\n }\n }\n\n const { base, hover, active } = getStateColors(props)\n\n const {\n color = c === 'gray' ? mode('black', 'white')(props) : 'white',\n bg = base,\n hoverBg = hover,\n activeBg = active,\n } = accessibleColorMap[c] ?? {}\n\n return {\n bg,\n color,\n _hover: {\n bg: hoverBg,\n _disabled: {\n bg: bg,\n },\n },\n _active: {\n bg: activeBg,\n },\n }\n})\n\nconst variantElevated = defineStyle((props) => {\n return {\n shadow: 'md',\n ...variantSolid(props),\n }\n})\n\nconst variantOutline = defineStyle((props) => {\n const { colorScheme: c } = props\n const { base, hover, active } = getStateColors(props)\n return {\n ...variantGhost(props),\n borderColor: c === 'gray' ? hover : base,\n borderWidth: '1px',\n _hover: {\n borderColor: c === 'gray' ? active : hover,\n },\n }\n})\n\nconst variantGhost = defineStyle((props) => {\n const { colorScheme: c, theme } = props\n\n if (c === 'gray') {\n return {\n color: 'inherit',\n _dark: {\n color: 'whiteAlpha.900',\n },\n _hover: {\n bg: `blackAlpha.100`,\n _dark: {\n bg: 'whiteAlpha.200',\n },\n },\n _active: {\n bg: 'blackAlpha.200',\n _dark: {\n bg: 'whiteAlpha.300',\n },\n },\n }\n }\n\n if (c === 'white') {\n return {\n color: 'white',\n _hover: {\n bg: 'whiteAlpha.200',\n },\n _active: 'whiteAlpha.300',\n }\n }\n\n const darkHoverBg = transparentize(`${c}.200`, 0.12)(theme)\n const darkActiveBg = transparentize(`${c}.200`, 0.24)(theme)\n\n return {\n color: `${c}.600`,\n _dark: {\n color: `${c}.200`,\n },\n bg: 'transparent',\n _hover: {\n bg: `${c}.50`,\n _dark: {\n bg: darkHoverBg,\n },\n },\n _active: {\n bg: `${c}.100`,\n _dark: {\n bg: darkActiveBg,\n },\n },\n }\n})\n\nconst variantSubtle = defineStyle((props) => {\n const { colorScheme: c, theme } = props\n\n if (c === 'gray') {\n return {\n color: `inherit`,\n bg: `blackAlpha.100`,\n _dark: {\n bg: `whiteAlpha.100`,\n color: `whiteAlpha.900`,\n },\n _hover: {\n bg: `blackAlpha.200`,\n _dark: {\n color: `white.200`,\n },\n },\n _active: {\n bg: `blackAlpha.300`,\n _dark: {\n bg: `whiteAlpha.300`,\n },\n },\n }\n }\n\n const bgColor = c === 'white' ? 'white' : mode(`${c}.500`, `${c}.200`)(props)\n const bg = transparentize(bgColor, 0.1)(theme)\n const hoverBg = transparentize(bgColor, 0.16)(theme)\n const activeBg = transparentize(bgColor, 0.24)(theme)\n\n return {\n color: c === 'white' ? 'white' : mode(`${c}.600`, `${c}.200`)(props),\n bg: bg,\n _hover: {\n bg: hoverBg,\n },\n _active: {\n bg: activeBg,\n },\n }\n})\n\nconst variantLink = defineStyle((props) => {\n const { colorScheme: c } = props\n return {\n padding: 0,\n height: 'auto',\n lineHeight: 'normal',\n verticalAlign: 'baseline',\n color: c === 'white' ? 'white' : mode(`${c}.500`, `${c}.200`)(props),\n _hover: {\n textDecoration: 'underline',\n _disabled: {\n textDecoration: 'none',\n },\n },\n _active: {\n color:\n c === 'white' ? 'whiteAlpha.800' : mode(`${c}.700`, `${c}.500`)(props),\n },\n }\n})\n\nconst variantPrimary = defineStyle((props) => {\n let { colorScheme } = props\n\n if (colorScheme === 'gray') {\n colorScheme = 'primary'\n }\n\n return variantSolid({\n ...props,\n variant: 'solid',\n colorScheme,\n })\n})\n\nconst variantSecondary = defineStyle((props) => {\n return variantSolid({\n ...props,\n variant: 'solid',\n })\n})\n\nconst variantTertiary = defineStyle((props) => {\n return variantOutline({\n ...props,\n variant: 'outline',\n })\n})\n\nexport const buttonTheme = defineStyleConfig({\n defaultProps: {\n size: 'sm',\n },\n variants: {\n solid: variantSolid,\n ghost: variantGhost,\n outline: variantOutline,\n subtle: variantSubtle,\n elevated: variantElevated,\n link: variantLink,\n primary: variantPrimary,\n secondary: variantSecondary,\n tertiary: variantTertiary,\n },\n})\n","import { mode } from '@chakra-ui/theme-tools'\nimport { cardAnatomy } from '@chakra-ui/anatomy'\n\nimport { createMultiStyleConfigHelpers, cssVar } from '@chakra-ui/styled-system'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(cardAnatomy.keys)\n\nconst $bg = cssVar('card-bg')\nconst $padding = cssVar('card-padding')\nconst $shadow = cssVar('card-shadow')\nconst $radius = cssVar('card-radius')\nconst $border = cssVar('card-border-width', '0')\nconst $borderColor = cssVar('card-border-color')\n\nconst baseStyle = definePartsStyle(() => {\n return {\n container: {\n transitionProperty: 'common',\n transitionDuration: 'normal',\n },\n header: {\n p: 4,\n },\n body: {\n p: 4,\n },\n footer: {\n p: 4,\n },\n }\n})\n\nconst variantElevated = definePartsStyle((props) => {\n return {\n container: {\n [$bg.variable]: 'colors.white',\n [$borderColor.variable]: 'colors.blackAlpha.200',\n [$border.variable]: '1px',\n [$shadow.variable]: 'shadows.sm',\n _dark: {\n [$bg.variable]: 'colors.whiteAlpha.200',\n [$borderColor.variable]: 'colors.whiteAlpha.50',\n },\n '&.chakra-linkbox:hover': {\n [$borderColor.variable]: 'colors.blackAlpha.300',\n _dark: {\n [$borderColor.variable]: 'colors.whiteAlpha.300',\n },\n },\n },\n }\n})\n\nconst variantFilled = definePartsStyle((props) => {\n const { colorScheme: c } = props\n\n const color = c ? 'white' : 'inherit'\n\n return {\n container: {\n [$border.variable]: '0',\n [$shadow.variable]: 'none',\n [$bg.variable]: c ? `${c}.500` : `colors.blackAlpha.100`,\n color,\n '&.chakra-linkbox:hover': {\n [$bg.variable]: c ? `${c}.600` : `colors.blackAlpha.200`,\n },\n _dark: {\n [$bg.variable]: c ? `${c}.500` : `colors.whiteAlpha.100`,\n '&.chakra-linkbox:hover': {\n [$bg.variable]: c ? `${c}.600` : `colors.whiteAlpha.200`,\n },\n },\n },\n }\n})\n\nconst variantOutline = definePartsStyle((props) => {\n const { colorScheme: c } = props\n\n return {\n container: {\n [$border.variable]: '1px',\n [$shadow.variable]: 'none',\n [$borderColor.variable]: c ? `${c}.500` : `colors.blackAlpha.200`,\n [$bg.variable]: 'transparent',\n '&.chakra-linkbox:hover': {\n [$borderColor.variable]: c ? `${c}.600` : `colors.blackAlpha.300`,\n },\n _dark: {\n [$borderColor.variable]: c ? `${c}.500` : `colors.whiteAlpha.300`,\n '&.chakra-linkbox:hover': {\n [$borderColor.variable]: c ? `${c}.600` : `colors.whiteAlpha.400`,\n },\n },\n },\n }\n})\n\nexport const cardTheme = defineMultiStyleConfig({\n defaultProps: {\n variant: 'elevated',\n },\n baseStyle,\n variants: {\n elevated: variantElevated,\n outline: variantOutline,\n filled: variantFilled,\n },\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { checkboxAnatomy } from '@chakra-ui/anatomy'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(checkboxAnatomy.keys)\n\nconst baseStyle = definePartsStyle((props) => {\n const { colorScheme } = props\n return {\n control: {\n _checked: {\n borderColor: `${colorScheme}.500`,\n bg: `${colorScheme}.500`,\n color: 'white',\n },\n },\n }\n})\n\nexport const checkboxTheme = defineMultiStyleConfig({ baseStyle })\n","import { defineStyleConfig } from '@chakra-ui/styled-system'\n\nexport const closeButtonTheme = defineStyleConfig({\n defaultProps: {\n size: 'sm',\n },\n})\n","import { inputAnatomy } from '@chakra-ui/anatomy'\n\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle,\n defineStyleConfig,\n} from '@chakra-ui/styled-system'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(inputAnatomy.keys)\n\nconst $height = cssVar('input-height')\nconst $padding = cssVar('input-padding')\nconst $borderRadius = cssVar('input-border-radius')\n\nconst inputSizes = {\n sm: definePartsStyle({\n field: {\n [$borderRadius.variable]: 'radii.md',\n },\n group: {\n [$borderRadius.variable]: 'radii.md',\n },\n }),\n md: definePartsStyle({\n field: {\n [$padding.variable]: 'space.3',\n [$height.variable]: 'sizes.9',\n },\n group: {\n [$padding.variable]: 'space.3',\n [$height.variable]: 'sizes.9',\n },\n }),\n lg: definePartsStyle({\n field: {\n [$padding.variable]: 'space.3',\n [$height.variable]: 'sizes.10',\n },\n group: {\n [$padding.variable]: 'space.3',\n [$height.variable]: 'sizes.10',\n },\n }),\n}\n\nconst outlineVariant = definePartsStyle((props) => {\n return {\n field: {\n borderColor: 'blackAlpha.300',\n _dark: {\n borderColor: 'whiteAlpha.300',\n },\n _hover: {\n borderColor: 'blackAlpha.400',\n _dark: {\n borderColor: 'whiteAlpha.400',\n },\n },\n },\n }\n})\n\nconst Input = defineMultiStyleConfig({\n defaultProps: {\n /* @ts-expect-error */\n focusBorderColor: 'primary.500',\n },\n variants: {\n outline: outlineVariant,\n },\n sizes: inputSizes,\n})\n\nexport const formLabelTheme = {\n variants: {\n horizontal: {\n mb: 0,\n marginStart: '0.5rem',\n },\n },\n}\n\nexport const inputTheme = Input\nexport const numberInputTheme = Input\nexport const pinInputTheme = defineStyleConfig({\n defaultProps: {\n /* @ts-expect-error */\n focusBorderColor: 'primary.500',\n },\n variants: {\n outline: outlineVariant,\n },\n sizes: inputSizes,\n})\nexport const textareaTheme = defineStyleConfig({\n defaultProps: {\n /* @ts-expect-error */\n focusBorderColor: 'primary.500',\n },\n variants: {\n outline: defineStyle(\n (props) => inputTheme.variants?.outline(props).field ?? {}\n ),\n },\n})\nexport const nativeSelectTheme = defineStyleConfig(Input)\n","import { defineStyle, defineStyleConfig } from '@chakra-ui/styled-system'\nimport { Input } from '@chakra-ui/theme/components'\n\nimport { inputTheme } from './form'\n\nexport const selectTheme = defineStyleConfig({\n ...Input,\n defaultProps: inputTheme.defaultProps,\n variants: {\n outline: defineStyle((props) => ({\n ...(inputTheme.variants?.outline(props) ?? {}),\n })),\n flushed: defineStyle((props) => Input.variants?.flushed(props) ?? {}),\n filled: defineStyle((props) => Input.variants?.filled(props) ?? {}),\n unstyled: Input.variants?.unstyled ?? {},\n },\n sizes: inputTheme.sizes,\n})\n","import { defineStyleConfig } from '@chakra-ui/styled-system'\n\nexport const headingTheme = defineStyleConfig({\n defaultProps: {\n size: 'lg',\n },\n})\n","import { defineStyle, defineStyleConfig } from '@chakra-ui/styled-system'\n\nconst variantSolid = defineStyle((props) => {\n return {\n color: `blackAlpha.300`,\n _dark: {\n bg: `whiteAlpha.300`,\n },\n borderWidth: 0,\n borderBottomWidth: 0,\n padding: '1px',\n display: 'inline-block',\n borderRadius: '3px',\n minW: '20px',\n textAlign: 'center',\n mr: 1,\n ':last-child': {\n mr: 0,\n },\n }\n})\n\nexport const kbdTheme = defineStyleConfig({\n defaultProps: {\n variant: 'solid',\n },\n variants: {\n basic: {\n opacity: 0.6,\n },\n solid: variantSolid,\n },\n})\n","import { menuAnatomy } from '@chakra-ui/anatomy'\n\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(menuAnatomy.keys)\n\nconst baseStyle = definePartsStyle((props) => {\n return {\n list: {\n borderWidth: 1,\n borderColor: `blackAlpha.200`,\n boxShadow: `lg`,\n _dark: {\n borderWidth: 0,\n borderColor: `whiteAlpha.300`,\n boxShadow: `dark-lg`,\n },\n },\n divider: {\n borderColor: `blackAlpha.200`,\n _dark: {\n borderColor: `whiteAlpha.300`,\n },\n },\n groupTitle: {\n mx: 3,\n },\n }\n})\n\nconst variantDialog = definePartsStyle(() => {\n return {\n item: {\n px: 6,\n },\n groupTitle: {\n color: 'muted',\n px: 3,\n },\n }\n})\n\nexport const menuTheme = defineMultiStyleConfig({\n baseStyle,\n variants: {\n dialog: variantDialog,\n },\n})\n","import { modalAnatomy } from '@chakra-ui/anatomy'\n\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(modalAnatomy.keys)\n\nconst baseStyle = definePartsStyle((props) => {\n return {\n closeButton: {\n top: 4,\n insetEnd: 4,\n },\n }\n})\n\nexport const modalTheme = defineMultiStyleConfig({ baseStyle })\n","import { StyleFunctionProps } from '@chakra-ui/theme-tools'\n\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { progressAnatomy } from '@chakra-ui/anatomy'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(progressAnatomy.keys)\n\nexport const progressTheme = defineMultiStyleConfig({\n defaultProps: {\n colorScheme: 'primary',\n },\n baseStyle: definePartsStyle((props) => {\n const { colorScheme } = props\n return {\n track: {\n borderRadius: 'md',\n },\n filledTrack: {\n bg: `${colorScheme}.500`,\n },\n }\n }),\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { radioAnatomy } from '@chakra-ui/anatomy'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(radioAnatomy.keys)\n\nexport const radioTheme = defineMultiStyleConfig({\n baseStyle: definePartsStyle((props) => {\n const { colorScheme } = props\n return {\n control: {\n _checked: {\n borderColor: `${colorScheme}.500`,\n bg: `${colorScheme}.500`,\n color: 'white',\n },\n },\n }\n }),\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { sliderAnatomy } from '@chakra-ui/anatomy'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(sliderAnatomy.keys)\n\nexport const sliderTheme = defineMultiStyleConfig({\n defaultProps: {\n colorScheme: 'primary',\n },\n baseStyle: definePartsStyle((props) => {\n const { colorScheme } = props\n return {\n filledTrack: {\n bg: `${colorScheme}.500`,\n },\n }\n }),\n})\n","import { switchAnatomy } from '@chakra-ui/anatomy'\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\n\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(switchAnatomy.keys)\n\nexport const switchTheme = defineMultiStyleConfig({\n baseStyle: definePartsStyle((props) => {\n const { colorScheme } = props\n return {\n track: {\n _checked: {\n bg: `${colorScheme}.500`,\n },\n },\n }\n }),\n})\n","import { defineStyle, defineStyleConfig } from '@chakra-ui/styled-system'\nimport { cssVar } from '@chakra-ui/theme-tools'\n\nconst $bg = cssVar('tooltip-bg')\nconst $fg = cssVar('tooltip-fg')\nconst $arrowBg = cssVar('popper-arrow-bg')\n\nconst baseStyle = defineStyle((props) => {\n return {\n display: 'flex',\n [$bg.variable]: 'colors.white',\n [$fg.variable]: 'colors.blackAlpha.900',\n _dark: {\n [$bg.variable]: 'colors.gray.700',\n [$fg.variable]: 'colors.whiteAlpha.900',\n },\n px: '8px',\n py: '2px',\n bg: [$bg.reference],\n [$arrowBg.variable]: [$bg.reference],\n borderRadius: 'sm',\n fontWeight: 'medium',\n fontSize: 'xs',\n boxShadow: 'md',\n maxW: '320px',\n zIndex: 'tooltip',\n borderWidth: '1px',\n }\n})\n\nexport const tooltipTheme = defineStyleConfig({\n baseStyle,\n})\n","import { createMultiStyleConfigHelpers, cssVar } from '@chakra-ui/styled-system'\nimport { transparentize } from '@chakra-ui/theme-tools'\n\nconst $size = cssVar('stepper-indicator-size')\nconst $accentColor = cssVar('stepper-accent-color')\nconst $verticalSeperatorOffset = cssVar('stepper-vertical-seperator-offset')\n\nconst { defineMultiStyleConfig, definePartsStyle } =\n createMultiStyleConfigHelpers([\n // saas ui parts\n 'container',\n 'item',\n 'content',\n // default parts\n 'stepper',\n 'step',\n 'title',\n 'description',\n 'indicator',\n 'separator',\n 'icon',\n 'number',\n ])\n\nconst baseStyle = definePartsStyle(({ colorScheme: c }) => ({\n container: {\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n },\n item: {\n w: 'full',\n },\n content: {\n ['&[data-orientation=vertical]']: {\n mt: 2,\n ms: $verticalSeperatorOffset.reference,\n borderLeftWidth: '1px',\n ps: 6,\n },\n },\n stepper: {\n gap: '2',\n [$verticalSeperatorOffset.variable]: `10px`,\n [$accentColor.variable]: `colors.${c}.500`,\n _dark: {\n [$accentColor.variable]: `colors.${c}.500`,\n },\n },\n separator: {\n transitionProperty: 'common',\n transitionDuration: 'normal',\n ['&[data-orientation=horizontal]']: {\n height: '1px',\n },\n ['&[data-orientation=vertical]']: {\n width: '1px',\n },\n ['.sui-steps__item .chakra-step &[data-orientation=vertical]']: {\n display: 'none',\n },\n ['.sui-steps__item &[data-orientation=vertical]']: {\n position: 'static',\n minH: 4,\n height: 'auto',\n ms: $verticalSeperatorOffset.reference,\n },\n },\n step: {\n ['&[data-orientation=vertical]']: {\n alignItems: 'center',\n },\n },\n}))\n\nconst variantOutline = definePartsStyle((props) => ({}))\n\nconst variantSolid = definePartsStyle((props) => ({\n indicator: {\n '&[data-status=active]': {\n borderWidth: '0',\n bg: $accentColor.reference,\n color: 'chakra-inverse-text',\n },\n '&[data-status=complete]': {\n bg: $accentColor.reference,\n color: 'chakra-inverse-text',\n },\n '&[data-status=incomplete]': {\n borderWidth: '0',\n bg: 'blackAlpha.200',\n _dark: {\n bg: 'whiteAlpha.200',\n },\n },\n },\n}))\n\nconst variantSubtle = definePartsStyle((props) => {\n const { theme, colorScheme: c } = props\n return {\n stepper: {\n [$accentColor.variable]: `colors.${c}.100`,\n },\n indicator: {\n '&[data-status=active]': {\n borderWidth: '0',\n bg: $accentColor.reference,\n color: `${c}.500`,\n _dark: {\n bg: transparentize(`${c}.200`, 0.16)(theme),\n },\n },\n '&[data-status=complete]': {\n bg: $accentColor.reference,\n color: `${c}.500`,\n _dark: {\n bg: transparentize(`${c}.200`, 0.24)(theme),\n color: `${c}.200`,\n },\n },\n '&[data-status=incomplete]': {\n borderWidth: '0',\n bg: 'blackAlpha.200',\n color: 'blackAlpha.700',\n _dark: {\n bg: 'whiteAlpha.200',\n color: 'whiteAlpha.600',\n },\n },\n },\n }\n})\n\nexport const stepperTheme = defineMultiStyleConfig({\n defaultProps: {\n variant: 'outline',\n colorScheme: 'primary',\n size: 'md',\n },\n baseStyle,\n variants: {\n outline: variantOutline,\n solid: variantSolid,\n subtle: variantSubtle,\n },\n sizes: {\n xs: definePartsStyle({\n stepper: {\n [$size.variable]: 'sizes.4',\n [$verticalSeperatorOffset.variable]: `7px`,\n },\n }),\n sm: definePartsStyle({\n stepper: {\n [$size.variable]: 'sizes.6',\n [$verticalSeperatorOffset.variable]: `11px`,\n },\n }),\n md: definePartsStyle({\n stepper: {\n [$size.variable]: 'sizes.7',\n [$verticalSeperatorOffset.variable]: `14px`,\n },\n }),\n lg: definePartsStyle({\n stepper: {\n [$size.variable]: 'sizes.8',\n [$verticalSeperatorOffset.variable]: `16px`,\n },\n }),\n },\n})\n","import { emptyStateAnatomy } from '../../anatomy'\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\n\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(emptyStateAnatomy.keys)\n\nconst baseStyle = definePartsStyle((props) => {\n const { colorScheme: c } = props\n return {\n icon: {\n boxSize: [10, null, 12],\n color: `${c}.500`,\n _dark: {\n color: `${c}.500`,\n },\n },\n }\n})\n\nexport const emptyStateTheme = defineMultiStyleConfig({\n baseStyle,\n})\n","import {\n defineMultiStyleConfig,\n definePartsStyle,\n} from '../../base/components/nprogress'\n\nconst baseStyle = definePartsStyle((props) => {\n const { colorScheme: c } = props\n return {\n bar: {\n bg: `${c}.500`,\n _dark: {\n bg: `${c}.500`,\n },\n },\n }\n})\n\nexport const nprogressTheme = defineMultiStyleConfig({\n defaultProps: {\n colorScheme: 'primary',\n },\n baseStyle,\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\nimport { propertyAnatomy } from '../../anatomy'\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(propertyAnatomy.keys)\n\nexport const propertyTheme = defineMultiStyleConfig({\n baseStyle: {\n label: {\n color: 'muted',\n _dark: {\n color: 'muted',\n },\n },\n },\n})\n","// Chakra UI Components\nimport { alertTheme } from './alert'\nimport { badgeTheme } from './badge'\nimport { buttonTheme } from './button'\nimport { cardTheme } from './card'\nimport { checkboxTheme } from './checkbox'\nimport { closeButtonTheme } from './close-button'\nimport {\n inputTheme,\n pinInputTheme,\n formLabelTheme,\n numberInputTheme,\n nativeSelectTheme,\n textareaTheme,\n} from './form'\nimport { selectTheme } from './select'\nimport { headingTheme } from './heading'\nimport { kbdTheme } from './kbd'\nimport { menuTheme } from './menu'\nimport { modalTheme } from './modal'\nimport { progressTheme } from './progress'\nimport { radioTheme } from './radio'\nimport { sliderTheme } from './slider'\nimport { switchTheme } from './switch'\nimport { tooltipTheme } from './tooltip'\n\nexport { alertTheme as Alert } from './alert'\nexport { badgeTheme as Badge } from './badge'\nexport { buttonTheme as Button } from './button'\nexport { cardTheme as Card } from './card'\nexport { checkboxTheme as Checkbox } from './checkbox'\nexport { closeButtonTheme as CloseButton } from './close-button'\nexport {\n inputTheme as Input,\n pinInputTheme as PinInput,\n formLabelTheme as FormLabel,\n numberInputTheme as NumberInput,\n nativeSelectTheme as Select,\n textareaTheme as Textarea,\n} from './form'\nexport { selectTheme as SuiSelect } from './select'\nexport { headingTheme as Heading } from './heading'\nexport { kbdTheme as Kbd } from './kbd'\nexport { menuTheme as Menu } from './menu'\nexport { modalTheme as Modal } from './modal'\nexport { progressTheme as Progress } from './progress'\nexport { radioTheme as Radio } from './radio'\nexport { sliderTheme as Slider } from './slider'\nexport { switchTheme as Switch } from './switch'\nimport { stepperTheme } from './stepper'\nexport { tooltipTheme as Tooltip } from './tooltip'\n\n// SaaS UI Components\nimport { emptyStateTheme } from './empty-state'\nimport { nprogressTheme } from './nprogress'\nimport { propertyTheme } from './property'\n\nexport { emptyStateTheme as SuiEmptyState } from './empty-state'\nexport { nprogressTheme as SuiNProgress } from './nprogress'\nexport { propertyTheme as SuiProperty } from './property'\nexport { stepperTheme as SuiStepper } from './stepper'\n\nexport const components = {\n Alert: alertTheme,\n Badge: badgeTheme,\n Button: buttonTheme,\n Card: cardTheme,\n Checkbox: checkboxTheme,\n CloseButton: closeButtonTheme,\n Heading: headingTheme,\n Kbd: kbdTheme,\n Menu: menuTheme,\n Modal: modalTheme,\n Progress: progressTheme,\n Radio: radioTheme,\n Slider: sliderTheme,\n Switch: switchTheme,\n Stepper: stepperTheme,\n Tooltip: tooltipTheme,\n Input: inputTheme,\n PinInput: pinInputTheme,\n FormLabel: formLabelTheme,\n NumberInput: numberInputTheme,\n Select: nativeSelectTheme,\n Textarea: textareaTheme,\n SuiEmptyState: emptyStateTheme,\n SuiNProgress: nprogressTheme,\n SuiProperty: propertyTheme,\n SuiSelect: selectTheme,\n}\n","import React from 'react'\nimport { chakra } from '@chakra-ui/react'\nimport { useSaas } from './saas-provider'\n\nconst Link: React.FC<any> = (props) => <chakra.a {...props} />\n\nexport function useLink(): React.ElementType<any> {\n const context = useSaas()\n if (context?.linkComponent) {\n return context.linkComponent\n }\n return Link\n}\n","import * as React from 'react'\n\nimport {\n Flex,\n createStylesContext,\n HTMLChakraProps,\n ThemingProps,\n useMultiStyleConfig,\n omitThemingProps,\n SystemStyleObject,\n forwardRef,\n} from '@chakra-ui/react'\n\nimport { cx } from '@chakra-ui/utils'\nimport { AppShellProvider, useAppShell } from './app-shell-context'\n\nconst [StylesProvider, useStyles] = createStylesContext('SuiAppShell')\n\nexport interface AppShellProps\n extends HTMLChakraProps<'div'>,\n ThemingProps<'SuiAppShell'> {\n /**\n * The top header navigation\n */\n navbar?: React.ReactNode\n /**\n * Main sidebar, positioned on the left\n */\n sidebar?: React.ReactElement\n /**\n * Secondary sidebar, positioned on the right\n */\n aside?: React.ReactNode\n /**\n * The footer\n */\n footer?: React.ReactNode\n /**\n * The main content\n */\n children: React.ReactNode\n mainRef?: React.RefObject<HTMLDivElement>\n}\n\n/**\n * The App Shell defines the main structure of your app.\n *\n * @see Docs https://saas-ui.dev/docs/components/layout/app-shell\n */\nexport const AppShell = forwardRef<AppShellProps, 'div'>((props, ref) => {\n const styles = useMultiStyleConfig('SuiAppShell', props) as Record<\n string,\n SystemStyleObject\n >\n\n const {\n navbar,\n sidebar,\n aside,\n footer,\n children,\n mainRef,\n ...containerProps\n } = omitThemingProps(props)\n\n const containerStyles: SystemStyleObject = {\n flexDirection: 'column',\n ...styles.container,\n }\n\n const innerStyles: SystemStyleObject = {\n flex: 1,\n minHeight: 0, // make sure child flex divs get correct height.\n minWidth: 0, // make sure child flex divs get correct width.\n ...styles.inner,\n }\n\n const mainStyles: SystemStyleObject = {\n flex: 1,\n flexDirection: 'column',\n minWidth: 0, // make sure child flex divs get correct width.\n ...styles.main,\n }\n\n const isSidebar =\n React.isValidElement(sidebar) && (sidebar as any).type.id === 'Sidebar'\n\n const context = useAppShell({\n toggleBreakpoint: isSidebar\n ? (sidebar as any)?.props.toggleBreakpoint\n : undefined,\n })\n\n return (\n <AppShellProvider value={context}>\n <StylesProvider value={styles}>\n <Flex\n ref={ref}\n {...containerProps}\n sx={containerStyles}\n className={cx('sui-app-shell', props.className)}\n >\n {navbar}\n <Flex sx={innerStyles} className=\"saas-app-shell__inner\">\n {sidebar}\n <Flex\n ref={mainRef}\n sx={mainStyles}\n className=\"saas-app-shell__main\"\n >\n {children}\n </Flex>\n {aside}\n </Flex>\n {footer}\n </Flex>\n </StylesProvider>\n </AppShellProvider>\n )\n})\n\nAppShell.displayName = 'AppShell'\n","import * as React from 'react'\nimport { createContext } from '@chakra-ui/react-utils'\nimport { useBreakpointValue, useDisclosure } from '@chakra-ui/react'\nimport { Breakpoints, getBreakpoints } from '../sidebar/sidebar-utils'\n\nexport const [AppShellProvider, useAppShellContext] = createContext<\n ReturnType<typeof useAppShell>\n>({\n strict: false,\n errorMessage: 'AppShell context not available.',\n})\n\nexport interface UseAppShellProps {\n toggleBreakpoint?: Breakpoints\n}\n\nexport const useAppShell = (props: UseAppShellProps) => {\n const disclosure = useDisclosure()\n\n const breakpoints = getBreakpoints(props.toggleBreakpoint)\n\n const isMobile = useBreakpointValue(breakpoints, {\n fallback: props.toggleBreakpoint || 'lg',\n })\n\n return {\n isSidebarOpen: disclosure.isOpen,\n closeSidebar: disclosure.onClose,\n openSidebar: disclosure.onOpen,\n toggleSidebar: disclosure.onToggle,\n isMobile,\n }\n}\n","import * as React from 'react'\nimport {\n CloseButton,\n CloseButtonProps,\n chakra,\n forwardRef,\n omitThemingProps,\n ButtonGroup,\n ButtonGroupProps,\n SystemStyleObject,\n ThemingProps,\n useMultiStyleConfig,\n HTMLChakraProps,\n As,\n createStylesContext,\n useId,\n ComponentWithAs,\n Icon,\n} from '@chakra-ui/react'\nimport { callAllHandlers, cx } from '@chakra-ui/utils'\n\nimport { createContext } from '@chakra-ui/react-utils'\n\nimport { InfoIcon, WarningIcon, CheckIcon } from './icons'\n\nimport { AnimatePresence } from 'framer-motion'\n\nimport {\n BannerTransition,\n BannerTransitionProps,\n BannerMotion,\n} from './banner-transition'\n\nconst [StylesProvider, useStyles] = createStylesContext('SuiBanner')\n\nconst STATUSES = {\n info: { icon: InfoIcon, colorScheme: 'blue' },\n warning: { icon: WarningIcon, colorScheme: 'orange' },\n success: { icon: CheckIcon, colorScheme: 'green' },\n error: { icon: WarningIcon, colorScheme: 'red' },\n}\n\nexport type BannerStatus = keyof typeof STATUSES\n\ninterface BannerOptions {\n /**\n * The status of the banner.\n */\n status?: BannerStatus\n /**\n * Show or hide the banner.\n */\n isOpen?: boolean\n /**\n * Callback fired when the close button is clicked.\n */\n onClose?: () => void\n /**\n * Customize the close animation.\n * @default 'slideOutTop'\n * @type 'slideOutTop', 'slideOutBottom', 'fade', 'scale', 'none'\n */\n motionPreset?: BannerMotion\n}\n\ninterface BannerContext extends BannerOptions {\n id: string\n status: BannerStatus\n}\n\nconst [BannerProvider, useBannerContext] = createContext<BannerContext>({\n name: 'BannerContext',\n errorMessage:\n 'useBannerContext: `context` is undefined. Seems you forgot to wrap banner components in `<Banner />`',\n})\n\nexport interface BannerProps\n extends Omit<BannerTransitionProps, 'motionPreset'>,\n BannerOptions,\n ThemingProps<'SuiBanner'> {}\n\n/**\n * Banner is used to communicate the state or status of a\n * page, feature or action\n *\n * @see Docs https://saas-ui.dev/docs/components/feedback/banner\n */\nexport const Banner = forwardRef<BannerProps, 'div'>((props, ref) => {\n const {\n id,\n status = 'info',\n isOpen = true,\n onClose,\n motionPreset = 'slideOutTop',\n ...rest\n } = omitThemingProps(props)\n const colorScheme = props.colorScheme ?? STATUSES[status].colorScheme\n\n const styles = useMultiStyleConfig('SuiBanner', {\n ...props,\n colorScheme,\n })\n\n const containerStyles: SystemStyleObject = {\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n position: 'relative',\n overflow: 'hidden',\n ...styles.container,\n }\n\n const context = {\n id: id || `banner-${useId()}`,\n status,\n onClose,\n isOpen,\n }\n\n const role = ['warning', 'error'].includes(status) ? 'alert' : 'status'\n\n const animate = isOpen ? 'enter' : 'exit'\n\n return (\n <BannerProvider value={context}>\n <StylesProvider value={styles}>\n <AnimatePresence>\n {isOpen && (\n <BannerTransition\n id={context.id}\n role={role}\n ref={ref}\n motionPreset={motionPreset}\n animate={animate}\n {...rest}\n className={cx('sui-banner', props.className)}\n __css={containerStyles}\n />\n )}\n </AnimatePresence>\n </StylesProvider>\n </BannerProvider>\n )\n})\n\nBanner.displayName = 'Banner'\n\nexport interface BannerContentProps extends HTMLChakraProps<'div'> {}\n\n/**\n * The wrapper for the banner title and description.\n *\n * @see Docs https://saas-ui.dev/docs/components/feedback/banner\n */\nexport const BannerContent = forwardRef<BannerContentProps, 'div'>(\n (props, ref) => {\n const styles = useStyles()\n\n return (\n <chakra.div\n ref={ref}\n {...props}\n className={cx('sui-banner__content', props.className)}\n __css={styles.content}\n />\n )\n }\n)\n\nBannerContent.displayName = 'BannerContent'\n\nexport interface BannerDescriptionProps extends HTMLChakraProps<'div'> {}\n\nexport interface BannerTitleProps extends HTMLChakraProps<'div'> {}\n\n/**\n * The title of the banner to be announced by screen readers.\n *\n * @see Docs https://saas-ui.dev/docs/components/feedback/banner\n */\nexport const BannerTitle = forwardRef<BannerTitleProps, 'div'>((props, ref) => {\n const styles = useStyles()\n\n return (\n <chakra.div\n ref={ref}\n {...props}\n className={cx('sui-banner__title', props.className)}\n __css={styles.title}\n />\n )\n})\n\nBannerTitle.displayName = 'BannerTitle'\n\nexport interface BannerDescriptionProps extends HTMLChakraProps<'div'> {}\n\n/**\n * The description of the banner to be announced by screen readers.\n *\n * @see Docs https://saas-ui.dev/docs/components/feedback/banner\n */\nexport const BannerDescription = forwardRef<BannerDescriptionProps, 'div'>(\n (props, ref) => {\n const styles = useStyles()\n const descriptionStyles: SystemStyleObject = {\n display: 'inline',\n ...styles.description,\n }\n\n return (\n <chakra.div\n ref={ref}\n {...props}\n className={cx('sui-banner__desc', props.className)}\n __css={descriptionStyles}\n />\n )\n }\n)\n\nBannerDescription.displayName = 'BannerDescription'\n\nexport interface BannerActionsProps\n extends HTMLChakraProps<'div'>,\n ButtonGroupProps {}\n\n/**\n * The banner actions, renders a ButtonGroup.\n *\n * @see Docs https://saas-ui.dev/docs/components/feedback/banner\n */\nexport const BannerActions = forwardRef<BannerActionsProps, 'div'>(\n (props, ref) => {\n const { children, variant } = props\n const styles = useStyles()\n\n return (\n <chakra.div\n ref={ref}\n {...props}\n className={cx('sui-banner__actions', props.className)}\n __css={styles.actions}\n >\n <ButtonGroup variant={variant}>{children}</ButtonGroup>\n </chakra.div>\n )\n }\n)\n\nBannerActions.displayName = 'BannerActions'\n\nexport interface BannerIconProps extends HTMLChakraProps<'span'> {\n icon?: As\n}\n\n/**\n * The visual icon for the banner.\n *\n * @see Docs https://saas-ui.dev/docs/components/feedback/banner\n */\nexport const BannerIcon: React.FC<BannerIconProps> = (props) => {\n const { status } = useBannerContext()\n const { icon, ...rest } = props\n const { icon: statusIcon } = STATUSES[status]\n const styles = useStyles()\n\n return (\n <chakra.span\n display=\"inherit\"\n {...rest}\n className={cx('sui-banner__icon', props.className)}\n __css={styles.icon}\n >\n <Icon as={icon || statusIcon} w=\"100%\" h=\"100%\" />\n </chakra.span>\n )\n}\n\nBannerIcon.displayName = 'BannerIcon'\n\n/**\n * The close button.\n *\n * @see Docs https://saas-ui.dev/docs/components/feedback/banner\n */\nexport const BannerCloseButton = forwardRef<CloseButtonProps, 'button'>(\n (props, ref) => {\n const { onClick, className, ...rest } = props\n const { onClose, isOpen, id } = useBannerContext()\n\n const _className = cx('sui-banner__close-btn', className)\n\n const styles = useStyles()\n\n return (\n <CloseButton\n ref={ref}\n __css={styles.closeButton}\n className={_className}\n onClick={callAllHandlers(onClick, (event) => {\n event.stopPropagation()\n onClose?.()\n })}\n aria-controls={id}\n aria-expanded={isOpen?.toString() ? 'true' : 'false'}\n {...rest}\n />\n )\n }\n)\n\nBannerCloseButton.displayName = 'BannerCloseButton'\n","import { Icon, IconProps } from '@chakra-ui/react'\n\nexport function CheckIcon(props: IconProps) {\n return (\n <Icon viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z\"\n />\n </Icon>\n )\n}\n\nexport function InfoIcon(props: IconProps) {\n return (\n <Icon viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z\"\n />\n </Icon>\n )\n}\n\nexport function WarningIcon(props: IconProps) {\n return (\n <Icon viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z\"\n />\n </Icon>\n )\n}\n","import * as React from 'react';\nimport { forwardRef, useContext } from 'react';\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 } from './features/load-features.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { LazyContext } from '../context/LazyContext.mjs';\nimport { SwitchLayoutGroupContext } from '../context/SwitchLayoutGroupContext.mjs';\nimport { motionComponentSymbol } from './utils/symbol.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({ preloadedFeatures, createVisualElement, useRender, useVisualState, Component, }) {\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout;\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n };\n const { isStatic } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState(props, isStatic);\n if (!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, configAndProps, createVisualElement);\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 const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext);\n const isStrict = useContext(LazyContext).strict;\n if (context.visualElement) {\n MeasureLayout = context.visualElement.loadFeatures(\n // Note: Pass the full new combined props to correctly re-render dynamic feature components.\n configAndProps, isStrict, preloadedFeatures, initialLayoutGroupConfig);\n }\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(MotionContext.Provider, { value: context },\n MeasureLayout && context.visualElement ? (React.createElement(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null,\n useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)));\n }\n const ForwardRefComponent = forwardRef(MotionComponent);\n ForwardRefComponent[motionComponentSymbol] = Component;\n return ForwardRefComponent;\n}\nfunction useLayoutId({ layoutId }) {\n const layoutGroupId = useContext(LayoutGroupContext).id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\n\nexport { createMotionComponent };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nconst MotionConfigContext = createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n","import { createContext } from 'react';\n\nconst MotionContext = createContext({});\n\nexport { MotionContext };\n","import { useContext, useRef, useInsertionEffect, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\n\nfunction useVisualElement(Component, visualState, props, createVisualElement) {\n const { visualElement: parent } = useContext(MotionContext);\n const lazyContext = useContext(LazyContext);\n const presenceContext = useContext(PresenceContext);\n const reducedMotionConfig = useContext(MotionConfigContext).reducedMotion;\n const visualElementRef = useRef();\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n createVisualElement = createVisualElement || lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState,\n parent,\n props,\n presenceContext,\n blockInitialAnimation: presenceContext\n ? presenceContext.initial === false\n : false,\n reducedMotionConfig,\n });\n }\n const visualElement = visualElementRef.current;\n useInsertionEffect(() => {\n visualElement && visualElement.update(props, presenceContext);\n });\n /**\n * Cache this value as we want to know whether HandoffAppearAnimations\n * was present on initial render - it will be deleted after this.\n */\n const canHandoff = useRef(Boolean(window.HandoffAppearAnimations));\n useIsomorphicLayoutEffect(() => {\n if (!visualElement)\n return;\n visualElement.render();\n /**\n * Ideally this function would always run in a useEffect.\n *\n * However, if we have optimised appear animations to handoff from,\n * it needs to happen synchronously to ensure there's no flash of\n * incorrect styles in the event of a hydration error.\n *\n * So if we detect a situtation where optimised appear animations\n * are running, we use useLayoutEffect to trigger animations.\n */\n if (canHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n });\n useEffect(() => {\n if (!visualElement)\n return;\n visualElement.updateFeatures();\n if (!canHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n /**\n * Once we've handed off animations we can delete HandoffAppearAnimations\n * so components added after the initial render can animate changes\n * in useEffect vs useLayoutEffect.\n */\n window.HandoffAppearAnimations = undefined;\n canHandoff.current = false;\n });\n return visualElement;\n}\n\nexport { useVisualElement };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nconst PresenceContext = createContext(null);\n\nexport { PresenceContext };\n","import { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.mjs';\n\nconst useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n","const isBrowser = typeof document !== \"undefined\";\n\nexport { isBrowser };\n","import { createContext } from 'react';\n\nconst LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\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((instance) => {\n instance && visualState.mount && visualState.mount(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 { useContext, useMemo } from 'react';\nimport { MotionContext } from './index.mjs';\nimport { getCurrentTreeVariants } from './utils.mjs';\n\nfunction useCreateMotionContext(props) {\n const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext));\n return useMemo(() => ({ initial, 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 variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || Array.isArray(v);\n}\n\nexport { isVariantLabel };\n","function isAnimationControls(v) {\n return typeof v === \"object\" && typeof v.start === \"function\";\n}\n\nexport { isAnimationControls };\n","const variantPriorityOrder = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\",\n];\nconst variantProps = [\"initial\", ...variantPriorityOrder];\n\nexport { variantPriorityOrder, variantProps };\n","import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n return (isAnimationControls(props.animate) ||\n variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n","import { isVariantLabel } from '../../render/utils/is-variant-label.mjs';\nimport { isControllingVariants } from '../../render/utils/is-controlling-variants.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n if (isControllingVariants(props)) {\n const { initial, animate } = props;\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","const featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\",\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n};\nconst featureDefinitions = {};\nfor (const key in featureProps) {\n featureDefinitions[key] = {\n isEnabled: (props) => featureProps[key].some((name) => !!props[name]),\n };\n}\n\nexport { featureDefinitions };\n","import { featureDefinitions } from './definitions.mjs';\n\nfunction loadFeatures(features) {\n for (const key in features) {\n featureDefinitions[key] = {\n ...featureDefinitions[key],\n ...features[key],\n };\n }\n}\n\nexport { loadFeatures };\n","import { createContext } from 'react';\n\nconst LayoutGroupContext = createContext({});\n\nexport { LayoutGroupContext };\n","import { createContext } from 'react';\n\n/**\n * Internal, exported only for usage in Framer\n */\nconst SwitchLayoutGroupContext = createContext({});\n\nexport { SwitchLayoutGroupContext };\n","const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\");\n\nexport { motionComponentSymbol };\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 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 const 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: (_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","/**\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 */\nconst 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 \"switch\",\n \"symbol\",\n \"svg\",\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 { useMemo, 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';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction createUseRender(forwardMotionProps = false) {\n const useRender = (Component, props, ref, { latestValues }, isStatic) => {\n const useVisualProps = isSVGComponent(Component)\n ? useSVGProps\n : useHTMLProps;\n const visualProps = useVisualProps(props, latestValues, isStatic, Component);\n const filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n const elementProps = {\n ...filteredProps,\n ...visualProps,\n ref,\n };\n /**\n * If component has been handed a motion value as its child,\n * memoise its initial value and render that. Subsequent updates\n * will be handled by the onChange handler\n */\n const { children } = props;\n const renderedChildren = useMemo(() => (isMotionValue(children) ? children.get() : children), [children]);\n return createElement(Component, {\n ...elementProps,\n children: renderedChildren,\n });\n };\n return useRender;\n}\n\nexport { createUseRender };\n","import { 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 (const key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues({ transformTemplate }, visualState, isStatic) {\n return useMemo(() => {\n const state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);\n return Object.assign({}, state.vars, state.style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState, isStatic) {\n const styleProp = props.style || {};\n const 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 return props.transformValues ? props.transformValues(style) : style;\n}\nfunction useHTMLProps(props, visualState, isStatic) {\n // The `any` isn't ideal but it is the type of createElement props argument\n const htmlProps = {};\n const style = useStyle(props, visualState, isStatic);\n if (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-${props.drag === \"x\" ? \"y\" : \"x\"}`;\n }\n if (props.tabIndex === undefined &&\n (props.onTap || props.onTapStart || props.whileTap)) {\n htmlProps.tabIndex = 0;\n }\n htmlProps.style = style;\n return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps };\n","const scaleCorrectors = {};\nfunction addScaleCorrector(correctors) {\n Object.assign(scaleCorrectors, correctors);\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n","/**\n * Generate a list of every possible transform key.\n */\nconst transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n */\nconst transformProps = new Set(transformPropOrder);\n\nexport { transformPropOrder, transformProps };\n","import { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nimport { transformProps } from '../../render/html/utils/transform.mjs';\n\nfunction isForcedMotionValue(key, { layout, layoutId }) {\n return (transformProps.has(key) ||\n key.startsWith(\"origin\") ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue };\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\n","import { transformPropOrder } from './transform.mjs';\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\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(transform, { enableHardwareAcceleration = true, allowTransformNone = true, }, transformIsDefault, transformTemplate) {\n // The transform string we're going to build into.\n let transformString = \"\";\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n if (transform[key] !== undefined) {\n const transformName = translateAlias[key] || key;\n transformString += `${transformName}(${transform[key]}) `;\n }\n }\n if (enableHardwareAcceleration && !transform.z) {\n transformString += \"translateZ(0)\";\n }\n transformString = transformString.trim();\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\nexport { buildTransform };\n","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = checkStringStartsWith(\"--\");\nconst isCSSVariableToken = checkStringStartsWith(\"var(--\");\nconst cssVariableRegex = /var\\s*\\(\\s*--[\\w-]+(\\s*,\\s*(?:(?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)+)?\\s*\\)/g;\n\nexport { cssVariableRegex, isCSSVariableName, isCSSVariableToken };\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nconst getValueAsType = (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.min(Math.max(v, min), max);\n\nexport { clamp };\n","import { clamp } from '../../../utils/clamp.mjs';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n","/**\n * TODO: When we move from string as a source of truth to data models\n * everything in this folder should probably be referred to as models vs types\n */\n// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\nconst floatRegex = /(-)?([\\d]*\\.?[\\d])+/g;\nconst colorRegex = /(#[0-9a-f]{3,8}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2}(-?[\\d\\.]+%?)\\s*[\\,\\/]?\\s*[\\d\\.]*%?\\))/gi;\nconst singleColorRegex = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2}(-?[\\d\\.]+%?)\\s*[\\,\\/]?\\s*[\\d\\.]*%?\\))$/i;\nfunction isString(v) {\n return typeof v === \"string\";\n}\n\nexport { colorRegex, floatRegex, isString, sanitize, singleColorRegex };\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 = {\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n};\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n","import { number } from '../../../value/types/numbers/index.mjs';\n\nconst int = {\n ...number,\n transform: Math.round,\n};\n\nexport { int };\n","import { scale, alpha } from '../../../value/types/numbers/index.mjs';\nimport { px, degrees, progressPercentage } from '../../../value/types/numbers/units.mjs';\nimport { int } from './type-int.mjs';\n\nconst 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,\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 } from './build-transform.mjs';\nimport { isCSSVariableName } from '../../dom/utils/is-css-variable.mjs';\nimport { transformProps } 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 const { style, vars, transform, transformOrigin } = state;\n // Track whether we encounter any transform or transformOrigin values.\n let hasTransform = false;\n let hasTransformOrigin = false;\n // Does the calculated transform essentially equal \"none\"?\n let 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 (const key in latestValues) {\n const value = latestValues[key];\n /**\n * If this is a CSS variable we don't do any further processing.\n */\n if (isCSSVariableName(key)) {\n vars[key] = value;\n continue;\n }\n // Convert the value to its default value type, ie 0 -> \"0px\"\n const valueType = numberValueTypes[key];\n const valueAsType = getValueAsType(value, valueType);\n if (transformProps.has(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n transform[key] = valueAsType;\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 !== (valueType.default || 0))\n transformIsNone = false;\n }\n else if (key.startsWith(\"origin\")) {\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n transformOrigin[key] = valueAsType;\n }\n else {\n style[key] = valueAsType;\n }\n }\n if (!latestValues.transform) {\n if (hasTransform || transformTemplate) {\n style.transform = buildTransform(state.transform, options, transformIsNone, transformTemplate);\n }\n else if (style.transform) {\n /**\n * If we have previously created a transform but currently don't have any,\n * reset transform style to none.\n */\n style.transform = \"none\";\n }\n }\n /**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n if (hasTransformOrigin) {\n const { originX = \"50%\", originY = \"50%\", originZ = 0, } = transformOrigin;\n style.transformOrigin = `${originX} ${originY} ${originZ}`;\n }\n}\n\nexport { buildHTMLStyles };\n","const createHtmlRenderState = () => ({\n style: {},\n transform: {},\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 */\nconst validMotionProps = new Set([\n \"animate\",\n \"exit\",\n \"variants\",\n \"initial\",\n \"style\",\n \"values\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"transformValues\",\n \"custom\",\n \"inherit\",\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 \"_dragX\",\n \"_dragY\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"ignoreStrict\",\n \"viewport\",\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 (key.startsWith(\"while\") ||\n (key.startsWith(\"drag\") && key !== \"draggable\") ||\n key.startsWith(\"layout\") ||\n key.startsWith(\"onTap\") ||\n key.startsWith(\"onPan\") ||\n validMotionProps.has(key));\n}\n\nexport { isValidMotionProp };\n","import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nlet shouldForward = (key) => !isValidMotionProp(key);\nfunction loadExternalIsValidProp(isValidProp) {\n if (!isValidProp)\n return;\n // Explicitly filter our events\n shouldForward = (key) => key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\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 const filteredProps = {};\n for (const key in props) {\n /**\n * values is considered a valid prop by Emotion, so if it's present\n * this will be rendered out to the DOM unless explicitly filtered.\n *\n * We check the type as it could be used with the `feColorMatrix`\n * element, which we support.\n */\n if (key === \"values\" && typeof props.values === \"object\")\n continue;\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 { 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';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\n\nfunction useSVGProps(props, visualState, _isStatic, Component) {\n const visualProps = useMemo(() => {\n const state = createSvgRenderState();\n buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, isSVGTag(Component), props.transformTemplate);\n return {\n ...state.attrs,\n style: { ...state.style },\n };\n }, [visualState]);\n if (props.style) {\n const rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = { ...rawStyles, ...visualProps.style };\n }\n return visualProps;\n}\n\nexport { useSVGProps };\n","import { px } from '../../../value/types/numbers/units.mjs';\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 const pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);\n const pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);\n return `${pxOriginX} ${pxOriginY}`;\n}\n\nexport { calcSVGTransformOrigin };\n","import { px } from '../../../value/types/numbers/units.mjs';\n\nconst dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nconst 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 = 1, offset = 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 const keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = px.transform(-offset);\n // Build the dash array\n const pathLength = px.transform(length);\n const pathSpacing = px.transform(spacing);\n attrs[keys.array] = `${pathLength} ${pathSpacing}`;\n}\n\nexport { buildSVGPath };\n","import { 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, { attrX, attrY, attrScale, originX, originY, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, options, isSVGTag, transformTemplate) {\n buildHTMLStyles(state, latest, options, transformTemplate);\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox;\n }\n return;\n }\n state.attrs = state.style;\n state.style = {};\n const { attrs, style, dimensions } = state;\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 // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n if (attrScale !== undefined)\n attrs.scale = attrScale;\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 { createHtmlRenderState } from '../../html/utils/create-render-state.mjs';\n\nconst createSvgRenderState = () => ({\n ...createHtmlRenderState(),\n attrs: {},\n});\n\nexport { createSvgRenderState };\n","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\n","/**\n * Convert camelCase to dash-case properties.\n */\nconst camelToDash = (str) => str.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n\nexport { camelToDash };\n","function renderHTML(element, { style, vars }, styleProp, projection) {\n Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));\n // Loop over any CSS variables and assign those.\n for (const 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 */\nconst 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 \"startOffset\",\n \"textLength\",\n \"lengthAdjust\",\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 (const 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, prevProps) {\n const { style } = props;\n const newValues = {};\n for (const key in style) {\n if (isMotionValue(style[key]) ||\n (prevProps.style && isMotionValue(prevProps.style[key])) ||\n 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';\nimport { transformPropOrder } from '../../html/utils/transform.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps) {\n const newValues = scrapeMotionValuesFromProps$1(props, prevProps);\n for (const key in props) {\n if (isMotionValue(props[key]) || isMotionValue(prevProps[key])) {\n const targetKey = transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { resolveVariantFromProps } from '../../render/utils/resolve-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';\nimport { isControllingVariants, isVariantNode } from '../../render/utils/is-controlling-variants.mjs';\n\nfunction makeState({ scrapeMotionValuesFromProps, createRenderState, onMount, }, props, context, presenceContext) {\n const state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n if (onMount) {\n state.mount = (instance) => onMount(props, instance, state);\n }\n return state;\n}\nconst makeUseVisualState = (config) => (props, isStatic) => {\n const context = useContext(MotionContext);\n const presenceContext = useContext(PresenceContext);\n const make = () => makeState(config, props, context, presenceContext);\n return isStatic ? make() : useConstant(make);\n};\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n const values = {};\n const motionValues = scrapeMotionValues(props, {});\n for (const key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n let { initial, animate } = props;\n const isControllingVariants$1 = isControllingVariants(props);\n const isVariantNode$1 = isVariantNode(props);\n if (context &&\n isVariantNode$1 &&\n !isControllingVariants$1 &&\n props.inherit !== false) {\n if (initial === undefined)\n initial = context.initial;\n if (animate === undefined)\n animate = context.animate;\n }\n let isInitialAnimationBlocked = presenceContext\n ? presenceContext.initial === false\n : false;\n isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;\n const variantToSet = isInitialAnimationBlocked ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n list.forEach((definition) => {\n const resolved = resolveVariantFromProps(props, definition);\n if (!resolved)\n return;\n const { transitionEnd, transition, ...target } = resolved;\n for (const key in target) {\n let 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 const index = isInitialAnimationBlocked\n ? valueTarget.length - 1\n : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (const key in transitionEnd)\n values[key] = transitionEnd[key];\n });\n }\n return values;\n}\n\nexport { makeUseVisualState };\n","function resolveVariantFromProps(props, definition, custom, currentValues = {}, currentVelocity = {}) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n definition = definition(custom !== undefined ? 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 = props.variants && props.variants[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 !== undefined ? custom : props.custom, currentValues, currentVelocity);\n }\n return definition;\n}\n\nexport { resolveVariantFromProps };\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 const ref = useRef(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n\nexport { useConstant };\n","const isKeyframesTarget = (v) => {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n","import { isKeyframesTarget } from '../animation/utils/is-keyframes-target.mjs';\n\nconst isCustomValue = (v) => {\n return Boolean(v && typeof v === \"object\" && v.mix && v.toValue);\n};\nconst resolveFinalValueInKeyframes = (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 const unwrappedValue = isMotionValue(value) ? value.get() : value;\n return isCustomValue(unwrappedValue)\n ? unwrappedValue.toValue()\n : unwrappedValue;\n}\n\nexport { resolveMotionValue };\n","const noop = (any) => any;\n\nexport { noop };\n","class Queue {\n constructor() {\n this.order = [];\n this.scheduled = new Set();\n }\n add(process) {\n if (!this.scheduled.has(process)) {\n this.scheduled.add(process);\n this.order.push(process);\n return true;\n }\n }\n remove(process) {\n const index = this.order.indexOf(process);\n if (index !== -1) {\n this.order.splice(index, 1);\n this.scheduled.delete(process);\n }\n }\n clear() {\n this.order.length = 0;\n this.scheduled.clear();\n }\n}\nfunction createRenderStep(runNextFrame) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Queue();\n let nextFrame = new Queue();\n let numToRun = 0;\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (queue.add(callback) && addToCurrentFrame && isProcessing) {\n // If we're adding it to the currently running queue, update its measured size\n numToRun = thisFrame.order.length;\n }\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.remove(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [thisFrame, nextFrame] = [nextFrame, thisFrame];\n // Clear the next frame queue\n nextFrame.clear();\n // Execute this frame\n numToRun = thisFrame.order.length;\n if (numToRun) {\n for (let i = 0; i < numToRun; i++) {\n const callback = thisFrame.order[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 { createRenderStep } from './render-step.mjs';\n\nconst stepsOrder = [\n \"prepare\",\n \"read\",\n \"update\",\n \"preRender\",\n \"render\",\n \"postRender\",\n];\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0,\n timestamp: 0,\n isProcessing: false,\n };\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(() => (runNextFrame = true));\n return acc;\n }, {});\n const processStep = (stepId) => steps[stepId].process(state);\n const processBatch = () => {\n const timestamp = performance.now();\n runNextFrame = false;\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n state.timestamp = timestamp;\n state.isProcessing = true;\n stepsOrder.forEach(processStep);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => stepsOrder.forEach((key) => steps[key].cancel(process));\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher, stepsOrder };\n","import { noop } from '../utils/noop.mjs';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps, } = createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, steps };\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';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst svgMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n onMount: (props, instance, { renderState, latestValues }) => {\n frame.read(() => {\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 });\n frame.render(() => {\n buildSVGAttrs(renderState, latestValues, { enableHardwareAcceleration: false }, isSVGTag(instance.tagName), props.transformTemplate);\n renderSVG(instance, renderState);\n });\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\nconst htmlMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n }),\n};\n\nexport { htmlMotionConfig };\n","import { 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, { forwardMotionProps = false }, preloadedFeatures, createVisualElement) {\n const baseConfig = isSVGComponent(Component)\n ? svgMotionConfig\n : htmlMotionConfig;\n return {\n ...baseConfig,\n preloadedFeatures,\n useRender: createUseRender(forwardMotionProps),\n createVisualElement,\n Component,\n };\n}\n\nexport { createDomMotionConfig };\n","function addDomEvent(target, eventName, handler, options = { passive: true }) {\n target.addEventListener(eventName, handler, options);\n return () => target.removeEventListener(eventName, handler);\n}\n\nexport { addDomEvent };\n","const isPrimaryPointer = (event) => {\n if (event.pointerType === \"mouse\") {\n return typeof event.button !== \"number\" || event.button <= 0;\n }\n else {\n /**\n * isPrimary is true for all mice buttons, whereas every touch point\n * is regarded as its own input. So subsequent concurrent touch points\n * will be false.\n *\n * Specifically match against false here as incomplete versions of\n * PointerEvents in very old browser might have it set as undefined.\n */\n return event.isPrimary !== false;\n }\n};\n\nexport { isPrimaryPointer };\n","import { isPrimaryPointer } from './utils/is-primary-pointer.mjs';\n\nfunction extractEventInfo(event, pointType = \"page\") {\n return {\n point: {\n x: event[pointType + \"X\"],\n y: event[pointType + \"Y\"],\n },\n };\n}\nconst addPointerInfo = (handler) => {\n return (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event));\n};\n\nexport { addPointerInfo, extractEventInfo };\n","import { addDomEvent } from './add-dom-event.mjs';\nimport { addPointerInfo } from './event-info.mjs';\n\nfunction addPointerEvent(target, eventName, handler, options) {\n return addDomEvent(target, eventName, addPointerInfo(handler), options);\n}\n\nexport { addPointerEvent };\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\n","function createLock(name) {\n let lock = null;\n return () => {\n const openLock = () => {\n lock = null;\n };\n if (lock === null) {\n lock = name;\n return openLock;\n }\n return false;\n };\n}\nconst globalHorizontalLock = createLock(\"dragHorizontal\");\nconst globalVerticalLock = createLock(\"dragVertical\");\nfunction getGlobalLock(drag) {\n let lock = false;\n if (drag === \"y\") {\n lock = globalVerticalLock();\n }\n else if (drag === \"x\") {\n lock = globalHorizontalLock();\n }\n else {\n const openHorizontal = globalHorizontalLock();\n const openVertical = globalVerticalLock();\n if (openHorizontal && openVertical) {\n lock = () => {\n openHorizontal();\n openVertical();\n };\n }\n else {\n // Release the locks because we don't use them\n if (openHorizontal)\n openHorizontal();\n if (openVertical)\n openVertical();\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 const openGestureLock = getGlobalLock(true);\n if (!openGestureLock)\n return true;\n openGestureLock();\n return false;\n}\n\nexport { createLock, getGlobalLock, isDragActive };\n","class Feature {\n constructor(node) {\n this.isMounted = false;\n this.node = node;\n }\n update() { }\n}\n\nexport { Feature };\n","import { addPointerEvent } from '../events/add-pointer-event.mjs';\nimport { pipe } from '../utils/pipe.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction addHoverEvent(node, isActive) {\n const eventName = \"pointer\" + (isActive ? \"enter\" : \"leave\");\n const callbackName = \"onHover\" + (isActive ? \"Start\" : \"End\");\n const handleEvent = (event, info) => {\n if (event.type === \"touch\" || isDragActive())\n return;\n const props = node.getProps();\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", isActive);\n }\n if (props[callbackName]) {\n frame.update(() => props[callbackName](event, info));\n }\n };\n return addPointerEvent(node.current, eventName, handleEvent, {\n passive: !node.getProps()[callbackName],\n });\n}\nclass HoverGesture extends Feature {\n mount() {\n this.unmount = pipe(addHoverEvent(this.node, true), addHoverEvent(this.node, false));\n }\n unmount() { }\n}\n\nexport { HoverGesture };\n","import { addDomEvent } from '../events/add-dom-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { pipe } from '../utils/pipe.mjs';\n\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n\nexport { FocusGesture };\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 */\nconst isNodeOrChild = (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 { extractEventInfo } from '../events/event-info.mjs';\nimport { addDomEvent } from '../events/add-dom-event.mjs';\nimport { addPointerEvent } from '../events/add-pointer-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { pipe } from '../utils/pipe.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\nimport { isNodeOrChild } from './utils/is-node-or-child.mjs';\nimport { noop } from '../utils/noop.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction fireSyntheticPointerEvent(name, handler) {\n if (!handler)\n return;\n const syntheticPointerEvent = new PointerEvent(\"pointer\" + name);\n handler(syntheticPointerEvent, extractEventInfo(syntheticPointerEvent));\n}\nclass PressGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removeStartListeners = noop;\n this.removeEndListeners = noop;\n this.removeAccessibleListeners = noop;\n this.startPointerPress = (startEvent, startInfo) => {\n this.removeEndListeners();\n if (this.isPressing)\n return;\n const props = this.node.getProps();\n const endPointerPress = (endEvent, endInfo) => {\n if (!this.checkPressEnd())\n return;\n const { onTap, onTapCancel } = this.node.getProps();\n frame.update(() => {\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(this.node.current, endEvent.target)\n ? onTapCancel && onTapCancel(endEvent, endInfo)\n : onTap && onTap(endEvent, endInfo);\n });\n };\n const removePointerUpListener = addPointerEvent(window, \"pointerup\", endPointerPress, { passive: !(props.onTap || props[\"onPointerUp\"]) });\n const removePointerCancelListener = addPointerEvent(window, \"pointercancel\", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo), { passive: !(props.onTapCancel || props[\"onPointerCancel\"]) });\n this.removeEndListeners = pipe(removePointerUpListener, removePointerCancelListener);\n this.startPress(startEvent, startInfo);\n };\n this.startAccessiblePress = () => {\n const handleKeydown = (keydownEvent) => {\n if (keydownEvent.key !== \"Enter\" || this.isPressing)\n return;\n const handleKeyup = (keyupEvent) => {\n if (keyupEvent.key !== \"Enter\" || !this.checkPressEnd())\n return;\n fireSyntheticPointerEvent(\"up\", (event, info) => {\n const { onTap } = this.node.getProps();\n if (onTap) {\n frame.update(() => onTap(event, info));\n }\n });\n };\n this.removeEndListeners();\n this.removeEndListeners = addDomEvent(this.node.current, \"keyup\", handleKeyup);\n fireSyntheticPointerEvent(\"down\", (event, info) => {\n this.startPress(event, info);\n });\n };\n const removeKeydownListener = addDomEvent(this.node.current, \"keydown\", handleKeydown);\n const handleBlur = () => {\n if (!this.isPressing)\n return;\n fireSyntheticPointerEvent(\"cancel\", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo));\n };\n const removeBlurListener = addDomEvent(this.node.current, \"blur\", handleBlur);\n this.removeAccessibleListeners = pipe(removeKeydownListener, removeBlurListener);\n };\n }\n startPress(event, info) {\n this.isPressing = true;\n const { onTapStart, whileTap } = this.node.getProps();\n /**\n * Ensure we trigger animations before firing event callback\n */\n if (whileTap && this.node.animationState) {\n this.node.animationState.setActive(\"whileTap\", true);\n }\n if (onTapStart) {\n frame.update(() => onTapStart(event, info));\n }\n }\n checkPressEnd() {\n this.removeEndListeners();\n this.isPressing = false;\n const props = this.node.getProps();\n if (props.whileTap && this.node.animationState) {\n this.node.animationState.setActive(\"whileTap\", false);\n }\n return !isDragActive();\n }\n cancelPress(event, info) {\n if (!this.checkPressEnd())\n return;\n const { onTapCancel } = this.node.getProps();\n if (onTapCancel) {\n frame.update(() => onTapCancel(event, info));\n }\n }\n mount() {\n const props = this.node.getProps();\n const removePointerListener = addPointerEvent(this.node.current, \"pointerdown\", this.startPointerPress, { passive: !(props.onTapStart || props[\"onPointerStart\"]) });\n const removeFocusListener = addDomEvent(this.node.current, \"focus\", this.startAccessiblePress);\n this.removeStartListeners = pipe(removePointerListener, removeFocusListener);\n }\n unmount() {\n this.removeStartListeners();\n this.removeEndListeners();\n this.removeAccessibleListeners();\n }\n}\n\nexport { PressGesture };\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 */\nconst 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 */\nconst observers = new WeakMap();\nconst fireObserverCallback = (entry) => {\n const callback = observerCallbacks.get(entry.target);\n callback && callback(entry);\n};\nconst fireAllObserverCallbacks = (entries) => {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver({ root, ...options }) {\n const 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 const rootObservers = observers.get(lookupRoot);\n const 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, { root, ...options });\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n const rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return () => {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\nexport { observeIntersection };\n","import { Feature } from '../Feature.mjs';\nimport { observeIntersection } from './observers.mjs';\n\nconst thresholdNames = {\n some: 0,\n all: 1,\n};\nclass InViewFeature extends Feature {\n constructor() {\n super(...arguments);\n this.hasEnteredView = false;\n this.isInView = false;\n }\n startObserver() {\n this.unmount();\n const { viewport = {} } = this.node.getProps();\n const { root, margin: rootMargin, amount = \"some\", once } = viewport;\n const options = {\n root: root ? root.current : undefined,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n const onIntersectionUpdate = (entry) => {\n const { isIntersecting } = entry;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (this.isInView === isIntersecting)\n return;\n this.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 && this.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n this.hasEnteredView = true;\n }\n if (this.node.animationState) {\n this.node.animationState.setActive(\"whileInView\", isIntersecting);\n }\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n const { onViewportEnter, onViewportLeave } = this.node.getProps();\n const callback = isIntersecting ? onViewportEnter : onViewportLeave;\n callback && callback(entry);\n };\n return observeIntersection(this.node.current, options, onIntersectionUpdate);\n }\n mount() {\n this.startObserver();\n }\n update() {\n if (typeof IntersectionObserver === \"undefined\")\n return;\n const { props, prevProps } = this.node;\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(hasViewportOptionChanged(props, prevProps));\n if (hasOptionsChanged) {\n this.startObserver();\n }\n }\n unmount() { }\n}\nfunction hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {\n return (name) => viewport[name] !== prevViewport[name];\n}\n\nexport { InViewFeature };\n","import { HoverGesture } from '../../gestures/hover.mjs';\nimport { FocusGesture } from '../../gestures/focus.mjs';\nimport { PressGesture } from '../../gestures/press.mjs';\nimport { InViewFeature } from './viewport/index.mjs';\n\nconst gestureAnimations = {\n inView: {\n Feature: InViewFeature,\n },\n tap: {\n Feature: PressGesture,\n },\n focus: {\n Feature: FocusGesture,\n },\n hover: {\n Feature: HoverGesture,\n },\n};\n\nexport { gestureAnimations };\n","function shallowCompare(next, prev) {\n if (!Array.isArray(prev))\n return false;\n const prevLength = prev.length;\n if (prevLength !== next.length)\n return false;\n for (let i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i])\n return false;\n }\n return true;\n}\n\nexport { shallowCompare };\n","import { resolveVariantFromProps } from './resolve-variants.mjs';\n\n/**\n * Creates an object containing the latest state of every MotionValue on a VisualElement\n */\nfunction getCurrent(visualElement) {\n const current = {};\n visualElement.values.forEach((value, key) => (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 const velocity = {};\n visualElement.values.forEach((value, key) => (velocity[key] = value.getVelocity()));\n return velocity;\n}\nfunction resolveVariant(visualElement, definition, custom) {\n const props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, getCurrent(visualElement), getVelocity(visualElement));\n}\n\nexport { resolveVariant };\n","import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\n\nconst optimizedAppearDataId = \"framerAppearId\";\nconst optimizedAppearDataAttribute = \"data-\" + camelToDash(optimizedAppearDataId);\n\nexport { optimizedAppearDataAttribute, optimizedAppearDataId };\n","import { noop } from './noop.mjs';\n\nlet warning = noop;\nlet invariant = noop;\nif (process.env.NODE_ENV !== \"production\") {\n warning = (check, message) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(message);\n }\n };\n invariant = (check, message) => {\n if (!check) {\n throw new Error(message);\n }\n };\n}\n\nexport { invariant, warning };\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n","const instantAnimationState = {\n current: false,\n};\n\nexport { instantAnimationState };\n","const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n","import { isBezierDefinition } from '../../../easing/utils/is-bezier-definition.mjs';\n\nfunction isWaapiSupportedEasing(easing) {\n return Boolean(!easing ||\n (typeof easing === \"string\" && supportedWaapiEasing[easing]) ||\n isBezierDefinition(easing) ||\n (Array.isArray(easing) && easing.every(isWaapiSupportedEasing)));\n}\nconst cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\nconst supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\nfunction mapEasingToNativeEasing(easing) {\n if (!easing)\n return undefined;\n return isBezierDefinition(easing)\n ? cubicBezierAsString(easing)\n : Array.isArray(easing)\n ? easing.map(mapEasingToNativeEasing)\n : supportedWaapiEasing[easing];\n}\n\nexport { cubicBezierAsString, isWaapiSupportedEasing, mapEasingToNativeEasing, supportedWaapiEasing };\n","import { mapEasingToNativeEasing } from './easing.mjs';\n\nfunction animateStyle(element, valueName, keyframes, { delay = 0, duration, repeat = 0, repeatType = \"loop\", ease, times, } = {}) {\n const keyframeOptions = { [valueName]: keyframes };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease);\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n return element.animate(keyframeOptions, {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n });\n}\n\nexport { animateStyle };\n","function getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }) {\n const index = repeat && repeatType !== \"loop\" && repeat % 2 === 1\n ? 0\n : keyframes.length - 1;\n return keyframes[index];\n}\n\nexport { getFinalKeyframe };\n","import { noop } from '../utils/noop.mjs';\n\n/*\n Bezier function generator\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticiably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0.0) {\n upperBound = currentT;\n }\n else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2)\n return noop;\n const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n // If animation is at start/end, return t without easing\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n","import { cubicBezier } from './cubic-bezier.mjs';\n\nconst easeIn = cubicBezier(0.42, 0, 1, 1);\nconst easeOut = cubicBezier(0, 0, 0.58, 1);\nconst easeInOut = cubicBezier(0.42, 0, 0.58, 1);\n\nexport { easeIn, easeInOut, easeOut };\n","const isEasingArray = (ease) => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\n","// Accepts an easing function and returns a new one that outputs mirrored values for\n// the second half of the animation. Turns easeIn into easeInOut.\nconst mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\nexport { mirrorEasing };\n","// Accepts an easing function and returns a new one that outputs reversed values.\n// Turns easeIn into easeOut.\nconst reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\nexport { reverseEasing };\n","import { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst circIn = (p) => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circOut);\n\nexport { circIn, circInOut, circOut };\n","import { cubicBezier } from './cubic-bezier.mjs';\nimport { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst backOut = cubicBezier(0.33, 1.53, 0.69, 0.99);\nconst backIn = reverseEasing(backOut);\nconst backInOut = mirrorEasing(backIn);\n\nexport { backIn, backInOut, backOut };\n","import { backIn } from './back.mjs';\n\nconst anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n\nexport { anticipate };\n","import { invariant } from '../../utils/errors.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { easeIn, easeInOut, easeOut } from '../ease.mjs';\nimport { circIn, circInOut, circOut } from '../circ.mjs';\nimport { backIn, backInOut, backOut } from '../back.mjs';\nimport { anticipate } from '../anticipate.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst easingDefinitionToFunction = (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 const [x1, y1, x2, y2] = definition;\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 '${definition}'`);\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n","import { isString, singleColorRegex, floatRegex } from '../utils.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\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 { clamp } from '../../../utils/clamp.mjs';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\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 we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\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 { 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 { 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","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mix = (from, to, progress) => -progress * from + progress * to + from;\n\nexport { mix };\n","// Adapted from https://gist.github.com/mjackson/5311256\nfunction 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 { invariant } from './errors.mjs';\nimport { hslaToRgba } from './hsla-to-rgba.mjs';\nimport { hex } from '../value/types/color/hex.mjs';\nimport { rgba } from '../value/types/color/rgba.mjs';\nimport { hsla } from '../value/types/color/hsla.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n return Math.sqrt(Math.max(0, v * (to * to - fromExpo) + fromExpo));\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n invariant(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`);\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Framer Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mix(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n","import { cssVariableRegex } from '../../../render/dom/utils/is-css-variable.mjs';\nimport { noop } from '../../../utils/noop.mjs';\nimport { color } from '../color/index.mjs';\nimport { number } from '../numbers/index.mjs';\nimport { colorRegex, floatRegex, isString, sanitize } from '../utils.mjs';\n\nfunction test(v) {\n var _a, _b;\n return (isNaN(v) &&\n isString(v) &&\n (((_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) || 0) +\n (((_b = v.match(colorRegex)) === null || _b === void 0 ? void 0 : _b.length) || 0) >\n 0);\n}\nconst cssVarTokeniser = {\n regex: cssVariableRegex,\n countKey: \"Vars\",\n token: \"${v}\",\n parse: noop,\n};\nconst colorTokeniser = {\n regex: colorRegex,\n countKey: \"Colors\",\n token: \"${c}\",\n parse: color.parse,\n};\nconst numberTokeniser = {\n regex: floatRegex,\n countKey: \"Numbers\",\n token: \"${n}\",\n parse: number.parse,\n};\nfunction tokenise(info, { regex, countKey, token, parse }) {\n const matches = info.tokenised.match(regex);\n if (!matches)\n return;\n info[\"num\" + countKey] = matches.length;\n info.tokenised = info.tokenised.replace(regex, token);\n info.values.push(...matches.map(parse));\n}\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const info = {\n value: originalValue,\n tokenised: originalValue,\n values: [],\n numVars: 0,\n numColors: 0,\n numNumbers: 0,\n };\n if (info.value.includes(\"var(--\"))\n tokenise(info, cssVarTokeniser);\n tokenise(info, colorTokeniser);\n tokenise(info, numberTokeniser);\n return info;\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction createTransformer(source) {\n const { values, numColors, numVars, tokenised } = analyseComplexValue(source);\n const numValues = values.length;\n return (v) => {\n let output = tokenised;\n for (let i = 0; i < numValues; i++) {\n if (i < numVars) {\n output = output.replace(cssVarTokeniser.token, v[i]);\n }\n else if (i < numVars + numColors) {\n output = output.replace(colorTokeniser.token, color.transform(v[i]));\n }\n else {\n output = output.replace(numberTokeniser.token, sanitize(v[i]));\n }\n }\n return output;\n };\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : v;\nfunction getAnimatableNone(v) {\n const parsed = parseComplexValue(v);\n const transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n","import { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { pipe } from './pipe.mjs';\nimport { warning } from './errors.mjs';\nimport { color } from '../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../value/types/complex/index.mjs';\n\nconst mixImmediate = (origin, target) => (p) => `${p > 0 ? target : origin}`;\nfunction getMixer(origin, target) {\n if (typeof origin === \"number\") {\n return (v) => mix(origin, target, v);\n }\n else if (color.test(origin)) {\n return mixColor(origin, target);\n }\n else {\n return origin.startsWith(\"var(\")\n ? mixImmediate(origin, target)\n : 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 = { ...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};\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.numVars === targetStats.numVars &&\n originStats.numColors === targetStats.numColors &&\n originStats.numNumbers >= targetStats.numNumbers;\n if (canInterpolate) {\n return pipe(mixArray(originStats.values, targetStats.values), 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 mixImmediate(origin, target);\n }\n};\n\nexport { mixArray, mixComplex, mixObject };\n","/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n\n @param [number]: Lower limit\n @param [number]: Upper limit\n @param [number]: Value to find progress within given range\n @return [number]: Progress of value within range as expressed 0-1\n*/\nconst progress = (from, to, value) => {\n const toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\n","import { invariant } from './errors.mjs';\nimport { color } from '../value/types/color/index.mjs';\nimport { clamp } from './clamp.mjs';\nimport { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { mixComplex, mixArray, mixObject } from './mix-complex.mjs';\nimport { pipe } from './pipe.mjs';\nimport { progress } from './progress.mjs';\nimport { noop } from './noop.mjs';\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 return color.test(v) ? mixColor : mixComplex;\n }\n else if (Array.isArray(v)) {\n return mixArray;\n }\n else if (typeof v === \"object\") {\n return mixObject;\n }\n return mixNumber;\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] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revist this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\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 /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n","import { mix } from '../mix.mjs';\nimport { progress } from '../progress.mjs';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mix(min, 1, offsetProgress));\n }\n}\n\nexport { fillOffset };\n","import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\nexport { defaultOffset };\n","function convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\n","import { easeInOut } from '../../easing/ease.mjs';\nimport { isEasingArray } from '../../easing/utils/is-easing-array.mjs';\nimport { easingDefinitionToFunction } from '../../easing/utils/map.mjs';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../../utils/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../../utils/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n","/*\n Convert velocity into velocity per second\n\n @param [number]: Unit per frame\n @param [number]: Frame duration in ms\n*/\nfunction velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n","import { velocityPerSecond } from '../../../utils/velocity-per-second.mjs';\n\nconst velocitySampleDuration = 5; // ms\nfunction calcGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { calcGeneratorVelocity };\n","import { warning } from '../../../utils/errors.mjs';\nimport { clamp } from '../../../utils/clamp.mjs';\nimport { secondsToMilliseconds, millisecondsToSeconds } from '../../../utils/time-conversion.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 <= secondsToMilliseconds(maxDuration), \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(minDamping, maxDamping, dampingRatio);\n duration = clamp(minDuration, maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\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 /**\n * Critically-damped spring\n */\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 = secondsToMilliseconds(duration);\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","import { millisecondsToSeconds } from '../../../utils/time-conversion.mjs';\nimport { calcGeneratorVelocity } from '../utils/velocity.mjs';\nimport { findSpring, calcAngularFreq } from './find.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 = {\n velocity: 0.0,\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n isResolvedFromDuration: false,\n ...options,\n };\n // stiffness/damping/mass overrides duration/bounce\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n const derived = findSpring(options);\n springOptions = {\n ...springOptions,\n ...derived,\n velocity: 0.0,\n mass: 1.0,\n };\n springOptions.isResolvedFromDuration = true;\n }\n return springOptions;\n}\nfunction spring({ keyframes, restDelta, restSpeed, ...options }) {\n const origin = keyframes[0];\n const target = keyframes[keyframes.length - 1];\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = { done: false, value: origin };\n const { stiffness, damping, mass, velocity, duration, isResolvedFromDuration, } = getSpringOptions(options);\n const initialVelocity = velocity ? -millisecondsToSeconds(velocity) : 0.0;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const initialDelta = target - origin;\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5;\n restSpeed || (restSpeed = isGranularScale ? 0.01 : 2);\n restDelta || (restDelta = isGranularScale ? 0.005 : 0.5);\n let resolveSpring;\n if (dampingRatio < 1) {\n const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n // Underdamped spring\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (target -\n envelope *\n (((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq) *\n Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t);\n }\n else {\n // Overdamped spring\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (target -\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 return {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n next: (t) => {\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n let currentVelocity = initialVelocity;\n if (t !== 0) {\n /**\n * We only need to calculate velocity for under-damped springs\n * as over- and critically-damped springs can't overshoot, so\n * checking only for displacement is enough.\n */\n if (dampingRatio < 1) {\n currentVelocity = calcGeneratorVelocity(resolveSpring, t, current);\n }\n else {\n currentVelocity = 0;\n }\n }\n const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;\n const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;\n state.done =\n isBelowVelocityThreshold && isBelowDisplacementThreshold;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? target : current;\n return state;\n },\n };\n}\n\nexport { spring };\n","import { spring } from './spring/index.mjs';\nimport { calcGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (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 let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: calcGeneratorVelocity(calcLatest, t, state.value),\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t > timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n","import { frame, cancelFrame, frameData } from '../../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: () => frame.update(passTimestamp, true),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => frameData.isProcessing ? frameData.timestamp : performance.now(),\n };\n};\n\nexport { frameloopDriver };\n","/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n","import { keyframes } from '../../generators/keyframes.mjs';\nimport { spring } from '../../generators/spring/index.mjs';\nimport { inertia } from '../../generators/inertia.mjs';\nimport { frameloopDriver } from './driver-frameloop.mjs';\nimport { interpolate } from '../../../utils/interpolate.mjs';\nimport { clamp } from '../../../utils/clamp.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../../utils/time-conversion.mjs';\nimport { calcGeneratorDuration } from '../../generators/utils/calc-duration.mjs';\n\nconst types = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes: keyframes,\n spring,\n};\n/**\n * Animate a single value on the main thread.\n *\n * This function is written, where functionality overlaps,\n * to be largely spec-compliant with WAAPI to allow fungibility\n * between the two.\n */\nfunction animateValue({ autoplay = true, delay = 0, driver = frameloopDriver, keyframes: keyframes$1, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", onPlay, onStop, onComplete, onUpdate, ...options }) {\n let speed = 1;\n let hasStopped = false;\n let resolveFinishedPromise;\n let currentFinishedPromise;\n /**\n * Resolve the current Promise every time we enter the\n * finished state. This is WAAPI-compatible behaviour.\n */\n const updateFinishedPromise = () => {\n currentFinishedPromise = new Promise((resolve) => {\n resolveFinishedPromise = resolve;\n });\n };\n // Create the first finished promise\n updateFinishedPromise();\n let animationDriver;\n const generatorFactory = types[type] || keyframes;\n /**\n * If this isn't the keyframes generator and we've been provided\n * strings as keyframes, we need to interpolate these.\n * TODO: Support velocity for units and complex value types/\n */\n let mapNumbersToKeyframes;\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n mapNumbersToKeyframes = interpolate([0, 100], keyframes$1, {\n clamp: false,\n });\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n let mirroredGenerator;\n if (repeatType === \"mirror\") {\n mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -(options.velocity || 0),\n });\n }\n let playState = \"idle\";\n let holdTime = null;\n let startTime = null;\n let cancelTime = null;\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null && repeat) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n let resolvedDuration = Infinity;\n let totalDuration = Infinity;\n if (calculatedDuration !== null) {\n resolvedDuration = calculatedDuration + repeatDelay;\n totalDuration = resolvedDuration * (repeat + 1) - repeatDelay;\n }\n let currentTime = 0;\n const tick = (timestamp) => {\n if (startTime === null)\n return;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (speed > 0)\n startTime = Math.min(startTime, timestamp);\n if (speed < 0)\n startTime = Math.min(timestamp - totalDuration / speed, startTime);\n if (holdTime !== null) {\n currentTime = holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n currentTime = Math.round(timestamp - startTime) * speed;\n }\n // Rebase on delay\n const timeWithoutDelay = currentTime - delay * (speed >= 0 ? 1 : -1);\n const isInDelayPhase = speed >= 0 ? timeWithoutDelay < 0 : timeWithoutDelay > totalDuration;\n currentTime = Math.max(timeWithoutDelay, 0);\n /**\n * If this animation has finished, set the current time\n * to the total duration.\n */\n if (playState === \"finished\" && holdTime === null) {\n currentTime = totalDuration;\n }\n let elapsed = currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = currentTime / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const iterationIsOdd = Boolean(currentIteration % 2);\n if (iterationIsOdd) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n let p = clamp(0, 1, iterationProgress);\n if (currentTime > totalDuration) {\n p = repeatType === \"reverse\" && iterationIsOdd ? 1 : 0;\n }\n elapsed = p * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n const state = isInDelayPhase\n ? { done: false, value: keyframes$1[0] }\n : frameGenerator.next(elapsed);\n if (mapNumbersToKeyframes) {\n state.value = mapNumbersToKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done = speed >= 0 ? currentTime >= totalDuration : currentTime <= 0;\n }\n const isAnimationFinished = holdTime === null &&\n (playState === \"finished\" || (playState === \"running\" && done));\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n finish();\n }\n return state;\n };\n const stopAnimationDriver = () => {\n animationDriver && animationDriver.stop();\n animationDriver = undefined;\n };\n const cancel = () => {\n playState = \"idle\";\n stopAnimationDriver();\n resolveFinishedPromise();\n updateFinishedPromise();\n startTime = cancelTime = null;\n };\n const finish = () => {\n playState = \"finished\";\n onComplete && onComplete();\n stopAnimationDriver();\n resolveFinishedPromise();\n };\n const play = () => {\n if (hasStopped)\n return;\n if (!animationDriver)\n animationDriver = driver(tick);\n const now = animationDriver.now();\n onPlay && onPlay();\n if (holdTime !== null) {\n startTime = now - holdTime;\n }\n else if (!startTime || playState === \"finished\") {\n startTime = now;\n }\n if (playState === \"finished\") {\n updateFinishedPromise();\n }\n cancelTime = startTime;\n holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n playState = \"running\";\n animationDriver.start();\n };\n if (autoplay) {\n play();\n }\n const controls = {\n then(resolve, reject) {\n return currentFinishedPromise.then(resolve, reject);\n },\n get time() {\n return millisecondsToSeconds(currentTime);\n },\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n currentTime = newTime;\n if (holdTime !== null || !animationDriver || speed === 0) {\n holdTime = newTime;\n }\n else {\n startTime = animationDriver.now() - newTime / speed;\n }\n },\n get duration() {\n const duration = generator.calculatedDuration === null\n ? calcGeneratorDuration(generator)\n : generator.calculatedDuration;\n return millisecondsToSeconds(duration);\n },\n get speed() {\n return speed;\n },\n set speed(newSpeed) {\n if (newSpeed === speed || !animationDriver)\n return;\n speed = newSpeed;\n controls.time = millisecondsToSeconds(currentTime);\n },\n get state() {\n return playState;\n },\n play,\n pause: () => {\n playState = \"paused\";\n holdTime = currentTime;\n },\n stop: () => {\n hasStopped = true;\n if (playState === \"idle\")\n return;\n playState = \"idle\";\n onStop && onStop();\n cancel();\n },\n cancel: () => {\n if (cancelTime !== null)\n tick(cancelTime);\n cancel();\n },\n complete: () => {\n playState = \"finished\";\n },\n sample: (elapsed) => {\n startTime = 0;\n return tick(elapsed);\n },\n };\n return controls;\n}\n\nexport { animateValue };\n","function memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n","import { animateStyle } from './index.mjs';\nimport { isWaapiSupportedEasing } from './easing.mjs';\nimport { getFinalKeyframe } from './utils/get-final-keyframe.mjs';\nimport { animateValue } from '../js/index.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../../utils/time-conversion.mjs';\nimport { memo } from '../../../utils/memo.mjs';\nimport { noop } from '../../../utils/noop.mjs';\nimport { frameData, frame, cancelFrame } from '../../../frameloop/frame.mjs';\n\nconst supportsWaapi = memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\n/**\n * A list of values that can be hardware-accelerated.\n */\nconst acceleratedValues = new Set([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\",\n \"backgroundColor\",\n]);\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\n/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxDuration = 20000;\nconst requiresPregeneratedKeyframes = (valueName, options) => options.type === \"spring\" ||\n valueName === \"backgroundColor\" ||\n !isWaapiSupportedEasing(options.ease);\nfunction createAcceleratedAnimation(value, valueName, { onUpdate, onComplete, ...options }) {\n const canAccelerateAnimation = supportsWaapi() &&\n acceleratedValues.has(valueName) &&\n !options.repeatDelay &&\n options.repeatType !== \"mirror\" &&\n options.damping !== 0 &&\n options.type !== \"inertia\";\n if (!canAccelerateAnimation)\n return false;\n /**\n * TODO: Unify with js/index\n */\n let hasStopped = false;\n let resolveFinishedPromise;\n let currentFinishedPromise;\n /**\n * Resolve the current Promise every time we enter the\n * finished state. This is WAAPI-compatible behaviour.\n */\n const updateFinishedPromise = () => {\n currentFinishedPromise = new Promise((resolve) => {\n resolveFinishedPromise = resolve;\n });\n };\n // Create the first finished promise\n updateFinishedPromise();\n let { keyframes, duration = 300, ease, times } = options;\n /**\n * If this animation needs pre-generated keyframes then generate.\n */\n if (requiresPregeneratedKeyframes(valueName, options)) {\n const sampleAnimation = animateValue({\n ...options,\n repeat: 0,\n delay: 0,\n });\n let state = { done: false, value: keyframes[0] };\n const pregeneratedKeyframes = [];\n /**\n * Bail after 20 seconds of pre-generated keyframes as it's likely\n * we're heading for an infinite loop.\n */\n let t = 0;\n while (!state.done && t < maxDuration) {\n state = sampleAnimation.sample(t);\n pregeneratedKeyframes.push(state.value);\n t += sampleDelta;\n }\n times = undefined;\n keyframes = pregeneratedKeyframes;\n duration = t - sampleDelta;\n ease = \"linear\";\n }\n const animation = animateStyle(value.owner.current, valueName, keyframes, {\n ...options,\n duration,\n /**\n * This function is currently not called if ease is provided\n * as a function so the cast is safe.\n *\n * However it would be possible for a future refinement to port\n * in easing pregeneration from Motion One for browsers that\n * support the upcoming `linear()` easing function.\n */\n ease: ease,\n times,\n });\n /**\n * WAAPI animations don't resolve startTime synchronously. But a blocked\n * thread could delay the startTime resolution by a noticeable amount.\n * For synching handoff animations with the new Motion animation we want\n * to ensure startTime is synchronously set.\n */\n if (options.syncStart) {\n animation.startTime = frameData.isProcessing\n ? frameData.timestamp\n : document.timeline\n ? document.timeline.currentTime\n : performance.now();\n }\n const cancelAnimation = () => animation.cancel();\n const safeCancel = () => {\n frame.update(cancelAnimation);\n resolveFinishedPromise();\n updateFinishedPromise();\n };\n /**\n * Prefer the `onfinish` prop as it's more widely supported than\n * the `finished` promise.\n *\n * Here, we synchronously set the provided MotionValue to the end\n * keyframe. If we didn't, when the WAAPI animation is finished it would\n * be removed from the element which would then revert to its old styles.\n */\n animation.onfinish = () => {\n value.set(getFinalKeyframe(keyframes, options));\n onComplete && onComplete();\n safeCancel();\n };\n /**\n * Animation interrupt callback.\n */\n const controls = {\n then(resolve, reject) {\n return currentFinishedPromise.then(resolve, reject);\n },\n attachTimeline(timeline) {\n animation.timeline = timeline;\n animation.onfinish = null;\n return noop;\n },\n get time() {\n return millisecondsToSeconds(animation.currentTime || 0);\n },\n set time(newTime) {\n animation.currentTime = secondsToMilliseconds(newTime);\n },\n get speed() {\n return animation.playbackRate;\n },\n set speed(newSpeed) {\n animation.playbackRate = newSpeed;\n },\n get duration() {\n return millisecondsToSeconds(duration);\n },\n play: () => {\n if (hasStopped)\n return;\n animation.play();\n /**\n * Cancel any pending cancel tasks\n */\n cancelFrame(cancelAnimation);\n },\n pause: () => animation.pause(),\n stop: () => {\n hasStopped = true;\n if (animation.playState === \"idle\")\n return;\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read commited styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n const { currentTime } = animation;\n if (currentTime) {\n const sampleAnimation = animateValue({\n ...options,\n autoplay: false,\n });\n value.setWithVelocity(sampleAnimation.sample(currentTime - sampleDelta).value, sampleAnimation.sample(currentTime).value, sampleDelta);\n }\n safeCancel();\n },\n complete: () => animation.finish(),\n cancel: safeCancel,\n };\n return controls;\n}\n\nexport { createAcceleratedAnimation };\n","import { animateValue } from './js/index.mjs';\nimport { noop } from '../../utils/noop.mjs';\n\nfunction createInstantAnimation({ keyframes, delay, onUpdate, onComplete, }) {\n const setValue = () => {\n onUpdate && onUpdate(keyframes[keyframes.length - 1]);\n onComplete && onComplete();\n /**\n * TODO: As this API grows it could make sense to always return\n * animateValue. This will be a bigger project as animateValue\n * is frame-locked whereas this function resolves instantly.\n * This is a behavioural change and also has ramifications regarding\n * assumptions within tests.\n */\n return {\n time: 0,\n speed: 1,\n duration: 0,\n play: (noop),\n pause: (noop),\n stop: (noop),\n then: (resolve) => {\n resolve();\n return Promise.resolve();\n },\n cancel: (noop),\n complete: (noop),\n };\n };\n return delay\n ? animateValue({\n keyframes: [0, 1],\n duration: 0,\n delay,\n onComplete: setValue,\n })\n : setValue();\n}\n\nexport { createInstantAnimation };\n","import { transformProps } from '../../render/html/utils/transform.mjs';\n\nconst underDampedSpring = {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n};\nconst criticallyDampedSpring = (target) => ({\n type: \"spring\",\n stiffness: 550,\n damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n});\nconst keyframesTransition = {\n type: \"keyframes\",\n duration: 0.8,\n};\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease = {\n type: \"keyframes\",\n ease: [0.25, 0.1, 0.35, 1],\n duration: 0.3,\n};\nconst getDefaultTransition = (valueKey, { keyframes }) => {\n if (keyframes.length > 2) {\n return keyframesTransition;\n }\n else if (transformProps.has(valueKey)) {\n return valueKey.startsWith(\"scale\")\n ? criticallyDampedSpring(keyframes[1])\n : underDampedSpring;\n }\n return ease;\n};\n\nexport { getDefaultTransition };\n","import { complex } from '../../value/types/complex/index.mjs';\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 */\nconst isAnimatable = (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) || value === \"0\") && // 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 { complex } from './index.mjs';\nimport { floatRegex } from '../utils.mjs';\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"]);\nfunction applyDefaultFilter(v) {\n const [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 = {\n ...complex,\n getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v;\n },\n};\n\nexport { filter };\n","import { color } from '../../../value/types/color/index.mjs';\nimport { filter } from '../../../value/types/complex/filter.mjs';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nconst defaultValueTypes = {\n ...numberValueTypes,\n // Color props\n color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n filter,\n WebkitFilter: filter,\n};\n/**\n * Gets the default ValueType for the provided value key\n */\nconst getDefaultValueType = (key) => defaultValueTypes[key];\n\nexport { defaultValueTypes, getDefaultValueType };\n","import { complex } from '../../../value/types/complex/index.mjs';\nimport { filter } from '../../../value/types/complex/filter.mjs';\nimport { getDefaultValueType } from './defaults.mjs';\n\nfunction getAnimatableNone(key, value) {\n let 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 defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined;\n}\n\nexport { getAnimatableNone };\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nconst isZeroValueString = (v) => /^0[^.\\s]+$/.test(v);\n\nexport { isZeroValueString };\n","import { isZeroValueString } from '../../utils/is-zero-value-string.mjs';\n\nfunction isNone(value) {\n if (typeof value === \"number\") {\n return value === 0;\n }\n else if (value !== null) {\n return value === \"none\" || value === \"0\" || isZeroValueString(value);\n }\n}\n\nexport { isNone };\n","import { getAnimatableNone } from '../../render/dom/value-types/animatable-none.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\nimport { isNone } from './is-none.mjs';\n\nfunction getKeyframes(value, valueName, target, transition) {\n const isTargetAnimatable = isAnimatable(valueName, target);\n let keyframes;\n if (Array.isArray(target)) {\n keyframes = [...target];\n }\n else {\n keyframes = [null, target];\n }\n const defaultOrigin = transition.from !== undefined ? transition.from : value.get();\n let animatableTemplateValue = undefined;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < keyframes.length; i++) {\n /**\n * Fill null/wildcard keyframes\n */\n if (keyframes[i] === null) {\n keyframes[i] = i === 0 ? defaultOrigin : keyframes[i - 1];\n }\n if (isNone(keyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n // TODO: Clean this conditional, it works for now\n if (typeof keyframes[i] === \"string\" &&\n keyframes[i] !== \"none\" &&\n keyframes[i] !== \"0\") {\n animatableTemplateValue = keyframes[i];\n }\n }\n if (isTargetAnimatable &&\n noneKeyframeIndexes.length &&\n animatableTemplateValue) {\n for (let i = 0; i < noneKeyframeIndexes.length; i++) {\n const index = noneKeyframeIndexes[i];\n keyframes[index] = getAnimatableNone(valueName, animatableTemplateValue);\n }\n }\n return keyframes;\n}\n\nexport { getKeyframes };\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({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, elapsed, ...transition }) {\n return !!Object.keys(transition).length;\n}\nfunction getValueTransition(transition, key) {\n return transition[key] || transition[\"default\"] || transition;\n}\n\nexport { getValueTransition, isTransitionDefined };\n","import { warning } from '../../utils/errors.mjs';\nimport { secondsToMilliseconds } from '../../utils/time-conversion.mjs';\nimport { instantAnimationState } from '../../utils/use-instant-transition-state.mjs';\nimport { createAcceleratedAnimation } from '../animators/waapi/create-accelerated-animation.mjs';\nimport { createInstantAnimation } from '../animators/instant.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { isAnimatable } from '../utils/is-animatable.mjs';\nimport { getKeyframes } from '../utils/keyframes.mjs';\nimport { getValueTransition, isTransitionDefined } from '../utils/transitions.mjs';\nimport { animateValue } from '../animators/js/index.mjs';\n\nconst animateMotionValue = (valueName, value, target, transition = {}) => {\n return (onComplete) => {\n const valueTransition = getValueTransition(transition, valueName) || {};\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0;\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition;\n elapsed = elapsed - secondsToMilliseconds(delay);\n const keyframes = getKeyframes(value, valueName, target, valueTransition);\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0];\n const targetKeyframe = keyframes[keyframes.length - 1];\n const isOriginAnimatable = isAnimatable(valueName, originKeyframe);\n const isTargetAnimatable = isAnimatable(valueName, targetKeyframe);\n warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${valueName} from \"${originKeyframe}\" to \"${targetKeyframe}\". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \\`style\\` property.`);\n let options = {\n keyframes,\n velocity: value.getVelocity(),\n ease: \"easeOut\",\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v);\n valueTransition.onUpdate && valueTransition.onUpdate(v);\n },\n onComplete: () => {\n onComplete();\n valueTransition.onComplete && valueTransition.onComplete();\n },\n };\n /**\n * If there's no transition defined for this value, we can generate\n * unqiue transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n options = {\n ...options,\n ...getDefaultTransition(valueName, options),\n };\n }\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n if (options.duration) {\n options.duration = secondsToMilliseconds(options.duration);\n }\n if (options.repeatDelay) {\n options.repeatDelay = secondsToMilliseconds(options.repeatDelay);\n }\n if (!isOriginAnimatable ||\n !isTargetAnimatable ||\n instantAnimationState.current ||\n valueTransition.type === false) {\n /**\n * If we can't animate this value, or the global instant animation flag is set,\n * or this is simply defined as an instant transition, return an instant transition.\n */\n return createInstantAnimation(instantAnimationState.current\n ? { ...options, delay: 0 }\n : options);\n }\n /**\n * Animate via WAAPI if possible.\n */\n if (value.owner &&\n value.owner.current instanceof HTMLElement &&\n !value.owner.getProps().onUpdate) {\n const acceleratedAnimation = createAcceleratedAnimation(value, valueName, options);\n if (acceleratedAnimation)\n return acceleratedAnimation;\n }\n /**\n * If we didn't create an accelerated animation, create a JS animation\n */\n return animateValue(options);\n };\n};\n\nexport { animateMotionValue };\n","import { isMotionValue } from '../utils/is-motion-value.mjs';\n\nfunction isWillChangeMotionValue(value) {\n return Boolean(isMotionValue(value) && value.add);\n}\n\nexport { isWillChangeMotionValue };\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nconst isNumericalString = (v) => /^\\-?\\d*\\.?\\d+$/.test(v);\n\nexport { isNumericalString };\n","function addUniqueItem(arr, item) {\n if (arr.indexOf(item) === -1)\n arr.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n if (index > -1)\n arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem([...arr], fromIndex, toIndex) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n const [item] = arr.splice(fromIndex, 1);\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nclass SubscriptionManager {\n constructor() {\n this.subscriptions = [];\n }\n add(handler) {\n addUniqueItem(this.subscriptions, handler);\n return () => removeItem(this.subscriptions, handler);\n }\n notify(a, b, c) {\n const 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 (let 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 const handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n }\n getSize() {\n return this.subscriptions.length;\n }\n clear() {\n this.subscriptions.length = 0;\n }\n}\n\nexport { SubscriptionManager };\n","import { SubscriptionManager } from '../utils/subscription-manager.mjs';\nimport { velocityPerSecond } from '../utils/velocity-per-second.mjs';\nimport { warnOnce } from '../utils/warn-once.mjs';\nimport { frame, frameData } from '../frameloop/frame.mjs';\n\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\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 constructor(init, options = {}) {\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 = \"10.16.5\";\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 * 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 /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v, render = true) => {\n this.prev = this.current;\n this.current = v;\n // Update timestamp\n const { delta, timestamp } = frameData;\n if (this.lastUpdated !== timestamp) {\n this.timeDelta = delta;\n this.lastUpdated = timestamp;\n frame.postRender(this.scheduleVelocityCheck);\n }\n // Update update subscribers\n if (this.prev !== this.current && this.events.change) {\n this.events.change.notify(this.current);\n }\n // Update velocity subscribers\n if (this.events.velocityChange) {\n this.events.velocityChange.notify(this.getVelocity());\n }\n // Update render subscribers\n if (render && this.events.renderRequest) {\n this.events.renderRequest.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 = () => frame.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 = ({ timestamp }) => {\n if (timestamp !== this.lastUpdated) {\n this.prev = this.current;\n if (this.events.velocityChange) {\n this.events.velocityChange.notify(this.getVelocity());\n }\n }\n };\n this.hasAnimated = false;\n this.prev = this.current = init;\n this.canTrackVelocity = isFloat(this.current);\n this.owner = options.owner;\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.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <motion.div style={{ x }} />\n * }\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 * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n *\n * @internal\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\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 set(v, render = true) {\n if (!render || !this.passiveEffect) {\n this.updateAndNotify(v, render);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = prev;\n this.timeDelta = delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v) {\n this.updateAndNotify(v);\n this.prev = v;\n this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\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 getVelocity() {\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 start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n delete this.animation;\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 destroy() {\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n","/**\n * Tests a provided value against a ValueType\n */\nconst testValueType = (v) => (type) => type.test(v);\n\nexport { testValueType };\n","/**\n * ValueType for \"auto\"\n */\nconst auto = {\n test: (v) => v === \"auto\",\n parse: (v) => v,\n};\n\nexport { auto };\n","import { number } from '../../../value/types/numbers/index.mjs';\nimport { px, percent, degrees, vw, vh } from '../../../value/types/numbers/units.mjs';\nimport { testValueType } from './test.mjs';\nimport { auto } from './type-auto.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nconst dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nconst findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));\n\nexport { dimensionValueTypes, findDimensionValueType };\n","import { color } from '../../../value/types/color/index.mjs';\nimport { complex } from '../../../value/types/complex/index.mjs';\nimport { dimensionValueTypes } from './dimensions.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex];\n/**\n * Tests a value against the list of ValueTypes\n */\nconst findValueType = (v) => valueTypes.find(testValueType(v));\n\nexport { findValueType };\n","import { 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 { complex } from '../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../dom/value-types/animatable-none.mjs';\nimport { findValueType } from '../dom/value-types/find.mjs';\nimport { resolveVariant } from './resolve-dynamic-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 const resolved = resolveVariant(visualElement, definition);\n let { transitionEnd = {}, transition = {}, ...target } = resolved ? visualElement.makeTargetAnimatable(resolved, false) : {};\n target = { ...target, ...transitionEnd };\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\nfunction setVariants(visualElement, variantLabels) {\n const reversedLabels = [...variantLabels].reverse();\n reversedLabels.forEach((key) => {\n const variant = visualElement.getVariant(key);\n variant && setTarget(visualElement, variant);\n if (visualElement.variantChildren) {\n visualElement.variantChildren.forEach((child) => {\n setVariants(child, variantLabels);\n });\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;\n const newValueKeys = Object.keys(target).filter((key) => !visualElement.hasValue(key));\n const numNewValues = newValueKeys.length;\n if (!numNewValues)\n return;\n for (let i = 0; i < numNewValues; i++) {\n const key = newValueKeys[i];\n const targetValue = target[key];\n let 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, { owner: visualElement }));\n if (origin[key] === undefined) {\n origin[key] = value;\n }\n if (value !== null)\n visualElement.setBaseTarget(key, value);\n }\n}\nfunction getOriginFromTransition(key, transition) {\n if (!transition)\n return;\n const valueTransition = transition[key] || transition[\"default\"] || transition;\n return valueTransition.from;\n}\nfunction getOrigin(target, transition, visualElement) {\n const origin = {};\n for (const key in target) {\n const transitionOrigin = getOriginFromTransition(key, transition);\n if (transitionOrigin !== undefined) {\n origin[key] = transitionOrigin;\n }\n else {\n const value = visualElement.getValue(key);\n if (value) {\n origin[key] = value.get();\n }\n }\n }\n return origin;\n}\n\nexport { checkTargetForNewValues, getOrigin, getOriginFromTransition, setTarget, setValues };\n","import { transformProps } from '../../render/html/utils/transform.mjs';\nimport { optimizedAppearDataAttribute } from '../optimized-appear/data-id.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\nimport { isWillChangeMotionValue } from '../../value/use-will-change/is.mjs';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\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({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, definition, { delay = 0, transitionOverride, type } = {}) {\n let { transition = visualElement.getDefaultTransition(), transitionEnd, ...target } = visualElement.makeTargetAnimatable(definition);\n const willChange = visualElement.getValue(\"willChange\");\n if (transitionOverride)\n transition = transitionOverride;\n const animations = [];\n const animationTypeState = type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type];\n for (const key in target) {\n const value = visualElement.getValue(key);\n const valueTarget = target[key];\n if (!value ||\n valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n const valueTransition = {\n delay,\n elapsed: 0,\n ...transition,\n };\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n if (window.HandoffAppearAnimations && !value.hasAnimated) {\n const appearId = visualElement.getProps()[optimizedAppearDataAttribute];\n if (appearId) {\n valueTransition.elapsed = window.HandoffAppearAnimations(appearId, key, value, frame);\n valueTransition.syncStart = true;\n }\n }\n value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key)\n ? { type: false }\n : valueTransition));\n const animation = value.animation;\n if (isWillChangeMotionValue(willChange)) {\n willChange.add(key);\n animation.then(() => willChange.remove(key));\n }\n animations.push(animation);\n }\n if (transitionEnd) {\n Promise.all(animations).then(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n }\n return animations;\n}\n\nexport { animateTarget };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n const resolved = resolveVariant(visualElement, variant, options.custom);\n let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};\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 const getAnimation = resolved\n ? () => Promise.all(animateTarget(visualElement, resolved, options))\n : () => 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 const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size\n ? (forwardDelay = 0) => {\n const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;\n return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);\n }\n : () => 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 const { when } = transition;\n if (when) {\n const [first, last] = when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation];\n return first().then(() => last());\n }\n else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\nfunction animateChildren(visualElement, variant, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {\n const animations = [];\n const maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;\n const generateStaggerDuration = staggerDirection === 1\n ? (i = 0) => i * staggerChildren\n : (i = 0) => maxStaggerDuration - i * staggerChildren;\n Array.from(visualElement.variantChildren)\n .sort(sortByTreeOrder)\n .forEach((child, i) => {\n child.notify(\"AnimationStart\", variant);\n animations.push(animateVariant(child, variant, {\n ...options,\n delay: delayChildren + generateStaggerDuration(i),\n }).then(() => child.notify(\"AnimationComplete\", variant)));\n });\n return Promise.all(animations);\n}\nfunction sortByTreeOrder(a, b) {\n return a.sortNodePosition(b);\n}\n\nexport { animateVariant, sortByTreeOrder };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n let animation;\n if (Array.isArray(definition)) {\n const animations = definition.map((variant) => animateVariant(visualElement, variant, options));\n animation = Promise.all(animations);\n }\n else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n }\n else {\n const resolvedDefinition = typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition;\n animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));\n }\n return animation.then(() => visualElement.notify(\"AnimationComplete\", definition));\n}\n\nexport { animateVisualElement };\n","import { 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 { isVariantLabel } from './is-variant-label.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { variantPriorityOrder } from './variant-props.mjs';\nimport { animateVisualElement } from '../../animation/interfaces/visual-element.mjs';\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse();\nconst numAnimationTypes = variantPriorityOrder.length;\nfunction animateList(visualElement) {\n return (animations) => Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n}\nfunction createAnimationState(visualElement) {\n let animate = animateList(visualElement);\n const state = createState();\n let 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 const buildResolvedTypeValues = (acc, definition) => {\n const resolved = resolveVariant(visualElement, definition);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n acc = { ...acc, ...target, ...transitionEnd };\n }\n return acc;\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 const props = visualElement.getProps();\n const 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 const 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 const 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 let 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 let removedVariantIndex = Infinity;\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 (let i = 0; i < numAnimationTypes; i++) {\n const type = reversePriorityOrder[i];\n const typeState = state[type];\n const prop = props[type] !== undefined ? props[type] : context[type];\n const 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 const 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 let 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 = { ...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 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 const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n let 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 const 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 let 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 const { prevResolvedValues = {} } = typeState;\n const allKeys = {\n ...prevResolvedValues,\n ...resolvedValues,\n };\n const markToAnimate = (key) => {\n shouldAnimateType = true;\n removedKeys.delete(key);\n typeState.needsAnimating[key] = true;\n };\n for (const key in allKeys) {\n const next = resolvedValues[key];\n const 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 = { ...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(...definitionList.map((animation) => ({\n animation: animation,\n options: { type, ...options },\n })));\n }\n }\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 const fallbackAnimation = {};\n removedKeys.forEach((key) => {\n const fallbackTarget = visualElement.getBaseTarget(key);\n if (fallbackTarget !== undefined) {\n fallbackAnimation[key] = fallbackTarget;\n }\n });\n animations.push({ animation: fallbackAnimation });\n }\n let 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((child) => { var _a; return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); });\n state[type].isActive = isActive;\n const animations = animateChanges(options, type);\n for (const key in state) {\n state[key].protectedKeys = {};\n }\n return animations;\n }\n return {\n animateChanges,\n setActive,\n setAnimateFunction,\n getState: () => state,\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n }\n else if (Array.isArray(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive = false) {\n return {\n isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n}\nfunction createState() {\n return {\n animate: createTypeState(true),\n whileInView: createTypeState(),\n whileHover: createTypeState(),\n whileTap: createTypeState(),\n whileDrag: createTypeState(),\n whileFocus: createTypeState(),\n exit: createTypeState(),\n };\n}\n\nexport { checkVariantsDidChange, createAnimationState };\n","import { isAnimationControls } from '../../../animation/utils/is-animation-controls.mjs';\nimport { createAnimationState } from '../../../render/utils/animation-state.mjs';\nimport { Feature } from '../Feature.mjs';\n\nclass AnimationFeature extends Feature {\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 constructor(node) {\n super(node);\n node.animationState || (node.animationState = createAnimationState(node));\n }\n updateAnimationControlsSubscription() {\n const { animate } = this.node.getProps();\n this.unmount();\n if (isAnimationControls(animate)) {\n this.unmount = animate.subscribe(this.node);\n }\n }\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription();\n }\n update() {\n const { animate } = this.node.getProps();\n const { animate: prevAnimate } = this.node.prevProps || {};\n if (animate !== prevAnimate) {\n this.updateAnimationControlsSubscription();\n }\n }\n unmount() { }\n}\n\nexport { AnimationFeature };\n","import { Feature } from '../Feature.mjs';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent, onExitComplete, custom } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent, { custom: custom !== null && custom !== void 0 ? custom : this.node.getProps().custom });\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => onExitComplete(this.id));\n }\n }\n mount() {\n const { register } = this.node.presenceContext || {};\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() { }\n}\n\nexport { ExitAnimationFeature };\n","import { AnimationFeature } from './animation/index.mjs';\nimport { ExitAnimationFeature } from './animation/exit.mjs';\n\nconst animations = {\n animation: {\n Feature: AnimationFeature,\n },\n exit: {\n Feature: ExitAnimationFeature,\n },\n};\n\nexport { animations };\n","const distance = (a, b) => Math.abs(a - b);\nfunction distance2D(a, b) {\n // Multi-dimensional\n const xDelta = distance(a.x, b.x);\n const yDelta = distance(a.y, b.y);\n return Math.sqrt(xDelta ** 2 + yDelta ** 2);\n}\n\nexport { distance, distance2D };\n","import { extractEventInfo } from '../../events/event-info.mjs';\nimport { secondsToMilliseconds, millisecondsToSeconds } from '../../utils/time-conversion.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { pipe } from '../../utils/pipe.mjs';\nimport { distance2D } from '../../utils/distance.mjs';\nimport { isPrimaryPointer } from '../../events/utils/is-primary-pointer.mjs';\nimport { frame, cancelFrame, frameData } from '../../frameloop/frame.mjs';\n\n/**\n * @internal\n */\nclass PanSession {\n constructor(event, handlers, { 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 = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const 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 const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\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 = (event, info) => {\n this.lastMoveEvent = event;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const { onEnd, onSessionEnd } = this.handlers;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : 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 (!isPrimaryPointer(event))\n return;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\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 updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n cancelFrame(this.updatePoint);\n }\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({ point }, history) {\n return {\n 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 let i = history.length - 1;\n let timestampedPoint = null;\n const 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 const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const 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 { mix } from '../../utils/mix.mjs';\n\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target = 0, maxDistance = 0.01) {\n return Math.abs(value - target) <= maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, 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 ? origin.originX : undefined);\n calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined);\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","import { progress } from '../../../utils/progress.mjs';\nimport { calcLength } from '../../../projection/geometry/delta-calc.mjs';\nimport { clamp } from '../../../utils/clamp.mjs';\nimport { mix } from '../../../utils/mix.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, { min, max }, elastic) {\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, { top, left, bottom, 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 let min = constraintsAxis.min - layoutAxis.min;\n let 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 [min, max] = [max, min];\n }\n return { min, 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 let origin = 0.5;\n const sourceLength = calcLength(source);\n const 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 const 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}\nconst defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nfunction resolveDragElastic(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 return typeof dragElastic === \"number\"\n ? dragElastic\n : dragElastic[label] || 0;\n}\n\nexport { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };\n","const createAxisDelta = () => ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n});\nconst createDelta = () => ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n});\nconst createAxis = () => ({ min: 0, max: 0 });\nconst createBox = () => ({\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({ top, left, right, bottom, }) {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox({ x, 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 const topLeft = transformPoint({ x: point.left, y: point.top });\n const 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","function isIdentityScale(scale) {\n return scale === undefined || scale === 1;\n}\nfunction hasScale({ scale, scaleX, scaleY }) {\n return (!isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY));\n}\nfunction hasTransform(values) {\n return (hasScale(values) ||\n has2DTranslate(values) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY);\n}\nfunction has2DTranslate(values) {\n return is2DTranslate(values.x) || is2DTranslate(values.y);\n}\nfunction is2DTranslate(value) {\n return value && value !== \"0%\";\n}\n\nexport { has2DTranslate, hasScale, hasTransform };\n","import { mix } from '../../utils/mix.mjs';\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 const distanceFromOrigin = point - originPoint;\n const 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 = 0, scale = 1, originPoint, boxScale) {\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, { x, 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 = false) {\n const treeLength = treePath.length;\n if (!treeLength)\n return;\n // Reset the treeScale\n treeScale.x = treeScale.y = 1;\n let node;\n let delta;\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const instance = node.instance;\n if (instance &&\n instance.style &&\n instance.style.display === \"contents\") {\n continue;\n }\n if (isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(box, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y,\n });\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 /**\n * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n * This will help reduce useless scales getting rendered.\n */\n treeScale.x = snapToDefault(treeScale.x);\n treeScale.y = snapToDefault(treeScale.y);\n}\nfunction snapToDefault(scale) {\n if (Number.isInteger(scale))\n return scale;\n return scale > 1.0000000000001 || scale < 0.999999999999 ? scale : 1;\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, [key, scaleKey, originKey]) {\n const axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5;\n const 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 */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst 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","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 const viewportBox = measureViewportBox(element, transformPagePoint);\n const { scroll } = rootProjectionNode;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x);\n translateAxis(viewportBox.y, scroll.offset.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n","import { invariant } from '../../utils/errors.mjs';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { getGlobalLock } from './utils/lock.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, calcOrigin } from './utils/constraints.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 { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\nimport { calcLength } from '../../projection/geometry/delta-calc.mjs';\nimport { mix } from '../../utils/mix.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { animateMotionValue } from '../../animation/interfaces/motion-value.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst elementDragControls = new WeakMap();\n/**\n *\n */\n// let latestPointerEvent: PointerEvent\nclass VisualElementDragControls {\n constructor(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 start(originEvent, { snapToCursor = false } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (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 const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\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((axis) => {\n let 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 const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.update(() => onDragStart(event, info), false, true);\n }\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n // latestPointerEvent = event\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openGlobalLock)\n return;\n const { offset } = info;\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 && 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.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n onDrag && onDrag(event, info);\n };\n const onSessionEnd = (event, info) => this.stop(event, info);\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n }, { transformPagePoint: this.visualElement.getTransformPagePoint() });\n }\n stop(event, info) {\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging)\n return;\n const { velocity } = info;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.update(() => onDragEnd(event, info));\n }\n }\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openGlobalLock) {\n this.openGlobalLock();\n this.openGlobalLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let 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 resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps();\n const { layout } = this.visualElement.projection || {};\n const 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.layoutBox, 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((axis) => {\n if (this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const 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 const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, 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 const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\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 const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\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 startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition));\n }\n stopAnimation() {\n eachAxis((axis) => 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 getAxisMotionValue(axis) {\n const dragKey = \"_drag\" + axis.toUpperCase();\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, (props.initial ? props.initial[axis] : undefined) || 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\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 scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\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 const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue) {\n const 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 const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.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((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mix(min, max, boxProgress[axis]));\n });\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n drag && dragListener && this.start(event);\n });\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints)) {\n this.constraints = this.resolveRefConstraints();\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.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 const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const 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.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\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 = 10) {\n let 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 { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\n\nclass DragGesture extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n }\n}\n\nexport { DragGesture };\n","import { PanSession } from './PanSession.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.update(() => handler(event, info));\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), { transformPagePoint: this.node.getTransformPagePoint() });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: onPan,\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.update(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n\nexport { PanGesture };\n","import 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';\nimport { frame } from '../../../frameloop/frame.mjs';\n\nclass MeasureLayoutWithContext extends React__default.Component {\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 componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;\n const { projection } = visualElement;\n addScaleCorrector(defaultScaleCorrectors);\n if (projection) {\n if (layoutGroup.group)\n layoutGroup.group.add(projection);\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection);\n }\n projection.root.didUpdate();\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove();\n });\n projection.setOptions({\n ...projection.options,\n onExitComplete: () => this.safeToRemove(),\n });\n }\n globalProjectionState.hasEverUpdated = true;\n }\n getSnapshotBeforeUpdate(prevProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props;\n const 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 frame.postRender(() => {\n const stack = projection.getStack();\n if (!stack || !stack.members.length) {\n this.safeToRemove();\n }\n });\n }\n }\n return null;\n }\n componentDidUpdate() {\n const { projection } = this.props.visualElement;\n if (projection) {\n projection.root.didUpdate();\n queueMicrotask(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n });\n }\n }\n componentWillUnmount() {\n const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props;\n const { projection } = visualElement;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n }\n safeToRemove() {\n const { safeToRemove } = this.props;\n safeToRemove && safeToRemove();\n }\n render() {\n return null;\n }\n}\nfunction MeasureLayout(props) {\n const [isPresent, safeToRemove] = usePresence();\n const layoutGroup = useContext(LayoutGroupContext);\n return (React__default.createElement(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove }));\n}\nconst defaultScaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\n\nexport { MeasureLayout };\n","import { useContext, useId, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.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 const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent, onExitComplete, register } = context;\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 const id = useId();\n useEffect(() => register(id), []);\n const safeToRemove = () => onExitComplete && 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","/**\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 */\nconst 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 { px } from '../../value/types/numbers/units.mjs';\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 */\nconst correctBorderRadius = {\n correct: (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 const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n","import { mix } from '../../utils/mix.mjs';\nimport { complex } from '../../value/types/complex/index.mjs';\n\nconst correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n const xScale = projectionDelta.x.scale * treeScale.x;\n const 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 const 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 return template(shadow);\n },\n};\n\nexport { correctBoxShadow };\n","import { circOut } from '../../easing/circ.mjs';\nimport { progress } from '../../utils/progress.mjs';\nimport { mix } from '../../utils/mix.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { percent, px } from '../../value/types/numbers/units.mjs';\n\nconst borders = [\"TopLeft\", \"TopRight\", \"BottomLeft\", \"BottomRight\"];\nconst numBorders = borders.length;\nconst asNumber = (value) => typeof value === \"string\" ? parseFloat(value) : value;\nconst isPx = (value) => typeof value === \"number\" || px.test(value);\nfunction mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {\n if (shouldCrossfadeOpacity) {\n target.opacity = mix(0, \n // TODO Reinstate this if only child\n lead.opacity !== undefined ? lead.opacity : 1, easeCrossfadeIn(progress));\n target.opacityExit = mix(follow.opacity !== undefined ? follow.opacity : 1, 0, easeCrossfadeOut(progress));\n }\n else if (isOnlyMember) {\n target.opacity = mix(follow.opacity !== undefined ? follow.opacity : 1, lead.opacity !== undefined ? lead.opacity : 1, progress);\n }\n /**\n * Mix border radius\n */\n for (let i = 0; i < numBorders; i++) {\n const borderLabel = `border${borders[i]}Radius`;\n let followRadius = getRadius(follow, borderLabel);\n let leadRadius = getRadius(lead, borderLabel);\n if (followRadius === undefined && leadRadius === undefined)\n continue;\n followRadius || (followRadius = 0);\n leadRadius || (leadRadius = 0);\n const 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 return values[radiusName] !== undefined\n ? values[radiusName]\n : 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// }\nconst easeCrossfadeIn = compress(0, 0.5, circOut);\nconst easeCrossfadeOut = compress(0.5, 0.95, noop);\nfunction compress(min, max, easing) {\n return (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 { mix } from '../../utils/mix.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\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 = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n const relativeProgress = mix(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n let 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, [key, scaleKey, originKey], origin, sourceAxis) {\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 */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst 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 ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);\n removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n","import { calcLength } from './delta-calc.mjs';\n\nfunction 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}\nfunction boxEqualsRounded(a, b) {\n return (Math.round(a.x.min) === Math.round(b.x.min) &&\n Math.round(a.x.max) === Math.round(b.x.max) &&\n Math.round(a.y.min) === Math.round(b.y.min) &&\n Math.round(a.y.max) === Math.round(b.y.max));\n}\nfunction aspectRatio(box) {\n return calcLength(box.x) / calcLength(box.y);\n}\n\nexport { aspectRatio, boxEquals, boxEqualsRounded, isDeltaZero };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\n\nclass NodeStack {\n constructor() {\n this.members = [];\n }\n add(node) {\n addUniqueItem(this.members, node);\n node.scheduleRender();\n }\n remove(node) {\n removeItem(this.members, node);\n if (node === this.prevLead) {\n this.prevLead = undefined;\n }\n if (node === this.lead) {\n const prevLead = this.members[this.members.length - 1];\n if (prevLead) {\n this.promote(prevLead);\n }\n }\n }\n relegate(node) {\n const indexOfNode = this.members.findIndex((member) => node === member);\n if (indexOfNode === 0)\n return false;\n /**\n * Find the next projection node that is present\n */\n let prevLead;\n for (let i = indexOfNode; i >= 0; i--) {\n const 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 promote(node, preserveFollowOpacity) {\n const 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 }\n if (node.root && node.root.isUpdating) {\n node.isLayoutDirty = true;\n }\n const { crossfade } = node.options;\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 exitAnimationComplete() {\n this.members.forEach((node) => {\n const { options, resumingFrom } = node;\n options.onExitComplete && options.onExitComplete();\n if (resumingFrom) {\n resumingFrom.options.onExitComplete &&\n resumingFrom.options.onExitComplete();\n }\n });\n }\n scheduleRender() {\n this.members.forEach((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 removeLeadSnapshot() {\n if (this.lead && this.lead.snapshot) {\n this.lead.snapshot = undefined;\n }\n }\n}\n\nexport { NodeStack };\n","function buildProjectionTransform(delta, treeScale, latestTransform) {\n let transform = \"\";\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 const xTranslate = delta.x.translate / treeScale.x;\n const yTranslate = delta.y.translate / treeScale.y;\n if (xTranslate || yTranslate) {\n transform = `translate3d(${xTranslate}px, ${yTranslate}px, 0) `;\n }\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;\n }\n if (latestTransform) {\n const { rotate, rotateX, rotateY } = latestTransform;\n if (rotate)\n transform += `rotate(${rotate}deg) `;\n if (rotateX)\n transform += `rotateX(${rotateX}deg) `;\n if (rotateY)\n transform += `rotateY(${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 const elementScaleX = delta.x.scale * treeScale.x;\n const elementScaleY = delta.y.scale * treeScale.y;\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform += `scale(${elementScaleX}, ${elementScaleY})`;\n }\n return transform || \"none\";\n}\n\nexport { buildProjectionTransform };\n","const compareByDepth = (a, b) => a.depth - b.depth;\n\nexport { compareByDepth };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\nimport { compareByDepth } from './compare-by-depth.mjs';\n\nclass FlatTree {\n constructor() {\n this.children = [];\n this.isDirty = false;\n }\n add(child) {\n addUniqueItem(this.children, child);\n this.isDirty = true;\n }\n remove(child) {\n removeItem(this.children, child);\n this.isDirty = true;\n }\n forEach(callback) {\n this.isDirty && this.children.sort(compareByDepth);\n this.isDirty = false;\n this.children.forEach(callback);\n }\n}\n\nexport { FlatTree };\n","import { frame, cancelFrame } from '../frameloop/frame.mjs';\n\n/**\n * Timeout defined in ms\n */\nfunction delay(callback, timeout) {\n const start = performance.now();\n const checkElapsed = ({ timestamp }) => {\n const elapsed = timestamp - start;\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed);\n callback(elapsed - timeout);\n }\n };\n frame.read(checkElapsed, true);\n return () => cancelFrame(checkElapsed);\n}\n\nexport { delay };\n","function record(data) {\n if (window.MotionDebug) {\n window.MotionDebug.record(data);\n }\n}\n\nexport { record };\n","function isSVGElement(element) {\n return element instanceof SVGElement && element.tagName !== \"svg\";\n}\n\nexport { isSVGElement };\n","import { animateMotionValue } from './motion-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction animateSingleValue(value, keyframes, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes, options));\n return motionValue$1.animation;\n}\n\nexport { animateSingleValue };\n","import { 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, isNear } 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 { boxEqualsRounded, isDeltaZero, aspectRatio, boxEquals } 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, has2DTranslate } from '../utils/has-transform.mjs';\nimport { FlatTree } from '../../render/utils/flat-tree.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { globalProjectionState } from './state.mjs';\nimport { delay } from '../../utils/delay.mjs';\nimport { mix } from '../../utils/mix.mjs';\nimport { record } from '../../debug/record.mjs';\nimport { isSVGElement } from '../../render/dom/utils/is-svg-element.mjs';\nimport { animateSingleValue } from '../../animation/interfaces/single-value.mjs';\nimport { clamp } from '../../utils/clamp.mjs';\nimport { cancelFrame, frameData, steps, frame } from '../../frameloop/frame.mjs';\nimport { noop } from '../../utils/noop.mjs';\n\nconst transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\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 */\nconst animationTarget = 1000;\nlet id = 0;\n/**\n * Use a mutable data object for debug data so as to not create a new\n * object every frame.\n */\nconst projectionFrameData = {\n type: \"projectionFrame\",\n totalNodes: 0,\n resolvedTargetDeltas: 0,\n recalculatedProjection: 0,\n};\nfunction createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) {\n return class ProjectionNode {\n constructor(latestValues = {}, parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent()) {\n /**\n * A unique ID generated for every projection node.\n */\n this.id = id++;\n /**\n * An id that represents a unique session instigated by startUpdate.\n */\n this.animationId = 0;\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 * Flag to true if we think the projection calculations for this node needs\n * recalculating as a result of an updated transform or layout animation.\n */\n this.isProjectionDirty = false;\n /**\n * Flag to true if the layout *or* transform has changed. This then gets propagated\n * throughout the projection tree, forcing any element below to recalculate on the next frame.\n */\n this.isSharedProjectionDirty = false;\n /**\n * Flag transform dirty. This gets propagated throughout the whole tree but is only\n * respected by shared nodes.\n */\n this.isTransformDirty = 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 layoutly\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 this.hasTreeAnimated = false;\n // Note: Currently only running on root node\n this.updateScheduled = false;\n this.checkUpdateFailed = () => {\n if (this.isUpdating) {\n this.isUpdating = false;\n this.clearAllSnapshots();\n }\n };\n /**\n * This is a multi-step process as shared nodes might be of different depths. Nodes\n * are sorted by depth order, so we need to resolve the entire tree before moving to\n * the next step.\n */\n this.updateProjection = () => {\n /**\n * Reset debug counts. Manually resetting rather than creating a new\n * object each frame.\n */\n projectionFrameData.totalNodes =\n projectionFrameData.resolvedTargetDeltas =\n projectionFrameData.recalculatedProjection =\n 0;\n this.nodes.forEach(propagateDirtyNodes);\n this.nodes.forEach(resolveTargetDelta);\n this.nodes.forEach(calcProjection);\n this.nodes.forEach(cleanDirtyNodes);\n record(projectionFrameData);\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.latestValues = latestValues;\n this.root = parent ? parent.root || parent : this;\n this.path = parent ? [...parent.path, parent] : [];\n this.parent = parent;\n this.depth = parent ? parent.depth + 1 : 0;\n for (let 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 addEventListener(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 notifyListeners(name, ...args) {\n const subscriptionManager = this.eventHandlers.get(name);\n subscriptionManager && subscriptionManager.notify(...args);\n }\n hasListeners(name) {\n return this.eventHandlers.has(name);\n }\n /**\n * Lifecycles\n */\n mount(instance, isLayoutDirty = this.root.hasTreeAnimated) {\n if (this.instance)\n return;\n this.isSVG = isSVGElement(instance);\n this.instance = instance;\n const { layoutId, layout, visualElement } = this.options;\n if (visualElement && !visualElement.current) {\n visualElement.mount(instance);\n }\n this.root.nodes.add(this);\n this.parent && this.parent.children.add(this);\n if (isLayoutDirty && (layout || layoutId)) {\n this.isLayoutDirty = true;\n }\n if (attachResizeListener) {\n let cancelDelay;\n const resizeUnblockUpdate = () => (this.root.updateBlockedByResize = false);\n attachResizeListener(instance, () => {\n this.root.updateBlockedByResize = true;\n cancelDelay && cancelDelay();\n cancelDelay = delay(resizeUnblockUpdate, 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\", ({ delta, hasLayoutChanged, hasRelativeTargetChanged, layout: newLayout, }) => {\n if (this.isTreeAnimationBlocked()) {\n this.target = undefined;\n this.relativeTarget = undefined;\n return;\n }\n // TODO: Check here if an animation exists\n const layoutTransition = this.options.transition ||\n visualElement.getDefaultTransition() ||\n defaultLayoutTransition;\n const { onLayoutAnimationStart, onLayoutAnimationComplete, } = visualElement.getProps();\n /**\n * The target layout of the element might stay the same,\n * but its position relative to its parent has changed.\n */\n const targetChanged = !this.targetLayout ||\n !boxEqualsRounded(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 const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;\n if (this.options.layoutRoot ||\n (this.resumeFrom && this.resumeFrom.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 const animationOptions = {\n ...getValueTransition(layoutTransition, \"layout\"),\n onPlay: onLayoutAnimationStart,\n onComplete: onLayoutAnimationComplete,\n };\n if (visualElement.shouldReduceMotion ||\n this.options.layoutRoot) {\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 finishAnimation(this);\n }\n if (this.isLead() && this.options.onExitComplete) {\n this.options.onExitComplete();\n }\n }\n this.targetLayout = newLayout;\n });\n }\n }\n unmount() {\n this.options.layoutId && this.willUpdate();\n this.root.nodes.remove(this);\n const stack = this.getStack();\n stack && stack.remove(this);\n this.parent && this.parent.children.delete(this);\n this.instance = undefined;\n cancelFrame(this.updateProjection);\n }\n // only on the root\n blockUpdate() {\n this.updateManuallyBlocked = true;\n }\n unblockUpdate() {\n this.updateManuallyBlocked = false;\n }\n isUpdateBlocked() {\n return this.updateManuallyBlocked || this.updateBlockedByResize;\n }\n isTreeAnimationBlocked() {\n return (this.isAnimationBlocked ||\n (this.parent && this.parent.isTreeAnimationBlocked()) ||\n false);\n }\n // Note: currently only running on root node\n startUpdate() {\n if (this.isUpdateBlocked())\n return;\n this.isUpdating = true;\n this.nodes && this.nodes.forEach(resetRotation);\n this.animationId++;\n }\n getTransformTemplate() {\n const { visualElement } = this.options;\n return visualElement && visualElement.getProps().transformTemplate;\n }\n willUpdate(shouldNotifyListeners = true) {\n this.root.hasTreeAnimated = true;\n if (this.root.isUpdateBlocked()) {\n this.options.onExitComplete && this.options.onExitComplete();\n return;\n }\n !this.root.isUpdating && this.root.startUpdate();\n if (this.isLayoutDirty)\n return;\n this.isLayoutDirty = true;\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.shouldResetTransform = true;\n node.updateScroll(\"snapshot\");\n if (node.options.layoutRoot) {\n node.willUpdate(false);\n }\n }\n const { layoutId, layout } = this.options;\n if (layoutId === undefined && !layout)\n return;\n const transformTemplate = this.getTransformTemplate();\n this.prevTransformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n this.updateSnapshot();\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\");\n }\n update() {\n this.updateScheduled = false;\n const 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 this.nodes.forEach(clearIsLayoutDirty);\n }\n this.isUpdating = false;\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 /**\n * Manually flush any pending updates. Ideally\n * we could leave this to the following requestAnimationFrame but this seems\n * to leave a flash of incorrectly styled content.\n */\n const now = performance.now();\n frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp);\n frameData.timestamp = now;\n frameData.isProcessing = true;\n steps.update.process(frameData);\n steps.preRender.process(frameData);\n steps.render.process(frameData);\n frameData.isProcessing = false;\n }\n didUpdate() {\n if (!this.updateScheduled) {\n this.updateScheduled = true;\n queueMicrotask(() => this.update());\n }\n }\n clearAllSnapshots() {\n this.nodes.forEach(clearSnapshot);\n this.sharedNodes.forEach(removeLeadSnapshots);\n }\n scheduleUpdateProjection() {\n frame.preRender(this.updateProjection, false, true);\n }\n scheduleCheckAfterUnmount() {\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 frame.postRender(() => {\n if (this.isLayoutDirty) {\n this.root.didUpdate();\n }\n else {\n this.root.checkUpdateFailed();\n }\n });\n }\n /**\n * Update measurements\n */\n updateSnapshot() {\n if (this.snapshot || !this.instance)\n return;\n this.snapshot = this.measure();\n }\n updateLayout() {\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 (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.updateScroll();\n }\n }\n const prevLayout = this.layout;\n this.layout = this.measure(false);\n this.layoutCorrected = createBox();\n this.isLayoutDirty = false;\n this.projectionDelta = undefined;\n this.notifyListeners(\"measure\", this.layout.layoutBox);\n const { visualElement } = this.options;\n visualElement &&\n visualElement.notify(\"LayoutMeasure\", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined);\n }\n updateScroll(phase = \"measure\") {\n let needsMeasurement = Boolean(this.options.layoutScroll && this.instance);\n if (this.scroll &&\n this.scroll.animationId === this.root.animationId &&\n this.scroll.phase === phase) {\n needsMeasurement = false;\n }\n if (needsMeasurement) {\n this.scroll = {\n animationId: this.root.animationId,\n phase,\n isRoot: checkIsScrollRoot(this.instance),\n offset: measureScroll(this.instance),\n };\n }\n }\n resetTransform() {\n if (!resetTransform)\n return;\n const isResetRequested = this.isLayoutDirty || this.shouldResetTransform;\n const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);\n const transformTemplate = this.getTransformTemplate();\n const transformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n const 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 measure(removeTransform = true) {\n const pageBox = this.measurePageBox();\n let layoutBox = this.removeElementScroll(pageBox);\n /**\n * Measurements taken during the pre-render stage\n * still have transforms applied so we remove them\n * via calculation.\n */\n if (removeTransform) {\n layoutBox = this.removeTransform(layoutBox);\n }\n roundBox(layoutBox);\n return {\n animationId: this.root.animationId,\n measuredBox: pageBox,\n layoutBox,\n latestValues: {},\n source: this.id,\n };\n }\n measurePageBox() {\n const { visualElement } = this.options;\n if (!visualElement)\n return createBox();\n const box = visualElement.measureViewportBox();\n // Remove viewport scroll to give page-relative coordinates\n const { scroll } = this.root;\n if (scroll) {\n translateAxis(box.x, scroll.offset.x);\n translateAxis(box.y, scroll.offset.y);\n }\n return box;\n }\n removeElementScroll(box) {\n const 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 (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n const { scroll, options } = node;\n if (node !== this.root && scroll && 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 (scroll.isRoot) {\n copyBoxInto(boxWithoutScroll, box);\n const { scroll: rootScroll } = this.root;\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.offset.x);\n translateAxis(boxWithoutScroll.y, -rootScroll.offset.y);\n }\n }\n translateAxis(boxWithoutScroll.x, scroll.offset.x);\n translateAxis(boxWithoutScroll.y, scroll.offset.y);\n }\n }\n return boxWithoutScroll;\n }\n applyTransform(box, transformOnly = false) {\n const withTransforms = createBox();\n copyBoxInto(withTransforms, box);\n for (let i = 0; i < this.path.length; i++) {\n const 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.offset.x,\n y: -node.scroll.offset.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 removeTransform(box) {\n const boxWithoutTransform = createBox();\n copyBoxInto(boxWithoutTransform, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!node.instance)\n continue;\n if (!hasTransform(node.latestValues))\n continue;\n hasScale(node.latestValues) && node.updateSnapshot();\n const sourceBox = createBox();\n const nodeBox = node.measurePageBox();\n copyBoxInto(sourceBox, nodeBox);\n removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot ? node.snapshot.layoutBox : undefined, sourceBox);\n }\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues);\n }\n return boxWithoutTransform;\n }\n setTargetDelta(delta) {\n this.targetDelta = delta;\n this.root.scheduleUpdateProjection();\n this.isProjectionDirty = true;\n }\n setOptions(options) {\n this.options = {\n ...this.options,\n ...options,\n crossfade: options.crossfade !== undefined ? options.crossfade : true,\n };\n }\n clearMeasurements() {\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 forceRelativeParentToResolveTarget() {\n if (!this.relativeParent)\n return;\n /**\n * If the parent target isn't up-to-date, force it to update.\n * This is an unfortunate de-optimisation as it means any updating relative\n * projection will cause all the relative parents to recalculate back\n * up the tree.\n */\n if (this.relativeParent.resolvedRelativeTargetAt !==\n frameData.timestamp) {\n this.relativeParent.resolveTargetDelta(true);\n }\n }\n resolveTargetDelta(forceRecalculation = false) {\n var _a;\n /**\n * Once the dirty status of nodes has been spread through the tree, we also\n * need to check if we have a shared node of a different depth that has itself\n * been dirtied.\n */\n const lead = this.getLead();\n this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty);\n this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty);\n this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty);\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n /**\n * We don't use transform for this step of processing so we don't\n * need to check whether any nodes have changed transform.\n */\n const canSkip = !(forceRecalculation ||\n (isShared && this.isSharedProjectionDirty) ||\n this.isProjectionDirty ||\n ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty) ||\n this.attemptToResolveRelativeTarget);\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\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 this.resolvedRelativeTargetAt = frameData.timestamp;\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 const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n relativeParent.layout &&\n this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.layout.layoutBox, relativeParent.layout.layoutBox);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\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 this.relativeParent &&\n this.relativeParent.target) {\n this.forceRelativeParentToResolveTarget();\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.layoutBox);\n }\n else {\n copyBoxInto(this.target, this.layout.layoutBox);\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.layoutBox);\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 const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n Boolean(relativeParent.resumingFrom) ===\n Boolean(this.resumingFrom) &&\n !relativeParent.options.layoutScroll &&\n relativeParent.target &&\n this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.target, relativeParent.target);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\n }\n }\n /**\n * Increase debug counter for resolved target deltas\n */\n projectionFrameData.resolvedTargetDeltas++;\n }\n getClosestProjectingParent() {\n if (!this.parent ||\n hasScale(this.parent.latestValues) ||\n has2DTranslate(this.parent.latestValues)) {\n return undefined;\n }\n if (this.parent.isProjecting()) {\n return this.parent;\n }\n else {\n return this.parent.getClosestProjectingParent();\n }\n }\n isProjecting() {\n return Boolean((this.relativeTarget ||\n this.targetDelta ||\n this.options.layoutRoot) &&\n this.layout);\n }\n calcProjection() {\n var _a;\n const lead = this.getLead();\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n let canSkip = true;\n /**\n * If this is a normal layout animation and neither this node nor its nearest projecting\n * is dirty then we can't skip.\n */\n if (this.isProjectionDirty || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty)) {\n canSkip = false;\n }\n /**\n * If this is a shared layout animation and this node's shared projection is dirty then\n * we can't skip.\n */\n if (isShared &&\n (this.isSharedProjectionDirty || this.isTransformDirty)) {\n canSkip = false;\n }\n /**\n * If we have resolved the target this frame we must recalculate the\n * projection to ensure it visually represents the internal calculations.\n */\n if (this.resolvedRelativeTargetAt === frameData.timestamp) {\n canSkip = false;\n }\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\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((this.parent && this.parent.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 /**\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.layoutBox);\n /**\n * Record previous tree scales before updating.\n */\n const prevTreeScaleX = this.treeScale.x;\n const prevTreeScaleY = this.treeScale.y;\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, isShared);\n /**\n * If this layer needs to perform scale correction but doesn't have a target,\n * use the layout as the target.\n */\n if (lead.layout &&\n !lead.target &&\n (this.treeScale.x !== 1 || this.treeScale.y !== 1)) {\n lead.target = lead.layout.layoutBox;\n }\n const { target } = lead;\n if (!target) {\n /**\n * If we don't have a target to project into, but we were previously\n * projecting, we want to remove the stored transform and schedule\n * a render to ensure the elements reflect the removed transform.\n */\n if (this.projectionTransform) {\n this.projectionDelta = createDelta();\n this.projectionTransform = \"none\";\n this.scheduleRender();\n }\n return;\n }\n if (!this.projectionDelta) {\n this.projectionDelta = createDelta();\n this.projectionDeltaWithTransform = createDelta();\n }\n const 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 * Increase debug counter for recalculated projections\n */\n projectionFrameData.recalculatedProjection++;\n }\n hide() {\n this.isVisible = false;\n // TODO: Schedule render\n }\n show() {\n this.isVisible = true;\n // TODO: Schedule render\n }\n scheduleRender(notifyAll = true) {\n this.options.scheduleRender && this.options.scheduleRender();\n if (notifyAll) {\n const stack = this.getStack();\n stack && stack.scheduleRender();\n }\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = undefined;\n }\n }\n setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false) {\n const snapshot = this.snapshot;\n const snapshotLatestValues = snapshot\n ? snapshot.latestValues\n : {};\n const mixedValues = { ...this.latestValues };\n const targetDelta = createDelta();\n if (!this.relativeParent ||\n !this.relativeParent.options.layoutRoot) {\n this.relativeTarget = this.relativeTargetOrigin = undefined;\n }\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;\n const relativeLayout = createBox();\n const snapshotSource = snapshot ? snapshot.source : undefined;\n const layoutSource = this.layout ? this.layout.source : undefined;\n const isSharedLayoutAnimation = snapshotSource !== layoutSource;\n const stack = this.getStack();\n const isOnlyMember = !stack || stack.members.length <= 1;\n const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation &&\n !isOnlyMember &&\n this.options.crossfade === true &&\n !this.path.some(hasOpacityCrossfade));\n this.animationProgress = 0;\n let prevRelativeTarget;\n this.mixTargetDelta = (latest) => {\n const 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 this.relativeParent &&\n this.relativeParent.layout) {\n calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox);\n mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress);\n /**\n * If this is an unchanged relative target we can consider the\n * projection not dirty.\n */\n if (prevRelativeTarget &&\n boxEquals(this.relativeTarget, prevRelativeTarget)) {\n this.isProjectionDirty = false;\n }\n if (!prevRelativeTarget)\n prevRelativeTarget = createBox();\n copyBoxInto(prevRelativeTarget, this.relativeTarget);\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(this.options.layoutRoot ? 1000 : 0);\n }\n startAnimation(options) {\n this.notifyListeners(\"animationStart\");\n this.currentAnimation && this.currentAnimation.stop();\n if (this.resumingFrom && this.resumingFrom.currentAnimation) {\n this.resumingFrom.currentAnimation.stop();\n }\n if (this.pendingAnimation) {\n cancelFrame(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 = frame.update(() => {\n globalProjectionState.hasAnimatedSinceResize = true;\n this.currentAnimation = animateSingleValue(0, animationTarget, {\n ...options,\n onUpdate: (latest) => {\n this.mixTargetDelta(latest);\n options.onUpdate && options.onUpdate(latest);\n },\n onComplete: () => {\n options.onComplete && options.onComplete();\n this.completeAnimation();\n },\n });\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = this.currentAnimation;\n }\n this.pendingAnimation = undefined;\n });\n }\n completeAnimation() {\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = undefined;\n this.resumingFrom.preserveOpacity = undefined;\n }\n const stack = this.getStack();\n stack && stack.exitAnimationComplete();\n this.resumingFrom =\n this.currentAnimation =\n this.animationValues =\n undefined;\n this.notifyListeners(\"animationComplete\");\n }\n finishAnimation() {\n if (this.currentAnimation) {\n this.mixTargetDelta && this.mixTargetDelta(animationTarget);\n this.currentAnimation.stop();\n }\n this.completeAnimation();\n }\n applyTransformsToTarget() {\n const lead = this.getLead();\n let { targetWithTransforms, target, layout, latestValues } = lead;\n if (!targetWithTransforms || !target || !layout)\n return;\n /**\n * If we're only animating position, and this element isn't the lead element,\n * then instead of projecting into the lead box we instead want to calculate\n * a new target that aligns the two boxes but maintains the layout shape.\n */\n if (this !== lead &&\n this.layout &&\n layout &&\n shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) {\n target = this.target || createBox();\n const xLength = calcLength(this.layout.layoutBox.x);\n target.x.min = lead.target.x.min;\n target.x.max = target.x.min + xLength;\n const yLength = calcLength(this.layout.layoutBox.y);\n target.y.min = lead.target.y.min;\n target.y.max = target.y.min + yLength;\n }\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 layout layout\n * into the desired bounding box.\n */\n calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);\n }\n registerSharedNode(layoutId, node) {\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack());\n }\n const stack = this.sharedNodes.get(layoutId);\n stack.add(node);\n const config = node.options.initialPromotionConfig;\n node.promote({\n transition: config ? config.transition : undefined,\n preserveFollowOpacity: config && config.shouldPreserveFollowOpacity\n ? config.shouldPreserveFollowOpacity(node)\n : undefined,\n });\n }\n isLead() {\n const stack = this.getStack();\n return stack ? stack.lead === this : true;\n }\n getLead() {\n var _a;\n const { layoutId } = this.options;\n return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;\n }\n getPrevLead() {\n var _a;\n const { layoutId } = this.options;\n return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined;\n }\n getStack() {\n const { layoutId } = this.options;\n if (layoutId)\n return this.root.sharedNodes.get(layoutId);\n }\n promote({ needsReset, transition, preserveFollowOpacity, } = {}) {\n const 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 });\n }\n relegate() {\n const stack = this.getStack();\n if (stack) {\n return stack.relegate(this);\n }\n else {\n return false;\n }\n }\n resetRotation() {\n const { visualElement } = this.options;\n if (!visualElement)\n return;\n // If there's no detected rotation values, we can early return without a forced render.\n let hasRotate = false;\n /**\n * An unrolled check for rotation values. Most elements don't have any rotation and\n * skipping the nested loop and new object creation is 50% faster.\n */\n const { latestValues } = visualElement;\n if (latestValues.rotate ||\n latestValues.rotateX ||\n latestValues.rotateY ||\n latestValues.rotateZ) {\n hasRotate = true;\n }\n // If there's no rotation values, we don't need to do any more.\n if (!hasRotate)\n return;\n const resetValues = {};\n // Check the rotate value of all axes and reset to 0\n for (let i = 0; i < transformAxes.length; i++) {\n const key = \"rotate\" + transformAxes[i];\n // Record the rotation and then temporarily set it to 0\n if (latestValues[key]) {\n resetValues[key] = latestValues[key];\n visualElement.setStaticValue(key, 0);\n }\n }\n // Force a render of this element to apply the transform with all rotations\n // set to 0.\n visualElement.render();\n // Put back all the values we reset\n for (const 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 getProjectionStyles(styleProp = {}) {\n var _a, _b;\n // TODO: Return lifecycle-persistent object\n const 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 const transformTemplate = this.getTransformTemplate();\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 const lead = this.getLead();\n if (!this.projectionDelta || !this.layout || !lead.target) {\n const emptyStyles = {};\n if (this.options.layoutId) {\n emptyStyles.opacity =\n this.latestValues.opacity !== undefined\n ? this.latestValues.opacity\n : 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 const 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 const { x, y } = this.projectionDelta;\n styles.transformOrigin = `${x.origin * 100}% ${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 ? (_b = (_a = valuesToRender.opacity) !== null && _a !== void 0 ? _a : this.latestValues.opacity) !== null && _b !== void 0 ? _b : 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 layout\n * opacity and other components to hidden.\n */\n styles.opacity =\n lead === this\n ? valuesToRender.opacity !== undefined\n ? valuesToRender.opacity\n : \"\"\n : valuesToRender.opacityExit !== undefined\n ? valuesToRender.opacityExit\n : 0;\n }\n /**\n * Apply scale correction\n */\n for (const key in scaleCorrectors) {\n if (valuesToRender[key] === undefined)\n continue;\n const { correct, applyTo } = scaleCorrectors[key];\n /**\n * Only apply scale correction to the value if we have an\n * active projection transform. Otherwise these values become\n * vulnerable to distortion if the element changes size without\n * a corresponding layout animation.\n */\n const corrected = styles.transform === \"none\"\n ? valuesToRender[key]\n : correct(valuesToRender[key], lead);\n if (applyTo) {\n const num = applyTo.length;\n for (let 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 clearSnapshot() {\n this.resumeFrom = this.snapshot = undefined;\n }\n // Only run on root\n resetTree() {\n this.root.nodes.forEach((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 };\n}\nfunction updateLayout(node) {\n node.updateLayout();\n}\nfunction notifyLayoutUpdate(node) {\n var _a;\n const snapshot = ((_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) || node.snapshot;\n if (node.isLead() &&\n node.layout &&\n snapshot &&\n node.hasListeners(\"didUpdate\")) {\n const { layoutBox: layout, measuredBox: measuredLayout } = node.layout;\n const { animationType } = node.options;\n const isShared = snapshot.source !== node.layout.source;\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 (animationType === \"size\") {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(axisSnapshot);\n axisSnapshot.min = layout[axis].min;\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(layout[axis]);\n axisSnapshot.max = axisSnapshot.min + length;\n /**\n * Ensure relative target gets resized and rerendererd\n */\n if (node.relativeTarget && !node.currentAnimation) {\n node.isProjectionDirty = true;\n node.relativeTarget[axis].max =\n node.relativeTarget[axis].min + length;\n }\n });\n }\n const layoutDelta = createDelta();\n calcBoxDelta(layoutDelta, layout, snapshot.layoutBox);\n const visualDelta = createDelta();\n if (isShared) {\n calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox);\n }\n else {\n calcBoxDelta(visualDelta, layout, snapshot.layoutBox);\n }\n const hasLayoutChanged = !isDeltaZero(layoutDelta);\n let hasRelativeTargetChanged = false;\n if (!node.resumeFrom) {\n const 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 (relativeParent && !relativeParent.resumeFrom) {\n const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent;\n if (parentSnapshot && parentLayout) {\n const relativeSnapshot = createBox();\n calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox);\n const relativeLayout = createBox();\n calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox);\n if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {\n hasRelativeTargetChanged = true;\n }\n if (relativeParent.options.layoutRoot) {\n node.relativeTarget = relativeLayout;\n node.relativeTargetOrigin = relativeSnapshot;\n node.relativeParent = relativeParent;\n }\n }\n }\n }\n node.notifyListeners(\"didUpdate\", {\n layout,\n snapshot,\n delta: visualDelta,\n layoutDelta,\n hasLayoutChanged,\n hasRelativeTargetChanged,\n });\n }\n else if (node.isLead()) {\n const { onExitComplete } = node.options;\n onExitComplete && onExitComplete();\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 propagateDirtyNodes(node) {\n /**\n * Increase debug counter for nodes encountered this frame\n */\n projectionFrameData.totalNodes++;\n if (!node.parent)\n return;\n /**\n * If this node isn't projecting, propagate isProjectionDirty. It will have\n * no performance impact but it will allow the next child that *is* projecting\n * but *isn't* dirty to just check its parent to see if *any* ancestor needs\n * correcting.\n */\n if (!node.isProjecting()) {\n node.isProjectionDirty = node.parent.isProjectionDirty;\n }\n /**\n * Propagate isSharedProjectionDirty and isTransformDirty\n * throughout the whole tree. A future revision can take another look at\n * this but for safety we still recalcualte shared nodes.\n */\n node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty ||\n node.parent.isProjectionDirty ||\n node.parent.isSharedProjectionDirty));\n node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty);\n}\nfunction cleanDirtyNodes(node) {\n node.isProjectionDirty =\n node.isSharedProjectionDirty =\n node.isTransformDirty =\n false;\n}\nfunction clearSnapshot(node) {\n node.clearSnapshot();\n}\nfunction clearMeasurements(node) {\n node.clearMeasurements();\n}\nfunction clearIsLayoutDirty(node) {\n node.isLayoutDirty = false;\n}\nfunction resetTransformStyle(node) {\n const { visualElement } = node.options;\n if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notify(\"BeforeLayoutMeasure\");\n }\n node.resetTransform();\n}\nfunction finishAnimation(node) {\n node.finishAnimation();\n node.targetDelta = node.relativeTarget = node.target = undefined;\n node.isProjectionDirty = true;\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}\nconst defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1],\n};\nconst userAgentContains = (string) => typeof navigator !== \"undefined\" &&\n navigator.userAgent.toLowerCase().includes(string);\n/**\n * Measured bounding boxes must be rounded in Safari and\n * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements\n * can appear to jump.\n */\nconst roundPoint = userAgentContains(\"applewebkit/\") && !userAgentContains(\"chrome/\")\n ? Math.round\n : noop;\nfunction roundAxis(axis) {\n // Round to the nearest .5 pixels to support subpixel layouts\n axis.min = roundPoint(axis.min);\n axis.max = roundPoint(axis.max);\n}\nfunction roundBox(box) {\n roundAxis(box.x);\n roundAxis(box.y);\n}\nfunction shouldAnimatePositionOnly(animationType, snapshot, layout) {\n return (animationType === \"position\" ||\n (animationType === \"preserve-aspect\" &&\n !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2)));\n}\n\nexport { cleanDirtyNodes, createProjectionNode, mixAxis, mixAxisDelta, mixBox, propagateDirtyNodes };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\n\nconst DocumentProjectionNode = createProjectionNode({\n attachResizeListener: (ref, notify) => addDomEvent(ref, \"resize\", notify),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body.scrollLeft,\n y: document.documentElement.scrollTop || document.body.scrollTop,\n }),\n checkIsScrollRoot: () => true,\n});\n\nexport { DocumentProjectionNode };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { DocumentProjectionNode } from './DocumentProjectionNode.mjs';\n\nconst rootProjectionNode = {\n current: undefined,\n};\nconst HTMLProjectionNode = createProjectionNode({\n measureScroll: (instance) => ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }),\n defaultParent: () => {\n if (!rootProjectionNode.current) {\n const documentNode = new DocumentProjectionNode({});\n documentNode.mount(window);\n documentNode.setOptions({ layoutScroll: true });\n rootProjectionNode.current = documentNode;\n }\n return rootProjectionNode.current;\n },\n resetTransform: (instance, value) => {\n instance.style.transform = value !== undefined ? value : \"none\";\n },\n checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === \"fixed\"),\n});\n\nexport { HTMLProjectionNode, rootProjectionNode };\n","import { DragGesture } from '../../gestures/drag/index.mjs';\nimport { PanGesture } from '../../gestures/pan/index.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\nimport { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\n\nconst drag = {\n pan: {\n Feature: PanGesture,\n },\n drag: {\n Feature: DragGesture,\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { drag };\n","import { invariant } from '../../../utils/errors.mjs';\nimport { isNumericalString } from '../../../utils/is-numerical-string.mjs';\nimport { isCSSVariableToken } from './is-css-variable.mjs';\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 */\nconst splitCSSVariableRegex = /var\\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\\)/;\nfunction parseCSSVariable(current) {\n const match = splitCSSVariableRegex.exec(current);\n if (!match)\n return [,];\n const [, token, fallback] = match;\n return [token, fallback];\n}\nconst maxDepth = 4;\nfunction getVariableValue(current, element, depth = 1) {\n invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`);\n const [token, fallback] = parseCSSVariable(current);\n // No CSS variable detected\n if (!token)\n return;\n // Attempt to read this CSS variable off the element\n const resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n const trimmed = resolved.trim();\n return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;\n }\n else if (isCSSVariableToken(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, { ...target }, transitionEnd) {\n const element = visualElement.current;\n if (!(element instanceof Element))\n return { target, 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 = { ...transitionEnd };\n }\n // Go through existing `MotionValue`s and ensure any existing CSS variables are resolved\n visualElement.values.forEach((value) => {\n const current = value.get();\n if (!isCSSVariableToken(current))\n return;\n const 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 (const key in target) {\n const current = target[key];\n if (!isCSSVariableToken(current))\n continue;\n const resolved = getVariableValue(current, element);\n if (!resolved)\n continue;\n // Clone target if it hasn't already been\n target[key] = resolved;\n if (!transitionEnd)\n transitionEnd = {};\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[key] === undefined) {\n transitionEnd[key] = current;\n }\n }\n return { target, transitionEnd };\n}\n\nexport { parseCSSVariable, resolveCSSVariables };\n","import { isKeyframesTarget } from '../../../animation/utils/is-keyframes-target.mjs';\nimport { invariant } from '../../../utils/errors.mjs';\nimport { transformPropOrder } from '../../html/utils/transform.mjs';\nimport { findDimensionValueType } from '../value-types/dimensions.mjs';\nimport { isBrowser } from '../../../utils/is-browser.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n \"x\",\n \"y\",\n \"translateX\",\n \"translateY\",\n]);\nconst isPositionalKey = (key) => positionalKeys.has(key);\nconst hasPositionalKey = (target) => {\n return Object.keys(target).some(isPositionalKey);\n};\nconst isNumOrPxType = (v) => v === number || v === px;\nconst getPosFromMatrix = (matrix, pos) => parseFloat(matrix.split(\", \")[pos]);\nconst getTranslateFromMatrix = (pos2, pos3) => (_bbox, { transform }) => {\n if (transform === \"none\" || !transform)\n return 0;\n const matrix3d = transform.match(/^matrix3d\\((.+)\\)$/);\n if (matrix3d) {\n return getPosFromMatrix(matrix3d[1], pos3);\n }\n else {\n const matrix = transform.match(/^matrix\\((.+)\\)$/);\n if (matrix) {\n return getPosFromMatrix(matrix[1], pos2);\n }\n else {\n return 0;\n }\n }\n};\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const 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.render();\n return removedTransforms;\n}\nconst positionalValues = {\n // Dimensions\n width: ({ x }, { paddingLeft = \"0\", paddingRight = \"0\" }) => x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight),\n height: ({ y }, { paddingTop = \"0\", paddingBottom = \"0\" }) => y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom),\n top: (_bbox, { top }) => parseFloat(top),\n left: (_bbox, { left }) => parseFloat(left),\n bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min),\n right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min),\n // Transform\n x: getTranslateFromMatrix(4, 13),\n y: getTranslateFromMatrix(5, 14),\n};\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x;\npositionalValues.translateY = positionalValues.y;\nconst convertChangedValueTypes = (target, visualElement, changedKeys) => {\n const originBbox = visualElement.measureViewportBox();\n const element = visualElement.current;\n const elementComputedStyle = getComputedStyle(element);\n const { display } = elementComputedStyle;\n const 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((key) => {\n origin[key] = positionalValues[key](originBbox, elementComputedStyle);\n });\n // Apply the latest values (as set in checkAndConvertChangedValueTypes)\n visualElement.render();\n const targetBbox = visualElement.measureViewportBox();\n changedKeys.forEach((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 const value = visualElement.getValue(key);\n value && value.jump(origin[key]);\n target[key] = positionalValues[key](targetBbox, elementComputedStyle);\n });\n return target;\n};\nconst checkAndConvertChangedValueTypes = (visualElement, target, origin = {}, transitionEnd = {}) => {\n target = { ...target };\n transitionEnd = { ...transitionEnd };\n const 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 let removedTransformValues = [];\n let hasAttemptedToRemoveTransformValues = false;\n const changedValueTypeKeys = [];\n targetPositionalKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (!visualElement.hasValue(key))\n return;\n let from = origin[key];\n let fromType = findDimensionValueType(from);\n const to = target[key];\n let 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 const numKeyframes = to.length;\n const fromIndex = to[0] === null ? 1 : 0;\n from = to[fromIndex];\n fromType = findDimensionValueType(from);\n for (let i = fromIndex; i < numKeyframes; i++) {\n /**\n * Don't allow wildcard keyframes to be used to detect\n * a difference in value types.\n */\n if (to[i] === null)\n break;\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 const 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 value.jump(to);\n }\n }\n });\n if (changedValueTypeKeys.length) {\n const scrollY = changedValueTypeKeys.indexOf(\"height\") >= 0\n ? window.pageYOffset\n : null;\n const convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys);\n // If we removed transform values, reapply them before the next render\n if (removedTransformValues.length) {\n removedTransformValues.forEach(([key, value]) => {\n visualElement.getValue(key).set(value);\n });\n }\n // Reapply original values\n visualElement.render();\n // Restore scroll position\n if (isBrowser && scrollY !== null) {\n window.scrollTo({ top: scrollY });\n }\n return { target: convertedTarget, transitionEnd };\n }\n else {\n return { target, 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, transitionEnd };\n}\n\nexport { 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 */\nconst parseDomVariant = (visualElement, target, origin, transitionEnd) => {\n const 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","// Does this device prefer reduced motion? Returns `null` server-side.\nconst prefersReducedMotion = { current: null };\nconst hasReducedMotionListener = { current: false };\n\nexport { hasReducedMotionListener, prefersReducedMotion };\n","import { isBrowser } from '../is-browser.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\nfunction initPrefersReducedMotion() {\n hasReducedMotionListener.current = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);\n motionMediaQuery.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n\nexport { initPrefersReducedMotion };\n","import { isWillChangeMotionValue } from '../../value/use-will-change/is.mjs';\nimport { 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 const { willChange } = next;\n for (const key in next) {\n const nextValue = next[key];\n const 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 if (isWillChangeMotionValue(willChange)) {\n willChange.add(key);\n }\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 === \"10.16.5\", `Attempting to mix Framer Motion versions ${nextValue.version} with 10.16.5 may not work as expected.`);\n }\n }\n else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping from a motion value to a static value,\n * create a new motion value from that\n */\n element.addValue(key, motionValue(nextValue, { owner: element }));\n if (isWillChangeMotionValue(willChange)) {\n willChange.remove(key);\n }\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 const 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 const latestValue = element.getStaticValue(key);\n element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element }));\n }\n }\n }\n // Handle removed values\n for (const key in prev) {\n if (next[key] === undefined)\n element.removeValue(key);\n }\n return next;\n}\n\nexport { updateMotionValuesFromProps };\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n","import { warning, invariant } from '../utils/errors.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { isRefObject } from '../utils/is-ref-object.mjs';\nimport { initPrefersReducedMotion } from '../utils/reduced-motion/index.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from '../utils/reduced-motion/state.mjs';\nimport { SubscriptionManager } from '../utils/subscription-manager.mjs';\nimport { motionValue } from '../value/index.mjs';\nimport { isWillChangeMotionValue } from '../value/use-will-change/is.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { transformProps } from './html/utils/transform.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { isVariantLabel } from './utils/is-variant-label.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\nimport { warnOnce } from '../utils/warn-once.mjs';\nimport { featureDefinitions } from '../motion/features/definitions.mjs';\nimport { variantProps } from './utils/variant-props.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nconst featureNames = Object.keys(featureDefinitions);\nconst numFeatures = featureNames.length;\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\nconst numVariantProps = variantProps.length;\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n constructor({ parent, props, presenceContext, reducedMotionConfig, visualState, }, options = {}) {\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\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 this.values = new Map();\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.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 this.prevMotionValues = {};\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.scheduleRender = () => frame.render(this.render, false, true);\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.options = options;\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\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 const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {});\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key], false);\n if (isWillChangeMotionValue(willChange)) {\n willChange.add(key);\n }\n }\n }\n }\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps) {\n return {};\n }\n mount(instance) {\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion =\n this.reducedMotionConfig === \"never\"\n ? false\n : this.reducedMotionConfig === \"always\"\n ? true\n : prefersReducedMotion.current;\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\");\n }\n if (this.parent)\n this.parent.children.add(this);\n this.update(this.props, this.presenceContext);\n }\n unmount() {\n visualElementStore.delete(this.current);\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent && this.parent.children.delete(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n this.features[key].unmount();\n }\n this.current = null;\n }\n bindToMotionValue(key, value) {\n const valueIsTransform = transformProps.has(key);\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate &&\n frame.update(this.notifyUpdate, false, true);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n });\n const removeOnRenderRequest = value.on(\"renderRequest\", this.scheduleRender);\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n removeOnRenderRequest();\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n loadFeatures({ children, ...renderedProps }, isStrict, preloadedFeatures, initialLayoutGroupConfig) {\n let ProjectionNodeConstructor;\n let MeasureLayout;\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 (process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict) {\n const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n renderedProps.ignoreStrict\n ? warning(false, strictMessage)\n : invariant(false, strictMessage);\n }\n for (let i = 0; i < numFeatures; i++) {\n const name = featureNames[i];\n const { isEnabled, Feature: FeatureConstructor, ProjectionNode, MeasureLayout: MeasureLayoutComponent, } = featureDefinitions[name];\n if (ProjectionNode)\n ProjectionNodeConstructor = ProjectionNode;\n if (isEnabled(renderedProps)) {\n if (!this.features[name] && FeatureConstructor) {\n this.features[name] = new FeatureConstructor(this);\n }\n if (MeasureLayoutComponent) {\n MeasureLayout = MeasureLayoutComponent;\n }\n }\n }\n if (!this.projection && ProjectionNodeConstructor) {\n this.projection = new ProjectionNodeConstructor(this.latestValues, this.parent && this.parent.projection);\n const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, } = renderedProps;\n this.projection.setOptions({\n layoutId,\n layout,\n alwaysMeasureLayout: Boolean(drag) ||\n (dragConstraints && isRefObject(dragConstraints)),\n visualElement: this,\n scheduleRender: () => this.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: initialLayoutGroupConfig,\n layoutScroll,\n layoutRoot,\n });\n }\n return MeasureLayout;\n }\n updateFeatures() {\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.options, this.props);\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() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\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(target, canMutate = true) {\n return this.makeTargetAnimatableFromInstance(target, this.props, canMutate);\n }\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 update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listener = props[\"on\" + key];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n getVariantContext(startAtParent = false) {\n if (startAtParent) {\n return this.parent ? this.parent.getVariantContext() : undefined;\n }\n if (!this.isControllingVariants) {\n const context = this.parent\n ? this.parent.getVariantContext() || {}\n : {};\n if (this.props.initial !== undefined) {\n context.initial = this.props.initial;\n }\n return context;\n }\n const context = {};\n for (let i = 0; i < numVariantProps; i++) {\n const name = variantProps[i];\n const prop = this.props[name];\n if (isVariantLabel(prop) || prop === false) {\n context[name] = prop;\n }\n }\n return context;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n if (value !== this.values.get(key)) {\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n }\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\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(key) {\n var _a;\n return this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : (_a = this.getBaseTargetFromProps(this.props, key)) !== null && _a !== void 0 ? _a : this.readValueFromInstance(this.current, key, this.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(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n var _a;\n const { initial } = this.props;\n const valueFromInitial = typeof initial === \"string\" || typeof initial === \"object\"\n ? (_a = resolveVariantFromProps(this.props, initial)) === null || _a === void 0 ? void 0 : _a[key]\n : undefined;\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n}\n\nexport { VisualElement };\n","import { getOrigin, checkTargetForNewValues } from '../utils/setters.mjs';\nimport { parseDomVariant } from './utils/parse-dom-variant.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nclass DOMVisualElement extends VisualElement {\n sortInstanceNodePosition(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 getBaseTargetFromProps(props, key) {\n return props.style ? props.style[key] : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n makeTargetAnimatableFromInstance({ transition, transitionEnd, ...target }, { transformValues }, isMounted) {\n let origin = getOrigin(target, transition || {}, this);\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(this, target, origin);\n const parsed = parseDomVariant(this, target, origin, transitionEnd);\n transitionEnd = parsed.transitionEnd;\n target = parsed.target;\n }\n return {\n transition,\n transitionEnd,\n ...target,\n };\n }\n}\n\nexport { DOMVisualElement };\n","import { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { isCSSVariableName } from '../dom/utils/is-css-variable.mjs';\nimport { transformProps } 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';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nclass HTMLVisualElement extends DOMVisualElement {\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n else {\n const computedStyle = getComputedStyle(instance);\n const value = (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0;\n return typeof value === \"string\" ? value.trim() : value;\n }\n }\n measureInstanceViewportBox(instance, { transformPagePoint }) {\n return measureViewportBox(instance, transformPagePoint);\n }\n build(renderState, latestValues, options, props) {\n buildHTMLStyles(renderState, latestValues, options, props.transformTemplate);\n }\n scrapeMotionValuesFromProps(props, prevProps) {\n return scrapeMotionValuesFromProps(props, prevProps);\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current)\n this.current.textContent = `${latest}`;\n });\n }\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderHTML(instance, renderState, styleProp, projection);\n }\n}\n\nexport { HTMLVisualElement, getComputedStyle };\n","import { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.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 { transformProps } from '../html/utils/transform.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\n\nclass SVGVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.isSVGTag = false;\n }\n getBaseTargetFromProps(props, key) {\n return props[key];\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return instance.getAttribute(key);\n }\n measureInstanceViewportBox() {\n return createBox();\n }\n scrapeMotionValuesFromProps(props, prevProps) {\n return scrapeMotionValuesFromProps(props, prevProps);\n }\n build(renderState, latestValues, options, props) {\n buildSVGAttrs(renderState, latestValues, options, this.isSVGTag, props.transformTemplate);\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderSVG(instance, renderState, styleProp, projection);\n }\n mount(instance) {\n this.isSVGTag = isSVGTag(instance.tagName);\n super.mount(instance);\n }\n}\n\nexport { SVGVisualElement };\n","import { HTMLVisualElement } from '../html/HTMLVisualElement.mjs';\nimport { SVGVisualElement } from '../svg/SVGVisualElement.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nconst createDomVisualElement = (Component, options) => {\n return isSVGComponent(Component)\n ? new SVGVisualElement(options, { enableHardwareAcceleration: false })\n : new HTMLVisualElement(options, { enableHardwareAcceleration: true });\n};\n\nexport { createDomVisualElement };\n","import { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\n\nconst layout = {\n layout: {\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { layout };\n","import { 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 { layout } from '../../motion/features/layout.mjs';\n\nconst preloadedFeatures = {\n ...animations,\n ...gestureAnimations,\n ...drag,\n ...layout,\n};\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 */\nconst motion = /*@__PURE__*/ createMotionProxy((Component, config) => createDomMotionConfig(Component, config, preloadedFeatures, createDomVisualElement));\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 }, preloadedFeatures, createDomVisualElement));\n}\n\nexport { createDomMotionComponent, motion };\n","import * as React from 'react';\nimport { useContext, useRef, cloneElement, Children, isValidElement } from 'react';\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';\nimport { invariant } from '../../utils/errors.mjs';\n\nconst getChildKey = (child) => child.key || \"\";\nfunction updateChildLookup(children, allChildren) {\n children.forEach((child) => {\n const key = getChildKey(child);\n allChildren.set(key, child);\n });\n}\nfunction onlyElements(children) {\n const filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, (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 */\nconst AnimatePresence = ({ children, custom, initial = true, onExitComplete, exitBeforeEnter, presenceAffectsLayout = true, mode = \"sync\", }) => {\n invariant(!exitBeforeEnter, \"Replace exitBeforeEnter with mode='wait'\");\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 const forceRender = useContext(LayoutGroupContext).forceRender || useForceUpdate()[0];\n const isMounted = useIsMounted();\n // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key\n const filteredChildren = onlyElements(children);\n let childrenToRender = filteredChildren;\n const exitingChildren = useRef(new Map()).current;\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 const presentChildren = useRef(childrenToRender);\n // A lookup table to quickly reference components by key\n const 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 const isInitialRender = useRef(true);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n updateChildLookup(filteredChildren, allChildren);\n presentChildren.current = childrenToRender;\n });\n useUnmountEffect(() => {\n isInitialRender.current = true;\n allChildren.clear();\n exitingChildren.clear();\n });\n if (isInitialRender.current) {\n return (React.createElement(React.Fragment, null, childrenToRender.map((child) => (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? undefined : false, presenceAffectsLayout: presenceAffectsLayout, mode: mode }, child)))));\n }\n // If this is a subsequent render, deal with entering and exiting children\n childrenToRender = [...childrenToRender];\n // Diff the keys of the currently-present and target children to update our\n // exiting list.\n const presentKeys = presentChildren.current.map(getChildKey);\n const targetKeys = filteredChildren.map(getChildKey);\n // Diff the present children with our target children and mark those that are exiting\n const numPresent = presentKeys.length;\n for (let i = 0; i < numPresent; i++) {\n const key = presentKeys[i];\n if (targetKeys.indexOf(key) === -1 && !exitingChildren.has(key)) {\n exitingChildren.set(key, undefined);\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 (mode === \"wait\" && exitingChildren.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 exitingChildren.forEach((component, key) => {\n // If this component is actually entering again, early return\n if (targetKeys.indexOf(key) !== -1)\n return;\n const child = allChildren.get(key);\n if (!child)\n return;\n const insertionIndex = presentKeys.indexOf(key);\n let exitingComponent = component;\n if (!exitingComponent) {\n const onExit = () => {\n // clean up the exiting children map\n exitingChildren.delete(key);\n // compute the keys of children that were rendered once but are no longer present\n // this could happen in case of too many fast consequent renderings\n // @link https://github.com/framer/motion/issues/2023\n const leftOverKeys = Array.from(allChildren.keys()).filter((childKey) => !targetKeys.includes(childKey));\n // clean up the all children map\n leftOverKeys.forEach((leftOverKey) => allChildren.delete(leftOverKey));\n // make sure to render only the children that are actually visible\n presentChildren.current = filteredChildren.filter((presentChild) => {\n const presentChildKey = getChildKey(presentChild);\n return (\n // filter out the node exiting\n presentChildKey === key ||\n // filter out the leftover children\n leftOverKeys.includes(presentChildKey));\n });\n // Defer re-rendering until all exiting children have indeed left\n if (!exitingChildren.size) {\n if (isMounted.current === false)\n return;\n forceRender();\n onExitComplete && onExitComplete();\n }\n };\n exitingComponent = (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: false, onExitComplete: onExit, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode }, child));\n exitingChildren.set(key, exitingComponent);\n }\n childrenToRender.splice(insertionIndex, 0, exitingComponent);\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((child) => {\n const key = child.key;\n return exitingChildren.has(key) ? (child) : (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, presenceAffectsLayout: presenceAffectsLayout, mode: mode }, child));\n });\n if (process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n childrenToRender.length > 1) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n return (React.createElement(React.Fragment, null, exitingChildren.size\n ? childrenToRender\n : childrenToRender.map((child) => cloneElement(child))));\n};\n\nexport { AnimatePresence };\n","import { useState, useCallback } from 'react';\nimport { useIsMounted } from './use-is-mounted.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction useForceUpdate() {\n const isMounted = useIsMounted();\n const [forcedRenderCount, setForcedRenderCount] = useState(0);\n const forceRender = useCallback(() => {\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 const deferredForceRender = useCallback(() => frame.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 const isMounted = useRef(false);\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return isMounted;\n}\n\nexport { useIsMounted };\n","import * as React from 'react';\nimport { useId, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n const context = useMemo(() => ({\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n 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(() => {\n presenceChildren.forEach((_, key) => 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(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n if (mode === \"popLayout\") {\n children = React.createElement(PopChild, { isPresent: isPresent }, children);\n }\n return (React.createElement(PresenceContext.Provider, { value: context }, children));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n","import * as React from 'react';\nimport { useId, useRef, useInsertionEffect } from 'react';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (element && prevProps.isPresent && !this.props.isPresent) {\n const size = this.props.sizeRef.current;\n size.height = element.offsetHeight || 0;\n size.width = element.offsetWidth || 0;\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n });\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left } = size.current;\n if (isPresent || !ref.current || !width || !height)\n return;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n document.head.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n top: ${top}px !important;\n left: ${left}px !important;\n }\n `);\n }\n return () => {\n document.head.removeChild(style);\n };\n }, [isPresent]);\n return (React.createElement(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size }, React.cloneElement(children, { ref })));\n}\n\nexport { PopChild };\n","import { useEffect } from 'react';\n\nfunction useUnmountEffect(callback) {\n return useEffect(() => () => callback(), []);\n}\n\nexport { useUnmountEffect };\n","import * as React from 'react'\nimport { chakra, ChakraProps } from '@chakra-ui/system'\nimport {\n scaleFadeConfig,\n slideFadeConfig,\n EASINGS,\n} from '@chakra-ui/transition'\nimport { HTMLMotionProps, motion } from 'framer-motion'\n\nexport type BannerMotion =\n | 'slideOutTop'\n | 'slideOutBottom'\n | 'fade'\n | 'scale'\n | 'none'\n\nexport interface BannerTransitionProps\n extends Omit<HTMLMotionProps<'div'>, 'color' | 'transition'>,\n ChakraProps {\n motionPreset: BannerMotion\n}\n\nconst defaultTransition = {\n enter: {\n duration: 0.2,\n ease: EASINGS.easeOut,\n },\n exit: {\n duration: 0.2,\n ease: EASINGS.easeIn,\n },\n}\n\nconst transitions = {\n slideOutTop: {\n ...slideFadeConfig,\n custom: {\n offsetY: '-100%',\n reverse: true,\n transition: defaultTransition,\n },\n initial: 'enter',\n },\n slideOutBottom: {\n ...slideFadeConfig,\n custom: {\n offsetY: '100%',\n reverse: true,\n transition: defaultTransition,\n },\n initial: 'enter',\n },\n fade: {\n ...slideFadeConfig,\n custom: {\n transition: defaultTransition,\n },\n initial: 'enter',\n },\n scale: {\n ...scaleFadeConfig,\n custom: { initialScale: 0.1, reverse: true, transition: defaultTransition },\n initial: 'enter',\n },\n none: {\n custom: {},\n },\n}\n\nconst Motion = chakra(motion.div)\n\nexport const BannerTransition = React.forwardRef(\n (props: BannerTransitionProps, ref: React.Ref<any>) => {\n const { motionPreset, ...rest } = props\n\n const preset = transitions[motionPreset]\n\n const motionProps = {\n ...preset,\n }\n\n return <Motion ref={ref} {...(motionProps as ChakraProps)} {...rest} />\n }\n)\n","import { cx } from \"@chakra-ui/shared-utils\"\nimport {\n AnimatePresence,\n HTMLMotionProps,\n motion,\n Variants as _Variants,\n} from \"framer-motion\"\nimport { forwardRef } from \"react\"\nimport {\n TRANSITION_DEFAULTS,\n Variants,\n withDelay,\n WithTransitionConfig,\n} from \"./transition-utils\"\n\ninterface ScaleFadeOptions {\n /**\n * The initial scale of the element\n * @default 0.95\n */\n initialScale?: number\n /**\n * If `true`, the element will transition back to exit state\n * @default true\n */\n reverse?: boolean\n}\n\nconst variants: Variants<ScaleFadeOptions> = {\n exit: ({ reverse, initialScale, transition, transitionEnd, delay }) => ({\n opacity: 0,\n ...(reverse\n ? { scale: initialScale, transitionEnd: transitionEnd?.exit }\n : { transitionEnd: { scale: initialScale, ...transitionEnd?.exit } }),\n transition:\n transition?.exit ?? withDelay.exit(TRANSITION_DEFAULTS.exit, delay),\n }),\n enter: ({ transitionEnd, transition, delay }) => ({\n opacity: 1,\n scale: 1,\n transition:\n transition?.enter ?? withDelay.enter(TRANSITION_DEFAULTS.enter, delay),\n transitionEnd: transitionEnd?.enter,\n }),\n}\n\nexport const scaleFadeConfig: HTMLMotionProps<\"div\"> = {\n initial: \"exit\",\n animate: \"enter\",\n exit: \"exit\",\n variants: variants as _Variants,\n}\n\nexport interface ScaleFadeProps\n extends ScaleFadeOptions,\n WithTransitionConfig<HTMLMotionProps<\"div\">> {}\n\nexport const ScaleFade = forwardRef<HTMLDivElement, ScaleFadeProps>(\n function ScaleFade(props, ref) {\n const {\n unmountOnExit,\n in: isOpen,\n reverse = true,\n initialScale = 0.95,\n className,\n transition,\n transitionEnd,\n delay,\n ...rest\n } = props\n\n const show = unmountOnExit ? isOpen && unmountOnExit : true\n const animate = isOpen || unmountOnExit ? \"enter\" : \"exit\"\n\n const custom = { initialScale, reverse, transition, transitionEnd, delay }\n\n return (\n <AnimatePresence custom={custom}>\n {show && (\n <motion.div\n ref={ref}\n className={cx(\"chakra-offset-slide\", className)}\n {...scaleFadeConfig}\n animate={animate}\n custom={custom}\n {...rest}\n />\n )}\n </AnimatePresence>\n )\n },\n)\n\nScaleFade.displayName = \"ScaleFade\"\n","import { cx } from \"@chakra-ui/shared-utils\"\nimport {\n AnimatePresence,\n HTMLMotionProps,\n motion,\n Variants as _Variants,\n} from \"framer-motion\"\nimport { forwardRef } from \"react\"\nimport {\n TRANSITION_DEFAULTS,\n Variants,\n withDelay,\n WithTransitionConfig,\n} from \"./transition-utils\"\n\ninterface SlideFadeOptions {\n /**\n * The offset on the horizontal or `x` axis\n * @default 0\n */\n offsetX?: string | number\n /**\n * The offset on the vertical or `y` axis\n * @default 8\n */\n offsetY?: string | number\n /**\n * If `true`, the element will be transitioned back to the offset when it leaves.\n * Otherwise, it'll only fade out\n * @default true\n */\n reverse?: boolean\n}\n\nconst variants: Variants<SlideFadeOptions> = {\n initial: ({ offsetX, offsetY, transition, transitionEnd, delay }) => ({\n opacity: 0,\n x: offsetX,\n y: offsetY,\n transition:\n transition?.exit ?? withDelay.exit(TRANSITION_DEFAULTS.exit, delay),\n transitionEnd: transitionEnd?.exit,\n }),\n enter: ({ transition, transitionEnd, delay }) => ({\n opacity: 1,\n x: 0,\n y: 0,\n transition:\n transition?.enter ?? withDelay.enter(TRANSITION_DEFAULTS.enter, delay),\n transitionEnd: transitionEnd?.enter,\n }),\n exit: ({ offsetY, offsetX, transition, transitionEnd, reverse, delay }) => {\n const offset = { x: offsetX, y: offsetY }\n return {\n opacity: 0,\n transition:\n transition?.exit ?? withDelay.exit(TRANSITION_DEFAULTS.exit, delay),\n ...(reverse\n ? { ...offset, transitionEnd: transitionEnd?.exit }\n : { transitionEnd: { ...offset, ...transitionEnd?.exit } }),\n }\n },\n}\n\nexport const slideFadeConfig: HTMLMotionProps<\"div\"> = {\n initial: \"initial\",\n animate: \"enter\",\n exit: \"exit\",\n variants: variants as _Variants,\n}\n\nexport interface SlideFadeProps\n extends SlideFadeOptions,\n WithTransitionConfig<HTMLMotionProps<\"div\">> {}\n\nexport const SlideFade = forwardRef<HTMLDivElement, SlideFadeProps>(\n function SlideFade(props, ref) {\n const {\n unmountOnExit,\n in: isOpen,\n reverse = true,\n className,\n offsetX = 0,\n offsetY = 8,\n transition,\n transitionEnd,\n delay,\n ...rest\n } = props\n\n const show = unmountOnExit ? isOpen && unmountOnExit : true\n const animate = isOpen || unmountOnExit ? \"enter\" : \"exit\"\n\n const custom = {\n offsetX,\n offsetY,\n reverse,\n transition,\n transitionEnd,\n delay,\n }\n\n return (\n <AnimatePresence custom={custom}>\n {show && (\n <motion.div\n ref={ref}\n className={cx(\"chakra-offset-slide\", className)}\n custom={custom}\n {...slideFadeConfig}\n animate={animate}\n {...rest}\n />\n )}\n </AnimatePresence>\n )\n },\n)\n\nSlideFade.displayName = \"SlideFade\"\n","import * as React from 'react'\nimport { createContext, PropGetter } from '@chakra-ui/react-utils'\nimport { useDisclosure, useId } from '@chakra-ui/react'\nimport { cx } from '@chakra-ui/utils'\n\nexport const [CollapseProvider, useCollapseContext] =\n createContext<UseCollapseReturn>({\n name: 'UseCollapseReturn',\n })\n\nexport interface UseCollapse {\n defaultIsOpen?: boolean\n isOpen?: boolean\n onOpen?: () => void\n onClose?: () => void\n isCollapsible?: boolean\n}\n\nexport const useCollapse = (props: UseCollapse = {}) => {\n const { isCollapsible = true, ...rest } = props\n\n const id = `collapse-${useId()}`\n\n const { isOpen, onToggle, onOpen, onClose } = useDisclosure(rest)\n\n const getToggleProps: PropGetter = React.useCallback(\n (props = {}) => {\n const { className, ...rest } = props\n if (isCollapsible) {\n return {\n className: cx('sui-collapse-toggle', className),\n onClick: () => onToggle(),\n 'aria-expanded': isOpen.toString(),\n 'aria-controls': id,\n ...rest,\n }\n }\n return {}\n },\n [isCollapsible, isOpen]\n )\n\n const getCollapseProps = React.useCallback(\n (props: any = {}) => {\n return {\n id,\n in: isOpen,\n ...props,\n }\n },\n [isOpen]\n )\n\n return {\n isCollapsible,\n isOpen,\n getToggleProps,\n getCollapseProps,\n onToggle,\n onOpen,\n onClose,\n }\n}\n\nexport interface UseCollapseReturn extends ReturnType<typeof useCollapse> {}\n","import * as React from 'react'\n\nimport {\n chakra,\n forwardRef,\n HTMLChakraProps,\n ThemingProps,\n omitThemingProps,\n SystemProps,\n SystemStyleObject,\n As,\n useColorModeValue,\n useMultiStyleConfig,\n createStylesContext,\n Icon,\n useId,\n useMergeRefs,\n} from '@chakra-ui/react'\n\nimport { callAllHandlers, cx, dataAttr } from '@chakra-ui/utils'\nimport { createContext } from '@chakra-ui/react-utils'\n\nimport { nextById, prevById, queryAll } from '@zag-js/dom-utils'\n\nconst [StylesProvider, useStyles] = createStylesContext('SuiStructuredList')\n\ninterface StructuredListContext {\n id: string\n containerRef: React.RefObject<HTMLUListElement>\n focusId: string | null\n setFocusId: React.Dispatch<React.SetStateAction<string | null>>\n}\n\nconst [StructuredListProvider, useStructuredListContext] =\n createContext<StructuredListContext>({\n name: 'StructuredListContext',\n errorMessage:\n 'useStructuredListContext: `context` is undefined. Seems you forgot to wrap the components in `<StructuredList />`',\n })\n\nfunction queryAllItems(root: HTMLElement | null) {\n return queryAll(root, `[role='button']:not([disabled])`)\n}\n\nconst useStructuredList = (props: StructuredListProps) => {\n const id = useId()\n\n const ref = React.useRef<HTMLUListElement>(null)\n\n const [focusId, setFocusId] = React.useState<string | null>(null)\n\n return {\n id: props.id ?? id,\n containerRef: ref,\n focusId,\n setFocusId,\n }\n}\n\ninterface StructuredListOptions {\n /**\n * An array of list items\n */\n items?: Array<StructuredListItemProps>\n}\n\nexport interface StructuredListProps\n extends StructuredListOptions,\n HTMLChakraProps<'ul'>,\n ThemingProps<'SuiStructuredList'> {}\n\n/**\n * React component to render lists of data\n */\nexport const StructuredList = forwardRef<StructuredListProps, 'ul'>(\n (props, ref) => {\n const { items, children, ...rest } = props\n\n const styles = useMultiStyleConfig('SuiStructuredList', rest)\n\n const listProps = omitThemingProps(rest)\n\n let content\n if (items) {\n content = items.map((item: any, i: number) => {\n return <StructuredListItem {...item} key={item.id || i} />\n })\n } else {\n content = children\n }\n\n const listStyles: SystemStyleObject = {\n py: 2,\n position: 'relative',\n ...styles.list,\n }\n\n const context = useStructuredList(props)\n\n return (\n <StructuredListProvider value={context}>\n <StylesProvider value={styles}>\n <chakra.ul\n ref={useMergeRefs(ref, context.containerRef)}\n __css={listStyles}\n {...listProps}\n className={cx('sui-list', props.className)}\n >\n {content}\n </chakra.ul>\n </StylesProvider>\n </StructuredListProvider>\n )\n }\n)\n\nStructuredList.displayName = 'StructuredList'\n\nexport interface StructuredListHeaderProps extends HTMLChakraProps<'li'> {\n /**\n * Action rendered next to the title\n */\n action?: React.ReactNode\n /**\n * The aria-level\n */\n level?: number\n}\n\nexport const StructuredListHeader: React.FC<StructuredListHeaderProps> = (\n props\n) => {\n const {\n children,\n onClick,\n action,\n role = 'heading',\n level = 1,\n ...rest\n } = props\n const styles = useStyles()\n\n const headerStyles = {\n display: 'flex',\n flexDirection: 'row',\n py: 2,\n px: 4,\n position: 'sticky',\n fontSize: 'md',\n fontWeight: 'semibold',\n color: useColorModeValue('gray.500', 'gray.400'),\n ...styles.header,\n }\n\n return (\n <chakra.li\n __css={headerStyles}\n onClick={onClick}\n {...rest}\n className={cx('sui-list__header', props.className)}\n >\n <chakra.span flex=\"1\" userSelect=\"none\" role={role} aria-level={level}>\n {children}\n </chakra.span>\n {action}\n </chakra.li>\n )\n}\n\nStructuredListHeader.displayName = 'StructuredListHeader'\n\nexport interface StructuredListItemProps extends HTMLChakraProps<'li'> {\n onClick?: (e: React.MouseEvent) => void\n href?: string | object\n}\n\n/**\n * Adding `onClick` or `href` props will wrap the content in a `StructuredListButton`\n */\nexport const StructuredListItem = forwardRef<StructuredListItemProps, 'li'>(\n (props, ref) => {\n const { onClick, href, as, children, ...rest } = props\n\n const styles = useStyles()\n\n const isButton = !!(onClick || href)\n\n const ContentWrapper = isButton ? StructuredListButton : React.Fragment\n const disablePadding = !!isButton\n\n const itemStyles: SystemStyleObject = {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n fontSize: 'md',\n ...styles.item,\n ...(disablePadding ? { py: 0, px: 0 } : {}),\n }\n\n const wrapperProps = isButton\n ? {\n onClick,\n href,\n as,\n }\n : {}\n\n const content = isButton ? (\n <ContentWrapper {...wrapperProps}>{children}</ContentWrapper>\n ) : (\n children\n )\n\n return (\n <chakra.li\n ref={ref}\n __css={itemStyles}\n {...rest}\n className={cx('sui-list__item', props.className)}\n >\n {content}\n </chakra.li>\n )\n }\n)\n\nStructuredListItem.displayName = 'StructuredListItem'\n\nconst useStructuredListButton = (props: StructuredListButtonProps) => {\n const {\n id: containerId,\n containerRef,\n focusId,\n setFocusId,\n } = useStructuredListContext()\n\n const id = `${containerId}-${useId()}`\n const buttonId = props.id ?? id\n\n const isFocused = focusId === buttonId\n\n const buttonProps = {\n id: buttonId,\n ['data-focus']: dataAttr(isFocused),\n tabIndex: isFocused ? 0 : -1,\n onFocus: callAllHandlers(props.onFocus, () => {\n setFocusId(buttonId)\n }),\n onKeyDown: callAllHandlers(\n props.onKeyDown,\n React.useCallback(\n (e: React.KeyboardEvent) => {\n const items = queryAllItems(containerRef.current)\n\n const keyMap: Record<string, React.KeyboardEventHandler> = {\n ArrowUp: () => {\n prevById(items, buttonId)?.focus()\n },\n ArrowDown: () => {\n nextById(items, buttonId)?.focus()\n },\n Home: () => {\n items[0]?.focus()\n },\n End: () => {\n items[items.length - 1]?.focus()\n },\n }\n\n if (keyMap[e.key]) {\n e.preventDefault()\n keyMap[e.key](e)\n }\n },\n [buttonId]\n )\n ),\n }\n\n return {\n buttonProps,\n }\n}\n\nexport interface StructuredListButtonProps extends HTMLChakraProps<'div'> {\n onClick?: (e: React.MouseEvent) => void\n as?: As\n}\n\n/**\n * Behaves like a button by default.\n * Use the 'as' prop to render a link.\n *\n * <StructuredListItemButton as=\"a\" href=\"/page\" />\n *\n * or\n *\n * <StructuredListItemButton as={Link} href={{path: '/page}} />\n */\nexport const StructuredListButton = forwardRef<\n StructuredListButtonProps,\n 'div'\n>((props, ref) => {\n const { children, ...rest } = props\n\n const { buttonProps } = useStructuredListButton(props)\n\n const styles = useStyles()\n\n const buttonStyles: SystemStyleObject = {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n flex: 1,\n cursor: 'pointer',\n userSelect: 'none',\n ...styles.button,\n }\n\n return (\n <chakra.div\n ref={ref}\n __css={buttonStyles}\n role=\"button\"\n {...rest}\n {...buttonProps}\n className={cx('sui-list__item-button', props.className)}\n >\n {children}\n </chakra.div>\n )\n})\n\nStructuredListButton.displayName = 'StructuredListButton'\n\nexport interface StructuredListIconProps extends HTMLChakraProps<'div'> {\n /**\n * The icon size\n * @default 5\n */\n size?: SystemProps['boxSize']\n /**\n * The icon spacing, ltr supported\n */\n spacing?: SystemProps['margin']\n}\n\nexport const StructuredListIcon: React.FC<StructuredListIconProps> = (\n props\n) => {\n const { children, spacing, size = 5, as, ...rest } = props\n const styles = useStyles()\n\n const iconStyles: SystemStyleObject = {\n ...styles.icon,\n display: 'flex',\n flexShrink: 0,\n me: spacing,\n }\n\n let _icon = children\n if (!_icon && as) {\n _icon = <Icon as={as} role=\"presentation\" boxSize={size} />\n } else if (React.isValidElement(_icon) && _icon.type === Icon) {\n _icon = React.cloneElement<any>(_icon, {\n boxSize: size,\n })\n }\n\n return (\n <chakra.div\n __css={iconStyles}\n {...rest}\n className={cx('sui-list__item-icon', props.className)}\n >\n {_icon}\n </chakra.div>\n )\n}\n\nStructuredListIcon.displayName = 'StructuredListItemIcon'\n\nexport interface StructuredListCellProps extends HTMLChakraProps<'div'> {}\n\nexport const StructuredListCell: React.FC<StructuredListCellProps> = (\n props\n) => {\n const { children, ...rest } = props\n const styles = useStyles()\n\n return (\n <chakra.div\n __css={styles.cell}\n {...rest}\n className={cx('sui-list__cell', props.className)}\n >\n {children}\n </chakra.div>\n )\n}\n\nStructuredListCell.displayName = 'StructuredListCell'\n","// src/nodelist.ts\nfunction queryAll(root, selector) {\n return Array.from(root?.querySelectorAll(selector) ?? []);\n}\nfunction query(root, selector) {\n return root?.querySelector(selector);\n}\nfunction itemById(v, id) {\n return v.find((node) => node.id === id);\n}\nfunction indexOfId(v, id) {\n const item = itemById(v, id);\n return item ? v.indexOf(item) : -1;\n}\nfunction nextById(v, id, loop = true) {\n let idx = indexOfId(v, id);\n idx = loop ? (idx + 1) % v.length : Math.min(idx + 1, v.length - 1);\n return v[idx];\n}\nfunction prevById(v, id, loop = true) {\n let idx = indexOfId(v, id);\n if (idx === -1)\n return loop ? v[v.length - 1] : null;\n idx = loop ? (idx - 1 + v.length) % v.length : Math.max(0, idx - 1);\n return v[idx];\n}\nvar getValueText = (item) => item.dataset.valuetext ?? item.textContent ?? \"\";\nvar match = (valueText, query2) => valueText.toLowerCase().startsWith(query2.toLowerCase());\nvar wrap = (v, idx) => {\n return v.map((_, index) => v[(Math.max(idx, 0) + index) % v.length]);\n};\nfunction findByText(v, text, currentId) {\n const index = currentId ? indexOfId(v, currentId) : -1;\n let items = currentId ? wrap(v, index) : v;\n const isSingleKey = text.length === 1;\n if (isSingleKey) {\n items = items.filter((item) => item.id !== currentId);\n }\n return items.find((item) => match(getValueText(item), text));\n}\nfunction sortByTreeOrder(v) {\n return v.sort((a, b) => a.compareDocumentPosition(b) & 2 ? 1 : -1);\n}\n\nexport {\n queryAll,\n query,\n itemById,\n indexOfId,\n nextById,\n prevById,\n findByText,\n sortByTreeOrder\n};\n","import { Link as ChakraLink, LinkProps, forwardRef } from '@chakra-ui/react'\nimport { useLink } from '../provider'\n\nexport type { LinkProps }\n\n/**\n * Chakra UI `Link` component wrapped in a router specific link component.\n * Falls back to a plain `Link` if no Saas UI context is available or no `linkComponent` is configured\n * The router link component can be configured in `SaasProvider`.\n * @see https://saas-ui.dev/docs/core/getting-started\n */\nexport const Link = forwardRef<LinkProps, 'a'>((props, ref) => {\n const LinkComponent = useLink()\n\n const { href, ...rest } = props\n\n return <ChakraLink as={LinkComponent} ref={ref} href={href} {...rest} />\n})\n\nLink.displayName = 'Link'\n","import React, { useState } from 'react'\nimport {\n chakra,\n Spinner,\n ThemingProps,\n ThemeTypings,\n SystemStyleObject,\n createStylesContext,\n useMultiStyleConfig,\n HTMLChakraProps,\n omitThemingProps,\n SystemProps,\n fadeConfig,\n SpinnerProps,\n} from '@chakra-ui/react'\nimport { cx } from '@chakra-ui/utils'\n\nimport { AnimatePresence, motion } from 'framer-motion'\n\ntype Variants = 'fill' | 'overlay' | 'fullscreen'\n\nconst [StylesProvider, useStyles] = createStylesContext('SuiLoadingOverlay')\n\nexport const useLoadingOverlayStyles = useStyles\n\nexport interface LoadingOverlayProps\n extends HTMLChakraProps<'div'>,\n ThemingProps<'SuiLoadingOverlay'> {\n /**\n * Show or hide the LoadingOverlay.\n * @default true\n */\n isLoading?: boolean\n\n /**\n * The transition that should be used for the overlay\n * @default \"fade\"\n */\n motionPreset?: 'none' | 'fade'\n /**\n * Spacing between children\n */\n spacing?: SystemProps['margin']\n /**\n * @type \"fill\" | \"overlay\" | \"fullscreen\"\n * @default \"fill\"\n */\n variant?: 'SuiLoadingOverlay' extends keyof ThemeTypings['components']\n ? /* @ts-ignore */\n ThemeTypings['components']['SuiLoadingOverlay']['variants']\n : Variants\n}\n\nconst Motion = chakra(motion.div)\n\nexport const LoadingOverlay: React.FC<LoadingOverlayProps> = (props) => {\n const styles = useMultiStyleConfig('SuiLoadingOverlay', props)\n\n const {\n children,\n isLoading = true,\n spacing = 2,\n motionPreset,\n ...rest\n } = omitThemingProps(props)\n\n const overlayStyles: SystemStyleObject = {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n '& > *:not(style) ~ *:not(style)': { marginTop: spacing },\n ...styles.overlay,\n }\n\n const [animateInitial] = useState(!isLoading && motionPreset !== 'none')\n\n const motionProps: any = motionPreset === 'none' ? {} : fadeConfig\n\n return (\n <StylesProvider value={styles}>\n <AnimatePresence initial={animateInitial}>\n {isLoading && (\n <Motion\n {...motionProps}\n {...rest}\n __css={overlayStyles}\n className={cx('chakra-loading-overlay', props.className)}\n >\n {children}\n </Motion>\n )}\n </AnimatePresence>\n </StylesProvider>\n )\n}\n\nLoadingOverlay.displayName = 'LoadingOverlay'\n\nexport const LoadingSpinner = Spinner\n\nexport type LoadingSpinnerProps = SpinnerProps\n\nexport interface LoadingTextProps extends HTMLChakraProps<'p'> {}\n\nexport const LoadingText: React.FC<LoadingTextProps> = (props) => {\n const styles = useStyles()\n return <chakra.p {...props} __css={styles.text}></chakra.p>\n}\n","import * as React from 'react'\nimport {\n Menu,\n MenuProps,\n MenuButton,\n MenuList,\n MenuListProps,\n IconButton,\n ThemeTypings,\n} from '@chakra-ui/react'\nimport { MoreIcon } from './icons'\n\nexport interface OverflowMenuProps extends Omit<MenuProps, 'size'> {\n /**\n * The button (aria) label.\n */\n label?: string\n /**\n * The MenuButton variant.\n */\n variant?: 'Button' extends keyof ThemeTypings['components']\n ? /* @ts-ignore */\n ThemeTypings['components']['Button']['variants']\n : string\n /**\n * The MenuButton size\n */\n size?: 'IconButton' extends keyof ThemeTypings['components']\n ? /* @ts-ignore */\n ThemeTypings['components']['IconButton']['sizes']\n : string\n /**\n * Props passed to the MenuList.\n */\n menuListProps?: MenuListProps\n /**\n * Render a custom icon.\n */\n icon?: React.ReactElement\n\n children: React.ReactNode\n}\n\nexport const OverflowMenu: React.FC<OverflowMenuProps> = (props) => {\n const {\n variant = 'ghost',\n size,\n label = 'More',\n icon = <MoreIcon />,\n menuListProps,\n children,\n ...rest\n } = props\n return (\n <Menu {...rest}>\n <MenuButton\n as={IconButton}\n icon={icon}\n aria-label={label}\n variant={variant}\n size={size}\n />\n <MenuList {...menuListProps}>{children}</MenuList>\n </Menu>\n )\n}\n\nOverflowMenu.displayName = 'OverflowMenu'\n","import * as React from 'react'\nimport { Icon, IconProps } from '@chakra-ui/react'\n\nexport const MoreIcon = (props: IconProps) => {\n return (\n <Icon viewBox=\"0 0 24 24\" strokeWidth=\"2\" stroke=\"currentColor\" {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"1\"></circle>\n <circle cx=\"12\" cy=\"5\" r=\"1\"></circle>\n <circle cx=\"12\" cy=\"19\" r=\"1\"></circle>\n </Icon>\n )\n}\n","import * as React from 'react'\nimport { useCallback, useRef, useState } from 'react'\nimport {\n chakra,\n Menu,\n MenuProps,\n MenuList,\n MenuListProps,\n MenuItem,\n HTMLChakraProps,\n useMenuContext,\n useEventListener,\n useOutsideClick,\n} from '@chakra-ui/react'\n\nimport { createContext } from '@chakra-ui/react-utils'\nimport { AnyPointerEvent, callAllHandlers, runIfFn } from '@chakra-ui/utils'\n\n// @todo migrate this to Ark-ui ContextMenu\nimport { useLongPress } from '@react-aria/interactions'\n\nimport { getEventPoint } from '@zag-js/dom-event'\n\ntype Position = [number, number]\ntype Anchor = { x: number; y: number }\n\nexport interface UseContextMenuReturn {\n isOpen: boolean\n anchor: Anchor\n triggerRef: React.RefObject<HTMLSpanElement>\n menuRef: React.RefObject<HTMLDivElement>\n onClose: () => void\n onOpen: (event: AnyPointerEvent) => void\n}\n\nexport const [ContextMenuProvider, useContextMenuContext] =\n createContext<UseContextMenuReturn>({\n name: 'UseContextMenuContext',\n strict: false,\n })\n\nexport interface UseContextMenuProps extends ContextMenuProps {\n onClose?: () => void\n}\n\nexport const useContextMenu = (props: UseContextMenuProps) => {\n const { closeOnBlur = true } = props\n const [isOpen, setIsOpen] = useState(false)\n const [anchor, setAnchor] = useState<Anchor>({ x: 0, y: 0 })\n const triggerRef = useRef<HTMLSpanElement>(null)\n const menuRef = useRef<HTMLDivElement>(null)\n\n // useOutsideClick of menu doesn't catch contextmenu\n useEventListener('contextmenu', (e) => {\n if (\n !triggerRef.current?.contains(e.target as any) &&\n e.target !== triggerRef.current\n ) {\n setIsOpen(false)\n } else {\n e.preventDefault()\n e.stopPropagation()\n }\n })\n\n useOutsideClick({\n enabled: isOpen && closeOnBlur,\n ref: menuRef,\n handler: (event) => {\n if (\n !triggerRef.current?.contains(event.target as HTMLElement) &&\n menuRef.current?.parentElement !== event.target\n ) {\n onClose()\n }\n },\n })\n\n const onOpen = useCallback((event: AnyPointerEvent) => {\n const point = getEventPoint(event)\n setAnchor(point)\n setIsOpen(true)\n }, [])\n\n const onClose = useCallback(() => {\n props.onClose?.()\n setIsOpen(false)\n }, [props.onClose, setIsOpen])\n\n return {\n isOpen,\n anchor,\n triggerRef,\n menuRef,\n onClose,\n onOpen,\n }\n}\n\nexport interface ContextMenuProps extends MenuProps {}\nexport const ContextMenu: React.FC<ContextMenuProps> = (props) => {\n const { children, ...rest } = props\n const ctx = useContextMenu(props)\n\n const context = React.useMemo(() => ctx, [ctx])\n\n const { isOpen, onClose } = context\n\n return (\n <Menu\n gutter={0}\n {...rest}\n isOpen={isOpen}\n onClose={onClose}\n closeOnBlur={false}\n >\n {(fnProps) => (\n <ContextMenuProvider value={context}>\n {runIfFn(children, fnProps)}\n </ContextMenuProvider>\n )}\n </Menu>\n )\n}\n\nContextMenu.displayName = 'ContextMenu'\n\nconst generateClientRect = (x = 0, y = 0) => {\n return () => {\n return {\n width: 0,\n height: 0,\n top: y,\n left: x,\n right: x,\n bottom: y,\n }\n }\n}\n\nconst useContextMenuTrigger = (props: ContextMenuTriggerProps) => {\n const { triggerRef, onOpen, onClose, anchor } = useContextMenuContext()\n\n const menu = useMenuContext()\n\n const { popper, openAndFocusFirstItem } = menu\n\n const { longPressProps } = useLongPress({\n accessibilityDescription: 'Long press to open context menu',\n onLongPressStart: (e) => {\n if (e.pointerType === 'mouse') {\n onClose()\n }\n },\n onLongPress: (e) => {\n if (e.pointerType === 'mouse') return\n\n if (e.type === 'longpress') {\n onOpen(e as unknown as AnyPointerEvent)\n openAndFocusFirstItem()\n }\n },\n })\n\n const anchorRef = React.useRef({\n getBoundingClientRect: generateClientRect(anchor.x, anchor.y),\n })\n\n React.useEffect(() => {\n popper.referenceRef(anchorRef.current)\n }, [])\n\n React.useEffect(() => {\n anchorRef.current.getBoundingClientRect = generateClientRect(\n anchor.x,\n anchor.y\n )\n menu.popper.update()\n }, [anchor])\n\n return {\n triggerProps: {\n ...longPressProps,\n onContextMenu: callAllHandlers((event: AnyPointerEvent) => {\n event.preventDefault()\n onOpen(event)\n openAndFocusFirstItem()\n }, props.onContextMenu as any),\n ref: triggerRef,\n },\n }\n}\n\nexport interface ContextMenuTriggerProps extends HTMLChakraProps<'span'> {}\n\nexport const ContextMenuTrigger: React.FC<ContextMenuTriggerProps> = (\n props\n) => {\n const { children, ...rest } = props\n\n const { triggerProps } = useContextMenuTrigger(props)\n\n return (\n <chakra.span\n {...rest}\n sx={{ WebkitTouchCallout: 'none' }}\n {...triggerProps}\n >\n {children}\n </chakra.span>\n )\n}\n\nContextMenuTrigger.displayName = 'ContextMenuTrigger'\n\nexport interface ContextMenuListProps extends MenuListProps {}\n\nexport const ContextMenuList: React.FC<ContextMenuListProps> = (props) => {\n const { children, ...rest } = props\n const { menuRef } = useContextMenuContext()\n\n return (\n <MenuList ref={menuRef} {...rest}>\n {children}\n </MenuList>\n )\n}\n\nContextMenuList.displayName = 'ContextMenuList'\n\nexport const ContextMenuItem = MenuItem\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport React from 'react';\n\n// During SSR, React emits a warning when calling useLayoutEffect.\n// Since neither useLayoutEffect nor useEffect run on the server,\n// we can suppress this by replace it with a noop on the server.\nexport const useLayoutEffect = typeof document !== 'undefined'\n ? React.useLayoutEffect\n : () => {};\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useRef} from 'react';\nimport {useLayoutEffect} from './useLayoutEffect';\n\nexport function useEffectEvent<T extends Function>(fn: T): T {\n const ref = useRef<T | null>(null);\n useLayoutEffect(() => {\n ref.current = fn;\n }, [fn]);\n // @ts-ignore\n return useCallback<T>((...args) => {\n const f = ref.current!;\n return f(...args);\n }, []);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef, useState} from 'react';\nimport {useLayoutEffect} from './useLayoutEffect';\nimport {useSSRSafeId} from '@react-aria/ssr';\nimport {useValueEffect} from './';\n\n// copied from SSRProvider.tsx to reduce exports, if needed again, consider sharing\nlet canUseDOM = Boolean(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\nlet idsUpdaterMap: Map<string, (v: string) => void> = new Map();\n\n/**\n * If a default is not provided, generate an id.\n * @param defaultId - Default component id.\n */\nexport function useId(defaultId?: string): string {\n let [value, setValue] = useState(defaultId);\n let nextId = useRef(null);\n\n let res = useSSRSafeId(value);\n\n let updateValue = useCallback((val) => {\n nextId.current = val;\n }, []);\n\n if (canUseDOM) {\n idsUpdaterMap.set(res, updateValue);\n }\n\n useLayoutEffect(() => {\n let r = res;\n return () => {\n idsUpdaterMap.delete(r);\n };\n }, [res]);\n\n // This cannot cause an infinite loop because the ref is updated first.\n // eslint-disable-next-line\n useEffect(() => {\n let newId = nextId.current;\n if (newId) {\n nextId.current = null;\n setValue(newId);\n }\n });\n\n return res;\n}\n\n/**\n * Merges two ids.\n * Different ids will trigger a side-effect and re-render components hooked up with `useId`.\n */\nexport function mergeIds(idA: string, idB: string): string {\n if (idA === idB) {\n return idA;\n }\n\n let setIdA = idsUpdaterMap.get(idA);\n if (setIdA) {\n setIdA(idB);\n return idB;\n }\n\n let setIdB = idsUpdaterMap.get(idB);\n if (setIdB) {\n setIdB(idA);\n return idA;\n }\n\n return idB;\n}\n\n/**\n * Used to generate an id, and after render, check if that id is rendered so we know\n * if we can use it in places such as labelledby.\n * @param depArray - When to recalculate if the id is in the DOM.\n */\nexport function useSlotId(depArray: ReadonlyArray<any> = []): string {\n let id = useId();\n let [resolvedId, setResolvedId] = useValueEffect(id);\n let updateId = useCallback(() => {\n setResolvedId(function *() {\n yield id;\n\n yield document.getElementById(id) ? id : undefined;\n });\n }, [id, setResolvedId]);\n\n useLayoutEffect(updateId, [id, updateId, ...depArray]);\n\n return resolvedId;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Calls all functions in the order they were chained with the same arguments.\n */\nexport function chain(...callbacks: any[]): (...args: any[]) => void {\n return (...args: any[]) => {\n for (let callback of callbacks) {\n if (typeof callback === 'function') {\n callback(...args);\n }\n }\n };\n}\n","export const getOwnerDocument = (el: Element | null | undefined): Document => {\n return el?.ownerDocument ?? document;\n};\n\nexport const getOwnerWindow = (\n el: (Window & typeof global) | Element | null | undefined\n): Window & typeof global => {\n if (el && 'window' in el && el.window === el) {\n return el;\n }\n\n const doc = getOwnerDocument(el as Element | null | undefined);\n return doc.defaultView || window;\n};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n// eslint-disable-next-line no-undef, @typescript-eslint/no-unused-vars\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated - different ids\n * will trigger a side-effect and re-render components hooked up with `useId`.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n // Start with a base clone of the first argument. This is a lot faster than starting\n // with an empty object and adding properties as we go.\n let result: Props = {...args[0]};\n for (let i = 1; i < args.length; i++) {\n let props = args[i];\n for (let key in props) {\n let a = result[key];\n let b = props[key];\n\n // Chain events\n if (\n typeof a === 'function' &&\n typeof b === 'function' &&\n // This is a lot faster than a regex.\n key[0] === 'o' &&\n key[1] === 'n' &&\n key.charCodeAt(2) >= /* 'A' */ 65 &&\n key.charCodeAt(2) <= /* 'Z' */ 90\n ) {\n result[key] = chain(a, b);\n\n // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n } else if (\n (key === 'className' || key === 'UNSAFE_className') &&\n typeof a === 'string' &&\n typeof b === 'string'\n ) {\n result[key] = clsx(a, b);\n } else if (key === 'id' && a && b) {\n result.id = mergeIds(a, b);\n // Override others\n } else {\n result[key] = b !== undefined ? b : a;\n }\n }\n }\n\n return result as UnionToIntersection<TupleTypes<T>>;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\n\n// This is a polyfill for element.focus({preventScroll: true});\n// Currently necessary for Safari and old Edge:\n// https://caniuse.com/#feat=mdn-api_htmlelement_focus_preventscroll_option\n// See https://bugs.webkit.org/show_bug.cgi?id=178583\n//\n\n// Original licensing for the following methods can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/calvellido/focus-options-polyfill\n\ninterface ScrollableElement {\n element: HTMLElement,\n scrollTop: number,\n scrollLeft: number\n}\n\nexport function focusWithoutScrolling(element: FocusableElement) {\n if (supportsPreventScroll()) {\n element.focus({preventScroll: true});\n } else {\n let scrollableElements = getScrollableElements(element);\n element.focus();\n restoreScrollPosition(scrollableElements);\n }\n}\n\nlet supportsPreventScrollCached: boolean = null;\nfunction supportsPreventScroll() {\n if (supportsPreventScrollCached == null) {\n supportsPreventScrollCached = false;\n try {\n var focusElem = document.createElement('div');\n focusElem.focus({\n get preventScroll() {\n supportsPreventScrollCached = true;\n return true;\n }\n });\n } catch (e) {\n // Ignore\n }\n }\n\n return supportsPreventScrollCached;\n}\n\nfunction getScrollableElements(element: FocusableElement): ScrollableElement[] {\n var parent = element.parentNode;\n var scrollableElements: ScrollableElement[] = [];\n var rootScrollingElement = document.scrollingElement || document.documentElement;\n\n while (parent instanceof HTMLElement && parent !== rootScrollingElement) {\n if (\n parent.offsetHeight < parent.scrollHeight ||\n parent.offsetWidth < parent.scrollWidth\n ) {\n scrollableElements.push({\n element: parent,\n scrollTop: parent.scrollTop,\n scrollLeft: parent.scrollLeft\n });\n }\n parent = parent.parentNode;\n }\n\n if (rootScrollingElement instanceof HTMLElement) {\n scrollableElements.push({\n element: rootScrollingElement,\n scrollTop: rootScrollingElement.scrollTop,\n scrollLeft: rootScrollingElement.scrollLeft\n });\n }\n\n return scrollableElements;\n}\n\nfunction restoreScrollPosition(scrollableElements: ScrollableElement[]) {\n for (let {element, scrollTop, scrollLeft} of scrollableElements) {\n element.scrollTop = scrollTop;\n element.scrollLeft = scrollLeft;\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nfunction testUserAgent(re: RegExp) {\n if (typeof window === 'undefined' || window.navigator == null) {\n return false;\n }\n return (\n window.navigator['userAgentData']?.brands.some((brand: {brand: string, version: string}) => re.test(brand.brand))\n ) ||\n re.test(window.navigator.userAgent);\n}\n\nfunction testPlatform(re: RegExp) {\n return typeof window !== 'undefined' && window.navigator != null\n ? re.test(window.navigator['userAgentData']?.platform || window.navigator.platform)\n : false;\n}\n\nexport function isMac() {\n return testPlatform(/^Mac/i);\n}\n\nexport function isIPhone() {\n return testPlatform(/^iPhone/i);\n}\n\nexport function isIPad() {\n return testPlatform(/^iPad/i) ||\n // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n (isMac() && navigator.maxTouchPoints > 1);\n}\n\nexport function isIOS() {\n return isIPhone() || isIPad();\n}\n\nexport function isAppleDevice() {\n return isMac() || isIOS();\n}\n\nexport function isWebKit() {\n return testUserAgent(/AppleWebKit/i) && !isChrome();\n}\n\nexport function isChrome() {\n return testUserAgent(/Chrome/i);\n}\n\nexport function isAndroid() {\n return testUserAgent(/Android/i);\n}\n\nexport function isFirefox() {\n return testUserAgent(/Firefox/i);\n}\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {focusWithoutScrolling, isMac, isWebKit} from './index';\nimport {isFirefox, isIPad} from './platform';\nimport {LinkDOMProps} from '@react-types/shared';\nimport React, {createContext, ReactNode, useContext, useMemo} from 'react';\n\ninterface Router {\n isNative: boolean,\n open: (target: Element, modifiers: Modifiers) => void\n}\n\nconst RouterContext = createContext<Router>({\n isNative: true,\n open: openSyntheticLink\n});\n\ninterface RouterProviderProps {\n navigate: (path: string) => void,\n children: ReactNode\n}\n\n/**\n * A RouterProvider accepts a `navigate` function from a framework or client side router,\n * and provides it to all nested React Aria links to enable client side navigation.\n */\nexport function RouterProvider(props: RouterProviderProps) {\n let {children, navigate} = props;\n\n let ctx = useMemo(() => ({\n isNative: false,\n open: (target: Element, modifiers: Modifiers) => {\n getSyntheticLink(target, link => {\n if (shouldClientNavigate(link, modifiers)) {\n navigate(link.pathname + link.search + link.hash);\n } else {\n openLink(link, modifiers);\n }\n });\n }\n }), [navigate]);\n\n return (\n <RouterContext.Provider value={ctx}>\n {children}\n </RouterContext.Provider>\n );\n}\n\nexport function useRouter(): Router {\n return useContext(RouterContext);\n}\n\ninterface Modifiers {\n metaKey?: boolean,\n ctrlKey?: boolean,\n altKey?: boolean,\n shiftKey?: boolean\n}\n\nexport function shouldClientNavigate(link: HTMLAnchorElement, modifiers: Modifiers) {\n // Use getAttribute here instead of link.target. Firefox will default link.target to \"_parent\" when inside an iframe.\n let target = link.getAttribute('target');\n return (\n (!target || target === '_self') &&\n link.origin === location.origin &&\n !link.hasAttribute('download') &&\n !modifiers.metaKey && // open in new tab (mac)\n !modifiers.ctrlKey && // open in new tab (windows)\n !modifiers.altKey && // download\n !modifiers.shiftKey\n );\n}\n\nexport function openLink(target: HTMLAnchorElement, modifiers: Modifiers, setOpening = true) {\n let {metaKey, ctrlKey, altKey, shiftKey} = modifiers;\n\n // Firefox does not recognize keyboard events as a user action by default, and the popup blocker\n // will prevent links with target=\"_blank\" from opening. However, it does allow the event if the\n // Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.\n if (isFirefox() && window.event?.type?.startsWith('key') && target.target === '_blank') {\n if (isMac()) {\n metaKey = true;\n } else {\n ctrlKey = true;\n }\n }\n\n // WebKit does not support firing click events with modifier keys, but does support keyboard events.\n // https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184\n let event = isWebKit() && isMac() && !isIPad() && process.env.NODE_ENV !== 'test'\n // @ts-ignore - keyIdentifier is a non-standard property, but it's what webkit expects\n ? new KeyboardEvent('keydown', {keyIdentifier: 'Enter', metaKey, ctrlKey, altKey, shiftKey})\n : new MouseEvent('click', {metaKey, ctrlKey, altKey, shiftKey, bubbles: true, cancelable: true});\n (openLink as any).isOpening = setOpening;\n focusWithoutScrolling(target);\n target.dispatchEvent(event);\n (openLink as any).isOpening = false;\n}\n// https://github.com/parcel-bundler/parcel/issues/8724\n(openLink as any).isOpening = false;\n\nfunction getSyntheticLink(target: Element, open: (link: HTMLAnchorElement) => void) {\n if (target instanceof HTMLAnchorElement) {\n open(target);\n } else if (target.hasAttribute('data-href')) {\n let link = document.createElement('a');\n link.href = target.getAttribute('data-href');\n if (target.hasAttribute('data-target')) {\n link.target = target.getAttribute('data-target');\n }\n if (target.hasAttribute('data-rel')) {\n link.rel = target.getAttribute('data-rel');\n }\n if (target.hasAttribute('data-download')) {\n link.download = target.getAttribute('data-download');\n }\n if (target.hasAttribute('data-ping')) {\n link.ping = target.getAttribute('data-ping');\n }\n if (target.hasAttribute('data-referrer-policy')) {\n link.referrerPolicy = target.getAttribute('data-referrer-policy');\n }\n target.appendChild(link);\n open(link);\n target.removeChild(link);\n }\n}\n\nfunction openSyntheticLink(target: Element, modifiers: Modifiers) {\n getSyntheticLink(target, link => openLink(link, modifiers));\n}\n\nexport function getSyntheticLinkProps(props: LinkDOMProps) {\n return {\n 'data-href': props.href,\n 'data-target': props.target,\n 'data-rel': props.rel,\n 'data-download': props.download,\n 'data-ping': props.ping,\n 'data-referrer-policy': props.referrerPolicy\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// We store a global list of elements that are currently transitioning,\n// mapped to a set of CSS properties that are transitioning for that element.\n// This is necessary rather than a simple count of transitions because of browser\n// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather\n// than one or the other. So we need to track what's actually transitioning so that\n// we can ignore these duplicate events.\nlet transitionsByElement = new Map<EventTarget, Set<string>>();\n\n// A list of callbacks to call once there are no transitioning elements.\nlet transitionCallbacks = new Set<() => void>();\n\nfunction setupGlobalEvents() {\n if (typeof window === 'undefined') {\n return;\n }\n\n let onTransitionStart = (e: TransitionEvent) => {\n // Add the transitioning property to the list for this element.\n let transitions = transitionsByElement.get(e.target);\n if (!transitions) {\n transitions = new Set();\n transitionsByElement.set(e.target, transitions);\n\n // The transitioncancel event must be registered on the element itself, rather than as a global\n // event. This enables us to handle when the node is deleted from the document while it is transitioning.\n // In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.\n e.target.addEventListener('transitioncancel', onTransitionEnd);\n }\n\n transitions.add(e.propertyName);\n };\n\n let onTransitionEnd = (e: TransitionEvent) => {\n // Remove property from list of transitioning properties.\n let properties = transitionsByElement.get(e.target);\n if (!properties) {\n return;\n }\n\n properties.delete(e.propertyName);\n\n // If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.\n if (properties.size === 0) {\n e.target.removeEventListener('transitioncancel', onTransitionEnd);\n transitionsByElement.delete(e.target);\n }\n\n // If no transitioning elements, call all of the queued callbacks.\n if (transitionsByElement.size === 0) {\n for (let cb of transitionCallbacks) {\n cb();\n }\n\n transitionCallbacks.clear();\n }\n };\n\n document.body.addEventListener('transitionrun', onTransitionStart);\n document.body.addEventListener('transitionend', onTransitionEnd);\n}\n\nif (typeof document !== 'undefined') {\n if (document.readyState !== 'loading') {\n setupGlobalEvents();\n } else {\n document.addEventListener('DOMContentLoaded', setupGlobalEvents);\n }\n}\n\nexport function runAfterTransition(fn: () => void) {\n // Wait one frame to see if an animation starts, e.g. a transition on mount.\n requestAnimationFrame(() => {\n // If no transitions are running, call the function immediately.\n // Otherwise, add it to a list of callbacks to run at the end of the animation.\n if (transitionsByElement.size === 0) {\n fn();\n } else {\n transitionCallbacks.add(fn);\n }\n });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef} from 'react';\n\ninterface GlobalListeners {\n addGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void,\n addGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void,\n removeGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void,\n removeGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void,\n removeAllGlobalListeners(): void\n}\n\nexport function useGlobalListeners(): GlobalListeners {\n let globalListeners = useRef(new Map());\n let addGlobalListener = useCallback((eventTarget, type, listener, options) => {\n // Make sure we remove the listener after it is called with the `once` option.\n let fn = options?.once ? (...args) => {\n globalListeners.current.delete(listener);\n listener(...args);\n } : listener;\n globalListeners.current.set(listener, {type, eventTarget, fn, options});\n eventTarget.addEventListener(type, listener, options);\n }, []);\n let removeGlobalListener = useCallback((eventTarget, type, listener, options) => {\n let fn = globalListeners.current.get(listener)?.fn || listener;\n eventTarget.removeEventListener(type, fn, options);\n globalListeners.current.delete(listener);\n }, []);\n let removeAllGlobalListeners = useCallback(() => {\n globalListeners.current.forEach((value, key) => {\n removeGlobalListener(value.eventTarget, value.type, key, value.options);\n });\n }, [removeGlobalListener]);\n\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return removeAllGlobalListeners;\n }, [removeAllGlobalListeners]);\n\n return {addGlobalListener, removeGlobalListener, removeAllGlobalListeners};\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {MutableRefObject, RefObject} from 'react';\nimport {useLayoutEffect} from './';\n\ninterface ContextValue<T> {\n ref?: MutableRefObject<T>\n}\n\n// Syncs ref from context with ref passed to hook\nexport function useSyncRef<T>(context?: ContextValue<T> | null, ref?: RefObject<T>) {\n useLayoutEffect(() => {\n if (context && context.ref && ref) {\n context.ref.current = ref.current;\n return () => {\n context.ref.current = null;\n };\n }\n });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useEffect, useState} from 'react';\nimport {useIsSSR} from '@react-aria/ssr';\n\ninterface ViewportSize {\n width: number,\n height: number\n}\n\n// @ts-ignore\nlet visualViewport = typeof document !== 'undefined' && window.visualViewport;\n\nexport function useViewportSize(): ViewportSize {\n let isSSR = useIsSSR();\n let [size, setSize] = useState(() => isSSR ? {width: 0, height: 0} : getViewportSize());\n\n useEffect(() => {\n // Use visualViewport api to track available height even on iOS virtual keyboard opening\n let onResize = () => {\n setSize(size => {\n let newSize = getViewportSize();\n if (newSize.width === size.width && newSize.height === size.height) {\n return size;\n }\n return newSize;\n });\n };\n\n if (!visualViewport) {\n window.addEventListener('resize', onResize);\n } else {\n visualViewport.addEventListener('resize', onResize);\n }\n\n return () => {\n if (!visualViewport) {\n window.removeEventListener('resize', onResize);\n } else {\n visualViewport.removeEventListener('resize', onResize);\n }\n };\n }, []);\n\n return size;\n}\n\nfunction getViewportSize(): ViewportSize {\n return {\n width: visualViewport?.width || window.innerWidth,\n height: visualViewport?.height || window.innerHeight\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps} from '@react-types/shared';\nimport {useLayoutEffect} from './useLayoutEffect';\nimport {useState} from 'react';\n\nlet descriptionId = 0;\nconst descriptionNodes = new Map<string, {refCount: number, element: Element}>();\n\nexport function useDescription(description?: string): AriaLabelingProps {\n let [id, setId] = useState(undefined);\n\n useLayoutEffect(() => {\n if (!description) {\n return;\n }\n\n let desc = descriptionNodes.get(description);\n if (!desc) {\n let id = `react-aria-description-${descriptionId++}`;\n setId(id);\n\n let node = document.createElement('div');\n node.id = id;\n node.style.display = 'none';\n node.textContent = description;\n document.body.appendChild(node);\n desc = {refCount: 0, element: node};\n descriptionNodes.set(description, desc);\n } else {\n setId(desc.element.id);\n }\n\n desc.refCount++;\n return () => {\n if (--desc.refCount === 0) {\n desc.element.remove();\n descriptionNodes.delete(description);\n }\n };\n }, [description]);\n\n return {\n 'aria-describedby': description ? id : undefined\n };\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isAndroid} from './platform';\n\n// Original licensing for the following method can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/blob/3c713d513195a53788b3f8bb4b70279d68b15bcc/packages/react-interactions/events/src/dom/shared/index.js#L74-L87\n\n// Keyboards, Assistive Technologies, and element.click() all produce a \"virtual\"\n// click event. This is a method of inferring such clicks. Every browser except\n// IE 11 only sets a zero value of \"detail\" for click events that are \"virtual\".\n// However, IE 11 uses a zero value for all click events. For IE 11 we rely on\n// the quirk that it produces click events that are of type PointerEvent, and\n// where only the \"virtual\" click lacks a pointerType field.\n\nexport function isVirtualClick(event: MouseEvent | PointerEvent): boolean {\n // JAWS/NVDA with Firefox.\n if ((event as any).mozInputSource === 0 && event.isTrusted) {\n return true;\n }\n\n // Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead\n // If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check\n // to detect TalkBack virtual clicks.\n if (isAndroid() && (event as PointerEvent).pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n\n return event.detail === 0 && !(event as PointerEvent).pointerType;\n}\n\nexport function isVirtualPointerEvent(event: PointerEvent) {\n // If the pointer size is zero, then we assume it's from a screen reader.\n // Android TalkBack double tap will sometimes return a event with width and height of 1\n // and pointerType === 'mouse' so we need to check for a specific combination of event attributes.\n // Cannot use \"event.pressure === 0\" as the sole check due to Safari pointer events always returning pressure === 0\n // instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush\n // Talkback double tap from Windows Firefox touch screen press\n return (\n (!isAndroid() && event.width === 0 && event.height === 0) ||\n (event.width === 1 &&\n event.height === 1 &&\n event.pressure === 0 &&\n event.detail === 0 &&\n event.pointerType === 'mouse'\n )\n );\n}\n","export function _class_apply_descriptor_get(receiver, descriptor) {\n if (descriptor.get) return descriptor.get.call(receiver);\n\n return descriptor.value;\n}\nexport { _class_apply_descriptor_get as _ };\n","export function _class_extract_field_descriptor(receiver, privateMap, action) {\n if (!privateMap.has(receiver)) throw new TypeError(\"attempted to \" + action + \" private field on non-instance\");\n\n return privateMap.get(receiver);\n}\nexport { _class_extract_field_descriptor as _ };\n","import { _class_apply_descriptor_get } from \"./_class_apply_descriptor_get.js\";\nimport { _class_extract_field_descriptor } from \"./_class_extract_field_descriptor.js\";\n\nexport function _class_private_field_get(receiver, privateMap) {\n var descriptor = _class_extract_field_descriptor(receiver, privateMap, \"get\");\n return _class_apply_descriptor_get(receiver, descriptor);\n}\nexport { _class_private_field_get as _ };\n","export function _check_private_redeclaration(obj, privateCollection) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\"Cannot initialize the same private elements twice on an object\");\n }\n}\nexport { _check_private_redeclaration as _ };\n","import { _check_private_redeclaration } from \"./_check_private_redeclaration.js\";\n\nexport function _class_private_field_init(obj, privateMap, value) {\n _check_private_redeclaration(obj, privateMap);\n privateMap.set(obj, value);\n}\nexport { _class_private_field_init as _ };\n","export function _class_apply_descriptor_set(receiver, descriptor, value) {\n if (descriptor.set) descriptor.set.call(receiver, value);\n else {\n if (!descriptor.writable) {\n // This should only throw in strict mode, but class bodies are\n // always strict and private fields can only be used inside\n // class bodies.\n throw new TypeError(\"attempted to set read only private field\");\n }\n descriptor.value = value;\n }\n}\nexport { _class_apply_descriptor_set as _ };\n","import { _class_apply_descriptor_set } from \"./_class_apply_descriptor_set.js\";\nimport { _class_extract_field_descriptor } from \"./_class_extract_field_descriptor.js\";\n\nexport function _class_private_field_set(receiver, privateMap, value) {\n var descriptor = _class_extract_field_descriptor(receiver, privateMap, \"set\");\n _class_apply_descriptor_set(receiver, descriptor, value);\n return value;\n}\nexport { _class_private_field_set as _ };\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getOwnerDocument, isIOS, runAfterTransition} from '@react-aria/utils';\n\n// Safari on iOS starts selecting text on long press. The only way to avoid this, it seems,\n// is to add user-select: none to the entire page. Adding it to the pressable element prevents\n// that element from being selected, but nearby elements may still receive selection. We add\n// user-select: none on touch start, and remove it again on touch end to prevent this.\n// This must be implemented using global state to avoid race conditions between multiple elements.\n\n// There are three possible states due to the delay before removing user-select: none after\n// pointer up. The 'default' state always transitions to the 'disabled' state, which transitions\n// to 'restoring'. The 'restoring' state can either transition back to 'disabled' or 'default'.\n\n// For non-iOS devices, we apply user-select: none to the pressed element instead to avoid possible\n// performance issues that arise from applying and removing user-select: none to the entire page\n// (see https://github.com/adobe/react-spectrum/issues/1609).\ntype State = 'default' | 'disabled' | 'restoring';\n\n// Note that state only matters here for iOS. Non-iOS gets user-select: none applied to the target element\n// rather than at the document level so we just need to apply/remove user-select: none for each pressed element individually\nlet state: State = 'default';\nlet savedUserSelect = '';\nlet modifiedElementMap = new WeakMap<Element, string>();\n\nexport function disableTextSelection(target?: Element) {\n if (isIOS()) {\n if (state === 'default') {\n // eslint-disable-next-line no-restricted-globals\n const documentObject = getOwnerDocument(target);\n savedUserSelect = documentObject.documentElement.style.webkitUserSelect;\n documentObject.documentElement.style.webkitUserSelect = 'none';\n }\n\n state = 'disabled';\n } else if (target instanceof HTMLElement || target instanceof SVGElement) {\n // If not iOS, store the target's original user-select and change to user-select: none\n // Ignore state since it doesn't apply for non iOS\n modifiedElementMap.set(target, target.style.userSelect);\n target.style.userSelect = 'none';\n }\n}\n\nexport function restoreTextSelection(target?: Element) {\n if (isIOS()) {\n // If the state is already default, there's nothing to do.\n // If it is restoring, then there's no need to queue a second restore.\n if (state !== 'disabled') {\n return;\n }\n\n state = 'restoring';\n\n // There appears to be a delay on iOS where selection still might occur\n // after pointer up, so wait a bit before removing user-select.\n setTimeout(() => {\n // Wait for any CSS transitions to complete so we don't recompute style\n // for the whole page in the middle of the animation and cause jank.\n runAfterTransition(() => {\n // Avoid race conditions\n if (state === 'restoring') {\n // eslint-disable-next-line no-restricted-globals\n const documentObject = getOwnerDocument(target);\n if (documentObject.documentElement.style.webkitUserSelect === 'none') {\n documentObject.documentElement.style.webkitUserSelect = savedUserSelect || '';\n }\n\n savedUserSelect = '';\n state = 'default';\n }\n });\n }, 300);\n } else if (target instanceof HTMLElement || target instanceof SVGElement) {\n // If not iOS, restore the target's original user-select if any\n // Ignore state since it doesn't apply for non iOS\n if (target && modifiedElementMap.has(target)) {\n let targetOldUserSelect = modifiedElementMap.get(target) as string;\n\n if (target.style.userSelect === 'none') {\n target.style.userSelect = targetOldUserSelect;\n }\n\n if (target.getAttribute('style') === '') {\n target.removeAttribute('style');\n }\n modifiedElementMap.delete(target);\n }\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\nimport {PressProps} from './usePress';\nimport React, {MutableRefObject} from 'react';\n\ninterface IPressResponderContext extends PressProps {\n register(): void,\n ref?: MutableRefObject<FocusableElement>\n}\n\nexport const PressResponderContext = React.createContext<IPressResponderContext>({register: () => {}});\nPressResponderContext.displayName = 'PressResponderContext';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\nimport {disableTextSelection, restoreTextSelection} from './textSelection';\nimport {DOMAttributes, FocusableElement, PressEvent as IPressEvent, PointerType, PressEvents} from '@react-types/shared';\nimport {focusWithoutScrolling, getOwnerDocument, getOwnerWindow, isMac, isVirtualClick, isVirtualPointerEvent, mergeProps, openLink, useEffectEvent, useGlobalListeners, useSyncRef} from '@react-aria/utils';\nimport {PressResponderContext} from './context';\nimport {RefObject, useContext, useEffect, useMemo, useRef, useState} from 'react';\n\nexport interface PressProps extends PressEvents {\n /** Whether the target is in a controlled press state (e.g. an overlay it triggers is open). */\n isPressed?: boolean,\n /** Whether the press events should be disabled. */\n isDisabled?: boolean,\n /** Whether the target should not receive focus on press. */\n preventFocusOnPress?: boolean,\n /**\n * Whether press events should be canceled when the pointer leaves the target while pressed.\n * By default, this is `false`, which means if the pointer returns back over the target while\n * still pressed, onPressStart will be fired again. If set to `true`, the press is canceled\n * when the pointer leaves the target and onPressStart will not be fired if the pointer returns.\n */\n shouldCancelOnPointerExit?: boolean,\n /** Whether text selection should be enabled on the pressable element. */\n allowTextSelectionOnPress?: boolean\n}\n\nexport interface PressHookProps extends PressProps {\n /** A ref to the target element. */\n ref?: RefObject<Element>\n}\n\ninterface PressState {\n isPressed: boolean,\n ignoreEmulatedMouseEvents: boolean,\n ignoreClickAfterPress: boolean,\n didFirePressStart: boolean,\n isTriggeringEvent: boolean,\n activePointerId: any,\n target: FocusableElement | null,\n isOverTarget: boolean,\n pointerType: PointerType | null,\n userSelect?: string,\n metaKeyEvents?: Map<string, KeyboardEvent>\n}\n\ninterface EventBase {\n currentTarget: EventTarget | null,\n shiftKey: boolean,\n ctrlKey: boolean,\n metaKey: boolean,\n altKey: boolean\n}\n\nexport interface PressResult {\n /** Whether the target is currently pressed. */\n isPressed: boolean,\n /** Props to spread on the target element. */\n pressProps: DOMAttributes\n}\n\nfunction usePressResponderContext(props: PressHookProps): PressHookProps {\n // Consume context from <PressResponder> and merge with props.\n let context = useContext(PressResponderContext);\n if (context) {\n let {register, ...contextProps} = context;\n props = mergeProps(contextProps, props) as PressHookProps;\n register();\n }\n useSyncRef(context, props.ref);\n\n return props;\n}\n\nclass PressEvent implements IPressEvent {\n type: IPressEvent['type'];\n pointerType: PointerType;\n target: Element;\n shiftKey: boolean;\n ctrlKey: boolean;\n metaKey: boolean;\n altKey: boolean;\n #shouldStopPropagation = true;\n\n constructor(type: IPressEvent['type'], pointerType: PointerType, originalEvent: EventBase) {\n this.type = type;\n this.pointerType = pointerType;\n this.target = originalEvent.currentTarget as Element;\n this.shiftKey = originalEvent.shiftKey;\n this.metaKey = originalEvent.metaKey;\n this.ctrlKey = originalEvent.ctrlKey;\n this.altKey = originalEvent.altKey;\n }\n\n continuePropagation() {\n this.#shouldStopPropagation = false;\n }\n\n get shouldStopPropagation() {\n return this.#shouldStopPropagation;\n }\n}\n\nconst LINK_CLICKED = Symbol('linkClicked');\n\n/**\n * Handles press interactions across mouse, touch, keyboard, and screen readers.\n * It normalizes behavior across browsers and platforms, and handles many nuances\n * of dealing with pointer and keyboard events.\n */\nexport function usePress(props: PressHookProps): PressResult {\n let {\n onPress,\n onPressChange,\n onPressStart,\n onPressEnd,\n onPressUp,\n isDisabled,\n isPressed: isPressedProp,\n preventFocusOnPress,\n shouldCancelOnPointerExit,\n allowTextSelectionOnPress,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ref: _, // Removing `ref` from `domProps` because TypeScript is dumb\n ...domProps\n } = usePressResponderContext(props);\n\n let [isPressed, setPressed] = useState(false);\n let ref = useRef<PressState>({\n isPressed: false,\n ignoreEmulatedMouseEvents: false,\n ignoreClickAfterPress: false,\n didFirePressStart: false,\n isTriggeringEvent: false,\n activePointerId: null,\n target: null,\n isOverTarget: false,\n pointerType: null\n });\n\n let {addGlobalListener, removeAllGlobalListeners} = useGlobalListeners();\n\n let triggerPressStart = useEffectEvent((originalEvent: EventBase, pointerType: PointerType) => {\n let state = ref.current;\n if (isDisabled || state.didFirePressStart) {\n return false;\n }\n\n let shouldStopPropagation = true;\n state.isTriggeringEvent = true;\n if (onPressStart) {\n let event = new PressEvent('pressstart', pointerType, originalEvent);\n onPressStart(event);\n shouldStopPropagation = event.shouldStopPropagation;\n }\n\n if (onPressChange) {\n onPressChange(true);\n }\n\n state.isTriggeringEvent = false;\n state.didFirePressStart = true;\n setPressed(true);\n return shouldStopPropagation;\n });\n\n let triggerPressEnd = useEffectEvent((originalEvent: EventBase, pointerType: PointerType, wasPressed = true) => {\n let state = ref.current;\n if (!state.didFirePressStart) {\n return false;\n }\n\n state.ignoreClickAfterPress = true;\n state.didFirePressStart = false;\n state.isTriggeringEvent = true;\n\n let shouldStopPropagation = true;\n if (onPressEnd) {\n let event = new PressEvent('pressend', pointerType, originalEvent);\n onPressEnd(event);\n shouldStopPropagation = event.shouldStopPropagation;\n }\n\n if (onPressChange) {\n onPressChange(false);\n }\n\n setPressed(false);\n\n if (onPress && wasPressed && !isDisabled) {\n let event = new PressEvent('press', pointerType, originalEvent);\n onPress(event);\n shouldStopPropagation &&= event.shouldStopPropagation;\n }\n\n state.isTriggeringEvent = false;\n return shouldStopPropagation;\n });\n\n let triggerPressUp = useEffectEvent((originalEvent: EventBase, pointerType: PointerType) => {\n let state = ref.current;\n if (isDisabled) {\n return false;\n }\n\n if (onPressUp) {\n state.isTriggeringEvent = true;\n let event = new PressEvent('pressup', pointerType, originalEvent);\n onPressUp(event);\n state.isTriggeringEvent = false;\n return event.shouldStopPropagation;\n }\n\n return true;\n });\n\n let cancel = useEffectEvent((e: EventBase) => {\n let state = ref.current;\n if (state.isPressed && state.target) {\n if (state.isOverTarget && state.pointerType != null) {\n triggerPressEnd(createEvent(state.target, e), state.pointerType, false);\n }\n state.isPressed = false;\n state.isOverTarget = false;\n state.activePointerId = null;\n state.pointerType = null;\n removeAllGlobalListeners();\n if (!allowTextSelectionOnPress) {\n restoreTextSelection(state.target);\n }\n }\n });\n\n let cancelOnPointerExit = useEffectEvent((e: EventBase) => {\n if (shouldCancelOnPointerExit) {\n cancel(e);\n }\n });\n\n let pressProps = useMemo(() => {\n let state = ref.current;\n let pressProps: DOMAttributes = {\n onKeyDown(e) {\n if (isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && e.currentTarget.contains(e.target as Element)) {\n if (shouldPreventDefaultKeyboard(e.target as Element, e.key)) {\n e.preventDefault();\n }\n\n // If the event is repeating, it may have started on a different element\n // after which focus moved to the current element. Ignore these events and\n // only handle the first key down event.\n let shouldStopPropagation = true;\n if (!state.isPressed && !e.repeat) {\n state.target = e.currentTarget;\n state.isPressed = true;\n shouldStopPropagation = triggerPressStart(e, 'keyboard');\n\n // Focus may move before the key up event, so register the event on the document\n // instead of the same element where the key down event occurred.\n addGlobalListener(getOwnerDocument(e.currentTarget), 'keyup', onKeyUp, false);\n }\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n\n // Keep track of the keydown events that occur while the Meta (e.g. Command) key is held.\n // macOS has a bug where keyup events are not fired while the Meta key is down.\n // When the Meta key itself is released we will get an event for that, and we'll act as if\n // all of these other keys were released as well.\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1393524\n // https://bugs.webkit.org/show_bug.cgi?id=55291\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1299553\n if (e.metaKey && isMac()) {\n state.metaKeyEvents?.set(e.key, e.nativeEvent);\n }\n } else if (e.key === 'Meta') {\n state.metaKeyEvents = new Map();\n }\n },\n onKeyUp(e) {\n if (isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && !e.repeat && e.currentTarget.contains(e.target as Element) && state.target) {\n triggerPressUp(createEvent(state.target, e), 'keyboard');\n }\n },\n onClick(e) {\n if (e && !e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n if (e && e.button === 0 && !state.isTriggeringEvent && !(openLink as any).isOpening) {\n let shouldStopPropagation = true;\n if (isDisabled) {\n e.preventDefault();\n }\n\n // If triggered from a screen reader or by using element.click(),\n // trigger as if it were a keyboard click.\n if (!state.ignoreClickAfterPress && !state.ignoreEmulatedMouseEvents && !state.isPressed && (state.pointerType === 'virtual' || isVirtualClick(e.nativeEvent))) {\n // Ensure the element receives focus (VoiceOver on iOS does not do this)\n if (!isDisabled && !preventFocusOnPress) {\n focusWithoutScrolling(e.currentTarget);\n }\n\n let stopPressStart = triggerPressStart(e, 'virtual');\n let stopPressUp = triggerPressUp(e, 'virtual');\n let stopPressEnd = triggerPressEnd(e, 'virtual');\n shouldStopPropagation = stopPressStart && stopPressUp && stopPressEnd;\n }\n\n state.ignoreEmulatedMouseEvents = false;\n state.ignoreClickAfterPress = false;\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n }\n }\n };\n\n let onKeyUp = (e: KeyboardEvent) => {\n if (state.isPressed && state.target && isValidKeyboardEvent(e, state.target)) {\n if (shouldPreventDefaultKeyboard(e.target as Element, e.key)) {\n e.preventDefault();\n }\n\n let target = e.target as Element;\n let shouldStopPropagation = triggerPressEnd(createEvent(state.target, e), 'keyboard', state.target.contains(target));\n removeAllGlobalListeners();\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n\n // If a link was triggered with a key other than Enter, open the URL ourselves.\n // This means the link has a role override, and the default browser behavior\n // only applies when using the Enter key.\n if (e.key !== 'Enter' && isHTMLAnchorLink(state.target) && state.target.contains(target) && !e[LINK_CLICKED]) {\n // Store a hidden property on the event so we only trigger link click once,\n // even if there are multiple usePress instances attached to the element.\n e[LINK_CLICKED] = true;\n openLink(state.target, e, false);\n }\n\n state.isPressed = false;\n state.metaKeyEvents?.delete(e.key);\n } else if (e.key === 'Meta' && state.metaKeyEvents?.size) {\n // If we recorded keydown events that occurred while the Meta key was pressed,\n // and those haven't received keyup events already, fire keyup events ourselves.\n // See comment above for more info about the macOS bug causing this.\n let events = state.metaKeyEvents;\n state.metaKeyEvents = undefined;\n for (let event of events.values()) {\n state.target?.dispatchEvent(new KeyboardEvent('keyup', event));\n }\n }\n };\n\n if (typeof PointerEvent !== 'undefined') {\n pressProps.onPointerDown = (e) => {\n // Only handle left clicks, and ignore events that bubbled through portals.\n if (e.button !== 0 || !e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n // iOS safari fires pointer events from VoiceOver with incorrect coordinates/target.\n // Ignore and let the onClick handler take care of it instead.\n // https://bugs.webkit.org/show_bug.cgi?id=222627\n // https://bugs.webkit.org/show_bug.cgi?id=223202\n if (isVirtualPointerEvent(e.nativeEvent)) {\n state.pointerType = 'virtual';\n return;\n }\n\n // Due to browser inconsistencies, especially on mobile browsers, we prevent\n // default on pointer down and handle focusing the pressable element ourselves.\n if (shouldPreventDefault(e.currentTarget as Element)) {\n e.preventDefault();\n }\n\n state.pointerType = e.pointerType;\n\n let shouldStopPropagation = true;\n if (!state.isPressed) {\n state.isPressed = true;\n state.isOverTarget = true;\n state.activePointerId = e.pointerId;\n state.target = e.currentTarget;\n\n if (!isDisabled && !preventFocusOnPress) {\n focusWithoutScrolling(e.currentTarget);\n }\n\n if (!allowTextSelectionOnPress) {\n disableTextSelection(state.target);\n }\n\n shouldStopPropagation = triggerPressStart(e, state.pointerType);\n\n addGlobalListener(getOwnerDocument(e.currentTarget), 'pointermove', onPointerMove, false);\n addGlobalListener(getOwnerDocument(e.currentTarget), 'pointerup', onPointerUp, false);\n addGlobalListener(getOwnerDocument(e.currentTarget), 'pointercancel', onPointerCancel, false);\n }\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n };\n\n pressProps.onMouseDown = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n if (e.button === 0) {\n // Chrome and Firefox on touch Windows devices require mouse down events\n // to be canceled in addition to pointer events, or an extra asynchronous\n // focus event will be fired.\n if (shouldPreventDefault(e.currentTarget as Element)) {\n e.preventDefault();\n }\n\n e.stopPropagation();\n }\n };\n\n pressProps.onPointerUp = (e) => {\n // iOS fires pointerup with zero width and height, so check the pointerType recorded during pointerdown.\n if (!e.currentTarget.contains(e.target as Element) || state.pointerType === 'virtual') {\n return;\n }\n\n // Only handle left clicks\n // Safari on iOS sometimes fires pointerup events, even\n // when the touch isn't over the target, so double check.\n if (e.button === 0 && isOverTarget(e, e.currentTarget)) {\n triggerPressUp(e, state.pointerType || e.pointerType);\n }\n };\n\n // Safari on iOS < 13.2 does not implement pointerenter/pointerleave events correctly.\n // Use pointer move events instead to implement our own hit testing.\n // See https://bugs.webkit.org/show_bug.cgi?id=199803\n let onPointerMove = (e: PointerEvent) => {\n if (e.pointerId !== state.activePointerId) {\n return;\n }\n\n if (state.target && isOverTarget(e, state.target)) {\n if (!state.isOverTarget && state.pointerType != null) {\n state.isOverTarget = true;\n triggerPressStart(createEvent(state.target, e), state.pointerType);\n }\n } else if (state.target && state.isOverTarget && state.pointerType != null) {\n state.isOverTarget = false;\n triggerPressEnd(createEvent(state.target, e), state.pointerType, false);\n cancelOnPointerExit(e);\n }\n };\n\n let onPointerUp = (e: PointerEvent) => {\n if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {\n if (isOverTarget(e, state.target) && state.pointerType != null) {\n triggerPressEnd(createEvent(state.target, e), state.pointerType);\n } else if (state.isOverTarget && state.pointerType != null) {\n triggerPressEnd(createEvent(state.target, e), state.pointerType, false);\n }\n\n state.isPressed = false;\n state.isOverTarget = false;\n state.activePointerId = null;\n state.pointerType = null;\n removeAllGlobalListeners();\n if (!allowTextSelectionOnPress) {\n restoreTextSelection(state.target);\n }\n }\n };\n\n let onPointerCancel = (e: PointerEvent) => {\n cancel(e);\n };\n\n pressProps.onDragStart = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n // Safari does not call onPointerCancel when a drag starts, whereas Chrome and Firefox do.\n cancel(e);\n };\n } else {\n pressProps.onMouseDown = (e) => {\n // Only handle left clicks\n if (e.button !== 0 || !e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n // Due to browser inconsistencies, especially on mobile browsers, we prevent\n // default on mouse down and handle focusing the pressable element ourselves.\n if (shouldPreventDefault(e.currentTarget)) {\n e.preventDefault();\n }\n\n if (state.ignoreEmulatedMouseEvents) {\n e.stopPropagation();\n return;\n }\n\n state.isPressed = true;\n state.isOverTarget = true;\n state.target = e.currentTarget;\n state.pointerType = isVirtualClick(e.nativeEvent) ? 'virtual' : 'mouse';\n\n if (!isDisabled && !preventFocusOnPress) {\n focusWithoutScrolling(e.currentTarget);\n }\n\n let shouldStopPropagation = triggerPressStart(e, state.pointerType);\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n\n addGlobalListener(getOwnerDocument(e.currentTarget), 'mouseup', onMouseUp, false);\n };\n\n pressProps.onMouseEnter = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n let shouldStopPropagation = true;\n if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {\n state.isOverTarget = true;\n shouldStopPropagation = triggerPressStart(e, state.pointerType);\n }\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n };\n\n pressProps.onMouseLeave = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n let shouldStopPropagation = true;\n if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {\n state.isOverTarget = false;\n shouldStopPropagation = triggerPressEnd(e, state.pointerType, false);\n cancelOnPointerExit(e);\n }\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n };\n\n pressProps.onMouseUp = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n if (!state.ignoreEmulatedMouseEvents && e.button === 0) {\n triggerPressUp(e, state.pointerType || 'mouse');\n }\n };\n\n let onMouseUp = (e: MouseEvent) => {\n // Only handle left clicks\n if (e.button !== 0) {\n return;\n }\n\n state.isPressed = false;\n removeAllGlobalListeners();\n\n if (state.ignoreEmulatedMouseEvents) {\n state.ignoreEmulatedMouseEvents = false;\n return;\n }\n\n if (state.target && isOverTarget(e, state.target) && state.pointerType != null) {\n triggerPressEnd(createEvent(state.target, e), state.pointerType);\n } else if (state.target && state.isOverTarget && state.pointerType != null) {\n triggerPressEnd(createEvent(state.target, e), state.pointerType, false);\n }\n\n state.isOverTarget = false;\n };\n\n pressProps.onTouchStart = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n let touch = getTouchFromEvent(e.nativeEvent);\n if (!touch) {\n return;\n }\n state.activePointerId = touch.identifier;\n state.ignoreEmulatedMouseEvents = true;\n state.isOverTarget = true;\n state.isPressed = true;\n state.target = e.currentTarget;\n state.pointerType = 'touch';\n\n // Due to browser inconsistencies, especially on mobile browsers, we prevent default\n // on the emulated mouse event and handle focusing the pressable element ourselves.\n if (!isDisabled && !preventFocusOnPress) {\n focusWithoutScrolling(e.currentTarget);\n }\n\n if (!allowTextSelectionOnPress) {\n disableTextSelection(state.target);\n }\n\n let shouldStopPropagation = triggerPressStart(e, state.pointerType);\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n\n addGlobalListener(getOwnerWindow(e.currentTarget), 'scroll', onScroll, true);\n };\n\n pressProps.onTouchMove = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n if (!state.isPressed) {\n e.stopPropagation();\n return;\n }\n\n let touch = getTouchById(e.nativeEvent, state.activePointerId);\n let shouldStopPropagation = true;\n if (touch && isOverTarget(touch, e.currentTarget)) {\n if (!state.isOverTarget && state.pointerType != null) {\n state.isOverTarget = true;\n shouldStopPropagation = triggerPressStart(e, state.pointerType);\n }\n } else if (state.isOverTarget && state.pointerType != null) {\n state.isOverTarget = false;\n shouldStopPropagation = triggerPressEnd(e, state.pointerType, false);\n cancelOnPointerExit(e);\n }\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n };\n\n pressProps.onTouchEnd = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n if (!state.isPressed) {\n e.stopPropagation();\n return;\n }\n\n let touch = getTouchById(e.nativeEvent, state.activePointerId);\n let shouldStopPropagation = true;\n if (touch && isOverTarget(touch, e.currentTarget) && state.pointerType != null) {\n triggerPressUp(e, state.pointerType);\n shouldStopPropagation = triggerPressEnd(e, state.pointerType);\n } else if (state.isOverTarget && state.pointerType != null) {\n shouldStopPropagation = triggerPressEnd(e, state.pointerType, false);\n }\n\n if (shouldStopPropagation) {\n e.stopPropagation();\n }\n\n state.isPressed = false;\n state.activePointerId = null;\n state.isOverTarget = false;\n state.ignoreEmulatedMouseEvents = true;\n if (state.target && !allowTextSelectionOnPress) {\n restoreTextSelection(state.target);\n }\n removeAllGlobalListeners();\n };\n\n pressProps.onTouchCancel = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n e.stopPropagation();\n if (state.isPressed) {\n cancel(e);\n }\n };\n\n let onScroll = (e: Event) => {\n if (state.isPressed && (e.target as Element).contains(state.target)) {\n cancel({\n currentTarget: state.target,\n shiftKey: false,\n ctrlKey: false,\n metaKey: false,\n altKey: false\n });\n }\n };\n\n pressProps.onDragStart = (e) => {\n if (!e.currentTarget.contains(e.target as Element)) {\n return;\n }\n\n cancel(e);\n };\n }\n\n return pressProps;\n }, [\n addGlobalListener,\n isDisabled,\n preventFocusOnPress,\n removeAllGlobalListeners,\n allowTextSelectionOnPress,\n cancel,\n cancelOnPointerExit,\n triggerPressEnd,\n triggerPressStart,\n triggerPressUp\n ]);\n\n // Remove user-select: none in case component unmounts immediately after pressStart\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return () => {\n if (!allowTextSelectionOnPress) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n restoreTextSelection(ref.current.target ?? undefined);\n }\n };\n }, [allowTextSelectionOnPress]);\n\n return {\n isPressed: isPressedProp || isPressed,\n pressProps: mergeProps(domProps, pressProps)\n };\n}\n\nfunction isHTMLAnchorLink(target: Element): target is HTMLAnchorElement {\n return target.tagName === 'A' && target.hasAttribute('href');\n}\n\nfunction isValidKeyboardEvent(event: KeyboardEvent, currentTarget: Element): boolean {\n const {key, code} = event;\n const element = currentTarget as HTMLElement;\n const role = element.getAttribute('role');\n // Accessibility for keyboards. Space and Enter only.\n // \"Spacebar\" is for IE 11\n return (\n (key === 'Enter' || key === ' ' || key === 'Spacebar' || code === 'Space') &&\n !((element instanceof getOwnerWindow(element).HTMLInputElement && !isValidInputKey(element, key)) ||\n element instanceof getOwnerWindow(element).HTMLTextAreaElement ||\n element.isContentEditable) &&\n // Links should only trigger with Enter key\n !((role === 'link' || (!role && isHTMLAnchorLink(element))) && key !== 'Enter')\n );\n}\n\nfunction getTouchFromEvent(event: TouchEvent): Touch | null {\n const {targetTouches} = event;\n if (targetTouches.length > 0) {\n return targetTouches[0];\n }\n return null;\n}\n\nfunction getTouchById(\n event: TouchEvent,\n pointerId: null | number\n): null | Touch {\n const changedTouches = event.changedTouches;\n for (let i = 0; i < changedTouches.length; i++) {\n const touch = changedTouches[i];\n if (touch.identifier === pointerId) {\n return touch;\n }\n }\n return null;\n}\n\nfunction createEvent(target: FocusableElement, e: EventBase): EventBase {\n return {\n currentTarget: target,\n shiftKey: e.shiftKey,\n ctrlKey: e.ctrlKey,\n metaKey: e.metaKey,\n altKey: e.altKey\n };\n}\n\ninterface Rect {\n top: number,\n right: number,\n bottom: number,\n left: number\n}\n\ninterface EventPoint {\n clientX: number,\n clientY: number,\n width?: number,\n height?: number,\n radiusX?: number,\n radiusY?: number\n}\n\nfunction getPointClientRect(point: EventPoint): Rect {\n let offsetX = 0;\n let offsetY = 0;\n if (point.width !== undefined) {\n offsetX = (point.width / 2);\n } else if (point.radiusX !== undefined) {\n offsetX = point.radiusX;\n }\n if (point.height !== undefined) {\n offsetY = (point.height / 2);\n } else if (point.radiusY !== undefined) {\n offsetY = point.radiusY;\n }\n\n return {\n top: point.clientY - offsetY,\n right: point.clientX + offsetX,\n bottom: point.clientY + offsetY,\n left: point.clientX - offsetX\n };\n}\n\nfunction areRectanglesOverlapping(a: Rect, b: Rect) {\n // check if they cannot overlap on x axis\n if (a.left > b.right || b.left > a.right) {\n return false;\n }\n // check if they cannot overlap on y axis\n if (a.top > b.bottom || b.top > a.bottom) {\n return false;\n }\n return true;\n}\n\nfunction isOverTarget(point: EventPoint, target: Element) {\n let rect = target.getBoundingClientRect();\n let pointRect = getPointClientRect(point);\n return areRectanglesOverlapping(rect, pointRect);\n}\n\nfunction shouldPreventDefault(target: Element) {\n // We cannot prevent default if the target is a draggable element.\n return !(target instanceof HTMLElement) || !target.hasAttribute('draggable');\n}\n\nfunction shouldPreventDefaultKeyboard(target: Element, key: string) {\n if (target instanceof HTMLInputElement) {\n return !isValidInputKey(target, key);\n }\n\n if (target instanceof HTMLButtonElement) {\n return target.type !== 'submit' && target.type !== 'reset';\n }\n\n if (isHTMLAnchorLink(target)) {\n return false;\n }\n\n return true;\n}\n\nconst nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n\nfunction isValidInputKey(target: HTMLInputElement, key: string) {\n // Only space should toggle checkboxes and radios, not enter.\n return target.type === 'checkbox' || target.type === 'radio'\n ? key === ' '\n : nonTextInputTypes.has(target.type);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\nimport {isMac, isVirtualClick} from '@react-aria/utils';\nimport {useEffect, useState} from 'react';\nimport {useIsSSR} from '@react-aria/ssr';\n\nexport type Modality = 'keyboard' | 'pointer' | 'virtual';\ntype HandlerEvent = PointerEvent | MouseEvent | KeyboardEvent | FocusEvent | null;\ntype Handler = (modality: Modality, e: HandlerEvent) => void;\nexport type FocusVisibleHandler = (isFocusVisible: boolean) => void;\nexport interface FocusVisibleProps {\n /** Whether the element is a text input. */\n isTextInput?: boolean,\n /** Whether the element will be auto focused. */\n autoFocus?: boolean\n}\n\nexport interface FocusVisibleResult {\n /** Whether keyboard focus is visible globally. */\n isFocusVisible: boolean\n}\n\nlet currentModality: null | Modality = null;\nlet changeHandlers = new Set<Handler>();\nlet hasSetupGlobalListeners = false;\nlet hasEventBeforeFocus = false;\nlet hasBlurredWindowRecently = false;\n\n// Only Tab or Esc keys will make focus visible on text input elements\nconst FOCUS_VISIBLE_INPUT_KEYS = {\n Tab: true,\n Escape: true\n};\n\nfunction triggerChangeHandlers(modality: Modality, e: HandlerEvent) {\n for (let handler of changeHandlers) {\n handler(modality, e);\n }\n}\n\n/**\n * Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.\n */\nfunction isValidKey(e: KeyboardEvent) {\n // Control and Shift keys trigger when navigating back to the tab with keyboard.\n return !(e.metaKey || (!isMac() && e.altKey) || e.ctrlKey || e.key === 'Control' || e.key === 'Shift' || e.key === 'Meta');\n}\n\n\nfunction handleKeyboardEvent(e: KeyboardEvent) {\n hasEventBeforeFocus = true;\n if (isValidKey(e)) {\n currentModality = 'keyboard';\n triggerChangeHandlers('keyboard', e);\n }\n}\n\nfunction handlePointerEvent(e: PointerEvent | MouseEvent) {\n currentModality = 'pointer';\n if (e.type === 'mousedown' || e.type === 'pointerdown') {\n hasEventBeforeFocus = true;\n triggerChangeHandlers('pointer', e);\n }\n}\n\nfunction handleClickEvent(e: MouseEvent) {\n if (isVirtualClick(e)) {\n hasEventBeforeFocus = true;\n currentModality = 'virtual';\n }\n}\n\nfunction handleFocusEvent(e: FocusEvent) {\n // Firefox fires two extra focus events when the user first clicks into an iframe:\n // first on the window, then on the document. We ignore these events so they don't\n // cause keyboard focus rings to appear.\n if (e.target === window || e.target === document) {\n return;\n }\n\n // If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.\n // This occurs, for example, when navigating a form with the next/previous buttons on iOS.\n if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {\n currentModality = 'virtual';\n triggerChangeHandlers('virtual', e);\n }\n\n hasEventBeforeFocus = false;\n hasBlurredWindowRecently = false;\n}\n\nfunction handleWindowBlur() {\n // When the window is blurred, reset state. This is necessary when tabbing out of the window,\n // for example, since a subsequent focus event won't be fired.\n hasEventBeforeFocus = false;\n hasBlurredWindowRecently = true;\n}\n\n/**\n * Setup global event listeners to control when keyboard focus style should be visible.\n */\nfunction setupGlobalFocusEvents() {\n if (typeof window === 'undefined' || hasSetupGlobalListeners) {\n return;\n }\n\n // Programmatic focus() calls shouldn't affect the current input modality.\n // However, we need to detect other cases when a focus event occurs without\n // a preceding user event (e.g. screen reader focus). Overriding the focus\n // method on HTMLElement.prototype is a bit hacky, but works.\n let focus = HTMLElement.prototype.focus;\n HTMLElement.prototype.focus = function () {\n hasEventBeforeFocus = true;\n focus.apply(this, arguments as unknown as [options?: FocusOptions | undefined]);\n };\n\n document.addEventListener('keydown', handleKeyboardEvent, true);\n document.addEventListener('keyup', handleKeyboardEvent, true);\n document.addEventListener('click', handleClickEvent, true);\n\n // Register focus events on the window so they are sure to happen\n // before React's event listeners (registered on the document).\n window.addEventListener('focus', handleFocusEvent, true);\n window.addEventListener('blur', handleWindowBlur, false);\n\n if (typeof PointerEvent !== 'undefined') {\n document.addEventListener('pointerdown', handlePointerEvent, true);\n document.addEventListener('pointermove', handlePointerEvent, true);\n document.addEventListener('pointerup', handlePointerEvent, true);\n } else {\n document.addEventListener('mousedown', handlePointerEvent, true);\n document.addEventListener('mousemove', handlePointerEvent, true);\n document.addEventListener('mouseup', handlePointerEvent, true);\n }\n\n hasSetupGlobalListeners = true;\n}\n\nif (typeof document !== 'undefined') {\n if (document.readyState !== 'loading') {\n setupGlobalFocusEvents();\n } else {\n document.addEventListener('DOMContentLoaded', setupGlobalFocusEvents);\n }\n}\n\n/**\n * If true, keyboard focus is visible.\n */\nexport function isFocusVisible(): boolean {\n return currentModality !== 'pointer';\n}\n\nexport function getInteractionModality(): Modality | null {\n return currentModality;\n}\n\nexport function setInteractionModality(modality: Modality) {\n currentModality = modality;\n triggerChangeHandlers(modality, null);\n}\n\n/**\n * Keeps state of the current modality.\n */\nexport function useInteractionModality(): Modality | null {\n setupGlobalFocusEvents();\n\n let [modality, setModality] = useState(currentModality);\n useEffect(() => {\n let handler = () => {\n setModality(currentModality);\n };\n\n changeHandlers.add(handler);\n return () => {\n changeHandlers.delete(handler);\n };\n }, []);\n\n return useIsSSR() ? null : modality;\n}\n\nconst nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n\n/**\n * If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that\n * focus visible style can be properly set.\n */\nfunction isKeyboardFocusEvent(isTextInput: boolean, modality: Modality, e: HandlerEvent) {\n isTextInput = isTextInput || \n (e?.target instanceof HTMLInputElement && !nonTextInputTypes.has(e?.target?.type)) ||\n e?.target instanceof HTMLTextAreaElement ||\n (e?.target instanceof HTMLElement && e?.target.isContentEditable);\n return !(isTextInput && modality === 'keyboard' && e instanceof KeyboardEvent && !FOCUS_VISIBLE_INPUT_KEYS[e.key]);\n}\n\n/**\n * Manages focus visible state for the page, and subscribes individual components for updates.\n */\nexport function useFocusVisible(props: FocusVisibleProps = {}): FocusVisibleResult {\n let {isTextInput, autoFocus} = props;\n let [isFocusVisibleState, setFocusVisible] = useState(autoFocus || isFocusVisible());\n useFocusVisibleListener((isFocusVisible) => {\n setFocusVisible(isFocusVisible);\n }, [isTextInput], {isTextInput});\n\n return {isFocusVisible: isFocusVisibleState};\n}\n\n/**\n * Listens for trigger change and reports if focus is visible (i.e., modality is not pointer).\n */\nexport function useFocusVisibleListener(fn: FocusVisibleHandler, deps: ReadonlyArray<any>, opts?: {isTextInput?: boolean}): void {\n setupGlobalFocusEvents();\n\n useEffect(() => {\n let handler = (modality: Modality, e: HandlerEvent) => {\n if (!isKeyboardFocusEvent(!!(opts?.isTextInput), modality, e)) {\n return;\n }\n fn(isFocusVisible());\n };\n changeHandlers.add(handler);\n return () => {\n changeHandlers.delete(handler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, LongPressEvent} from '@react-types/shared';\nimport {mergeProps, useDescription, useGlobalListeners} from '@react-aria/utils';\nimport {usePress} from './usePress';\nimport {useRef} from 'react';\n\nexport interface LongPressProps {\n /** Whether long press events should be disabled. */\n isDisabled?: boolean,\n /** Handler that is called when a long press interaction starts. */\n onLongPressStart?: (e: LongPressEvent) => void,\n /**\n * Handler that is called when a long press interaction ends, either\n * over the target or when the pointer leaves the target.\n */\n onLongPressEnd?: (e: LongPressEvent) => void,\n /**\n * Handler that is called when the threshold time is met while\n * the press is over the target.\n */\n onLongPress?: (e: LongPressEvent) => void,\n /**\n * The amount of time in milliseconds to wait before triggering a long press.\n * @default 500ms\n */\n threshold?: number,\n /**\n * A description for assistive techology users indicating that a long press\n * action is available, e.g. \"Long press to open menu\".\n */\n accessibilityDescription?: string\n}\n\nexport interface LongPressResult {\n /** Props to spread on the target element. */\n longPressProps: DOMAttributes\n}\n\nconst DEFAULT_THRESHOLD = 500;\n\n/**\n * Handles long press interactions across mouse and touch devices. Supports a customizable time threshold,\n * accessibility description, and normalizes behavior across browsers and devices.\n */\nexport function useLongPress(props: LongPressProps): LongPressResult {\n let {\n isDisabled,\n onLongPressStart,\n onLongPressEnd,\n onLongPress,\n threshold = DEFAULT_THRESHOLD,\n accessibilityDescription\n } = props;\n\n const timeRef = useRef<ReturnType<typeof setTimeout> | undefined>();\n let {addGlobalListener, removeGlobalListener} = useGlobalListeners();\n\n let {pressProps} = usePress({\n isDisabled,\n onPressStart(e) {\n e.continuePropagation();\n if (e.pointerType === 'mouse' || e.pointerType === 'touch') {\n if (onLongPressStart) {\n onLongPressStart({\n ...e,\n type: 'longpressstart'\n });\n }\n\n timeRef.current = setTimeout(() => {\n // Prevent other usePress handlers from also handling this event.\n e.target.dispatchEvent(new PointerEvent('pointercancel', {bubbles: true}));\n if (onLongPress) {\n onLongPress({\n ...e,\n type: 'longpress'\n });\n }\n timeRef.current = undefined;\n }, threshold);\n\n // Prevent context menu, which may be opened on long press on touch devices\n if (e.pointerType === 'touch') {\n let onContextMenu = e => {\n e.preventDefault();\n };\n\n addGlobalListener(e.target, 'contextmenu', onContextMenu, {once: true});\n addGlobalListener(window, 'pointerup', () => {\n // If no contextmenu event is fired quickly after pointerup, remove the handler\n // so future context menu events outside a long press are not prevented.\n setTimeout(() => {\n removeGlobalListener(e.target, 'contextmenu', onContextMenu);\n }, 30);\n }, {once: true});\n }\n }\n },\n onPressEnd(e) {\n if (timeRef.current) {\n clearTimeout(timeRef.current);\n }\n\n if (onLongPressEnd && (e.pointerType === 'mouse' || e.pointerType === 'touch')) {\n onLongPressEnd({\n ...e,\n type: 'longpressend'\n });\n }\n }\n });\n\n let descriptionProps = useDescription(onLongPress && !isDisabled ? accessibilityDescription : undefined);\n\n return {\n longPressProps: mergeProps(pressProps, descriptionProps)\n };\n}\n","type PointType = \"page\" | \"client\"\n\nfunction pointFromTouch(e: TouchEvent, type: PointType = \"client\") {\n const point = e.touches[0] || e.changedTouches[0]\n return { x: point[`${type}X`], y: point[`${type}Y`] }\n}\n\nfunction pointFromMouse(point: MouseEvent | PointerEvent, type: PointType = \"client\") {\n return { x: point[`${type}X`], y: point[`${type}Y`] }\n}\n\ntype AnyPointerEvent = MouseEvent | TouchEvent | PointerEvent\n\nconst isTouchEvent = (event: AnyPointerEvent): event is TouchEvent => \"touches\" in event && event.touches.length > 0\n\nexport function getEventPoint(event: AnyPointerEvent, type: PointType = \"client\") {\n return isTouchEvent(event) ? pointFromTouch(event, type) : pointFromMouse(event, type)\n}\n","import * as React from 'react'\n\nimport {\n Avatar,\n AvatarBadge,\n AvatarProps,\n AvatarBadgeProps,\n Tooltip,\n chakra,\n forwardRef,\n HTMLChakraProps,\n ThemingProps,\n SystemStyleObject,\n SystemProps,\n useColorModeValue,\n useTheme,\n useMultiStyleConfig,\n omitThemingProps,\n createStylesContext,\n} from '@chakra-ui/react'\n\nimport { cx } from '@chakra-ui/utils'\n\nconst [StylesProvider, useStyles] = createStylesContext('SuiPersona')\n\nexport interface PresenceOptions {\n [presence: string]: {\n label: string\n color: string\n }\n}\n\n/**\n * The presence configuration object.\n *\n * Default presence values: online, offline, busy, dnd, away\n *\n * You can overwrite colors in the theme semantic tokens.\n * theme.semanticTokens.colors['presence.online'] = 'cyan.500'\n *\n * Or add a custom presence value\n * theme.semanticTokens.colors['presence.vacay'] = 'blue.500'\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/persona\n */\nexport const Presence: PresenceOptions = {\n online: {\n label: 'Online',\n color: 'presence.online',\n },\n offline: {\n label: 'Offline',\n color: 'presence.offline',\n },\n busy: {\n label: 'Busy',\n color: 'presence.busy',\n },\n dnd: {\n label: 'Do-not-disturb',\n color: 'presence.dnd',\n },\n away: {\n label: 'Away',\n color: 'presence.away',\n },\n}\n\n/**\n * Fallback when theme tokens aren't configured\n */\nexport const defaultPresenceTokens = {\n online: 'green.500',\n offline: 'gray.400',\n busy: 'orange.500',\n dnd: 'red.500',\n away: 'gray.400',\n}\n\ninterface PersonaOptions {\n /**\n * The name of the person in the avatar.\n *\n * - if `src` has loaded, the name will be used as the `alt` attribute of the `img`\n * - If `src` is not loaded, the name will be used to create the initials\n */\n name?: string\n /**\n * The presence status of the person\n *\n * If set will add an AvatarBadge with color configured in `Presence`\n * Default presence options:\n * - online\n * - offline\n * - busy\n * - dnd\n * - away\n */\n presence?: string\n /**\n * The icon shown in the AvatarBadge\n */\n presenceIcon?: React.ReactNode\n /**\n * Indicates that a person is out of office. Changes the presence badge style.\n */\n isOutOfOffice?: boolean\n /**\n * Primary label of the persona, defaults to the name\n */\n label?: React.ReactNode\n /**\n * Secondary label, usually the role of the person\n * Only visible from md size and up.\n */\n secondaryLabel?: React.ReactNode\n /**\n * Tertiary label, usually the status of the person.\n * Only visible from lg size and up.\n */\n tertiaryLabel?: React.ReactNode\n /**\n * Hide the persona details next to the avatar.\n */\n hideDetails?: boolean\n /**\n * The size of the persona, from 2xs to 2xl.\n */\n}\n\nexport interface PersonaProps\n extends PersonaOptions,\n Omit<PresenceAvatarProps, 'size' | 'variant'>,\n ThemingProps<'SuiPersona'> {}\n/**\n * The wrapper component that handles default composition.\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/persona\n */\nexport const Persona: React.FC<PersonaProps> = (props) => {\n const {\n name,\n presence,\n presenceIcon,\n isOutOfOffice,\n label,\n secondaryLabel,\n tertiaryLabel,\n size,\n hideDetails,\n children,\n /** Avatar props */\n getInitials,\n icon,\n iconLabel,\n ignoreFallback,\n loading,\n onError,\n src,\n srcSet,\n ...rest\n } = props\n\n const isComposed = !!(name || label || src || icon)\n\n return (\n <PersonaContainer size={size} {...rest}>\n {isComposed ? (\n <>\n <PersonaAvatar\n name={name}\n presence={presence}\n presenceIcon={presenceIcon}\n isOutOfOffice={isOutOfOffice}\n size={size}\n getInitials={getInitials}\n icon={icon}\n iconLabel={iconLabel}\n ignoreFallback={ignoreFallback}\n loading={loading}\n onError={onError}\n src={src}\n srcSet={srcSet}\n />\n\n {!hideDetails && (\n <PersonaDetails>\n <PersonaLabel>{label || name}</PersonaLabel>\n {secondaryLabel && (\n <PersonaSecondaryLabel>{secondaryLabel}</PersonaSecondaryLabel>\n )}\n {tertiaryLabel && (\n <PersonaTertiaryLabel>{tertiaryLabel}</PersonaTertiaryLabel>\n )}\n {children}\n </PersonaDetails>\n )}\n </>\n ) : (\n children\n )}\n </PersonaContainer>\n )\n}\n\nPersona.displayName = 'Persona'\n\nexport interface PersonaContainerProps\n extends HTMLChakraProps<'div'>,\n ThemingProps<'SuiPersona'> {}\n/**\n * The container component that provides context and styles.\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/persona\n */\nexport const PersonaContainer = forwardRef<PersonaContainerProps, 'div'>(\n (props, ref) => {\n const { children, ...rest } = props\n const styles = useMultiStyleConfig('SuiPersona', props)\n\n const containerProps = omitThemingProps(rest)\n\n const baseStyle: SystemStyleObject = {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n }\n\n const containerStyles: SystemStyleObject = {\n ...baseStyle,\n ...styles.container,\n }\n\n return (\n <StylesProvider value={styles}>\n <chakra.div\n ref={ref}\n __css={containerStyles}\n {...containerProps}\n className={cx('sui-persona', props.className)}\n >\n {children}\n </chakra.div>\n </StylesProvider>\n )\n }\n)\n\nPersonaContainer.displayName = 'PersonaContainer'\n\ninterface PresenceAvatarOptions {\n /**\n * The name of the person in the avatar.\n *\n * - if `src` has loaded, the name will be used as the `alt` attribute of the `img`\n * - If `src` is not loaded, the name will be used to create the initials\n */\n name?: string\n /**\n * The presence status of the person\n *\n * If set will add an AvatarBadge with color configured in `Presence`\n * Default presence options:\n * - online\n * - offline\n * - busy\n * - dnd\n * - away\n */\n presence?: string\n /**\n * The textual presence status of the person.\n * Online, Offline, Busy, Do-not-disturb or Away\n */\n presenceLabel?: string\n /**\n * The icon shown in the AvatarBadge\n */\n presenceIcon?: React.ReactNode\n /**\n * The badge size. Defaults to 1em. Use em value to keep the size relative to the avatar.\n */\n badgeSize?: SystemProps['boxSize']\n /**\n * Indicates that a person is out of office. Changes the presence badge style.\n */\n isOutOfOffice?: boolean\n}\n\ninterface PresenceAvatarProps extends PresenceAvatarOptions, AvatarProps {}\n/**\n * An avatar with optional status badge.\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/persona\n */\nexport const PersonaAvatar = forwardRef<PresenceAvatarProps, 'span'>(\n (props, ref) => {\n const {\n name,\n presence,\n presenceLabel,\n presenceIcon,\n isOutOfOffice,\n badgeSize = '1em',\n size,\n getInitials,\n icon,\n iconLabel,\n ignoreFallback,\n loading,\n onError,\n src,\n srcSet,\n ...rest\n } = props\n const badgeProps: AvatarBadgeProps = {}\n let badge\n\n const theme = useTheme()\n\n const colors = theme.colors?.presence || defaultPresenceTokens\n const semantic = !!theme.semanticTokens?.colors?.['presence.online']\n\n if (presence) {\n const label = presenceLabel || Presence[presence]?.label\n const color = semantic\n ? Presence[presence]?.color || `presence.${presence}`\n : colors[presence]\n if (isOutOfOffice) {\n badgeProps.sx = {\n _before: {\n content: '\"\"',\n width: '100%',\n height: '100%',\n position: 'absolute',\n top: 0,\n left: 0,\n border: '0.2em solid',\n borderColor: color,\n borderRadius: '50%',\n boxSizing: 'border-box',\n },\n }\n badgeProps.borderWidth = '0.15em'\n badgeProps.bg = useColorModeValue('white', 'gray.800')\n } else {\n badgeProps.bg = color\n }\n\n badge = (\n <AvatarBadge boxSize={badgeSize} {...badgeProps}>\n {presenceIcon}\n </AvatarBadge>\n )\n\n if (label) {\n badge = <Tooltip label={label}>{badge}</Tooltip>\n }\n }\n\n return (\n <Avatar\n ref={ref}\n name={name}\n size={size}\n getInitials={getInitials}\n icon={icon}\n iconLabel={iconLabel}\n ignoreFallback={ignoreFallback}\n loading={loading}\n onError={onError}\n src={src}\n srcSet={srcSet}\n {...rest}\n >\n {badge}\n </Avatar>\n )\n }\n)\n\nPersonaAvatar.displayName = 'PersonaAvatar'\n\n/**\n * Wrapper component for the labels.\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/persona\n */\nexport const PersonaDetails = forwardRef<PersonaProps, 'div'>((props, ref) => {\n const { children, className, ...rest } = props\n const styles = useStyles()\n\n const baseStyle: SystemStyleObject = {\n display: 'flex',\n flexDirection: 'column',\n }\n\n const detailsStyles = {\n ...baseStyle,\n ...styles.details,\n }\n\n return (\n <chakra.div\n ref={ref}\n {...rest}\n __css={detailsStyles}\n className={cx('sui-persona__details', className)}\n >\n {children}\n </chakra.div>\n )\n})\n\nPersonaDetails.displayName = 'PersonaDetails'\n\n/**\n * The main label, usually a name.\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/persona\n */\nexport const PersonaLabel = forwardRef<HTMLChakraProps<'span'>, 'span'>(\n (props, ref) => {\n const styles = useStyles()\n return (\n <chakra.span\n ref={ref}\n {...props}\n __css={styles.label}\n className={cx('sui-persona__label', props.className)}\n />\n )\n }\n)\n\nPersonaLabel.displayName = 'PersonaLabel'\n\n/**\n * The secondary label, usually the role of a person.\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/persona\n */\nexport const PersonaSecondaryLabel = forwardRef<\n HTMLChakraProps<'span'>,\n 'span'\n>((props, ref) => {\n const styles = useStyles()\n return (\n <chakra.span\n ref={ref}\n {...props}\n __css={styles.secondaryLabel}\n className={cx('sui-persona__secondary-label', props.className)}\n />\n )\n})\n\nPersonaSecondaryLabel.displayName = 'PersonaSecondaryLabel'\n\n/**\n * The tertiary label, typically a status message.\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/persona\n */\nexport const PersonaTertiaryLabel = forwardRef<HTMLChakraProps<'span'>, 'span'>(\n (props, ref) => {\n const styles = useStyles()\n\n return (\n <chakra.span\n ref={ref}\n {...props}\n __css={styles.tertiaryLabel}\n className={cx('sui-persona__tertiary-label', props.className)}\n />\n )\n }\n)\n\nPersonaTertiaryLabel.displayName = 'PersonaTertiaryLabel'\n","import * as React from 'react'\n\nimport {\n List,\n ListProps,\n chakra,\n forwardRef,\n useMultiStyleConfig,\n useColorModeValue,\n HTMLChakraProps,\n ThemingProps,\n SystemProps,\n SystemStyleObject,\n omitThemingProps,\n createStylesContext,\n} from '@chakra-ui/react'\n\nimport { cx } from '@chakra-ui/utils'\n\nconst [StylesProvider, useStyles] = createStylesContext('SuiProperty')\n\ninterface PropertyOptions {\n label?: React.ReactNode\n value?: React.ReactNode\n labelWidth?: SystemProps['width']\n spacing?: SystemProps['margin']\n}\n\nexport interface PropertyProps\n extends PropertyOptions,\n HTMLChakraProps<'dl'>,\n ThemingProps<'SuiProperty'> {}\n/**\n * The wrapper component that handles default composition.\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/property\n */\nexport const Property = forwardRef<PropertyProps, 'dl'>((props, ref) => {\n const styles = useMultiStyleConfig('SuiProperty', props)\n\n const { children, label, value, labelWidth, spacing, ...rest } =\n omitThemingProps(props)\n\n const propertyStyles: SystemStyleObject = {\n minW: 0,\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n ...styles.property,\n }\n\n return (\n <StylesProvider value={styles}>\n <chakra.dl\n ref={ref}\n __css={propertyStyles}\n {...rest}\n className={cx('sui-property', props.className)}\n >\n {label && (\n <PropertyLabel\n width={labelWidth}\n minWidth={labelWidth}\n marginEnd={spacing}\n >\n {label}\n </PropertyLabel>\n )}\n {value && <PropertyValue>{value}</PropertyValue>}\n {children}\n </chakra.dl>\n </StylesProvider>\n )\n})\n\nProperty.displayName = 'Property'\n\nexport interface PropertyLabelProps extends HTMLChakraProps<'dt'> {}\n/**\n * The property label.\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/property\n */\nexport const PropertyLabel = forwardRef<PropertyProps, 'dt'>((props, ref) => {\n const styles = useStyles()\n const { children, noOfLines = 1, width, minWidth, ...rest } = props\n\n const labelStyles = {\n display: 'flex',\n flexDirection: 'row',\n ...styles.label,\n }\n\n if (width) {\n labelStyles.minWidth = minWidth || 'auto'\n labelStyles.width = width\n }\n\n return (\n <chakra.dt\n ref={ref}\n __css={labelStyles}\n {...rest}\n className={cx('sui-property__label', props.className)}\n >\n <chakra.span flex=\"1\" noOfLines={noOfLines}>\n {children}\n </chakra.span>\n </chakra.dt>\n )\n})\n\nPropertyLabel.displayName = 'PropertyLabel'\n\nexport interface PropertyValueProps extends HTMLChakraProps<'dd'> {}\n/**\n * The property value.\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/property\n */\nexport const PropertyValue = forwardRef<PropertyValueProps, 'dd'>(\n (props, ref) => {\n const styles = useStyles()\n\n const { children, ...rest } = props\n\n const valueStyles = {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n flex: 1,\n ...styles.value,\n }\n\n return (\n <chakra.dd\n ref={ref}\n __css={valueStyles}\n {...rest}\n className={cx('sui-property__value', props.className)}\n >\n {children}\n </chakra.dd>\n )\n }\n)\n\nPropertyValue.displayName = 'PropertyValue'\n\nexport interface PropertyListProps extends Omit<ListProps, 'items'> {}\n\n/**\n * Render a list of properties.\n * Will set the `as` prop of it's children to `div`,\n * in order to render a semantically correct `dl` list.\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/property\n */\nexport const PropertyList: React.FC<PropertyListProps> = (props) => {\n const { children, ...rest } = props\n return (\n <List\n as=\"dl\"\n {...rest}\n className={cx('sui-property-list', props.className)}\n >\n {React.Children.map(children, (child) =>\n React.isValidElement<PropertyProps>(child)\n ? React.cloneElement(child, {\n as: 'div',\n })\n : child\n )}\n </List>\n )\n}\n\nPropertyList.displayName = 'PropertyList'\n","import { PropGetterV2 } from '@chakra-ui/react-utils'\nimport { dataAttr } from '@chakra-ui/utils'\nimport React, { useEffect, useImperativeHandle, useRef, useState } from 'react'\nimport { useResizeObserver } from '@react-aria/utils'\nimport { useScrollPosition } from '@saas-ui/hooks'\nimport { HTMLMotionProps } from 'framer-motion'\n\nexport interface UseNavbarProps {\n /**\n * Ref to the DOM node.\n */\n ref: React.ForwardedRef<HTMLElement>\n /**\n * The parent element where the navbar is placed within.\n * This is used to determine the scroll position and whether the navbar should be hidden or not.\n * @default `window`\n */\n parentRef?: React.RefObject<HTMLElement>\n /**\n * The height of the navbar.\n * @default \"3.5rem\" (56px)\n */\n height?: number | string\n /**\n * Whether the navbar should hide on scroll or not.\n * @default false\n */\n shouldHideOnScroll?: boolean\n /**\n * Whether the navbar parent scroll event should be listened to or not.\n * @default false\n */\n disableScrollHandler?: boolean\n /**\n * The props to modify the framer motion animation. Use the `variants` API to create your own animation.\n * This motion is only available if the `shouldHideOnScroll` prop is set to `true`.\n */\n motionProps?: HTMLMotionProps<'nav'>\n /**\n * The scroll event handler for the navbar. The event fires when the navbar parent element is scrolled.\n * it only works if `disableScrollHandler` is set to `false` or `shouldHideOnScroll` is set to `true`.\n */\n onScrollPositionChange?: (scrollPosition: number) => void\n /**\n * Style props to be applied to the navbar container.\n */\n style?: React.CSSProperties\n}\n\nexport function useNavbar(props: UseNavbarProps) {\n const {\n ref,\n parentRef,\n height = '3.5rem',\n shouldHideOnScroll = false,\n disableScrollHandler = false,\n onScrollPositionChange,\n motionProps,\n ...containerProps\n } = props\n\n const containerRef = useRef<HTMLElement>(null)\n\n useImperativeHandle(ref, () => containerRef.current as HTMLElement)\n\n const prevWidth = useRef(0)\n const navHeight = useRef(0)\n\n const [isHidden, setIsHidden] = useState(false)\n\n const updateWidth = () => {\n if (containerRef.current) {\n const width = containerRef.current.offsetWidth\n\n if (width !== prevWidth.current) {\n prevWidth.current = width\n }\n }\n }\n\n useResizeObserver({\n ref: containerRef,\n onResize: () => {\n const currentWidth = containerRef.current?.offsetWidth\n\n if (currentWidth !== prevWidth.current) {\n updateWidth()\n }\n },\n })\n\n useEffect(() => {\n updateWidth()\n\n navHeight.current = containerRef.current?.offsetHeight || 0\n }, [])\n\n useScrollPosition({\n elementRef: parentRef,\n isEnabled: shouldHideOnScroll || !disableScrollHandler,\n callback: ({ prevPos, currPos }) => {\n onScrollPositionChange?.(currPos.y)\n if (shouldHideOnScroll) {\n setIsHidden((prev) => {\n const next = currPos.y > prevPos.y && currPos.y > navHeight.current\n\n return next !== prev ? next : prev\n })\n }\n },\n })\n\n const getContainerProps: PropGetterV2<any> = (props = {}) => ({\n ...containerProps,\n ...motionProps,\n 'data-hidden': dataAttr(isHidden),\n ref: containerRef,\n style: {\n '--navbar-height': height,\n ...containerProps.style,\n ...props?.style,\n },\n })\n\n return {\n containerRef,\n height,\n isHidden,\n shouldHideOnScroll,\n motionProps,\n getContainerProps,\n }\n}\n\nexport type UseNavbarReturn = ReturnType<typeof useNavbar>\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport React from 'react';\n\n// During SSR, React emits a warning when calling useLayoutEffect.\n// Since neither useLayoutEffect nor useEffect run on the server,\n// we can suppress this by replace it with a noop on the server.\nexport const useLayoutEffect = typeof document !== 'undefined'\n ? React.useLayoutEffect\n : () => {};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef, useState} from 'react';\nimport {useLayoutEffect} from './useLayoutEffect';\nimport {useSSRSafeId} from '@react-aria/ssr';\nimport {useValueEffect} from './';\n\n// copied from SSRProvider.tsx to reduce exports, if needed again, consider sharing\nlet canUseDOM = Boolean(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\nlet idsUpdaterMap: Map<string, (v: string) => void> = new Map();\n\n/**\n * If a default is not provided, generate an id.\n * @param defaultId - Default component id.\n */\nexport function useId(defaultId?: string): string {\n let [value, setValue] = useState(defaultId);\n let nextId = useRef(null);\n\n let res = useSSRSafeId(value);\n\n let updateValue = useCallback((val) => {\n nextId.current = val;\n }, []);\n\n if (canUseDOM) {\n idsUpdaterMap.set(res, updateValue);\n }\n\n useLayoutEffect(() => {\n let r = res;\n return () => {\n idsUpdaterMap.delete(r);\n };\n }, [res]);\n\n // This cannot cause an infinite loop because the ref is updated first.\n // eslint-disable-next-line\n useEffect(() => {\n let newId = nextId.current;\n if (newId) {\n nextId.current = null;\n setValue(newId);\n }\n });\n\n return res;\n}\n\n/**\n * Merges two ids.\n * Different ids will trigger a side-effect and re-render components hooked up with `useId`.\n */\nexport function mergeIds(idA: string, idB: string): string {\n if (idA === idB) {\n return idA;\n }\n\n let setIdA = idsUpdaterMap.get(idA);\n if (setIdA) {\n setIdA(idB);\n return idB;\n }\n\n let setIdB = idsUpdaterMap.get(idB);\n if (setIdB) {\n setIdB(idA);\n return idA;\n }\n\n return idB;\n}\n\n/**\n * Used to generate an id, and after render, check if that id is rendered so we know\n * if we can use it in places such as labelledby.\n * @param depArray - When to recalculate if the id is in the DOM.\n */\nexport function useSlotId(depArray: ReadonlyArray<any> = []): string {\n let id = useId();\n let [resolvedId, setResolvedId] = useValueEffect(id);\n let updateId = useCallback(() => {\n setResolvedId(function *() {\n yield id;\n\n yield document.getElementById(id) ? id : undefined;\n });\n }, [id, setResolvedId]);\n\n useLayoutEffect(updateId, [id, updateId, ...depArray]);\n\n return resolvedId;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\n\n// This is a polyfill for element.focus({preventScroll: true});\n// Currently necessary for Safari and old Edge:\n// https://caniuse.com/#feat=mdn-api_htmlelement_focus_preventscroll_option\n// See https://bugs.webkit.org/show_bug.cgi?id=178583\n//\n\n// Original licensing for the following methods can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/calvellido/focus-options-polyfill\n\ninterface ScrollableElement {\n element: HTMLElement,\n scrollTop: number,\n scrollLeft: number\n}\n\nexport function focusWithoutScrolling(element: FocusableElement) {\n if (supportsPreventScroll()) {\n element.focus({preventScroll: true});\n } else {\n let scrollableElements = getScrollableElements(element);\n element.focus();\n restoreScrollPosition(scrollableElements);\n }\n}\n\nlet supportsPreventScrollCached: boolean = null;\nfunction supportsPreventScroll() {\n if (supportsPreventScrollCached == null) {\n supportsPreventScrollCached = false;\n try {\n var focusElem = document.createElement('div');\n focusElem.focus({\n get preventScroll() {\n supportsPreventScrollCached = true;\n return true;\n }\n });\n } catch (e) {\n // Ignore\n }\n }\n\n return supportsPreventScrollCached;\n}\n\nfunction getScrollableElements(element: FocusableElement): ScrollableElement[] {\n var parent = element.parentNode;\n var scrollableElements: ScrollableElement[] = [];\n var rootScrollingElement = document.scrollingElement || document.documentElement;\n\n while (parent instanceof HTMLElement && parent !== rootScrollingElement) {\n if (\n parent.offsetHeight < parent.scrollHeight ||\n parent.offsetWidth < parent.scrollWidth\n ) {\n scrollableElements.push({\n element: parent,\n scrollTop: parent.scrollTop,\n scrollLeft: parent.scrollLeft\n });\n }\n parent = parent.parentNode;\n }\n\n if (rootScrollingElement instanceof HTMLElement) {\n scrollableElements.push({\n element: rootScrollingElement,\n scrollTop: rootScrollingElement.scrollTop,\n scrollLeft: rootScrollingElement.scrollLeft\n });\n }\n\n return scrollableElements;\n}\n\nfunction restoreScrollPosition(scrollableElements: ScrollableElement[]) {\n for (let {element, scrollTop, scrollLeft} of scrollableElements) {\n element.scrollTop = scrollTop;\n element.scrollLeft = scrollLeft;\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nfunction testUserAgent(re: RegExp) {\n if (typeof window === 'undefined' || window.navigator == null) {\n return false;\n }\n return (\n window.navigator['userAgentData']?.brands.some((brand: {brand: string, version: string}) => re.test(brand.brand))\n ) ||\n re.test(window.navigator.userAgent);\n}\n\nfunction testPlatform(re: RegExp) {\n return typeof window !== 'undefined' && window.navigator != null\n ? re.test(window.navigator['userAgentData']?.platform || window.navigator.platform)\n : false;\n}\n\nexport function isMac() {\n return testPlatform(/^Mac/i);\n}\n\nexport function isIPhone() {\n return testPlatform(/^iPhone/i);\n}\n\nexport function isIPad() {\n return testPlatform(/^iPad/i) ||\n // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n (isMac() && navigator.maxTouchPoints > 1);\n}\n\nexport function isIOS() {\n return isIPhone() || isIPad();\n}\n\nexport function isAppleDevice() {\n return isMac() || isIOS();\n}\n\nexport function isWebKit() {\n return testUserAgent(/AppleWebKit/i) && !isChrome();\n}\n\nexport function isChrome() {\n return testUserAgent(/Chrome/i);\n}\n\nexport function isAndroid() {\n return testUserAgent(/Android/i);\n}\n\nexport function isFirefox() {\n return testUserAgent(/Firefox/i);\n}\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {focusWithoutScrolling, isMac, isWebKit} from './index';\nimport {isFirefox, isIPad} from './platform';\nimport {LinkDOMProps} from '@react-types/shared';\nimport React, {createContext, ReactNode, useContext, useMemo} from 'react';\n\ninterface Router {\n isNative: boolean,\n open: (target: Element, modifiers: Modifiers) => void\n}\n\nconst RouterContext = createContext<Router>({\n isNative: true,\n open: openSyntheticLink\n});\n\ninterface RouterProviderProps {\n navigate: (path: string) => void,\n children: ReactNode\n}\n\n/**\n * A RouterProvider accepts a `navigate` function from a framework or client side router,\n * and provides it to all nested React Aria links to enable client side navigation.\n */\nexport function RouterProvider(props: RouterProviderProps) {\n let {children, navigate} = props;\n\n let ctx = useMemo(() => ({\n isNative: false,\n open: (target: Element, modifiers: Modifiers) => {\n getSyntheticLink(target, link => {\n if (shouldClientNavigate(link, modifiers)) {\n navigate(link.pathname + link.search + link.hash);\n } else {\n openLink(link, modifiers);\n }\n });\n }\n }), [navigate]);\n\n return (\n <RouterContext.Provider value={ctx}>\n {children}\n </RouterContext.Provider>\n );\n}\n\nexport function useRouter(): Router {\n return useContext(RouterContext);\n}\n\ninterface Modifiers {\n metaKey?: boolean,\n ctrlKey?: boolean,\n altKey?: boolean,\n shiftKey?: boolean\n}\n\nexport function shouldClientNavigate(link: HTMLAnchorElement, modifiers: Modifiers) {\n // Use getAttribute here instead of link.target. Firefox will default link.target to \"_parent\" when inside an iframe.\n let target = link.getAttribute('target');\n return (\n (!target || target === '_self') &&\n link.origin === location.origin &&\n !link.hasAttribute('download') &&\n !modifiers.metaKey && // open in new tab (mac)\n !modifiers.ctrlKey && // open in new tab (windows)\n !modifiers.altKey && // download\n !modifiers.shiftKey\n );\n}\n\nexport function openLink(target: HTMLAnchorElement, modifiers: Modifiers, setOpening = true) {\n let {metaKey, ctrlKey, altKey, shiftKey} = modifiers;\n\n // Firefox does not recognize keyboard events as a user action by default, and the popup blocker\n // will prevent links with target=\"_blank\" from opening. However, it does allow the event if the\n // Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.\n if (isFirefox() && window.event?.type?.startsWith('key') && target.target === '_blank') {\n if (isMac()) {\n metaKey = true;\n } else {\n ctrlKey = true;\n }\n }\n\n // WebKit does not support firing click events with modifier keys, but does support keyboard events.\n // https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184\n let event = isWebKit() && isMac() && !isIPad() && process.env.NODE_ENV !== 'test'\n // @ts-ignore - keyIdentifier is a non-standard property, but it's what webkit expects\n ? new KeyboardEvent('keydown', {keyIdentifier: 'Enter', metaKey, ctrlKey, altKey, shiftKey})\n : new MouseEvent('click', {metaKey, ctrlKey, altKey, shiftKey, bubbles: true, cancelable: true});\n (openLink as any).isOpening = setOpening;\n focusWithoutScrolling(target);\n target.dispatchEvent(event);\n (openLink as any).isOpening = false;\n}\n// https://github.com/parcel-bundler/parcel/issues/8724\n(openLink as any).isOpening = false;\n\nfunction getSyntheticLink(target: Element, open: (link: HTMLAnchorElement) => void) {\n if (target instanceof HTMLAnchorElement) {\n open(target);\n } else if (target.hasAttribute('data-href')) {\n let link = document.createElement('a');\n link.href = target.getAttribute('data-href');\n if (target.hasAttribute('data-target')) {\n link.target = target.getAttribute('data-target');\n }\n if (target.hasAttribute('data-rel')) {\n link.rel = target.getAttribute('data-rel');\n }\n if (target.hasAttribute('data-download')) {\n link.download = target.getAttribute('data-download');\n }\n if (target.hasAttribute('data-ping')) {\n link.ping = target.getAttribute('data-ping');\n }\n if (target.hasAttribute('data-referrer-policy')) {\n link.referrerPolicy = target.getAttribute('data-referrer-policy');\n }\n target.appendChild(link);\n open(link);\n target.removeChild(link);\n }\n}\n\nfunction openSyntheticLink(target: Element, modifiers: Modifiers) {\n getSyntheticLink(target, link => openLink(link, modifiers));\n}\n\nexport function getSyntheticLinkProps(props: LinkDOMProps) {\n return {\n 'data-href': props.href,\n 'data-target': props.target,\n 'data-rel': props.rel,\n 'data-download': props.download,\n 'data-ping': props.ping,\n 'data-referrer-policy': props.referrerPolicy\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// We store a global list of elements that are currently transitioning,\n// mapped to a set of CSS properties that are transitioning for that element.\n// This is necessary rather than a simple count of transitions because of browser\n// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather\n// than one or the other. So we need to track what's actually transitioning so that\n// we can ignore these duplicate events.\nlet transitionsByElement = new Map<EventTarget, Set<string>>();\n\n// A list of callbacks to call once there are no transitioning elements.\nlet transitionCallbacks = new Set<() => void>();\n\nfunction setupGlobalEvents() {\n if (typeof window === 'undefined') {\n return;\n }\n\n let onTransitionStart = (e: TransitionEvent) => {\n // Add the transitioning property to the list for this element.\n let transitions = transitionsByElement.get(e.target);\n if (!transitions) {\n transitions = new Set();\n transitionsByElement.set(e.target, transitions);\n\n // The transitioncancel event must be registered on the element itself, rather than as a global\n // event. This enables us to handle when the node is deleted from the document while it is transitioning.\n // In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.\n e.target.addEventListener('transitioncancel', onTransitionEnd);\n }\n\n transitions.add(e.propertyName);\n };\n\n let onTransitionEnd = (e: TransitionEvent) => {\n // Remove property from list of transitioning properties.\n let properties = transitionsByElement.get(e.target);\n if (!properties) {\n return;\n }\n\n properties.delete(e.propertyName);\n\n // If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.\n if (properties.size === 0) {\n e.target.removeEventListener('transitioncancel', onTransitionEnd);\n transitionsByElement.delete(e.target);\n }\n\n // If no transitioning elements, call all of the queued callbacks.\n if (transitionsByElement.size === 0) {\n for (let cb of transitionCallbacks) {\n cb();\n }\n\n transitionCallbacks.clear();\n }\n };\n\n document.body.addEventListener('transitionrun', onTransitionStart);\n document.body.addEventListener('transitionend', onTransitionEnd);\n}\n\nif (typeof document !== 'undefined') {\n if (document.readyState !== 'loading') {\n setupGlobalEvents();\n } else {\n document.addEventListener('DOMContentLoaded', setupGlobalEvents);\n }\n}\n\nexport function runAfterTransition(fn: () => void) {\n // Wait one frame to see if an animation starts, e.g. a transition on mount.\n requestAnimationFrame(() => {\n // If no transitions are running, call the function immediately.\n // Otherwise, add it to a list of callbacks to run at the end of the animation.\n if (transitionsByElement.size === 0) {\n fn();\n } else {\n transitionCallbacks.add(fn);\n }\n });\n}\n","import {RefObject, useEffect} from 'react';\n\nfunction hasResizeObserver() {\n return typeof window.ResizeObserver !== 'undefined';\n}\n\ntype useResizeObserverOptionsType<T> = {\n ref: RefObject<T | undefined> | undefined,\n onResize: () => void\n}\n\nexport function useResizeObserver<T extends Element>(options: useResizeObserverOptionsType<T>) {\n const {ref, onResize} = options;\n\n useEffect(() => {\n let element = ref?.current;\n if (!element) {\n return;\n }\n\n if (!hasResizeObserver()) {\n window.addEventListener('resize', onResize, false);\n return () => {\n window.removeEventListener('resize', onResize, false);\n };\n } else {\n\n const resizeObserverInstance = new window.ResizeObserver((entries) => {\n if (!entries.length) {\n return;\n }\n\n onResize();\n });\n resizeObserverInstance.observe(element);\n\n return () => {\n if (element) {\n resizeObserverInstance.unobserve(element);\n }\n };\n }\n\n }, [onResize, ref]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useEffect, useState} from 'react';\nimport {useIsSSR} from '@react-aria/ssr';\n\ninterface ViewportSize {\n width: number,\n height: number\n}\n\n// @ts-ignore\nlet visualViewport = typeof document !== 'undefined' && window.visualViewport;\n\nexport function useViewportSize(): ViewportSize {\n let isSSR = useIsSSR();\n let [size, setSize] = useState(() => isSSR ? {width: 0, height: 0} : getViewportSize());\n\n useEffect(() => {\n // Use visualViewport api to track available height even on iOS virtual keyboard opening\n let onResize = () => {\n setSize(size => {\n let newSize = getViewportSize();\n if (newSize.width === size.width && newSize.height === size.height) {\n return size;\n }\n return newSize;\n });\n };\n\n if (!visualViewport) {\n window.addEventListener('resize', onResize);\n } else {\n visualViewport.addEventListener('resize', onResize);\n }\n\n return () => {\n if (!visualViewport) {\n window.removeEventListener('resize', onResize);\n } else {\n visualViewport.removeEventListener('resize', onResize);\n }\n };\n }, []);\n\n return size;\n}\n\nfunction getViewportSize(): ViewportSize {\n return {\n width: visualViewport?.width || window.innerWidth,\n height: visualViewport?.height || window.innerHeight\n };\n}\n","import * as React from 'react'\n\nexport interface UsePromise {\n error?: Error | null\n data?: any\n isLoading: boolean\n isResolved: boolean\n isRejected: boolean\n}\n\ntype CallbackFn = (...args: any[]) => Promise<any>\n\nexport function usePromise<C extends CallbackFn>(fn: C): [UsePromise, C] {\n const [isLoading, setLoading] = React.useState(false)\n const [isResolved, setResolved] = React.useState(false)\n const [isRejected, setRejected] = React.useState(false)\n const [error, setError] = React.useState(null)\n const [data, setData] = React.useState(null)\n\n const call: any = (...params: any) => {\n setLoading(true)\n\n return fn(...params)\n .then((data) => {\n setData(data)\n setResolved(true)\n setLoading(false)\n\n return data\n })\n .catch((err) => {\n setError(err)\n setRejected(true)\n setLoading(false)\n\n throw err\n })\n }\n\n return [{ error, data, isLoading, isResolved, isRejected }, call]\n}\n","import React, { useState, useEffect } from 'react'\nconst isBrowser = typeof window !== 'undefined'\n\nfunction setItem(key: string, value: string) {\n if (isBrowser && 'localStorage' in window) {\n return value === undefined\n ? localStorage.removeItem(key)\n : localStorage.setItem(key, value)\n }\n}\n\nfunction getItem(key: string) {\n if (isBrowser && 'localStorage' in window) {\n return localStorage.getItem(key)\n }\n}\n\nconst serializeJSON = <T>(value: T) => {\n try {\n return JSON.stringify(value)\n } catch (e) {\n throw new Error('useLocalStorage: failed to serialize the value to JSON')\n }\n}\n\nconst deserializeJSON = (value?: string) => {\n try {\n return value && JSON.parse(value)\n } catch (e) {\n return value\n }\n}\n\nexport interface UseLocalStorageOptions<T> {\n serialize?<T>(value: T): string\n deserialize?(value?: string): T\n}\n\ntype StorageEventDetail = {\n key: string\n newValue?: string\n}\nconst triggerCustomEvent = (detail: StorageEventDetail) => {\n const event = new CustomEvent('use-local-storage', {\n detail,\n })\n window.dispatchEvent(event)\n}\n\n/**\n * Works like useState but stores the value as JSON in localStorage.\n * Updates work across multiple tabs using StorageEvent.\n *\n * Setting undefined will remote the localStorage item.\n */\nexport const useLocalStorage = <T = string>(\n key: string,\n defaultValue: T,\n options: UseLocalStorageOptions<T> = {}\n) => {\n const { serialize = serializeJSON, deserialize = deserializeJSON } = options\n\n const initRef = React.useRef(false)\n\n const [value, setValue] = useState<T>(() => {\n return isBrowser ? deserialize(getItem(key) ?? undefined) : defaultValue\n })\n\n useEffect(() => {\n const handler = (event: StorageEvent | CustomEvent<StorageEventDetail>) => {\n const isCustom = event instanceof CustomEvent\n const eventKey = isCustom ? event.detail.key : event.key\n const newValue = isCustom ? event.detail.newValue : event.newValue\n\n if (\n (isCustom || event.storageArea === window.localStorage) &&\n eventKey === key\n ) {\n setValue(deserialize(newValue ?? undefined))\n }\n }\n\n if (isBrowser) {\n window.addEventListener('storage', handler)\n window.addEventListener<any>('use-local-storage', handler)\n }\n return () => {\n if (isBrowser) {\n window.removeEventListener('storage', handler)\n window.removeEventListener<any>('use-local-storage', handler)\n }\n }\n }, [])\n\n useEffect(() => {\n if (!initRef.current) {\n initRef.current = true\n return\n }\n const serializedValue = serialize(value)\n if (getItem(key) !== serializedValue) {\n setItem(key, serializedValue)\n triggerCustomEvent({ key, newValue: serializedValue })\n }\n }, [value])\n\n return [value === undefined ? defaultValue : value, setValue] as const\n}\n","import { useState } from 'react'\n\nconst FIRST_STEP = 0\n\ntype Step = {\n id: string\n}\n\ntype UseStepsProps<S> = {\n steps: S[]\n initialStep?: number\n}\n\nexport const useSteps = <S extends { id: string } = Step>({\n steps,\n initialStep = FIRST_STEP,\n}: UseStepsProps<S>) => {\n const [completed, setCompleted] = useState<string[]>([])\n const [index, setIndex] = useState<number>(initialStep)\n const step = steps[index]\n const inRange = (index: number | string) => {\n if (typeof index === 'number') {\n if (index < FIRST_STEP) return FIRST_STEP\n if (index >= steps.length) return steps.length - 1\n return index\n }\n\n return steps.findIndex((step) => step.id === index) || FIRST_STEP\n }\n\n const go = (nextStep: number | string) => setIndex(inRange(nextStep))\n const next = () => go(index + 1)\n const prev = () => go(index - 1)\n\n const setComplete = (completeStep: number | string = index) => {\n const completeStepIndex = inRange(completeStep)\n const id = steps[completeStepIndex].id\n\n setCompleted([...new Set([...completed, id])])\n }\n\n const setUncomplete = (uncompleteStep: number | string = index) => {\n const uncompleteStepIndex = inRange(uncompleteStep)\n const stepId = steps[uncompleteStepIndex].id\n\n setCompleted(completed.filter((id) => id !== stepId))\n }\n\n const reset = (resetStep = initialStep) => {\n setIndex(resetStep)\n setCompleted([])\n }\n\n return {\n setComplete,\n completed,\n index,\n isLast: index === steps.length - 1,\n navigation: { next, prev, go },\n step,\n setUncomplete,\n reset,\n }\n}\n","import { useEffect, useState } from 'react'\n\nexport type Status = 'idle' | 'loading' | 'ready' | 'error'\nexport type ScriptElt = HTMLScriptElement | null\n\nexport const useScript = (src: string): Status => {\n const [status, setStatus] = useState<Status>(src ? 'loading' : 'idle')\n\n useEffect(\n () => {\n if (!src) {\n setStatus('idle')\n return\n }\n\n // Fetch existing script element by src\n // It may have been added by another instance of this hook\n let script: ScriptElt = document.querySelector(`script[src=\"${src}\"]`)\n\n if (!script) {\n // Create script\n script = document.createElement('script')\n script.src = src\n script.async = true\n script.setAttribute('data-status', 'loading')\n // Add script to document body\n document.body.appendChild(script)\n\n // Store status in attribute on script\n // This can be read by other instances of this hook\n const setAttributeFromEvent = (event: Event) => {\n script?.setAttribute(\n 'data-status',\n event.type === 'load' ? 'ready' : 'error'\n )\n }\n\n script.addEventListener('load', setAttributeFromEvent)\n script.addEventListener('error', setAttributeFromEvent)\n } else {\n // Grab existing script status from attribute and set to state.\n setStatus(script.getAttribute('data-status') as Status)\n }\n\n // Script event handler to update status in state\n // Note: Even if the script already exists we still need to add\n // event handlers to update the state for *this* hook instance.\n const setStateFromEvent = (event: Event) => {\n setStatus(event.type === 'load' ? 'ready' : 'error')\n }\n\n // Add event listeners\n script.addEventListener('load', setStateFromEvent)\n script.addEventListener('error', setStateFromEvent)\n\n // Remove event listeners on cleanup\n return () => {\n if (script) {\n script.removeEventListener('load', setStateFromEvent)\n script.removeEventListener('error', setStateFromEvent)\n }\n }\n },\n [src] // Only re-run effect if script src changes\n )\n\n return status\n}\n","import { useRef, useEffect } from 'react'\n\nconst isBrowser = typeof window !== 'undefined'\n\nexport type ScrollValue = { x: any; y: any }\n\nfunction getScrollPosition(\n element: HTMLElement | undefined | null\n): ScrollValue {\n if (!isBrowser) return { x: 0, y: 0 }\n if (!element) {\n return { x: window.scrollX, y: window.scrollY }\n }\n\n return { x: element.scrollLeft, y: element.scrollTop }\n}\n\nexport interface UseScrollPositionOptions {\n /**\n * The wait time in milliseconds before triggering the callback.\n * @default 30\n */\n delay?: number\n /**\n * Whether the scroll position should be tracked or not.\n * @default true\n */\n isEnabled?: boolean\n /**\n * The element to track the scroll position for.\n */\n elementRef?: React.RefObject<HTMLElement> | null\n /**\n * The callback function to be called when the scroll position changes.\n */\n callback?: ({\n prevPos,\n currPos,\n }: {\n prevPos: ScrollValue\n currPos: ScrollValue\n }) => void\n}\n\nexport const useScrollPosition = (\n props: UseScrollPositionOptions\n): ScrollValue => {\n const { elementRef, delay = 30, callback, isEnabled } = props\n\n const position = useRef<ScrollValue>(\n isEnabled ? getScrollPosition(elementRef?.current) : { x: 0, y: 0 }\n )\n\n let throttleTimeout: ReturnType<typeof setTimeout> | null = null\n\n const handler = () => {\n const currPos = getScrollPosition(elementRef?.current)\n\n if (typeof callback === 'function') {\n callback({ prevPos: position.current, currPos })\n }\n\n position.current = currPos\n throttleTimeout = null\n }\n\n useEffect(() => {\n if (!isEnabled) return\n\n const handleScroll = () => {\n if (delay) {\n if (throttleTimeout === null) {\n throttleTimeout = setTimeout(handler, delay)\n }\n } else {\n handler()\n }\n }\n\n const target = elementRef?.current || window\n\n target.addEventListener('scroll', handleScroll)\n\n return () => target.removeEventListener('scroll', handleScroll)\n }, [elementRef?.current, delay, isEnabled])\n\n return position.current\n}\n","import {\n createContext as createReactContext,\n useContext as useReactContext,\n} from \"react\"\n\nexport interface CreateContextOptions<T> {\n strict?: boolean\n hookName?: string\n providerName?: string\n errorMessage?: string\n name?: string\n defaultValue?: T\n}\n\nexport type CreateContextReturn<T> = [\n React.Provider<T>,\n () => T,\n React.Context<T>,\n]\n\nfunction getErrorMessage(hook: string, provider: string) {\n return `${hook} returned \\`undefined\\`. Seems you forgot to wrap component within ${provider}`\n}\n\nexport function createContext<T>(options: CreateContextOptions<T> = {}) {\n const {\n name,\n strict = true,\n hookName = \"useContext\",\n providerName = \"Provider\",\n errorMessage,\n defaultValue,\n } = options\n\n const Context = createReactContext<T | undefined>(defaultValue)\n\n Context.displayName = name\n\n function useContext() {\n const context = useReactContext(Context)\n\n if (!context && strict) {\n const error = new Error(\n errorMessage ?? getErrorMessage(hookName, providerName),\n )\n error.name = \"ContextError\"\n Error.captureStackTrace?.(error, useContext)\n throw error\n }\n\n return context\n }\n\n return [Context.Provider, useContext, Context] as CreateContextReturn<T>\n}\n","import {\n HTMLChakraProps,\n ThemingProps,\n chakra,\n forwardRef,\n useMultiStyleConfig,\n} from '@chakra-ui/react'\nimport { HTMLMotionProps, motion } from 'framer-motion'\nimport { UseNavbarProps, useNavbar } from './use-navbar'\nimport { NavBarStylesProvider, NavbarProvider } from './navbar-context'\nimport { cx } from '@saas-ui/react-utils'\n\nconst MotionBox = chakra(motion.nav)\n\ntype MotionProps = Pick<\n HTMLMotionProps<'div'>,\n 'onAnimationStart' | 'onDrag' | 'onDragStart' | 'onDragEnd'\n>\n\nexport interface NavbarProps\n extends Omit<UseNavbarProps, 'hideOnScroll' | 'ref'>,\n Omit<HTMLChakraProps<'div'>, keyof MotionProps | 'height'>,\n MotionProps,\n ThemingProps<'SuiNavbar'> {\n children?: React.ReactNode | React.ReactNode[]\n}\n\nexport const Navbar = forwardRef<NavbarProps, 'div'>((props, ref) => {\n const { children, ...otherProps } = props\n\n const context = useNavbar({ ...otherProps, ref })\n\n const styles = useMultiStyleConfig('SuiNavbar', props)\n\n const content = (\n <chakra.header __css={styles.inner} className=\"sui-navbar__inner\">\n {children}\n </chakra.header>\n )\n\n const containerStyles = {\n top: props.position === 'sticky' ? '0' : undefined,\n insetX: props.position === 'sticky' ? '0' : undefined,\n ...styles.container,\n }\n\n return (\n <NavBarStylesProvider value={styles}>\n <NavbarProvider value={context}>\n <MotionBox\n __css={containerStyles}\n animate={context.isHidden ? 'hidden' : 'visible'}\n initial={false}\n variants={{\n hidden: { y: '-100%' },\n visible: { y: 0, transition: { ease: 'easeInOut' } },\n }}\n className={cx('sui-navbar', props.className)}\n {...context.getContainerProps()}\n >\n {content}\n </MotionBox>\n </NavbarProvider>\n </NavBarStylesProvider>\n )\n})\n\nNavbar.displayName = 'Navbar'\n","import {\n ResponsiveValue,\n UseBreakpointOptions,\n useTheme,\n useBreakpointValue,\n} from '@chakra-ui/react'\n\nconst normalize = (variant: any, toArray?: (value: any) => any) => {\n if (Array.isArray(variant)) return variant\n else if (typeof variant === 'object') return toArray?.(variant)\n if (variant != null) return [variant]\n return []\n}\n\nexport const useResponsiveValue = (\n value: ResponsiveValue<any>,\n options?: UseBreakpointOptions\n) => {\n const theme = useTheme()\n const normalized = normalize(value, theme.__breakpoints?.toArrayValue)\n return useBreakpointValue(normalized, options)\n}\n","import * as React from 'react'\n\n/**\n * Get the first child of a specific type.\n * @param children The children\n * @param type The component type\n */\nexport function getChildOfType(\n children: React.ReactNode,\n type: React.JSXElementConstructor<any>\n) {\n return (React.Children.toArray(children) as React.ReactElement[]).find(\n (item) => item.type === type\n )\n}\n","import * as React from 'react'\n\n/**\n * Get all children of a specific type.\n * @param children The children\n * @param type The component type\n */\nexport function getChildrenOfType(\n children: React.ReactNode,\n type: React.JSXElementConstructor<any> | React.JSXElementConstructor<any>[]\n) {\n return (React.Children.toArray(children) as React.ReactElement[]).filter(\n (item) =>\n Array.isArray(type)\n ? type.some((component) => component === item.type)\n : item.type === type\n )\n}\n","import { chakra, forwardRef, HTMLChakraProps } from '@chakra-ui/react'\nimport { cx } from '@chakra-ui/utils'\nimport { useNavBarStyles } from './navbar-context'\n\nexport interface NavbarBrandProps extends HTMLChakraProps<'div'> {\n children?: React.ReactNode | React.ReactNode[]\n}\n\nexport const NavbarBrand = forwardRef<NavbarBrandProps, 'div'>((props, ref) => {\n const { className, children, ...rest } = props\n\n const styles = useNavBarStyles()\n\n return (\n <chakra.div\n ref={ref}\n __css={styles.brand}\n className={cx('sui-navbar__brand')}\n {...rest}\n >\n {children}\n </chakra.div>\n )\n})\n\nNavbarBrand.displayName = 'NavbarBrand'\n","import {\n chakra,\n forwardRef,\n HTMLChakraProps,\n SystemProps,\n} from '@chakra-ui/react'\nimport { cx } from '@chakra-ui/utils'\n\nimport { useNavBarStyles } from './navbar-context'\n\nexport interface NavbarContentProps extends HTMLChakraProps<'ul'> {\n /**\n * Typically the `NavbarItem` component\n */\n children?: React.ReactNode | React.ReactNode[]\n /**\n * Spacing between each navbar item\n */\n spacing?: SystemProps['margin']\n}\n\nexport const NavbarContent = forwardRef<NavbarContentProps, 'ul'>(\n (props, ref) => {\n const { className, children, spacing = 0, ...rest } = props\n\n const styles = useNavBarStyles()\n\n const contentStyles = {\n ...styles.content,\n '& > *:not(style) ~ *:not(style)': { marginStart: spacing },\n }\n\n return (\n <chakra.ul\n ref={ref}\n __css={contentStyles}\n className={cx('sui-navbar__content', className)}\n {...rest}\n >\n {children}\n </chakra.ul>\n )\n }\n)\n\nNavbarContent.displayName = 'NavbarContent'\n","import { chakra, forwardRef, HTMLChakraProps } from '@chakra-ui/react'\nimport { cx, dataAttr } from '@chakra-ui/utils'\n\nimport { useNavBarStyles } from './navbar-context'\n\nexport interface NavbarItemProps extends HTMLChakraProps<'li'> {\n children?: React.ReactNode\n /**\n * Whether the item is active or not.\n * @default false\n */\n isActive?: boolean\n}\n\nexport const NavbarItem = forwardRef<NavbarItemProps, 'li'>((props, ref) => {\n const { className, children, isActive, ...rest } = props\n\n const styles = useNavBarStyles()\n\n return (\n <chakra.li\n ref={ref}\n __css={styles.item}\n className={cx('sui-navbar__item', className)}\n data-active={dataAttr(isActive)}\n {...rest}\n >\n {children}\n </chakra.li>\n )\n})\n\nNavbarItem.displayName = 'NavbarItem'\n","import { chakra, forwardRef, HTMLChakraProps } from '@chakra-ui/react'\nimport { cx, dataAttr } from '@chakra-ui/utils'\n\nimport { useNavBarStyles } from './navbar-context'\nimport { useLink } from '../provider'\n\nexport interface NavbarLinkProps extends HTMLChakraProps<'a'> {\n children?: React.ReactNode\n /**\n * Whether the link is active or not.\n * @default false\n */\n isActive?: boolean\n}\n\nexport const NavbarLink = forwardRef<NavbarLinkProps, 'li'>((props, ref) => {\n const { className, children, isActive, ...rest } = props\n\n const Link = useLink()\n\n const styles = useNavBarStyles()\n\n return (\n <chakra.a\n as={Link}\n ref={ref}\n __css={styles.link}\n data-active={dataAttr(isActive)}\n className={cx('sui-navbar__link', className)}\n {...rest}\n >\n {children}\n </chakra.a>\n )\n})\n\nNavbarLink.displayName = 'NavbarLink'\n","import * as React from 'react'\n\nimport {\n chakra,\n omitThemingProps,\n useMultiStyleConfig,\n useBreakpointValue,\n SystemStyleObject,\n IconButton,\n useDisclosure,\n Portal,\n forwardRef,\n useTheme,\n useStyleConfig,\n} from '@chakra-ui/react'\nimport { cx, dataAttr, runIfFn } from '@chakra-ui/utils'\nimport { HamburgerIcon } from '../icons'\nimport { motion, AnimatePresence } from 'framer-motion'\n\nimport { useResponsiveValue } from '@saas-ui/react-utils'\n\nimport {\n SidebarProvider,\n useSidebarContext,\n useSidebarToggleButton,\n} from './use-sidebar'\nimport { SidebarStylesProvider, useSidebarStyles } from './sidebar-context'\nimport {\n SidebarOverlayProps,\n SidebarProps,\n SidebarSectionProps,\n SidebarToggleButtonProps,\n} from './sidebar-types'\nimport { getBreakpoints } from './sidebar-utils'\nimport { useAppShellContext } from '../app-shell/app-shell-context'\n\nconst MotionBox = chakra(motion.nav)\n\nconst motionPresets = {\n slideInOut: {\n enter: {\n left: 0,\n transition: { type: 'spring', duration: 0.6, bounce: 0.15 },\n },\n exit: {\n left: '-100%',\n },\n },\n none: {},\n}\n\n/**\n * Side navigation, commonly used as the primary navigation\n *\n * @see Docs https://saas-ui.dev/docs/components/layout/sidebar\n */\nexport const Sidebar = forwardRef<SidebarProps, 'nav'>((props, ref) => {\n const styles = useMultiStyleConfig('SuiSidebar', props)\n const theme = useTheme()\n const defaultProps = theme.components['SuiSidebar']?.defaultProps\n\n const variant = useResponsiveValue(props.variant ?? defaultProps?.variant, {\n fallback: 'base',\n })\n const size = useResponsiveValue(props.size ?? defaultProps?.size, {\n fallback: 'base',\n })\n\n const isCondensed = variant === 'compact'\n\n const {\n spacing = 4,\n children,\n toggleBreakpoint = 'lg',\n className,\n motionPreset = 'slideInOut',\n isOpen: isOpenProp,\n onOpen: onOpenProp,\n onClose: onCloseProp,\n ...containerProps\n } = omitThemingProps(props)\n\n const appShell = useAppShellContext()\n const breakpoints = getBreakpoints(toggleBreakpoint)\n\n const isMobile = useBreakpointValue(breakpoints, {\n fallback: undefined,\n })\n // we check this twice to avoid SSR issues.\n const isMobileInitial = useBreakpointValue(breakpoints)\n const isInitial = typeof isMobile === 'undefined'\n const isControlled = typeof isOpenProp !== 'undefined'\n const isCollapsible = (isMobile || isControlled) && !isCondensed\n\n const disclosure = useDisclosure({\n isOpen: isOpenProp || appShell?.isSidebarOpen,\n onOpen: onOpenProp || appShell?.openSidebar,\n onClose: onCloseProp || appShell?.closeSidebar,\n })\n\n const { isOpen, onClose, onOpen } = disclosure\n\n React.useEffect(() => {\n if ((isInitial && isMobileInitial) || isCondensed || isControlled) {\n // make sure we do not show an initial animation or when this is a compact sidebar\n return\n }\n isMobileInitial ? onClose() : onOpen()\n }, [isInitial, isCondensed, isMobileInitial])\n\n const containerStyles: SystemStyleObject = {\n '& > *:not(style) ~ *:not(style, .sui-resize-handle, .sui-sidebar__toggle-button + *)':\n {\n marginTop: spacing,\n },\n display: 'flex',\n flexDirection: 'column',\n ...(isMobile && isCollapsible\n ? {\n position: 'absolute',\n zIndex: 'modal',\n top: 0,\n left: { base: '-100%', lg: '0' },\n bottom: 0,\n }\n : {\n position: 'relative',\n }),\n }\n\n const context = {\n ...disclosure,\n breakpoints,\n isMobile,\n variant,\n size,\n }\n\n const variants = motionPresets[isCondensed ? 'none' : motionPreset || 'none']\n\n return (\n <SidebarProvider value={context}>\n <SidebarStylesProvider value={styles}>\n <MotionBox\n ref={ref}\n initial={false}\n animate={!isInitial && (!isCollapsible || isOpen ? 'enter' : 'exit')}\n variants={variants}\n __css={{\n ...containerStyles,\n ...styles.container,\n }}\n {...containerProps}\n id={disclosure.getDisclosureProps().id}\n className={cx('sui-sidebar', className)}\n data-compact={dataAttr(isCondensed)}\n data-collapsible={dataAttr(isMobile && isCollapsible)}\n >\n {children}\n </MotionBox>\n </SidebarStylesProvider>\n </SidebarProvider>\n )\n})\n\nSidebar.displayName = 'Sidebar'\nSidebar.id = 'Sidebar'\n\n/**\n * Button that toggles the sidebar visibility.\n *\n * @see Docs https://saas-ui.dev/docs/components/layout/sidebar\n */\nexport const SidebarToggleButton: React.FC<SidebarToggleButtonProps> = (\n props\n) => {\n const { sx, pos, position, variant = 'ghost', icon, isRound, ...rest } = props\n const { isOpen, isMobile, getButtonProps } = useSidebarToggleButton()\n const styles = useStyleConfig('SuiSidebarToggleButton', props)\n const btnStyles = useStyleConfig('Button', {\n ...props,\n variant,\n })\n\n const p = pos ?? position ?? sx?.pos ?? sx?.position\n\n const buttonStyles: SystemStyleObject = {\n display: 'inline-flex',\n appearance: 'none',\n alignItems: 'center',\n justifyContent: 'center',\n userSelect: 'none',\n whiteSpace: 'nowrap',\n verticalAlign: 'middle',\n outline: 'none',\n ...btnStyles,\n ...(isMobile\n ? !p\n ? { position: 'fixed', top: 3, left: 3, zIndex: 'popover' }\n : {}\n : { display: 'none' }),\n ...styles,\n }\n\n const _icon = icon ? (\n runIfFn(icon, {\n isOpen,\n })\n ) : (\n <HamburgerIcon aria-hidden=\"true\" focusable=\"false\" />\n )\n\n return (\n <chakra.button\n __css={buttonStyles}\n padding=\"0\"\n borderRadius={isRound ? 'full' : undefined}\n aria-label={isOpen ? 'Close sidebar' : 'Open sidebar'}\n data-state={isOpen ? 'open' : 'closed'}\n {...rest}\n {...getButtonProps(props)}\n sx={sx}\n className={cx('sui-sidebar__toggle-button', props.className)}\n >\n {_icon}\n </chakra.button>\n )\n}\n\n/**\n * Overlay shown when sidebar is open on mobile.\n *\n * @see Docs https://saas-ui.dev/docs/components/layout/sidebar\n */\nexport const SidebarOverlay: React.FC<SidebarOverlayProps> = (props) => {\n const { onClose, isOpen, isMobile } = useSidebarContext()\n\n const styles = useSidebarStyles()\n\n return (\n <Portal>\n <AnimatePresence>\n {isMobile && isOpen && (\n <MotionBox\n animate={isOpen ? 'enter' : 'exit'}\n initial=\"exit\"\n variants={{\n enter: { opacity: 1 },\n exit: { opacity: 0 },\n }}\n position=\"fixed\"\n top=\"0\"\n right=\"0\"\n bottom=\"0\"\n left=\"0\"\n zIndex=\"overlay\"\n {...props}\n onClick={onClose}\n __css={styles.overlay}\n />\n )}\n </AnimatePresence>\n </Portal>\n )\n}\n\nSidebarToggleButton.displayName = 'SidebarToggleButton'\n\n/**\n * Sidebar section that can contain sidebar items.\n *\n * @see Docs https://saas-ui.dev/docs/components/layout/sidebar\n */\nexport const SidebarSection: React.FC<SidebarSectionProps> = (props) => {\n const { direction = 'column', ...rest } = props\n const styles = useSidebarStyles()\n const sectionStyles = {\n display: 'flex',\n flexDirection: direction,\n ...styles.section,\n }\n\n return (\n <chakra.div\n __css={sectionStyles}\n {...rest}\n className={cx('sui-sidebar__section', props.className)}\n />\n )\n}\n\nSidebarSection.displayName = 'SidebarSection'\n","import * as React from 'react'\n\nimport {\n chakra,\n StackProps,\n HTMLChakraProps,\n useStyleConfig,\n} from '@chakra-ui/react'\n\nimport { cx } from '@chakra-ui/utils'\n\nexport interface NavProps extends HTMLChakraProps<'nav'> {\n orientation?: 'vertical' | 'horizontal'\n spacing?: StackProps['spacing']\n}\n\nexport const Nav: React.FC<NavProps> = (props) => {\n const styles = useStyleConfig('SuiNav', props)\n\n const { children, spacing = 0, orientation = 'vertical', ...rest } = props\n\n const containerStyles = {\n '& > *:not(style) ~ *:not(style)': {\n mt: orientation === 'vertical' ? spacing : undefined,\n me: orientation === 'horizontal' ? spacing : undefined,\n },\n ...styles,\n }\n\n return (\n <chakra.nav\n {...rest}\n __css={containerStyles}\n className={cx('sui-nav', props.className)}\n data-orientation={orientation}\n >\n {children}\n </chakra.nav>\n )\n}\n\nNav.displayName = 'Nav'\n","import * as React from 'react'\n\nimport {\n chakra,\n Collapse,\n HTMLChakraProps,\n ThemingProps,\n useMultiStyleConfig,\n} from '@chakra-ui/react'\n\nimport { runIfFn, cx } from '@chakra-ui/utils'\nimport { MaybeRenderProp } from '@chakra-ui/react-utils'\nimport { ChevronDownIcon, ChevronRightIcon } from '../icons'\n\nimport { CollapseProvider, useCollapseContext, useCollapse } from '../collapse'\n\nimport { NavGroupStylesProvider, useNavGroupStyles } from './nav-context'\n\nexport interface NavGroupTitleProps extends HTMLChakraProps<'div'> {\n leftIcon?: React.ReactElement\n collapseIcon?: MaybeRenderProp<{ isOpen: boolean }>\n isCollapsible?: boolean\n}\n\nconst NavGroupIcon: React.FC<HTMLChakraProps<'span'>> = (props) => {\n const { children, className, ...rest } = props\n\n const _children = React.isValidElement<any>(children)\n ? React.cloneElement(children, {\n 'aria-hidden': true,\n focusable: false,\n })\n : children\n\n const _className = cx('sui-nav-group__icon', className)\n\n return (\n <chakra.span\n display=\"inline-flex\"\n alignSelf=\"center\"\n flexShrink={0}\n {...rest}\n className={_className}\n >\n {_children}\n </chakra.span>\n )\n}\n\nexport const NavGroupTitle: React.FC<NavGroupTitleProps> = (props) => {\n const {\n leftIcon,\n collapseIcon = ({ isOpen }) =>\n isOpen ? <ChevronDownIcon /> : <ChevronRightIcon />,\n children,\n ...rest\n } = props\n const styles = useNavGroupStyles()\n\n const { getToggleProps, isOpen, isCollapsible } = useCollapseContext()\n\n const iconStyles = { marginEnd: 2, ...styles.icon }\n\n const toggleProps = getToggleProps(rest)\n\n return (\n <chakra.div\n {...toggleProps}\n __css={styles.title}\n className={cx(\n 'saas-nav-group__title',\n props.className,\n toggleProps.className\n )}\n >\n {leftIcon && <NavGroupIcon __css={iconStyles}>{leftIcon}</NavGroupIcon>}\n <chakra.span flex=\"1\">{runIfFn(children, { isOpen })}</chakra.span>\n {isCollapsible && (\n <NavGroupIcon>{runIfFn(collapseIcon, { isOpen })}</NavGroupIcon>\n )}\n </chakra.div>\n )\n}\n\nNavGroupTitle.displayName = 'NavGroupTitle'\n\nexport interface NavGroupProps\n extends Omit<HTMLChakraProps<'div'>, 'title'>,\n ThemingProps<'SuiNavGroup'> {\n title?: React.ReactNode\n isCollapsible?: boolean\n defaultIsOpen?: boolean\n onOpen?: () => void\n onClose?: () => void\n icon?: React.ReactElement\n}\n\nexport const NavGroupContent: React.FC<HTMLChakraProps<'div'>> = (props) => {\n const styles = useNavGroupStyles()\n return (\n <chakra.div\n {...props}\n __css={styles.content}\n className={cx('sui-nav-group__content', props.className)}\n />\n )\n}\n\n/**\n * Navigation group containing nav items, used in Sidebar.\n *\n * @see Docs https://saas-ui.dev/docs/components/layout/sidebar\n */\nexport const NavGroup: React.FC<NavGroupProps> = (props) => {\n const {\n title,\n icon,\n isCollapsible = false,\n defaultIsOpen = true,\n onOpen,\n onClose,\n children,\n ...rest\n } = props\n const styles = useMultiStyleConfig('SuiNavGroup', props)\n\n const collapse = useCollapse({\n ...props,\n defaultIsOpen,\n })\n const { getCollapseProps } = collapse\n\n let header = title\n if (typeof title === 'string') {\n header = <NavGroupTitle leftIcon={icon}>{title}</NavGroupTitle>\n }\n\n let content = <NavGroupContent>{children}</NavGroupContent>\n\n if (isCollapsible) {\n content = <Collapse {...(getCollapseProps() as any)}>{content}</Collapse>\n }\n\n return (\n <NavGroupStylesProvider value={styles}>\n <CollapseProvider value={collapse}>\n <chakra.div\n __css={{\n userSelect: 'none',\n ...styles.container,\n }}\n {...rest}\n className={cx('sui-nav-group', props.className)}\n role=\"group\"\n >\n {header}\n {content}\n </chakra.div>\n </CollapseProvider>\n </NavGroupStylesProvider>\n )\n}\n\nNavGroup.displayName = 'NavGroup'\n","import * as React from 'react'\n\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n HTMLChakraProps,\n ThemingProps,\n SystemProps,\n useMultiStyleConfig,\n Tooltip,\n TooltipProps,\n} from '@chakra-ui/react'\n\nimport { cx, dataAttr } from '@chakra-ui/utils'\nimport { useLink } from '../provider'\n\nimport { useSidebarContext } from './use-sidebar'\nimport { NavItemStylesProvider, useNavItemStyles } from './nav-context'\n\nexport interface NavItemLabelProps extends HTMLChakraProps<'span'> {}\n\nexport const NavItemLabel = forwardRef<NavItemLabelProps, 'span'>(\n ({ children, ...props }, ref) => {\n const styles = useNavItemStyles()\n return (\n <chakra.span\n ref={ref}\n __css={styles.label}\n {...props}\n className={cx('sui-nav-item__label', props.className)}\n >\n {children}\n </chakra.span>\n )\n }\n)\n\nNavItemLabel.displayName = 'NavItemLabel'\n\nconst NavItemIcon: React.FC<HTMLChakraProps<'span'>> = (props) => {\n const styles = useNavItemStyles()\n\n const { className, children, ...rest } = props\n\n const child = React.Children.only(children)\n\n const clone = React.isValidElement<HTMLChakraProps<any>>(child)\n ? React.cloneElement(child, {\n focusable: 'false',\n 'aria-hidden': true,\n })\n : null\n\n return (\n <chakra.span\n {...rest}\n className={cx('sui-nav-item__icon', props.className)}\n __css={{\n flexShrink: 0,\n ...styles.icon,\n }}\n >\n {clone}\n </chakra.span>\n )\n}\n\nNavItemIcon.displayName = 'NavItemIcon'\n\nexport interface NavItemProps\n extends HTMLChakraProps<'a'>,\n ThemingProps<'SuiNavItem'> {\n /**\n * The href attribute of the nav item,\n * will be wrapped in a `Link`, if `linkComponent` is configured in SaasProvider.\n */\n href?: string\n /**\n * Icon to be displayed in the nav item\n */\n icon?: React.ReactElement\n /**\n * Inset of the item, used for nested items\n */\n inset?: SystemProps['paddingLeft']\n /**\n * Props to be passed to the tooltip\n * @see Docs https://chakra-ui.com/docs/overlay/tooltip\n */\n tooltipProps?: Omit<TooltipProps, 'children'>\n /**\n * If `true`, the nav item will be active\n */\n isActive?: boolean\n}\n\n/**\n * Navigation item used in the sidebar.\n *\n * @see Docs https://saas-ui.dev/docs/components/layout/sidebar\n */\nexport const NavItem = forwardRef<NavItemProps, 'a'>((props, ref) => {\n const {\n href,\n icon,\n inset,\n className,\n tooltipProps,\n isActive,\n children,\n ...rest\n } = omitThemingProps(props)\n const Link = useLink()\n const { onClose, variant: sidebarVariant } = useSidebarContext() || {}\n const isCompact = sidebarVariant === 'compact'\n\n const styles = useMultiStyleConfig('SuiNavItem', props)\n\n let label = children\n let tooltipLabel = tooltipProps?.label\n if (typeof label === 'string') {\n if (!tooltipLabel && isCompact) {\n tooltipLabel = label\n }\n label = <NavItemLabel>{label}</NavItemLabel>\n }\n\n let as\n if (href) {\n as = Link\n }\n\n const link = (\n <chakra.a\n as={as}\n aria-current={isActive ? 'page' : undefined}\n {...rest}\n ref={ref}\n href={href}\n className=\"sui-nav-item__link\"\n data-active={dataAttr(isActive)}\n __css={styles.link}\n >\n <chakra.span\n __css={{\n ...styles.inner,\n pl: inset,\n }}\n className=\"sui-nav-item__inner\"\n >\n {icon && <NavItemIcon>{icon}</NavItemIcon>}\n {label}\n </chakra.span>\n </chakra.a>\n )\n\n return (\n <NavItemStylesProvider value={styles}>\n <Tooltip\n label={tooltipLabel}\n placement=\"right\"\n openDelay={400}\n {...tooltipProps}\n >\n <chakra.div\n __css={styles.item}\n onClick={onClose}\n data-compact={dataAttr(isCompact)}\n className={cx('sui-nav-item', className)}\n >\n {link}\n </chakra.div>\n </Tooltip>\n </NavItemStylesProvider>\n )\n})\n\nNavItem.displayName = 'NavItem'\n","import * as React from 'react'\n\nimport {\n forwardRef,\n InputGroup,\n Input,\n InputLeftElement,\n InputRightElement,\n IconButton,\n InputProps,\n ThemingProps,\n useMultiStyleConfig,\n useControllableState,\n useMergeRefs,\n} from '@chakra-ui/react'\nimport { callAllHandlers } from '@chakra-ui/utils'\nimport { SearchIcon, CloseIcon } from '../icons'\n\nexport interface SearchInputProps\n extends ThemingProps<'SuiSearchInput'>,\n Omit<InputProps, 'size' | 'variant'> {\n /**\n * The placeholder text for the input\n * @type string\n * @default Search\n */\n placeholder?: string\n /**\n * The icon to render before the input text\n * @type React.ReactElement\n */\n icon?: React.ReactElement\n /**\n * The icon to render in the reset button\n * @type React.ReactElement\n */\n resetIcon?: React.ReactElement\n /**\n * Right element rendered when the value is empty\n * @type React.ReactElement\n */\n rightElement?: React.ReactElement\n /**\n * Callback to trigger when the reset button is clicked or escape key is pressed\n */\n onReset?: () => void\n}\n\nexport const SearchInput = forwardRef<SearchInputProps, 'input'>(\n (props, ref) => {\n const {\n placeholder = 'Search',\n value: valueProp,\n defaultValue: defaultValueProp,\n size,\n variant,\n width,\n icon,\n resetIcon,\n rightElement,\n onChange: onChangeProp,\n onReset: onResetProp,\n onKeyDown: onKeyDownProp,\n ...inputProps\n } = props\n const styles = useMultiStyleConfig('SuiSearchInput', props)\n\n const inputRef = React.useRef<HTMLInputElement>(null)\n\n const [value, setValue] = useControllableState({\n value: valueProp,\n defaultValue: defaultValueProp,\n })\n\n const onChange = React.useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n setValue(e.target.value)\n },\n [setValue]\n )\n\n const onKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Escape') {\n setValue('')\n onReset()\n }\n },\n [onResetProp, setValue]\n )\n\n const onReset = () => {\n setValue('')\n onResetProp?.()\n inputRef.current?.focus()\n }\n\n const btnSize = size === 'lg' ? 'sm' : 'xs'\n\n return (\n <InputGroup size={size} width={width}>\n <InputLeftElement>{icon || <SearchIcon />}</InputLeftElement>\n <Input\n type=\"text\"\n placeholder={placeholder}\n variant={variant}\n size={size}\n value={value}\n ref={useMergeRefs(ref, inputRef)}\n sx={styles.input}\n onChange={callAllHandlers(onChange, onChangeProp)}\n onKeyDown={callAllHandlers(onKeyDown, onKeyDownProp)}\n {...inputProps}\n />\n <InputRightElement>\n {value ? (\n <IconButton\n onClick={onReset}\n size={btnSize}\n variant=\"ghost\"\n aria-label=\"Reset search\"\n icon={resetIcon || <CloseIcon />}\n sx={styles.reset}\n />\n ) : (\n rightElement\n )}\n </InputRightElement>\n </InputGroup>\n )\n }\n)\n\nSearchInput.displayName = 'SearchInput'\n","import * as React from 'react'\n\nimport {\n chakra,\n useTheme,\n useToast,\n UseToastOptions,\n ToastId,\n Alert,\n AlertIcon,\n AlertTitle,\n AlertDescription,\n AlertIconProps,\n CloseButton,\n ButtonGroup,\n Spinner,\n useMultiStyleConfig,\n AlertProps,\n ToastPosition,\n} from '@chakra-ui/react'\nimport { runIfFn } from '@chakra-ui/utils'\n\nconst AlertSpinner: React.FC<AlertIconProps> = (props) => {\n const styles = useMultiStyleConfig('Alert', props)\n return (\n <chakra.span\n display=\"inherit\"\n alignItems=\"center\"\n {...props}\n __css={styles.icon}\n >\n <Spinner size=\"sm\" />\n </chakra.span>\n )\n}\n\nexport interface SnackbarProps\n extends Omit<AlertProps, 'id' | 'title' | 'position'> {\n id?: ToastId\n title?: React.ReactNode\n icon?: React.ReactNode\n action?: React.ReactNode\n description?: React.ReactNode\n position?: ToastPosition\n isClosable?: boolean\n onClose?: () => void\n}\n\nexport const Snackbar: React.FC<SnackbarProps> = (props) => {\n const {\n status,\n variant,\n id,\n title,\n icon,\n isClosable,\n onClose,\n description,\n action,\n } = props\n\n const theme = useTheme()\n\n // Use the snackbar variant if it exists, otherwise default to solid\n const defaultVariant = theme.components?.Alert?.variants?.snackbar\n ? 'snackbar'\n : 'solid'\n\n const alertTitleId =\n typeof id !== 'undefined' ? `toast-${id}-title` : undefined\n\n return (\n <Alert\n status={status}\n variant={variant || defaultVariant}\n id={id !== 'undefined' ? `toast-${id}` : undefined}\n alignItems=\"start\"\n borderRadius=\"md\"\n boxShadow=\"lg\"\n textAlign=\"start\"\n width=\"auto\"\n aria-labelledby={alertTitleId}\n >\n {icon === null ? null : icon ? icon : <AlertIcon />}\n <chakra.div flex=\"1\" maxWidth=\"100%\">\n {title && <AlertTitle id={alertTitleId}>{title}</AlertTitle>}\n {description && (\n <AlertDescription display=\"block\">{description}</AlertDescription>\n )}\n </chakra.div>\n {(action || isClosable) && (\n <ButtonGroup size=\"xs\" variant=\"ghost\" ms=\"2\">\n {action}\n {isClosable && <CloseButton size=\"sm\" onClick={onClose} />}\n </ButtonGroup>\n )}\n </Alert>\n )\n}\n\nexport interface UseSnackbarOptions extends UseToastOptions {\n icon?: React.ReactNode\n action?: React.ReactNode\n variant?:\n | 'snackbar'\n | 'subtle'\n | 'solid'\n | 'left-accent'\n | 'top-accent'\n | string\n}\n\nexport type SnackbarOptions = UseSnackbarOptions | string\n\nexport interface SnackbarPromiseOptions {\n loading?: SnackbarOptions\n success: SnackbarOptions\n error: SnackbarOptions | ((error: any) => SnackbarOptions)\n}\n\nconst defaults = {\n duration: 5000,\n position: 'bottom',\n} as const\n\n/**\n * The snackbar component is used to give feedback after certain actions.\n *\n * @see Docs https://saas-ui.dev/docs/components/feedback/snackbar\n */\nexport function useSnackbar(defaultOptions: UseSnackbarOptions = defaults) {\n const toast = useToast(defaultOptions)\n\n const parseOptions = React.useCallback(\n (options: SnackbarOptions): UseSnackbarOptions => {\n if (typeof options === 'string') {\n return {\n title: options,\n }\n }\n return options\n },\n []\n )\n\n return React.useMemo(() => {\n const snackbar = (options: SnackbarOptions): ToastId => {\n const opts = parseOptions(options)\n return toast({\n render: (props) => (\n <Snackbar {...defaultOptions} {...opts} {...props} />\n ),\n ...opts,\n })\n }\n\n snackbar.info = (options: SnackbarOptions) =>\n snackbar({\n status: 'info',\n ...parseOptions(options),\n })\n\n snackbar.success = (options: SnackbarOptions) =>\n snackbar({\n status: 'success',\n ...parseOptions(options),\n })\n\n snackbar.error = (options: SnackbarOptions) =>\n snackbar({\n status: 'error',\n ...parseOptions(options),\n })\n\n snackbar.promise = async (\n promise: Promise<unknown>,\n { loading, success, error }: SnackbarPromiseOptions\n ) => {\n let toastId: ToastId | undefined\n if (loading) {\n const options = parseOptions(loading)\n toastId = snackbar({\n status: 'info',\n duration: null,\n icon: <AlertSpinner />,\n ...options,\n })\n }\n return promise\n .then((result) => {\n const options: UseSnackbarOptions = {\n status: 'success',\n ...parseOptions(success),\n }\n if (toastId) {\n snackbar.update(toastId, options)\n } else {\n snackbar(options)\n }\n return result\n })\n .catch((e) => {\n const options: UseSnackbarOptions = {\n title: e.name,\n description: e.description,\n status: 'error',\n ...parseOptions(runIfFn(error, e)),\n }\n\n if (toastId) {\n snackbar.update(toastId, options)\n } else {\n snackbar(options)\n }\n\n throw e\n })\n }\n\n snackbar.update = (toastId: ToastId, options: UseToastOptions) => {\n return toast.update(toastId, {\n render: (props) => (\n <Snackbar {...defaultOptions} {...options} {...props} />\n ),\n ...options,\n })\n }\n snackbar.isActive = toast.isActive\n snackbar.close = toast.close\n snackbar.closeAll = toast.closeAll\n\n return snackbar\n }, [toast, defaultOptions])\n}\n\nexport type UseSnackbarReturn = ReturnType<typeof useSnackbar>\n","import {\n CreateStandAloneToastParam,\n createStandaloneToast,\n} from '@chakra-ui/react'\nimport { Snackbar } from './use-snackbar'\n\nexport const createStandAloneSnackbar = (\n options: CreateStandAloneToastParam\n) => {\n const { ToastContainer: SnackbarContainer, toast: snackbar } =\n createStandaloneToast({\n ...options,\n defaultOptions: {\n render: (props) => <Snackbar {...props} />,\n ...options.defaultOptions,\n },\n })\n\n return {\n SnackbarContainer,\n snackbar,\n }\n}\n","import * as React from 'react'\n\nimport {\n chakra,\n forwardRef,\n useMultiStyleConfig,\n HTMLChakraProps,\n createStylesContext,\n Stepper,\n StepperProps,\n StepSeparator,\n Collapse,\n Step,\n StepIndicator,\n StepStatus,\n StepIcon,\n StepNumber,\n Box,\n StepTitle,\n StepDescription,\n ThemingProps,\n} from '@chakra-ui/react'\n\nimport { getChildOfType, getChildrenOfType } from '@saas-ui/react-utils'\nimport { cx } from '@chakra-ui/utils'\n\nimport {\n StepperProvider,\n useStepper,\n useStep,\n useStepperContext,\n} from './use-stepper'\n\nconst [StylesProvider, useStyles] = createStylesContext('Stepper')\n\nexport interface StepsProps\n extends Omit<HTMLChakraProps<'div'>, 'onChange'>,\n ThemingProps<'Stepper'> {\n /**\n * The orientation of the stepper.\n */\n orientation?: 'horizontal' | 'vertical'\n /**\n * The current step index or name.\n */\n step?: number | string\n /**\n * The current step index.\n */\n index?: number\n /**\n * Callback invoked when the step changes.\n */\n onChange?: (index: number) => void\n /**\n * Props to pass to the stepper component.\n *\n * @see Docs https://chakra-ui.com/docs/feedback/stepper#props\n */\n stepperProps?: StepperProps\n}\n\n/**\n * Wrapper element containing the steps.\n */\nexport const Steps = forwardRef<StepsProps, 'div'>((props, ref) => {\n const {\n children,\n orientation = 'horizontal',\n index,\n step,\n onChange,\n variant,\n colorScheme,\n size,\n stepperProps,\n ...rest\n } = props\n const styles = useMultiStyleConfig('Stepper', props)\n\n const context = useStepper({\n step: step ?? index,\n onChange,\n })\n\n const { activeIndex } = context\n\n const isVertical = orientation === 'vertical'\n\n const steps = getChildrenOfType(children, StepsItem)\n\n const itemStyles = {\n position: 'relative',\n ...styles.item,\n }\n\n const elements = steps.reduce<React.ReactElement[]>((memo, step, i, arr) => {\n const item = React.cloneElement(step, {\n key: i,\n ...step.props,\n isActive: activeIndex === i,\n isCompleted: step.props.isCompleted || activeIndex > i,\n })\n\n if (isVertical) {\n memo.push(\n <chakra.div\n className=\"sui-steps__item\"\n key={`content-${i}`}\n __css={itemStyles}\n >\n {item}\n <StepsContent isOpen={activeIndex === i} orientation={orientation}>\n {step.props.children}\n </StepsContent>\n {i < arr.length - 1 ? <StepSeparator /> : null}\n </chakra.div>\n )\n } else {\n memo.push(item)\n }\n\n return memo\n }, [])\n\n const completed = getChildOfType(children, StepsCompleted)\n\n const hasContent = steps[activeIndex]?.props?.children\n\n const content =\n activeIndex >= steps.length ? (\n completed\n ) : !isVertical && hasContent ? (\n <StepsContent orientation={orientation}>\n {steps[activeIndex]?.props?.children}\n </StepsContent>\n ) : null\n\n return (\n <StylesProvider value={styles}>\n <StepperProvider value={context}>\n <chakra.div\n ref={ref}\n __css={styles.container}\n {...rest}\n className={cx('sui-steps', props.className)}\n >\n <Stepper\n index={activeIndex}\n orientation={orientation}\n variant={variant}\n colorScheme={colorScheme}\n size={size}\n {...stepperProps}\n >\n {elements}\n </Stepper>\n {content}\n </chakra.div>\n </StepperProvider>\n </StylesProvider>\n )\n})\n\nSteps.displayName = 'Steps'\n\nexport interface StepsItemProps extends Omit<HTMLChakraProps<'div'>, 'title'> {\n /**\n * Custom render function\n */\n render?: (props?: any) => React.ReactElement\n /**\n * The step name\n */\n name?: string\n /**\n * The step title\n */\n title: React.ReactNode\n /**\n * The step description\n */\n description?: React.ReactNode\n /**\n * Show an icon instead of the step number\n */\n icon?: React.ReactNode\n /**\n * Show the step as active\n */\n isActive?: boolean\n /**\n * Show the step as completed\n */\n isCompleted?: boolean\n}\n\nexport const StepsItem: React.FC<StepsItemProps> = (props) => {\n const { render, icon, title, description, ...rest } = props\n\n const step = useStep(rest)\n\n if (render) {\n return render({\n ...step,\n ...props,\n })\n }\n\n return (\n <Step>\n <StepIndicator>\n <StepStatus\n complete={<StepIcon />}\n incomplete={<StepNumber children={icon} />}\n active={<StepNumber />}\n />\n </StepIndicator>\n\n <Box flexShrink=\"0\">\n <StepTitle>{title}</StepTitle>\n {description && <StepDescription>{description}</StepDescription>}\n </Box>\n\n <StepSeparator />\n </Step>\n )\n}\n\nStepsItem.displayName = 'StepsItem'\n\nexport interface StepperContentProps extends HTMLChakraProps<'div'> {\n /**\n * Show or hide the content, only when orientation is vertical.\n */\n isOpen?: boolean\n /**\n * The orientation of the stepper.\n */\n orientation?: 'horizontal' | 'vertical'\n}\n\n/**\n * Renders the step content, is collapsible.\n */\nexport const StepsContent: React.FC<StepperContentProps> = (props) => {\n const { children, isOpen = true, orientation = 'horizontal', ...rest } = props\n const styles = useStyles()\n\n return (\n <chakra.div\n {...rest}\n __css={styles.content}\n className={cx('sui-steps__content', props.className)}\n data-orientation={orientation}\n >\n {orientation === 'vertical' ? (\n <Collapse\n in={isOpen}\n style={{ overflow: isOpen ? 'visible' : 'hidden' }}\n >\n <chakra.div p=\"2px\">{isOpen ? children : null}</chakra.div>\n </Collapse>\n ) : (\n children\n )}\n </chakra.div>\n )\n}\n\nStepsContent.displayName = 'StepsContent'\n\n/**\n * Shown when all steps have completed.\n */\nexport const StepsCompleted: React.FC<HTMLChakraProps<'div'>> = (props) => {\n const completedStyles = {}\n return (\n <chakra.div\n __css={completedStyles}\n {...props}\n className={cx('sui-steps__completed', props.className)}\n />\n )\n}\n\nStepsCompleted.displayName = 'StepsCompleted'\n","import * as React from 'react'\n\nimport { createContext } from '@chakra-ui/react-utils'\n\nexport const [StepperProvider, useStepperContext] =\n createContext<UseStepperReturn>({\n name: 'StepperContext',\n errorMessage:\n 'useStepperContext: `context` is undefined. Seems you forgot to wrap stepper components in `<Stepper />`',\n })\n\nexport interface UseStepperProps {\n step?: number | string\n isCompleted?: boolean\n onChange?(index: number): void\n}\n\nexport function useStepper(props: UseStepperProps) {\n const { step, onChange } = props\n\n const [activeIndex, setIndex] = React.useState(0)\n\n const stepsRef = React.useRef<string[]>([])\n\n const [, onUpdate] = React.useState(Date.now())\n\n const registerStep = React.useCallback(\n (name: string) => {\n const newSteps = [...stepsRef.current]\n\n if (newSteps.indexOf(name) === -1) {\n newSteps.push(name)\n }\n\n stepsRef.current = newSteps\n onUpdate(Date.now())\n },\n [stepsRef, onUpdate]\n )\n\n const unregisterStep = (name: string) => {\n stepsRef.current = stepsRef.current.slice(stepsRef.current.indexOf(name), 1)\n }\n\n const setStep = (name: string) => {\n const i = stepsRef.current.indexOf(name)\n if (i !== -1) {\n setIndex(i)\n }\n }\n\n const nextStep = () => {\n setIndex(activeIndex + 1)\n }\n\n const prevStep = () => {\n setIndex(activeIndex - 1)\n }\n\n React.useEffect(() => {\n if (typeof step === 'string') {\n setStep(step)\n } else if (typeof step === 'number') {\n setIndex(step)\n } else if (activeIndex === -1) {\n setIndex(0) // initiate the stepper by activating the first step\n }\n }, [step])\n\n React.useEffect(() => {\n onChange?.(activeIndex)\n }, [activeIndex, onChange])\n\n const context = {\n stepsRef,\n activeStep: stepsRef.current[activeIndex],\n activeIndex,\n isFirstStep: activeIndex === 0,\n isLastStep: activeIndex === stepsRef.current.length - 1,\n isCompleted: activeIndex >= stepsRef.current.length,\n setIndex,\n setStep,\n nextStep,\n prevStep,\n registerStep,\n unregisterStep,\n }\n\n return context\n}\n\nexport type UseStepperReturn = ReturnType<typeof useStepper>\n\nexport interface UseStepProps {\n name?: string\n isActive?: boolean\n isCompleted?: boolean\n}\n\nexport function useStep(props: UseStepProps) {\n const { name, isActive, isCompleted } = props\n\n const { registerStep, unregisterStep, activeStep } = useStepperContext()\n\n React.useEffect(() => {\n if (!name) {\n return\n }\n registerStep(name)\n\n return () => {\n unregisterStep(name)\n }\n }, [])\n\n return {\n isActive: name ? activeStep === name : isActive,\n isCompleted,\n }\n}\n\n/**\n * Returns props for a Prev Button\n */\nexport function useStepperPrevButton({ label = 'Back' } = {}) {\n const { isFirstStep, prevStep } = useStepperContext()\n\n return {\n isDisabled: isFirstStep,\n onClick: prevStep,\n children: label,\n }\n}\n\n/**\n * Returns props for a Next Button\n */\nexport function useStepperNextButton({\n label = 'Next',\n submitLabel = 'Submit',\n} = {}) {\n const { isLastStep, isCompleted, nextStep } = useStepperContext()\n\n return {\n isDisabled: isCompleted,\n onClick: nextStep,\n children: isLastStep ? submitLabel : label,\n }\n}\n","import * as React from 'react'\n\nimport { chakra, HTMLChakraProps } from '@chakra-ui/react'\n\nimport { cx } from '@chakra-ui/utils'\n\nexport interface Web3AddressProps extends HTMLChakraProps<'span'> {\n address: string\n startLength?: number\n endLength?: number\n}\n/**\n * Display Web3 addresses in a more readable format.\n *\n * @see Docs https://saas-ui.dev/docs/components/web3/address\n */\nexport const Web3Address: React.FC<Web3AddressProps> = (props) => {\n const { address, startLength = 6, endLength = 4, ...rest } = props\n const start = address.slice(0, startLength)\n const end = address.slice(address.length - endLength, address.length)\n\n return (\n <chakra.span {...rest} className={cx('sui-web3-address', props.className)}>\n {start}...{end}\n </chakra.span>\n )\n}\n\nWeb3Address.displayName = 'Web3Address'\n","import React from 'react'\nimport {\n chakra,\n forwardRef,\n HTMLChakraProps,\n createStylesContext,\n useMultiStyleConfig,\n ThemingProps,\n} from '@chakra-ui/react'\nimport { cx, dataAttr } from '@chakra-ui/utils'\n\nconst [StylesProvider, useStyles] = createStylesContext('SuiTimeline')\n\nexport const useTimelineStyles = useStyles\n\nexport interface TimelineProps\n extends HTMLChakraProps<'ul'>,\n ThemingProps<'SuiTimeline'> {}\n\n/**\n * Display a list of events in chronological order.\n *\n * @see Docs https://saas-ui.dev/docs/components/data-display/timeline\n */\nexport const Timeline: React.FC<TimelineProps> = (props) => {\n const { children, orientation = 'vertical', ...rest } = props\n\n const styles = useMultiStyleConfig('SuiTimeline', props)\n\n const timelineStyles = {\n position: 'relative',\n listStyle: 'none',\n ...styles.container,\n }\n\n return (\n <StylesProvider value={styles}>\n <chakra.ul\n {...rest}\n __css={timelineStyles}\n className={cx('sui-timeline', props.className)}\n data-orientation=\"vertical\"\n >\n {children}\n </chakra.ul>\n </StylesProvider>\n )\n}\n\nTimeline.displayName = 'Timeline'\n\nexport interface TimelineItemProps extends HTMLChakraProps<'li'> {}\n\nexport const TimelineItem = forwardRef<TimelineItemProps, 'li'>(\n (props, ref) => {\n const { children, ...rest } = props\n\n const styles = useStyles()\n\n return (\n <chakra.li\n {...rest}\n ref={ref}\n __css={styles.item}\n className={cx('sui-timeline__item', props.className)}\n >\n {children}\n </chakra.li>\n )\n }\n)\n\nTimelineItem.displayName = 'TimelineItem'\n\nexport interface TimelineContentProps extends HTMLChakraProps<'div'> {}\n\nexport const TimelineContent: React.FC<TimelineContentProps> = (props) => {\n const { children, ...rest } = props\n\n const styles = useStyles()\n\n const contentStyles = {\n flex: 1,\n ...styles.content,\n }\n\n return (\n <chakra.div\n {...rest}\n __css={contentStyles}\n className={cx('sui-timeline__content', props.className)}\n >\n {children}\n </chakra.div>\n )\n}\n\nTimelineContent.displayName = 'TimelineContent'\n\nexport interface TimelineSeparatorProps extends HTMLChakraProps<'div'> {}\n\nexport const TimelineSeparator: React.FC<TimelineSeparatorProps> = (props) => {\n const { children, ...rest } = props\n\n const styles = useStyles()\n\n const separatorStyles = {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n flexShrink: 0,\n ...styles.separator,\n }\n\n return (\n <chakra.div\n {...rest}\n __css={separatorStyles}\n className={cx('sui-timeline__separator', props.className)}\n >\n {children}\n </chakra.div>\n )\n}\n\nTimelineSeparator.displayName = 'TimelineSeparator'\n\nexport interface TimelineDotProps extends HTMLChakraProps<'div'> {}\n\nexport const TimelineDot: React.FC<TimelineDotProps> = (props) => {\n const { children, ...rest } = props\n\n const styles = useStyles()\n\n const dotStyles = {\n ...styles.dot,\n }\n\n return (\n <chakra.div\n {...rest}\n __css={dotStyles}\n className={cx('sui-timeline__dot', props.className)}\n >\n {children}\n </chakra.div>\n )\n}\n\nTimelineDot.displayName = 'TimelineDot'\n\nexport interface TimelineIconProps extends HTMLChakraProps<'div'> {}\n\nexport const TimelineIcon: React.FC<TimelineIconProps> = (props) => {\n const { children, ...rest } = props\n\n const styles = useStyles()\n\n const iconStyles = {\n display: 'flex',\n alignItems: 'center',\n zIndex: 1,\n ...styles.icon,\n }\n\n return (\n <chakra.div\n {...rest}\n __css={iconStyles}\n className={cx('sui-timeline__icon', props.className)}\n data-dot={dataAttr(!children)}\n >\n {children || <TimelineDot />}\n </chakra.div>\n )\n}\n\nTimelineIcon.displayName = 'TimelineIcon'\n\nexport interface TimelineTrackProps extends HTMLChakraProps<'div'> {}\n\nexport const TimelineTrack: React.FC<TimelineTrackProps> = (props) => {\n const { children, ...rest } = props\n\n const styles = useStyles()\n\n return (\n <chakra.div\n {...rest}\n __css={styles.track}\n className={cx('sui-timeline__track', props.className)}\n >\n {children}\n </chakra.div>\n )\n}\n\nTimelineTrack.displayName = 'TimelineTrack'\n","import {\n chakra,\n useStyleConfig,\n IconProps,\n ThemingProps,\n forwardRef,\n omitThemingProps,\n} from '@chakra-ui/react'\nimport { cx } from '@chakra-ui/utils'\nimport { cloneElement, isValidElement } from 'react'\n\nexport interface IconBadgeProps\n extends IconProps,\n ThemingProps<'SuiIconBadge'> {\n /**\n * The icon to be used in the button.\n * @type React.ReactElement\n */\n icon?: React.ReactElement\n /**\n * If `true`, the badge will be perfectly round. Else, it'll be slightly round\n *\n * @default false\n */\n isRound?: boolean\n /**\n * A11y: A label that describes the icon\n */\n 'aria-label'?: string\n}\n\nexport const IconBadge = forwardRef<IconBadgeProps, 'div'>((props, ref) => {\n const { icon, children, isRound, 'aria-label': ariaLabel, ...rest } = props\n const styles = useStyleConfig('SuiIconBadge', props)\n\n const itemProps = omitThemingProps(rest)\n\n /**\n * Passing the icon as prop or children should work\n */\n const element = icon || children\n const _children = isValidElement(element)\n ? cloneElement(element as any, {\n 'aria-hidden': true,\n focusable: false,\n })\n : null\n\n const __css = {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n ...styles,\n }\n\n return (\n <chakra.div\n ref={ref}\n __css={__css}\n borderRadius={isRound ? 'full' : undefined}\n aria-label={ariaLabel}\n {...itemProps}\n className={cx('sui-icon-badge', props.className)}\n >\n {_children}\n </chakra.div>\n )\n})\n","export type Breakpoints = false | 'base' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'\nexport const getBreakpoints = (breakpoint: Breakpoints = 'lg') => {\n return breakpoint\n ? {\n base: true,\n [breakpoint]: false,\n }\n : { base: false }\n}\n","import type { Target, TargetAndTransition, Transition } from \"framer-motion\"\n\nexport type TransitionProperties = {\n /**\n * Custom `transition` definition for `enter` and `exit`\n */\n transition?: TransitionConfig\n /**\n * Custom `transitionEnd` definition for `enter` and `exit`\n */\n transitionEnd?: TransitionEndConfig\n /**\n * Custom `delay` definition for `enter` and `exit`\n */\n delay?: number | DelayConfig\n}\n\ntype TargetResolver<P = {}> = (\n props: P & TransitionProperties,\n) => TargetAndTransition\n\ntype Variant<P = {}> = TargetAndTransition | TargetResolver<P>\n\nexport type Variants<P = {}> = {\n enter: Variant<P>\n exit: Variant<P>\n initial?: Variant<P>\n}\n\ntype WithMotionState<P> = Partial<Record<\"enter\" | \"exit\", P>>\n\nexport type TransitionConfig = WithMotionState<Transition>\n\nexport type TransitionEndConfig = WithMotionState<Target>\n\nexport type DelayConfig = WithMotionState<number>\n\nexport const TRANSITION_EASINGS = {\n ease: [0.25, 0.1, 0.25, 1],\n easeIn: [0.4, 0, 1, 1],\n easeOut: [0, 0, 0.2, 1],\n easeInOut: [0.4, 0, 0.2, 1],\n} as const\n\nexport const TRANSITION_VARIANTS = {\n scale: {\n enter: { scale: 1 },\n exit: { scale: 0.95 },\n },\n fade: {\n enter: { opacity: 1 },\n exit: { opacity: 0 },\n },\n pushLeft: {\n enter: { x: \"100%\" },\n exit: { x: \"-30%\" },\n },\n pushRight: {\n enter: { x: \"-100%\" },\n exit: { x: \"30%\" },\n },\n pushUp: {\n enter: { y: \"100%\" },\n exit: { y: \"-30%\" },\n },\n pushDown: {\n enter: { y: \"-100%\" },\n exit: { y: \"30%\" },\n },\n slideLeft: {\n position: { left: 0, top: 0, bottom: 0, width: \"100%\" },\n enter: { x: 0, y: 0 },\n exit: { x: \"-100%\", y: 0 },\n },\n slideRight: {\n position: { right: 0, top: 0, bottom: 0, width: \"100%\" },\n enter: { x: 0, y: 0 },\n exit: { x: \"100%\", y: 0 },\n },\n slideUp: {\n position: { top: 0, left: 0, right: 0, maxWidth: \"100vw\" },\n enter: { x: 0, y: 0 },\n exit: { x: 0, y: \"-100%\" },\n },\n slideDown: {\n position: { bottom: 0, left: 0, right: 0, maxWidth: \"100vw\" },\n enter: { x: 0, y: 0 },\n exit: { x: 0, y: \"100%\" },\n },\n}\n\nexport type SlideDirection = \"top\" | \"left\" | \"bottom\" | \"right\"\n\nexport function getSlideTransition(options?: { direction?: SlideDirection }) {\n const side = options?.direction ?? \"right\"\n switch (side) {\n case \"right\":\n return TRANSITION_VARIANTS.slideRight\n case \"left\":\n return TRANSITION_VARIANTS.slideLeft\n case \"bottom\":\n return TRANSITION_VARIANTS.slideDown\n case \"top\":\n return TRANSITION_VARIANTS.slideUp\n default:\n return TRANSITION_VARIANTS.slideRight\n }\n}\n\nexport const TRANSITION_DEFAULTS = {\n enter: {\n duration: 0.2,\n ease: TRANSITION_EASINGS.easeOut,\n },\n exit: {\n duration: 0.1,\n ease: TRANSITION_EASINGS.easeIn,\n },\n} as const\n\nexport type WithTransitionConfig<P extends object> = Omit<P, \"transition\"> &\n TransitionProperties & {\n /**\n * If `true`, the element will unmount when `in={false}` and animation is done\n */\n unmountOnExit?: boolean\n /**\n * Show the component; triggers when enter or exit states\n */\n in?: boolean\n }\n\nexport const withDelay = {\n enter: (\n transition: Transition,\n delay?: number | DelayConfig,\n ): Transition & { delay: number | undefined } => ({\n ...transition,\n delay: typeof delay === \"number\" ? delay : delay?.[\"enter\"],\n }),\n exit: (\n transition: Transition,\n delay?: number | DelayConfig,\n ): Transition & { delay: number | undefined } => ({\n ...transition,\n delay: typeof delay === \"number\" ? delay : delay?.[\"exit\"],\n }),\n}\n","import { createContext } from '@chakra-ui/react-context'\n\nimport { UseNavbarReturn } from './use-navbar'\nimport { SystemStyleObject } from '@chakra-ui/styled-system'\n\nexport const [NavbarProvider, useNavbarContext] =\n createContext<UseNavbarReturn>({\n name: 'NavbarContext',\n strict: true,\n errorMessage:\n 'useNavbarContext: `context` is undefined. Seems you forgot to wrap component within <Navbar />',\n })\n\nexport const [NavBarStylesProvider, useNavBarStyles] = createContext<\n Record<string, SystemStyleObject>\n>({\n name: `NavBarStylesContext`,\n hookName: `useNavItemStyles`,\n providerName: '<NavBar />',\n})\n","import { createContext, PropGetter } from '@chakra-ui/react-utils'\nimport {\n ResponsiveValue,\n ThemeTypings,\n UseDisclosureReturn,\n} from '@chakra-ui/react'\nimport { useAppShellContext } from '../app-shell/app-shell-context'\nimport { callAllHandlers } from '@chakra-ui/utils'\n\ntype Variants = 'compact' | 'default'\n\nexport interface UseSidebarReturn extends UseDisclosureReturn {\n isMobile?: boolean\n breakpoints?: ResponsiveValue<boolean>\n variant?: 'Sidebar' extends keyof ThemeTypings['components'] /* @ts-ignore */\n ? ThemeTypings['components']['Sidebar']['variants']\n : Variants\n size?: 'Sidebar' extends keyof ThemeTypings['components'] /* @ts-ignore */\n ? ThemeTypings['components']['Sidebar']['sizes']\n : string\n}\n\nexport const [SidebarProvider, useSidebarContext] =\n createContext<UseSidebarReturn>({\n name: 'SidebarContext',\n strict: false,\n })\n\nexport const useSidebarToggleButton = () => {\n const appShellContext = useAppShellContext()\n const context = useSidebarContext()\n\n const getButtonProps: PropGetter = (props) => {\n return {\n onClick: callAllHandlers(\n context?.onToggle || appShellContext?.toggleSidebar,\n props?.onClick\n ),\n }\n }\n\n return {\n isOpen: context?.isOpen || appShellContext?.isSidebarOpen,\n isMobile: context?.isMobile || appShellContext?.isMobile,\n getButtonProps,\n }\n}\n","import { createContext } from '@chakra-ui/react-context'\nimport { SystemStyleObject } from '@chakra-ui/react'\n\nexport const [SidebarStylesProvider, useSidebarStyles] = createContext<\n Record<string, SystemStyleObject>\n>({\n name: `SidebarStylesContext`,\n hookName: `useSidebarStyles`,\n providerName: '<Sidebar />',\n})\n","import { createContext } from '@chakra-ui/react-context'\nimport { SystemStyleObject } from '@chakra-ui/react'\n\nexport const [NavGroupStylesProvider, useNavGroupStyles] = createContext<\n Record<string, SystemStyleObject>\n>({\n name: `NavGroupStylesContext`,\n hookName: `useNavItemStyles`,\n providerName: '<NavItem />',\n})\n\nexport const [NavItemStylesProvider, useNavItemStyles] = createContext<\n Record<string, SystemStyleObject>\n>({\n name: `NavItemStylesContext`,\n hookName: `useNavItemStyles`,\n providerName: '<NavItem />',\n})\n","import {\n extendTheme,\n withDefaultColorScheme,\n ChakraTheme,\n} from '@chakra-ui/react'\n\nimport colors from './foundations/colors'\nimport { fonts, fontSizes, textStyles } from './foundations/typography'\nimport sizes from './foundations/sizes'\nimport shadows from './foundations/shadows'\nimport semanticTokens from './foundations/semantic-tokens'\nimport components from './components'\n\nexport const theme = extendTheme(\n {\n colors,\n fonts,\n fontSizes,\n textStyles,\n sizes,\n components,\n shadows,\n semanticTokens,\n },\n withDefaultColorScheme({\n colorScheme: 'primary',\n components: ['Radio', 'Switch', 'Checkbox'],\n })\n) as ChakraTheme\n","const colors = {\n black: '#0e1012',\n primary: {\n '50': '#f6f7fd',\n '100': '#dcdff5',\n '200': '#bec3ed',\n '300': '#9aa1e2',\n '400': '#858edd',\n '500': '#6b75d0',\n '600': '#5a63af',\n '700': '#484f8d',\n '800': '#3d4377',\n '900': '#2c3056',\n },\n grayAlpha: {\n '50': 'rgba(249, 249, 250, 0.5)',\n '100': 'rgba(241, 241, 243, 0.5)',\n '200': 'rgba(231, 231, 234, 0.5)',\n '300': 'rgba(211, 212, 216, 0.5)',\n '400': 'rgba(171, 172, 181, 0.5)',\n '500': 'rgba(124, 126, 139, 0.5)',\n '600': 'rgba(81, 84, 101, 0.5)',\n '700': 'rgba(52, 54, 67, 0.5)',\n '800': 'rgba(30, 32, 39, 0.5)',\n '900': 'rgba(24, 25, 31, 0.5)',\n },\n gray: {\n '50': '#f9f9fa',\n '100': '#f1f1f3',\n '200': '#e7e7ea',\n '300': '#d3d4d8',\n '400': '#abacb5',\n '500': '#7c7e8b',\n '600': '#515465',\n '700': '#343643',\n '800': '#1e2027',\n '900': '#18191f',\n },\n purple: {\n '50': '#f9f6fd',\n '100': '#e5daf8',\n '200': '#d3bef4',\n '300': '#b795ec',\n '400': '#a379e7',\n '500': '#8952e0',\n '600': '#7434db',\n '700': '#6023c0',\n '800': '#4f1d9e',\n '900': '#3b1676',\n },\n pink: {\n '50': '#fdf5f9',\n '100': '#f8d9e7',\n '200': '#f3b9d3',\n '300': '#eb8db8',\n '400': '#e56ba2',\n '500': '#dc3882',\n '600': '#c4246c',\n '700': '#a01d58',\n '800': '#7d1745',\n '900': '#5d1133',\n },\n red: {\n '50': '#fdf6f5',\n '100': '#f8d9d8',\n '200': '#f1b8b4',\n '300': '#e98d87',\n '400': '#e4726c',\n '500': '#dc4a41',\n '600': '#d2140a',\n '700': '#ac0900',\n '800': '#930800',\n '900': '#6d0600',\n },\n orange: {\n '50': '#fdfaf6',\n '100': '#f9ebdb',\n '200': '#f1d4b1',\n '300': '#e6b273',\n '400': '#dc9239',\n '500': '#c37b24',\n '600': '#a5681e',\n '700': '#835318',\n '800': '#674113',\n '900': '#553610',\n },\n yellow: {\n '50': '#fffefb',\n '100': '#fff8e9',\n '200': '#feecbd',\n '300': '#fddc87',\n '400': '#fbc434',\n '500': '#d2a01e',\n '600': '#a88018',\n '700': '#836413',\n '800': '#624b0e',\n '900': '#513e0c',\n },\n green: {\n '50': '#f7fdfb',\n '100': '#d2f2e7',\n '200': '#9fe3cd',\n '300': '#64d2ad',\n '400': '#1dbd88',\n '500': '#0ea371',\n '600': '#0c875e',\n '700': '#096949',\n '800': '#07563c',\n '900': '#064731',\n },\n teal: {\n '50': '#f1fcfc',\n '100': '#c0f1f4',\n '200': '#84e4e9',\n '300': '#2dd1da',\n '400': '#22b2ba',\n '500': '#1d979e',\n '600': '#187b80',\n '700': '#125f64',\n '800': '#0f5053',\n '900': '#0d4244',\n },\n cyan: {\n '50': '#f4fbfd',\n '100': '#d0eef7',\n '200': '#bae7f3',\n '300': '#a2deee',\n '400': '#53c2e1',\n '500': '#2ab4d9',\n '600': '#24a2c4',\n '700': '#1e86a2',\n '800': '#196e85',\n '900': '#135567',\n },\n blue: {\n '50': '#f1f6fd',\n '100': '#cde0f6',\n '200': '#a8c8f0',\n '300': '#7fafe8',\n '400': '#5896e1',\n '500': '#347fdb',\n '600': '#236abf',\n '700': '#1b5192',\n '800': '#164278',\n '900': '#123662',\n },\n indigo: {\n '50': '#f8f7fc',\n '100': '#e1ddf5',\n '200': '#c8c0ec',\n '300': '#a89de2',\n '400': '#9789dc',\n '500': '#7f6ed4',\n '600': '#6a58c9',\n '700': '#5546a1',\n '800': '#483c88',\n '900': '#342b62',\n },\n}\n\nexport default colors\n","export const fonts = {\n heading: 'InterVariable, sans-serif',\n body: 'InterVariable, sans-serif',\n}\n\nexport const fontSizes = {\n xs: '0.75rem',\n sm: '0.8125rem',\n md: '0.875rem',\n lg: '1rem',\n xl: '1.125rem',\n '2xl': '1.5rem',\n '3xl': '1.875rem',\n '4xl': '2.25rem',\n '5xl': '3rem',\n '6xl': '3.75rem',\n '7xl': '4.5rem',\n '8xl': '6rem',\n '9xl': '8rem',\n}\n\nexport const textStyles = {}\n","const sizes = {\n container: {\n sm: '30em',\n md: '48em',\n lg: '62em',\n xl: '80em',\n '2xl': '96em',\n },\n}\n\nexport default sizes\n","import { transparentize } from '@chakra-ui/theme-tools'\n\nimport colors from './colors'\n\nconst shadows = {\n xs: 'rgb(0 0 0 / 7%) 0px 1px 1px',\n 'dark-xs': 'rgb(0 0 0 / 7%) 0px 1px 1px',\n outline: `0 0 0 2px ${transparentize(colors.primary[500], 0.6)({ colors })}`,\n}\n\nexport default shadows\n","export default {\n colors: {\n muted: {\n default: 'gray.500',\n _dark: 'gray.400',\n },\n },\n}\n","import { alertAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n StyleFunctionProps,\n} from '@chakra-ui/styled-system'\nimport { transparentize } from '@chakra-ui/theme-tools'\n\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst $fg = cssVar('alert-fg')\nconst $bg = cssVar('alert-bg')\nconst $b = cssVar('alert-border')\n\nfunction getBg(props: StyleFunctionProps) {\n const { theme, colorScheme: c } = props\n const darkBg = transparentize(`${c}.600`, 0.16)(theme)\n return {\n light: `colors.${c}.100`,\n dark: darkBg,\n }\n}\n\nfunction getBorder(props: StyleFunctionProps) {\n const { theme, colorScheme: c } = props\n const darkBg = transparentize(`${c}.300`, 0.16)(theme)\n return {\n light: `colors.${c}.200`,\n dark: darkBg,\n }\n}\n\nconst variantSubtle = definePartsStyle((props) => {\n const { colorScheme: c } = props\n const bg = getBg(props)\n const border = getBorder(props)\n return {\n container: {\n borderWidth: '1px',\n [$fg.variable]: `colors.${c}.500`,\n [$bg.variable]: bg.light,\n [$b.variable]: border.light,\n _dark: {\n [$fg.variable]: `colors.${c}.500`,\n [$bg.variable]: bg.dark,\n [$b.variable]: border.dark,\n },\n },\n }\n})\n\nconst baseStyle = definePartsStyle(() => {\n return {\n container: {\n borderColor: $b.reference,\n borderRadius: 'md',\n fontSize: 'sm',\n },\n icon: {\n w: 4,\n h: 5,\n },\n title: {\n fontSize: 'sm',\n fontWeight: 'medium',\n },\n description: {\n color: 'muted',\n },\n }\n})\n\nexport default defineMultiStyleConfig({\n defaultProps: {\n size: 'sm',\n colorScheme: 'primary',\n },\n baseStyle,\n variants: {\n subtle: variantSubtle,\n },\n})\n","import { defineStyle, defineStyleConfig } from '@chakra-ui/styled-system'\n\nconst variantSolid = defineStyle((props) => {\n const { colorScheme: c, colorMode } = props\n\n let color = `${c}.500`\n let hoverColor = `${c}.600`\n\n if (c === 'neutral' && colorMode === 'dark') {\n color = 'white'\n hoverColor = 'whiteAlpha.800'\n } else if (c === 'neutral') {\n color = 'black'\n hoverColor = 'blackAlpha.800'\n }\n\n return {\n borderWidth: '1px',\n borderColor: color,\n boxShadow: 'xs',\n bg: color,\n color: 'white',\n fontWeight: 'medium',\n _hover: {\n borderColor: hoverColor,\n bg: hoverColor,\n },\n _dark: {\n boxShadow: 'dark-xs',\n },\n }\n})\n\nconst variantGhost = defineStyle((props) => {\n return {\n fontWeight: 'medium',\n _checked: {\n bg: 'blackAlpha.100',\n },\n _dark: {\n _checked: {\n bg: 'whiteAlpha.100',\n },\n },\n }\n})\n\nconst variantOutline = defineStyle((props) => {\n const { colorScheme: c } = props\n\n if (c === 'gray') {\n return {\n fontWeight: 'medium',\n }\n }\n\n return {\n fontWeight: 'medium',\n color: `${c}.500`,\n _hover: {\n color: `${c}.400`,\n bg: 'blackAlpha.50',\n },\n _dark: {\n color: `${c}.500`,\n _hover: {\n color: `${c}.400`,\n bg: 'whiteAlpha.50',\n },\n },\n }\n})\n\nconst variantPrimary = defineStyle((props) => {\n return variantSolid({ ...props, colorScheme: 'primary' })\n})\n\nconst variantSecondary = defineStyle({\n borderWidth: '1px',\n borderColor: 'gray.200',\n boxShadow: 'xs',\n bg: 'white',\n fontWeight: 'medium',\n color: 'inherit',\n _hover: {\n borderColor: 'gray.300',\n bg: 'gray.50',\n },\n _dark: {\n boxShadow: 'dark-xs',\n borderColor: 'gray.600',\n bg: 'gray.700',\n _hover: {\n borderColor: 'gray.500',\n bg: 'gray.600',\n },\n },\n})\n\nconst variantTertiary = defineStyle({\n borderWidth: '1px',\n borderColor: 'gray.200',\n bg: 'gray.200',\n color: 'black',\n fontWeight: 'medium',\n _hover: {\n borderColor: 'gray.300',\n bg: 'gray.200',\n },\n _dark: {\n borderColor: 'gray.700',\n bg: 'gray.700',\n color: 'white',\n _hover: {\n borderColor: 'gray.600',\n },\n },\n})\n\nconst sizes = {\n lg: defineStyle({\n h: '8',\n minW: '10',\n fontSize: 'md',\n px: '4',\n rounded: '6',\n }),\n md: defineStyle({\n h: '7',\n minW: '8',\n fontSize: 'sm',\n px: '3',\n rounded: '4',\n }),\n sm: defineStyle({\n h: '6',\n minW: '6',\n fontSize: 'sm',\n px: '2',\n rounded: '3',\n }),\n xs: defineStyle({\n h: '5',\n minW: '4',\n fontSize: 'xs',\n px: '1',\n rounded: '3',\n }),\n}\n\nexport default defineStyleConfig({\n defaultProps: {\n size: 'md',\n variant: 'secondary',\n },\n variants: {\n solid: variantSolid,\n outline: variantOutline,\n ghost: variantGhost,\n primary: variantPrimary,\n secondary: variantSecondary,\n tertiary: variantTertiary,\n },\n sizes,\n})\n","import { anatomy } from '@chakra-ui/anatomy'\nimport { createMultiStyleConfigHelpers, cssVar } from '@chakra-ui/styled-system'\n\nconst parts = anatomy('card').parts(\n 'container',\n 'header',\n 'title',\n 'subtitle',\n 'body',\n 'footer'\n)\n\nconst { definePartsStyle } = createMultiStyleConfigHelpers(parts.keys)\n\nconst $bg = cssVar('card-bg')\nconst $padding = cssVar('card-padding')\nconst $shadow = cssVar('card-shadow')\nconst $radius = cssVar('card-radius')\nconst $border = cssVar('card-border-width', '0')\nconst $borderColor = cssVar('card-border-color')\n\nconst sizes = {\n sm: definePartsStyle({\n container: {\n [$radius.variable]: 'radii.base',\n [$padding.variable]: 'space.3',\n },\n }),\n md: definePartsStyle({\n container: {\n [$radius.variable]: 'radii.md',\n [$padding.variable]: 'space.4',\n },\n }),\n lg: definePartsStyle({\n container: {\n [$radius.variable]: 'radii.xl',\n [$padding.variable]: 'space.6',\n },\n }),\n}\n\nconst variantShadow = definePartsStyle((props) => {\n const { isHoverable } = props\n return {\n container: {\n [$borderColor.variable]: 'colors.blackAlpha.200',\n [$border.variable]: '1px',\n [$shadow.variable]: 'shadows.sm',\n _hover: isHoverable\n ? {\n [$borderColor.variable]: 'colors.blackAlpha.300',\n }\n : {},\n _dark: {\n [$bg.variable]: 'colors.gray.700',\n [$borderColor.variable]: 'colors.whiteAlpha.50',\n _hover: isHoverable\n ? {\n [$borderColor.variable]: 'colors.whiteAlpha.300',\n }\n : {},\n },\n },\n }\n})\n\nexport default {\n parts: parts.keys,\n defaultProps: {\n variant: 'elevated',\n },\n variants: {\n elevated: variantShadow,\n shadow: variantShadow,\n },\n sizes,\n}\n","import { StyleFunctionProps } from '@chakra-ui/theme-tools'\n\nexport default {\n baseStyle: (props: StyleFunctionProps) => {\n const { colorScheme } = props\n return {\n control: {\n _checked: {\n borderColor: `${colorScheme}.500`,\n bg: `${colorScheme}.500`,\n color: 'white',\n },\n },\n }\n },\n}\n","const defaultProps = {\n size: 'sm',\n}\n\nexport default {\n defaultProps,\n}\n","import { drawerAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle,\n} from '@chakra-ui/styled-system'\n\nimport { runIfFn } from '@chakra-ui/utils'\n\nconst { defineMultiStyleConfig, definePartsStyle } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst $bg = cssVar('drawer-bg')\n\nconst baseStyleOverlay = defineStyle({\n bg: 'blackAlpha.50',\n})\n\nconst baseStyleDialog = defineStyle((props) => {\n return {\n borderRadius: 'md',\n margin: '8px',\n borderWidth: '1px',\n borderColor: 'chakra-border-color',\n backdropFilter: 'blur(10px) contrast(100%) saturate(100%) brightness(200%)',\n [$bg.variable]: 'colors.whiteAlpha.800',\n fontSize: 'md',\n _dark: {\n backdropFilter: 'blur(10px) saturate(190%) contrast(70%) brightness(80%)',\n [$bg.variable]: 'colors.grayAlpha.700',\n },\n }\n})\n\nconst baseStyleHeader = defineStyle({\n px: '4',\n py: '3',\n fontSize: 'md',\n fontWeight: 'semibold',\n})\n\nconst baseStyleCloseButton = defineStyle({\n position: 'absolute',\n top: '2',\n insetEnd: '3',\n})\n\nconst baseStyleBody = defineStyle((props) => {\n return {\n px: '4',\n py: '2',\n }\n})\n\nconst baseStyleFooter = defineStyle({\n px: '3',\n py: '3',\n})\n\nconst baseStyle = definePartsStyle((props) => ({\n overlay: baseStyleOverlay,\n dialog: runIfFn(baseStyleDialog, props),\n header: baseStyleHeader,\n closeButton: baseStyleCloseButton,\n body: runIfFn(baseStyleBody, props),\n footer: baseStyleFooter,\n}))\n\nexport const modalTheme = defineMultiStyleConfig({\n baseStyle,\n})\n\nexport default modalTheme\n","export default {\n defaultProps: {\n size: 'lg',\n },\n}\n","import {\n cssVar,\n defineStyle,\n defineStyleConfig,\n} from '@chakra-ui/styled-system'\n\nconst $bg = cssVar('kbd-bg')\n\nconst baseStyle = defineStyle({\n [$bg.variable]: 'colors.blackAlpha.300',\n _dark: {\n [$bg.variable]: 'colors.whiteAlpha.300',\n },\n bg: $bg.reference,\n borderRadius: 'md',\n borderWidth: '0',\n borderBottomWidth: '0',\n padding: '1px',\n minW: '20px',\n textAlign: 'center',\n ':last-child': {\n mr: 0,\n },\n})\n\nexport const kbdTheme = defineStyleConfig({\n defaultProps: {\n variant: 'solid',\n },\n baseStyle,\n})\n\nexport default kbdTheme\n","import { menuAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle,\n} from '@chakra-ui/styled-system'\n\nconst { defineMultiStyleConfig, definePartsStyle } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst $bg = cssVar('menu-bg')\nconst $shadow = cssVar('menu-shadow')\n\nconst baseStyleList = defineStyle({\n [$bg.variable]: 'colors.whiteAlpha.500',\n [$shadow.variable]: 'shadows.lg',\n backdropFilter: 'blur(10px) contrast(100%) saturate(190%)',\n _dark: {\n [$bg.variable]: 'colors.grayAlpha.700',\n [$shadow.variable]: 'shadows.dark-lg',\n backdropFilter: 'blur(10px) saturate(190%) contrast(70%) brightness(80%)',\n },\n py: '1',\n borderRadius: 'md',\n borderWidth: '1px',\n bg: $bg.reference,\n boxShadow: $shadow.reference,\n})\n\nconst baseStyleItem = defineStyle({\n py: '1.5',\n px: '3',\n mx: '1',\n rounded: 'md',\n fontSize: 'sm',\n width: 'calc(100% - 8px)',\n boxSizing: 'border-box',\n bg: 'transparent',\n _hover: {\n bg: $bg.reference,\n [$bg.variable]: 'colors.grayAlpha.300',\n },\n _focus: {\n bg: $bg.reference,\n [$bg.variable]: 'colors.grayAlpha.300',\n },\n _active: {\n bg: $bg.reference,\n [$bg.variable]: 'colors.grayAlpha.300',\n },\n _expanded: {\n bg: $bg.reference,\n [$bg.variable]: 'colors.grayAlpha.300',\n },\n})\n\nconst baseStyleGroupTitle = defineStyle({\n mx: 4,\n my: 2,\n fontWeight: 'semibold',\n fontSize: 'sm',\n})\n\nconst baseStyleButton = defineStyle({\n transitionProperty: 'common',\n transitionDuration: 'normal',\n})\n\nconst baseStyleDivider = defineStyle({\n my: '1',\n})\n\nconst baseStyle = definePartsStyle({\n button: baseStyleButton,\n list: baseStyleList,\n item: baseStyleItem,\n groupTitle: baseStyleGroupTitle,\n divider: baseStyleDivider,\n})\n\nexport const menuTheme = defineMultiStyleConfig({\n baseStyle,\n})\n\nexport default menuTheme\n","import { modalAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n defineStyle,\n} from '@chakra-ui/styled-system'\n\nimport { runIfFn } from '@chakra-ui/utils'\n\nconst { defineMultiStyleConfig, definePartsStyle } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst baseStyleOverlay = defineStyle({\n bg: 'blackAlpha.50',\n})\n\nconst baseStyleDialog = defineStyle((props) => {\n return {\n bg: 'whiteAlpha.800',\n backdropFilter: 'blur(10px) contrast(100%) saturate(100%) brightness(200%)',\n fontSize: 'md',\n _dark: {\n bg: 'grayAlpha.700',\n boxShadow: 'dark-lg',\n backdropFilter: 'blur(10px) saturate(190%) contrast(70%) brightness(80%)',\n },\n }\n})\n\nconst baseStyleHeader = defineStyle({\n px: '4',\n py: '3',\n fontSize: 'md',\n fontWeight: 'semibold',\n})\n\nconst baseStyleCloseButton = defineStyle({\n position: 'absolute',\n top: '2',\n insetEnd: '3',\n})\n\nconst baseStyleBody = defineStyle((props) => {\n return {\n px: '4',\n py: '2',\n }\n})\n\nconst baseStyleFooter = defineStyle({\n px: '3',\n py: '3',\n})\n\nconst baseStyle = definePartsStyle((props) => ({\n overlay: baseStyleOverlay,\n dialog: runIfFn(baseStyleDialog, props),\n header: baseStyleHeader,\n closeButton: baseStyleCloseButton,\n body: runIfFn(baseStyleBody, props),\n footer: baseStyleFooter,\n}))\n\nexport const modalTheme = defineMultiStyleConfig({\n baseStyle,\n defaultProps: { size: 'md' },\n})\n\nexport default modalTheme\n","import { progressAnatomy as parts } from '@chakra-ui/anatomy'\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\n\nconst { defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys)\n\nexport default defineMultiStyleConfig({\n defaultProps: {\n colorScheme: 'primary',\n },\n baseStyle: (props) => {\n const { colorScheme } = props\n return {\n track: {\n borderRadius: 'md',\n bg: 'gray.200',\n _dark: {\n bg: 'gray.800',\n },\n },\n filledTrack: {\n bg: `${colorScheme}.500`,\n },\n }\n },\n})\n","import { popoverAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle,\n} from '@chakra-ui/styled-system'\n\nimport { runIfFn } from '@chakra-ui/utils'\n\nconst { defineMultiStyleConfig, definePartsStyle } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst $popperBg = cssVar('popper-bg')\nconst $arrowBg = cssVar('popper-arrow-bg')\nconst $arrowShadowColor = cssVar('popper-arrow-shadow-color')\n\nconst baseStyleContent = defineStyle({\n [$popperBg.variable]: `colors.whiteAlpha.800`,\n bg: $popperBg.reference,\n [$arrowBg.variable]: $popperBg.reference,\n [$arrowShadowColor.variable]: `colors.gray.200`,\n backdropFilter: 'blur(10px) contrast(100%) saturate(100%) brightness(200%)',\n _dark: {\n [$popperBg.variable]: `colors.grayAlpha.700`,\n [$arrowShadowColor.variable]: `colors.whiteAlpha.300`,\n backdropFilter: 'blur(10px) saturate(190%) contrast(70%) brightness(80%)',\n },\n})\n\nconst baseStyle = definePartsStyle((props) => ({\n content: runIfFn(baseStyleContent, props),\n}))\n\nexport const popoverTheme = defineMultiStyleConfig({\n baseStyle,\n defaultProps: { size: 'md' },\n})\n\nexport default popoverTheme\n","import { StyleFunctionProps } from '@chakra-ui/theme-tools'\n\nexport default {\n baseStyle: (props: StyleFunctionProps) => {\n const { colorScheme } = props\n return {\n control: {\n _checked: {\n borderColor: `${colorScheme}.500`,\n bg: `${colorScheme}.500`,\n color: 'white',\n },\n },\n }\n },\n}\n","import { mode, StyleFunctionProps } from '@chakra-ui/theme-tools'\n\nexport default {\n defaultProps: {\n colorScheme: 'primary',\n },\n baseStyle: (props: StyleFunctionProps) => {\n const { colorScheme } = props\n return {\n filledTrack: {\n bg: `${colorScheme}.500`,\n },\n }\n },\n}\n","import { switchAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n defineStyle,\n} from '@chakra-ui/styled-system'\nimport { cssVar } from '@chakra-ui/theme-tools'\n\nconst { defineMultiStyleConfig, definePartsStyle } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst $bg = cssVar('switch-bg')\n\nconst baseStyleTrack = defineStyle((props) => {\n const { colorScheme: c } = props\n\n return {\n [$bg.variable]: 'colors.gray.300',\n _dark: {\n [$bg.variable]: 'colors.whiteAlpha.300',\n },\n _checked: {\n [$bg.variable]: `colors.${c}.500`,\n _dark: {\n [$bg.variable]: `colors.${c}.500`,\n },\n },\n bg: $bg.reference,\n }\n})\n\nconst baseStyleThumb = defineStyle({\n bg: 'white',\n _dark: {\n bg: 'blackAlpha.800',\n _checked: {\n bg: 'white',\n },\n },\n})\n\nconst baseStyle = definePartsStyle((props) => ({\n track: baseStyleTrack(props),\n thumb: baseStyleThumb,\n}))\n\nexport const switchTheme = defineMultiStyleConfig({\n baseStyle,\n defaultProps: {\n size: 'md',\n colorScheme: 'primary',\n },\n})\n\nexport default switchTheme\n","import { cssVar, SystemStyleFunction } from '@chakra-ui/theme-tools'\n\nconst $bg = cssVar('tooltip-bg')\nconst $fg = cssVar('tooltip-fg')\nconst $arrowBg = cssVar('popper-arrow-bg')\n\nconst baseStyle: SystemStyleFunction = (props) => {\n return {\n display: 'flex',\n [$bg.variable]: 'colors.white',\n [$fg.variable]: 'colors.blackAlpha.900',\n _dark: {\n [$bg.variable]: 'colors.gray.700',\n [$fg.variable]: 'colors.whiteAlpha.900',\n },\n px: '8px',\n py: '2px',\n bg: [$bg.reference],\n [$arrowBg.variable]: [$bg.reference],\n borderRadius: 'sm',\n fontWeight: 'medium',\n fontSize: 'xs',\n boxShadow: 'md',\n maxW: '320px',\n zIndex: 'tooltip',\n borderWidth: '1px',\n }\n}\n\nexport default {\n baseStyle,\n}\n","import { inputAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle,\n defineStyleConfig,\n} from '@chakra-ui/styled-system'\nimport { getColor, mode } from '@chakra-ui/theme-tools'\n\nconst { definePartsStyle } = createMultiStyleConfigHelpers(parts.keys)\n\nfunction getDefaults(props: Record<string, any>) {\n const { focusBorderColor: fc, errorBorderColor: ec } = props\n return {\n focusBorderColor: fc || mode('blue.500', 'blue.300')(props),\n errorBorderColor: ec || mode('red.500', 'red.300')(props),\n }\n}\n\nconst $borderRadius = cssVar('input-border-radius')\nconst $height = cssVar('input-height')\nconst $padding = cssVar('input-padding')\n\nconst variantOutline = definePartsStyle((props) => {\n const { theme } = props\n const { focusBorderColor: fc, errorBorderColor: ec } = getDefaults(props)\n\n return {\n field: {\n border: '1px solid var(--chakra-colors-chakra-border-color)',\n bg: 'inherit',\n _hover: {\n borderColor: 'gray.300',\n },\n _invalid: {\n borderColor: getColor(theme, ec),\n boxShadow: 'none',\n },\n _focusVisible: {\n zIndex: 1,\n borderColor: getColor(theme, fc),\n boxShadow: 'none',\n },\n _dark: {\n bg: 'gray.900',\n borderColor: 'chakra-border-color',\n _hover: {\n borderColor: 'whiteAlpha.400',\n },\n _invalid: {\n borderColor: getColor(theme, ec),\n },\n _focusVisible: {\n borderColor: getColor(theme, fc),\n },\n },\n },\n addon: {\n borderColor: 'inherit',\n bg: 'gray.100',\n _dark: {\n borderColor: 'whiteAlpha.50',\n bg: 'whiteAlpha.300',\n },\n },\n }\n})\n\nconst sizes = {\n sm: {\n field: {\n [$borderRadius.variable]: 'radii.sm',\n [$height.variable]: 'sizes.7',\n },\n addon: {\n [$borderRadius.variable]: 'radii.sm',\n [$height.variable]: 'sizes.7',\n },\n },\n md: {\n field: {\n [$padding.variable]: 'space.3',\n [$height.variable]: 'sizes.9',\n },\n addon: {\n [$padding.variable]: 'space.3',\n [$height.variable]: 'sizes.9',\n },\n },\n}\n\nconst Input = defineStyleConfig({\n defaultProps: {\n variant: 'outline',\n size: 'sm',\n /* @ts-expect-error */\n focusBorderColor: 'primary.500',\n },\n variants: {\n outline: variantOutline,\n },\n sizes,\n})\n\nexport const formLabelTheme = defineStyleConfig({\n baseStyle: {\n mb: 1,\n },\n variants: {\n horizontal: {\n mb: 0,\n marginStart: '0.5rem',\n },\n },\n})\n\nexport const inputTheme = Input\nexport const numberInputTheme = Input\nexport const pinInputTheme = defineStyleConfig({\n defaultProps: {\n /* @ts-expect-error */\n focusBorderColor: 'primary.500',\n },\n variants: {\n outline: variantOutline,\n },\n sizes,\n})\nexport const textareaTheme = defineStyleConfig({\n defaultProps: {\n /* @ts-expect-error */\n focusBorderColor: 'primary.500',\n },\n variants: {\n outline: defineStyle(\n (props) => inputTheme.variants?.outline(props).field ?? {}\n ),\n },\n})\nexport const nativeSelectTheme = inputTheme\n","import Alert from './alert'\nimport Button from './button'\nimport Card from './card'\nimport Checkbox from './checkbox'\nimport CloseButton from './close-button'\nimport Drawer from './drawer'\nimport Heading from './heading'\nimport Kbd from './kbd'\nimport Menu from './menu'\nimport Modal from './modal'\nimport Progress from './progress'\nimport Popover from './popover'\nimport Radio from './radio'\nimport Slider from './slider'\nimport Switch from './switch'\nimport Tooltip from './tooltip'\nimport {\n inputTheme,\n pinInputTheme,\n formLabelTheme,\n numberInputTheme,\n nativeSelectTheme,\n textareaTheme,\n} from './form'\n\nexport { default as Alert } from './alert'\nexport { default as Button } from './button'\nexport { default as Card } from './card'\nexport { default as Checkbox } from './checkbox'\nexport { default as CloseButton } from './close-button'\nexport { default as Drawer } from './drawer'\nexport { default as Heading } from './heading'\nexport { default as Kbd } from './kbd'\nexport { default as Menu } from './menu'\nexport { default as Modal } from './modal'\nexport { default as Progress } from './progress'\nexport { default as Popover } from './popover'\nexport { default as Radio } from './radio'\nexport { default as Slider } from './slider'\nexport { default as Switch } from './switch'\nexport { default as Tooltip } from './tooltip'\n\nexport {\n inputTheme as Input,\n pinInputTheme as PinInput,\n formLabelTheme as FormLabel,\n numberInputTheme as NumberInput,\n nativeSelectTheme as Select,\n textareaTheme as Textarea,\n} from './form'\n\nexport default {\n Alert,\n Button,\n Card,\n Checkbox,\n CloseButton,\n Drawer,\n Heading,\n Kbd,\n Menu,\n Modal,\n Progress,\n Popover,\n Radio,\n Slider,\n Switch,\n Tooltip,\n Input: inputTheme,\n PinInput: pinInputTheme,\n FormLabel: formLabelTheme,\n NumberInput: numberInputTheme,\n Select: nativeSelectTheme,\n Textarea: textareaTheme,\n}\n"]}