@saas-ui/forms 1.0.0-rc.2 → 1.0.0-rc.5
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +42 -0
- package/ajv/package.json +18 -0
- package/dist/ajv/ajv-resolver.d.ts +11 -0
- package/dist/ajv/ajv-resolver.d.ts.map +1 -0
- package/dist/ajv/index.d.ts +2 -0
- package/dist/ajv/index.d.ts.map +1 -0
- package/dist/ajv/index.js +97 -0
- package/dist/ajv/index.js.map +1 -0
- package/dist/ajv/index.modern.mjs +97 -0
- package/dist/ajv/index.modern.mjs.map +1 -0
- package/dist/auto-form.d.ts +13 -1
- package/dist/auto-form.d.ts.map +1 -1
- package/dist/field.d.ts +1 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.modern.mjs.map +1 -1
- package/dist/layout.d.ts +0 -1
- package/dist/layout.d.ts.map +1 -1
- package/dist/step-form.d.ts.map +1 -1
- package/dist/use-step-form.d.ts +1 -1
- package/dist/use-step-form.d.ts.map +1 -1
- package/dist/zod/index.js +1 -1
- package/dist/zod/index.js.map +1 -1
- package/dist/zod/index.modern.mjs +1 -1
- package/dist/zod/index.modern.mjs.map +1 -1
- package/package.json +25 -17
- package/src/auto-form.tsx +22 -3
- package/src/field-resolver.ts +2 -2
- package/src/field.tsx +19 -19
- package/src/object-field.tsx +3 -3
- package/src/step-form.tsx +9 -11
- package/src/use-step-form.tsx +3 -2
- package/yup/package.json +2 -2
- package/zod/package.json +4 -4
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.modern.mjs","sources":["../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/index.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/Prefixer.js","../../../../node_modules/stylis/src/Serializer.js","../../../../node_modules/@emotion/memoize/dist/emotion-memoize.browser.esm.js","../../../../node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","../../../../node_modules/stylis/src/Middleware.js","../../../../node_modules/@babel/runtime/helpers/esm/extends.js","../../../../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/cjs/react-is.development.js","../../../../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","../../../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js","../../../../node_modules/@emotion/unitless/dist/unitless.browser.esm.js","../../../../node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js","../../../../node_modules/@emotion/hash/dist/hash.browser.esm.js","../../../../node_modules/@emotion/react/dist/emotion-element-cbed451f.browser.esm.js","../../../../node_modules/@emotion/react/dist/emotion-react.browser.esm.js","../../../../node_modules/@chakra-ui/react-utils/dist/chakra-ui-react-utils.esm.js","../../../../node_modules/@chakra-ui/hooks/dist/use-animation-state-5054a9f7.esm.js","../../../../node_modules/@chakra-ui/hooks/dist/chakra-ui-hooks.esm.js","../../../../node_modules/@chakra-ui/color-mode/dist/chakra-ui-color-mode.esm.js","../../../../node_modules/@chakra-ui/styled-system/dist/chakra-ui-styled-system.esm.js","../../../../node_modules/react-fast-compare/index.js","../../../../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.browser.esm.js","../../../../node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js","../../../../node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js","../../../../node_modules/@chakra-ui/system/dist/chakra-ui-system.esm.js","../../../../node_modules/@chakra-ui/visually-hidden/dist/chakra-ui-visually-hidden.esm.js","../../../../node_modules/@chakra-ui/spinner/dist/chakra-ui-spinner.esm.js","../../../../node_modules/@chakra-ui/icon/dist/chakra-ui-icon.esm.js","../../../../node_modules/tslib/tslib.es6.js","../../../../node_modules/framer-motion/dist/es/utils/process.mjs","../../../../node_modules/framer-motion/dist/es/motion/features/definitions.mjs","../../../../node_modules/hey-listen/dist/hey-listen.es.js","../../../../node_modules/framer-motion/dist/es/context/LazyContext.mjs","../../../../node_modules/framer-motion/dist/es/motion/features/use-features.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/context/PresenceContext.mjs","../../../../node_modules/framer-motion/dist/es/utils/is-browser.mjs","../../../../node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs","../../../../node_modules/framer-motion/dist/es/utils/use-reduced-motion.mjs","../../../../node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","../../../../node_modules/framer-motion/dist/es/render/utils/variants.mjs","../../../../node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","../../../../node_modules/framer-motion/dist/es/utils/use-constant.mjs","../../../../node_modules/framesync/dist/es/on-next-frame.mjs","../../../../node_modules/framesync/dist/es/index.mjs","../../../../node_modules/framesync/dist/es/create-render-step.mjs","../../../../node_modules/popmotion/dist/es/utils/clamp.mjs","../../../../node_modules/popmotion/dist/es/animations/utils/find-spring.mjs","../../../../node_modules/popmotion/dist/es/animations/generators/spring.mjs","../../../../node_modules/popmotion/dist/es/utils/progress.mjs","../../../../node_modules/popmotion/dist/es/utils/mix.mjs","../../../../node_modules/style-value-types/dist/es/utils.mjs","../../../../node_modules/style-value-types/dist/es/numbers/index.mjs","../../../../node_modules/style-value-types/dist/es/numbers/units.mjs","../../../../node_modules/style-value-types/dist/es/color/utils.mjs","../../../../node_modules/style-value-types/dist/es/color/hsla.mjs","../../../../node_modules/style-value-types/dist/es/color/rgba.mjs","../../../../node_modules/style-value-types/dist/es/color/hex.mjs","../../../../node_modules/style-value-types/dist/es/color/index.mjs","../../../../node_modules/style-value-types/dist/es/complex/index.mjs","../../../../node_modules/style-value-types/dist/es/complex/filter.mjs","../../../../node_modules/popmotion/dist/es/utils/hsla-to-rgba.mjs","../../../../node_modules/popmotion/dist/es/utils/mix-color.mjs","../../../../node_modules/popmotion/dist/es/utils/inc.mjs","../../../../node_modules/popmotion/dist/es/utils/pipe.mjs","../../../../node_modules/popmotion/dist/es/utils/mix-complex.mjs","../../../../node_modules/popmotion/dist/es/utils/interpolate.mjs","../../../../node_modules/popmotion/dist/es/easing/utils.mjs","../../../../node_modules/popmotion/dist/es/easing/index.mjs","../../../../node_modules/popmotion/dist/es/animations/generators/keyframes.mjs","../../../../node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.mjs","../../../../node_modules/popmotion/dist/es/animations/generators/decay.mjs","../../../../node_modules/popmotion/dist/es/animations/utils/elapsed.mjs","../../../../node_modules/popmotion/dist/es/animations/index.mjs","../../../../node_modules/popmotion/dist/es/utils/velocity-per-second.mjs","../../../../node_modules/popmotion/dist/es/utils/is-point.mjs","../../../../node_modules/popmotion/dist/es/utils/is-point-3d.mjs","../../../../node_modules/popmotion/dist/es/utils/distance.mjs","../../../../node_modules/popmotion/dist/es/easing/cubic-bezier.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/value/utils/is-motion-value.mjs","../../../../node_modules/framer-motion/dist/es/utils/time-conversion.mjs","../../../../node_modules/framer-motion/dist/es/animation/utils/easing.mjs","../../../../node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs","../../../../node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","../../../../node_modules/framer-motion/dist/es/animation/utils/default-transitions.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/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/use-instant-transition-state.mjs","../../../../node_modules/framer-motion/dist/es/utils/resolve-value.mjs","../../../../node_modules/framer-motion/dist/es/animation/utils/transitions.mjs","../../../../node_modules/popmotion/dist/es/animations/inertia.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/utils/has-transform.mjs","../../../../node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs","../../../../node_modules/framer-motion/dist/es/projection/geometry/delta-calc.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/scale-correction.mjs","../../../../node_modules/framer-motion/dist/es/projection/styles/transform.mjs","../../../../node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs","../../../../node_modules/framer-motion/dist/es/render/html/utils/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/value/utils/resolve-motion-value.mjs","../../../../node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs","../../../../node_modules/framer-motion/dist/es/projection/geometry/models.mjs","../../../../node_modules/framer-motion/dist/es/animation/animate.mjs","../../../../node_modules/framer-motion/dist/es/projection/node/id.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/VisualElementHandler.mjs","../../../../node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs","../../../../node_modules/framer-motion/dist/es/motion/index.mjs","../../../../node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","../../../../node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","../../../../node_modules/framer-motion/dist/es/motion/features/use-projection.mjs","../../../../node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.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/motion/utils/is-forced-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/render/html/utils/build-styles.mjs","../../../../node_modules/framer-motion/dist/es/render/html/use-props.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/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/use-props.mjs","../../../../node_modules/framer-motion/dist/es/render/dom/use-render.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/animation/utils/is-animation-controls.mjs","../../../../node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","../../../../node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","../../../../node_modules/framer-motion/dist/es/render/utils/types.mjs","../../../../node_modules/framer-motion/dist/es/render/html/config-motion.mjs","../../../../node_modules/framer-motion/dist/es/events/use-dom-event.mjs","../../../../node_modules/framer-motion/dist/es/gestures/utils/event-type.mjs","../../../../node_modules/framer-motion/dist/es/events/event-info.mjs","../../../../node_modules/framer-motion/dist/es/events/use-pointer-event.mjs","../../../../node_modules/framer-motion/dist/es/events/utils.mjs","../../../../node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs","../../../../node_modules/framer-motion/dist/es/gestures/use-hover-gesture.mjs","../../../../node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs","../../../../node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs","../../../../node_modules/framer-motion/dist/es/utils/warn-once.mjs","../../../../node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","../../../../node_modules/framer-motion/dist/es/motion/features/viewport/use-viewport.mjs","../../../../node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.mjs","../../../../node_modules/framer-motion/dist/es/motion/features/gestures.mjs","../../../../node_modules/framer-motion/dist/es/gestures/use-tap-gesture.mjs","../../../../node_modules/framer-motion/dist/es/gestures/use-focus-gesture.mjs","../../../../node_modules/framer-motion/dist/es/utils/use-id.mjs","../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","../../../../node_modules/framer-motion/dist/es/utils/shallow-compare.mjs","../../../../node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs","../../../../node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs","../../../../node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs","../../../../node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs","../../../../node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.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/render/utils/animation.mjs","../../../../node_modules/framer-motion/dist/es/render/utils/animation-state.mjs","../../../../node_modules/framer-motion/dist/es/motion/features/animations.mjs","../../../../node_modules/framer-motion/dist/es/gestures/PanSession.mjs","../../../../node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs","../../../../node_modules/framer-motion/dist/es/projection/geometry/conversion.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/motion/features/drag.mjs","../../../../node_modules/framer-motion/dist/es/gestures/use-pan-gesture.mjs","../../../../node_modules/framer-motion/dist/es/gestures/drag/use-drag.mjs","../../../../node_modules/framer-motion/dist/es/render/utils/lifecycles.mjs","../../../../node_modules/framer-motion/dist/es/render/index.mjs","../../../../node_modules/framer-motion/dist/es/render/utils/motion-values.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/html/visual-element.mjs","../../../../node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.mjs","../../../../node_modules/framer-motion/dist/es/render/svg/visual-element.mjs","../../../../node_modules/framer-motion/dist/es/render/dom/create-visual-element.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/motion/features/layout/MeasureLayout.mjs","../../../../node_modules/framer-motion/dist/es/motion/features/layout/index.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/render/dom/motion.mjs","../../../../node_modules/framer-motion/dist/es/render/dom/utils/create-config.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/index.mjs","../../../../node_modules/framer-motion/dist/es/utils/use-force-update.mjs","../../../../node_modules/@chakra-ui/transition/dist/chakra-ui-transition.esm.js","../../../../node_modules/@chakra-ui/descendant/dist/chakra-ui-descendant.esm.js","../../../../node_modules/@chakra-ui/button/dist/chakra-ui-button.esm.js","../../../../node_modules/@chakra-ui/form-control/dist/chakra-ui-form-control.esm.js","../../../../node_modules/@zag-js/focus-visible/dist/index.mjs","../../../../node_modules/@chakra-ui/checkbox/dist/chakra-ui-checkbox.esm.js","../../../../node_modules/@chakra-ui/counter/dist/chakra-ui-counter.esm.js","../../../../node_modules/@chakra-ui/input/dist/chakra-ui-input.esm.js","../../../../node_modules/@chakra-ui/layout/dist/chakra-ui-layout.esm.js","../../../../node_modules/@chakra-ui/clickable/dist/chakra-ui-clickable.esm.js","../../../../node_modules/@popperjs/core/lib/enums.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../../node_modules/@popperjs/core/lib/utils/math.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../../../node_modules/@popperjs/core/lib/dom-utils/contains.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../../node_modules/@popperjs/core/lib/utils/within.js","../../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../../../node_modules/@popperjs/core/lib/utils/getVariation.js","../../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../../../node_modules/@popperjs/core/lib/modifiers/flip.js","../../../../node_modules/@popperjs/core/lib/modifiers/hide.js","../../../../node_modules/@popperjs/core/lib/modifiers/offset.js","../../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../../../node_modules/@popperjs/core/lib/utils/format.js","../../../../node_modules/@popperjs/core/lib/utils/validateModifiers.js","../../../../node_modules/@popperjs/core/lib/createPopper.js","../../../../node_modules/@popperjs/core/lib/utils/debounce.js","../../../../node_modules/@popperjs/core/lib/utils/uniqueBy.js","../../../../node_modules/@popperjs/core/lib/utils/mergeByName.js","../../../../node_modules/@popperjs/core/lib/popper.js","../../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../../node_modules/@popperjs/core/lib/modifiers/arrow.js","../../../../node_modules/@chakra-ui/popper/dist/chakra-ui-popper.esm.js","../../../../node_modules/@chakra-ui/menu/dist/chakra-ui-menu.esm.js","../../../../node_modules/@chakra-ui/number-input/dist/chakra-ui-number-input.esm.js","../../../../node_modules/@chakra-ui/pin-input/dist/chakra-ui-pin-input.esm.js","../../../../node_modules/@chakra-ui/radio/dist/chakra-ui-radio.esm.js","../../../../node_modules/@chakra-ui/select/dist/chakra-ui-select.esm.js","../../../../node_modules/@chakra-ui/switch/dist/chakra-ui-switch.esm.js","../../../../node_modules/@chakra-ui/textarea/dist/chakra-ui-textarea.esm.js","../../../saas-ui-number-input/dist/index.modern.mjs","../../../../node_modules/@chakra-ui/icons/node_modules/@chakra-ui/icon/dist/chakra-ui-icon.esm.js","../../../../node_modules/@chakra-ui/icons/dist/chakra-ui-icons.esm.js","../../../saas-ui-button/dist/index.modern.mjs","../../../saas-ui-input-right-button/dist/index.modern.mjs","../../../saas-ui-password-input/dist/index.modern.mjs","../../../saas-ui-radio/dist/index.modern.mjs","../../../saas-ui-pin-input/dist/index.modern.mjs","../../../saas-ui-select/dist/index.modern.mjs","../../../saas-ui-stepper/dist/index.modern.mjs","../../../saas-ui-react-utils/dist/index.modern.mjs","../index.modern.mjs","../../ajv/src/ajv-resolver.ts"],"sourcesContent":["/**\n * @license React\n * react.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'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return{$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}}\nfunction N(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\\/+/g;function Q(a,b){return\"object\"===typeof a&&null!==a&&null!=a.key?escape(\"\"+a.key):b.toString(36)}\nfunction R(a,b,e,d,c){var k=typeof a;if(\"undefined\"===k||\"boolean\"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case \"string\":case \"number\":h=!0;break;case \"object\":switch(a.$$typeof){case l:case n:h=!0}}if(h)return h=a,c=c(h),a=\"\"===d?\".\"+Q(h,0):d,I(c)?(e=\"\",null!=a&&(e=a.replace(P,\"$&/\")+\"/\"),R(c,b,e,\"\",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?\"\":(\"\"+c.key).replace(P,\"$&/\")+\"/\")+a)),b.push(c)),1;h=0;d=\"\"===d?\".\":d+\":\";if(I(a))for(var g=0;g<a.length;g++){k=\na[g];var f=d+Q(k,g);h+=R(k,b,e,f,c)}else if(f=A(a),\"function\"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if(\"object\"===k)throw b=String(a),Error(\"Objects are not valid as a React child (found: \"+(\"[object Object]\"===b?\"object with keys {\"+Object.keys(a).join(\", \")+\"}\":b)+\"). If you meant to render a collection of children, use an array instead.\");return h}\nfunction S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,\"\",\"\",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}\nvar U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};exports.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments)},e)},count:function(a){var b=0;S(a,function(){b++});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error(\"React.Children.only expected to receive a single React element child.\");return a}};exports.Component=E;exports.Fragment=p;\nexports.Profiler=r;exports.PureComponent=G;exports.StrictMode=q;exports.Suspense=w;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;\nexports.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+a+\".\");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=\"\"+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f);\nfor(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g}return{$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};\nexports.forwardRef=function(a){return{$$typeof:v,render:a}};exports.isValidElement=O;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};exports.memo=function(a,b){return{$$typeof:x,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=V.transition;V.transition={};try{a()}finally{V.transition=b}};exports.unstable_act=function(){throw Error(\"act(...) is not supported in production builds of React.\");};\nexports.useCallback=function(a,b){return U.current.useCallback(a,b)};exports.useContext=function(a){return U.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return U.current.useDeferredValue(a)};exports.useEffect=function(a,b){return U.current.useEffect(a,b)};exports.useId=function(){return U.current.useId()};exports.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)};\nexports.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return U.current.useMemo(a,b)};exports.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};exports.useRef=function(a){return U.current.useRef(a)};exports.useState=function(a){return U.current.useState(a)};exports.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)};\nexports.useTransition=function(){return U.current.useTransition()};exports.version=\"18.1.0\";\n","/**\n * @license React\n * react.development.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';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var ReactVersion = '18.1.0';\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\n// ATTENTION\n\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n transition: null\n};\n\nvar ReactCurrentActQueue = {\n current: null,\n // Used to reproduce behavior of `batchedUpdates` in legacy mode.\n isBatchingLegacy: false,\n didScheduleLegacyUpdate: false\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nvar ReactDebugCurrentFrame = {};\nvar currentExtraStackFrame = null;\nfunction setExtraStackFrame(stack) {\n {\n currentExtraStackFrame = stack;\n }\n}\n\n{\n ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {\n {\n currentExtraStackFrame = stack;\n }\n }; // Stack implementation injected by the current renderer.\n\n\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentExtraStackFrame) {\n stack += currentExtraStackFrame;\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\nvar ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner\n};\n\n{\n ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;\n ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar assign = Object.assign;\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n\n var propName; // Original props are copied\n\n var props = assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n // Explicit key\n {\n checkKeyStringCoercion(element.key);\n }\n\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n var _child = children;\n var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n if (isArray(mappedChild)) {\n var escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n {\n // The `if` statement here prevents auto-disabling of the safe\n // coercion ESLint rule, so we must manually disable it below.\n // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {\n checkKeyStringCoercion(mappedChild.key);\n }\n }\n\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n // eslint-disable-next-line react-internal/safe-string-coercion\n escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var iterableChildren = children;\n\n {\n // Warn about using Maps as children\n if (iteratorFn === iterableChildren.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(iterableChildren);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var childrenString = String(children);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n var count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n var n = 0;\n mapChildren(children, function () {\n n++; // Don't return anything\n });\n return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n throw new Error('React.Children.only expected to receive a single React element child.');\n }\n\n return children;\n}\n\nfunction createContext(defaultValue) {\n // TODO: Second argument used to be an optional `calculateChangedBits`\n // function. Warn to reserve for future use?\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null,\n // Add these to use same hidden class in VM as ServerContext\n _defaultValue: null,\n _globalName: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n var hasWarnedAboutDisplayNameOnConsumer = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n\n error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n\n error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n\n return context.Consumer;\n }\n },\n displayName: {\n get: function () {\n return context.displayName;\n },\n set: function (displayName) {\n if (!hasWarnedAboutDisplayNameOnConsumer) {\n warn('Setting `displayName` on Context.Consumer has no effect. ' + \"You should set it directly on the context with Context.displayName = '%s'.\", displayName);\n\n hasWarnedAboutDisplayNameOnConsumer = true;\n }\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n var ctor = payload._result;\n var thenable = ctor(); // Transition to the next state.\n // This might throw either because it's missing or throws. If so, we treat it\n // as still uninitialized and try again next time. Which is the same as what\n // happens if the ctor or any wrappers processing the ctor throws. This might\n // end up fixing it if the resolution was a concurrency bug.\n\n thenable.then(function (moduleObject) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var resolved = payload;\n resolved._status = Resolved;\n resolved._result = moduleObject;\n }\n }, function (error) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n\n if (payload._status === Uninitialized) {\n // In case, we're still uninitialized, then we're waiting for the thenable\n // to resolve. Set it as pending in the meantime.\n var pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n }\n }\n\n if (payload._status === Resolved) {\n var moduleObject = payload._result;\n\n {\n if (moduleObject === undefined) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\\n\\n\" + 'Did you accidentally put curly braces around the import?', moduleObject);\n }\n }\n\n {\n if (!('default' in moduleObject)) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n }\n }\n\n return moduleObject.default;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n var payload = {\n // We use these fields to store the result.\n _status: Uninitialized,\n _result: ctor\n };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes; // $FlowFixMe\n\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null || render.propTypes != null) {\n error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n var elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.forwardRef((props, ref) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!render.name && !render.displayName) {\n render.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n var elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.memo((props) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!type.name && !type.displayName) {\n type.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n {\n if (dispatcher === null) {\n error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n } // Will result in a null access error if accessed outside render phase. We\n // intentionally don't throw our own error because this is in a hot path.\n // Also helps ensure this is inlined.\n\n\n return dispatcher;\n}\nfunction useContext(Context) {\n var dispatcher = resolveDispatcher();\n\n {\n // TODO: add a more generic warning for invalid values.\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n\n return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\nfunction useTransition() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useTransition();\n}\nfunction useDeferredValue(value) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDeferredValue(value);\n}\nfunction useId() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$1.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$1.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n setExtraStackFrame(stack);\n } else {\n setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n {\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n {\n error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n}\n\nfunction startTransition(scope, options) {\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = {};\n var currentTransition = ReactCurrentBatchConfig.transition;\n\n {\n ReactCurrentBatchConfig.transition._updatedFibers = new Set();\n }\n\n try {\n scope();\n } finally {\n ReactCurrentBatchConfig.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n\n currentTransition._updatedFibers.clear();\n }\n }\n }\n}\n\nvar didWarnAboutMessageChannel = false;\nvar enqueueTaskImpl = null;\nfunction enqueueTask(task) {\n if (enqueueTaskImpl === null) {\n try {\n // read require off the module object to get around the bundlers.\n // we don't want them to detect a require and bundle a Node polyfill.\n var requireString = ('require' + Math.random()).slice(0, 7);\n var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's\n // version of setImmediate, bypassing fake timers if any.\n\n enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;\n } catch (_err) {\n // we're in a browser\n // we can't use regular timers because they may still be faked\n // so we try MessageChannel+postMessage instead\n enqueueTaskImpl = function (callback) {\n {\n if (didWarnAboutMessageChannel === false) {\n didWarnAboutMessageChannel = true;\n\n if (typeof MessageChannel === 'undefined') {\n error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');\n }\n }\n }\n\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(undefined);\n };\n }\n }\n\n return enqueueTaskImpl(task);\n}\n\nvar actScopeDepth = 0;\nvar didWarnNoAwaitAct = false;\nfunction act(callback) {\n {\n // `act` calls can be nested, so we track the depth. This represents the\n // number of `act` scopes on the stack.\n var prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n\n if (ReactCurrentActQueue.current === null) {\n // This is the outermost `act` scope. Initialize the queue. The reconciler\n // will detect the queue and use it instead of Scheduler.\n ReactCurrentActQueue.current = [];\n }\n\n var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;\n var result;\n\n try {\n // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only\n // set to `true` while the given callback is executed, not for updates\n // triggered during an async event, because this is how the legacy\n // implementation of `act` behaved.\n ReactCurrentActQueue.isBatchingLegacy = true;\n result = callback(); // Replicate behavior of original `act` implementation in legacy mode,\n // which flushed updates immediately after the scope function exits, even\n // if it's an async function.\n\n if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n ReactCurrentActQueue.didScheduleLegacyUpdate = false;\n flushActQueue(queue);\n }\n }\n } catch (error) {\n popActScope(prevActScopeDepth);\n throw error;\n } finally {\n ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n }\n\n if (result !== null && typeof result === 'object' && typeof result.then === 'function') {\n var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait\n // for it to resolve before exiting the current scope.\n\n var wasAwaited = false;\n var thenable = {\n then: function (resolve, reject) {\n wasAwaited = true;\n thenableResult.then(function (returnValue) {\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // We've exited the outermost act scope. Recursively flush the\n // queue until there's no remaining work.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }, function (error) {\n // The callback threw an error.\n popActScope(prevActScopeDepth);\n reject(error);\n });\n }\n };\n\n {\n if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {\n // eslint-disable-next-line no-undef\n Promise.resolve().then(function () {}).then(function () {\n if (!wasAwaited) {\n didWarnNoAwaitAct = true;\n\n error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');\n }\n });\n }\n }\n\n return thenable;\n } else {\n var returnValue = result; // The callback is not an async function. Exit the current scope\n // immediately, without awaiting.\n\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // Exiting the outermost act scope. Flush the queue.\n var _queue = ReactCurrentActQueue.current;\n\n if (_queue !== null) {\n flushActQueue(_queue);\n ReactCurrentActQueue.current = null;\n } // Return a thenable. If the user awaits it, we'll flush again in\n // case additional work was scheduled by a microtask.\n\n\n var _thenable = {\n then: function (resolve, reject) {\n // Confirm we haven't re-entered another `act` scope, in case\n // the user does something weird like await the thenable\n // multiple times.\n if (ReactCurrentActQueue.current === null) {\n // Recursively flush the queue until there's no remaining work.\n ReactCurrentActQueue.current = [];\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }\n };\n return _thenable;\n } else {\n // Since we're inside a nested `act` scope, the returned thenable\n // immediately resolves. The outer scope will flush the queue.\n var _thenable2 = {\n then: function (resolve, reject) {\n resolve(returnValue);\n }\n };\n return _thenable2;\n }\n }\n }\n}\n\nfunction popActScope(prevActScopeDepth) {\n {\n if (prevActScopeDepth !== actScopeDepth - 1) {\n error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');\n }\n\n actScopeDepth = prevActScopeDepth;\n }\n}\n\nfunction recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n if (queue.length === 0) {\n // No additional work was scheduled. Finish.\n ReactCurrentActQueue.current = null;\n resolve(returnValue);\n } else {\n // Keep flushing work until there's none left.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n }\n });\n } catch (error) {\n reject(error);\n }\n } else {\n resolve(returnValue);\n }\n }\n}\n\nvar isFlushing = false;\n\nfunction flushActQueue(queue) {\n {\n if (!isFlushing) {\n // Prevent re-entrance.\n isFlushing = true;\n var i = 0;\n\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n\n do {\n callback = callback(true);\n } while (callback !== null);\n }\n\n queue.length = 0;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n queue = queue.slice(i + 1);\n throw error;\n } finally {\n isFlushing = false;\n }\n }\n }\n}\n\nvar createElement$1 = createElementWithValidation ;\nvar cloneElement$1 = cloneElementWithValidation ;\nvar createFactory = createFactoryWithValidation ;\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_act = act;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\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 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){/.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'\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 (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3)\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, 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 && characters.charCodeAt(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:\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) {\n\t\t\t\t\t\t\t\t\t// d m s\n\t\t\t\t\t\t\t\t\tcase 100: 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 {MS, MOZ, WEBKIT} from './Enum.js'\nimport {hash, charat, strlen, indexof, replace} from './Utility.js'\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {string}\n */\nexport function prefix (value, length) {\n\tswitch (hash(value, length)) {\n\t\t// color-adjust\n\t\tcase 5103:\n\t\t\treturn WEBKIT + 'print-' + value + value\n\t\t// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\t\tcase 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921:\n\t\t// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\t\tcase 5572: case 6356: case 5844: case 3191: case 6645: case 3005:\n\t\t// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\t\tcase 6391: case 5879: case 5623: case 6135: case 4599: case 4855:\n\t\t// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\t\tcase 4215: case 6389: case 5109: case 5365: case 5621: case 3829:\n\t\t\treturn WEBKIT + value + value\n\t\t// appearance, user-select, transform, hyphens, text-size-adjust\n\t\tcase 5349: case 4246: case 4810: case 6968: case 2756:\n\t\t\treturn WEBKIT + value + MOZ + value + MS + value + value\n\t\t// flex, flex-direction\n\t\tcase 6828: case 4268:\n\t\t\treturn WEBKIT + value + MS + value + value\n\t\t// order\n\t\tcase 6165:\n\t\t\treturn WEBKIT + value + MS + 'flex-' + value + value\n\t\t// align-items\n\t\tcase 5187:\n\t\t\treturn WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value\n\t\t// align-self\n\t\tcase 5443:\n\t\t\treturn WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value\n\t\t// align-content\n\t\tcase 4675:\n\t\t\treturn WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value\n\t\t// flex-shrink\n\t\tcase 5548:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value\n\t\t// flex-basis\n\t\tcase 5292:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value\n\t\t// flex-grow\n\t\tcase 6060:\n\t\t\treturn WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value\n\t\t// transition\n\t\tcase 4554:\n\t\t\treturn WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value\n\t\t// cursor\n\t\tcase 6187:\n\t\t\treturn replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value\n\t\t// background, background-image\n\t\tcase 5495: case 3959:\n\t\t\treturn replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1')\n\t\t// justify-content\n\t\tcase 4968:\n\t\t\treturn replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value\n\t\t// (margin|padding)-inline-(start|end)\n\t\tcase 4095: case 3583: case 4068: case 2532:\n\t\t\treturn replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value\n\t\t// (min|max)?(width|height|inline-size|block-size)\n\t\tcase 8116: case 7059: case 5753: case 5535:\n\t\tcase 5445: case 5701: case 4933: case 4677:\n\t\tcase 5533: case 5789: case 5021: case 4765:\n\t\t\t// stretch, max-content, min-content, fill-available\n\t\t\tif (strlen(value) - 1 - length > 6)\n\t\t\t\tswitch (charat(value, length + 1)) {\n\t\t\t\t\t// (m)ax-content, (m)in-content\n\t\t\t\t\tcase 109:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (charat(value, length + 4) !== 45)\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t// (f)ill-available, (f)it-content\n\t\t\t\t\tcase 102:\n\t\t\t\t\t\treturn replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value\n\t\t\t\t\t// (s)tretch\n\t\t\t\t\tcase 115:\n\t\t\t\t\t\treturn ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value\n\t\t\t\t}\n\t\t\tbreak\n\t\t// position: sticky\n\t\tcase 4949:\n\t\t\t// (s)ticky?\n\t\t\tif (charat(value, length + 1) !== 115)\n\t\t\t\tbreak\n\t\t// display: (flex|inline-flex)\n\t\tcase 6444:\n\t\t\tswitch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n\t\t\t\t// stic(k)y\n\t\t\t\tcase 107:\n\t\t\t\t\treturn replace(value, ':', ':' + WEBKIT) + value\n\t\t\t\t// (inline-)?fl(e)x\n\t\t\t\tcase 101:\n\t\t\t\t\treturn replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value\n\t\t\t}\n\t\t\tbreak\n\t\t// writing-mode\n\t\tcase 5936:\n\t\t\tswitch (charat(value, length + 11)) {\n\t\t\t\t// vertical-l(r)\n\t\t\t\tcase 114:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value\n\t\t\t\t// vertical-r(l)\n\t\t\t\tcase 108:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value\n\t\t\t\t// horizontal(-)tb\n\t\t\t\tcase 45:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value\n\t\t\t}\n\n\t\t\treturn WEBKIT + value + MS + value + value\n\t}\n\n\treturn value\n}\n","import {IMPORT, 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 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","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 default memoize;\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, stringify, COMMENT, rulesheet, middleware, prefixer, serialize, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar last = function last(arr) {\n return arr.length ? arr[arr.length - 1] : null;\n}; // based on https://github.com/thysultan/stylis.js/blob/e6843c373ebcbbfade25ebcc23f540ed8508da0a/src/Tokenizer.js#L239-L244\n\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 && 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') return;\n var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);\n\n if (unsafePseudoClasses && cache.compat !== true) {\n var prevElement = index > 0 ? children[index - 1] : null;\n\n if (prevElement && isIgnoringComment(last(prevElement.children))) {\n return;\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\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 = {}; // $FlowFixMe\n\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 default createCache;\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)\n\t\t\t\t\tbreak\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","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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}","/** @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","/** @license React v16.13.1\n * react-is.development.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';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\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 var maybeStyles = 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","'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","var unitlessKeys = {\n animationIterationCount: 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 default unitlessKeys;\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|(((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\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('Component selectors can only be used in conjunction with @emotion/babel-plugin.');\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('Component selectors can only be used in conjunction with @emotion/babel-plugin.');\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","/* 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 default murmur2;\n","import * as React from 'react';\nimport { createContext, useContext, forwardRef, createElement, Fragment } 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';\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */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\nvar ThemeContext = /* #__PURE__ */createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return 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 = useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/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 = useContext(ThemeContext);\n return /*#__PURE__*/createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/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 useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : function useInsertionEffect(create) {\n create();\n};\nfunction useInsertionEffectMaybe(create) {\n\n useInsertionEffect(create);\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 var rules = useInsertionEffectMaybe(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, 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__*/createElement(Fragment, null, /*#__PURE__*/createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/createElement(WrappedComponent, newProps));\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nexport { CacheProvider as C, Emotion as E, ThemeContext as T, __unsafe_useEmotionCache as _, useTheme as a, ThemeProvider as b, createEmotionProps as c, withTheme as d, hasOwnProperty as h, useInsertionEffectMaybe as u, withEmotionCache as w };\n","import * as React from 'react';\nimport { createElement, useLayoutEffect, useContext, useRef, Fragment } from 'react';\nimport '@emotion/cache';\nimport { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, u as useInsertionEffectMaybe } from './emotion-element-cbed451f.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, b as ThemeProvider, _ as __unsafe_useEmotionCache, a as useTheme, w as withEmotionCache, d as withTheme } from './emotion-element-cbed451f.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport 'hoist-non-react-statics';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\n\nvar pkg = {\n\tname: \"@emotion/react\",\n\tversion: \"11.9.0\",\n\tmain: \"dist/emotion-react.cjs.js\",\n\tmodule: \"dist/emotion-react.esm.js\",\n\tbrowser: {\n\t\t\"./dist/emotion-react.cjs.js\": \"./dist/emotion-react.browser.cjs.js\",\n\t\t\"./dist/emotion-react.esm.js\": \"./dist/emotion-react.browser.esm.js\"\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.js\",\n\t\t\"macro.d.ts\",\n\t\t\"macro.js.flow\"\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.13.10\",\n\t\t\"@emotion/babel-plugin\": \"^11.7.1\",\n\t\t\"@emotion/cache\": \"^11.7.1\",\n\t\t\"@emotion/serialize\": \"^1.0.3\",\n\t\t\"@emotion/utils\": \"^1.1.0\",\n\t\t\"@emotion/weak-memoize\": \"^0.2.5\",\n\t\t\"hoist-non-react-statics\": \"^3.3.1\"\n\t},\n\tpeerDependencies: {\n\t\t\"@babel/core\": \"^7.0.0\",\n\t\treact: \">=16.8.0\"\n\t},\n\tpeerDependenciesMeta: {\n\t\t\"@babel/core\": {\n\t\t\toptional: true\n\t\t},\n\t\t\"@types/react\": {\n\t\t\toptional: true\n\t\t}\n\t},\n\tdevDependencies: {\n\t\t\"@babel/core\": \"^7.13.10\",\n\t\t\"@emotion/css\": \"11.9.0\",\n\t\t\"@emotion/css-prettifier\": \"1.0.1\",\n\t\t\"@emotion/server\": \"11.4.0\",\n\t\t\"@emotion/styled\": \"11.8.1\",\n\t\t\"@types/react\": \"^16.9.11\",\n\t\tdtslint: \"^4.2.1\",\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}\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 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 createElement.apply(null, createElementArgArray);\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : useLayoutEffect;\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, useContext(ThemeContext));\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 = useRef();\n useInsertionEffect(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 useInsertionEffect(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 var rules = useInsertionEffectMaybe(function () {\n\n for (var i = 0; i < serializedArr.length; i++) {\n var res = 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: useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/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 for some reason Jest evaluates modules twice if some consuming module gets mocked with jest.mock\n\n var isJest = typeof jest !== 'undefined';\n\n if (isBrowser && !isJest) {\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 { isFunction } from '@chakra-ui/utils';\nimport * as React from 'react';\n\n/**\n * Assigns a value to a ref function or object\n *\n * @param ref the ref to assign to\n * @param value the value\n */\nfunction assignRef(ref, value) {\n if (ref == null) return;\n\n if (isFunction(ref)) {\n ref(value);\n return;\n }\n\n try {\n // @ts-ignore\n ref.current = value;\n } catch (error) {\n throw new Error(\"Cannot assign value '\" + value + \"' to ref '\" + ref + \"'\");\n }\n}\n/**\n * Combine multiple React refs into a single ref function.\n * This is used mostly when you need to allow consumers forward refs to\n * internal components\n *\n * @param refs refs to assign to value to\n */\n\nfunction mergeRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return function (node) {\n refs.forEach(function (ref) {\n return assignRef(ref, node);\n });\n };\n}\n\n/**\n * Creates a named context, provider, and hook.\n *\n * @param options create context options\n */\nfunction createContext(options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? true : _options$strict,\n _options$errorMessage = _options.errorMessage,\n errorMessage = _options$errorMessage === void 0 ? \"useContext: `context` is undefined. Seems you forgot to wrap component within the Provider\" : _options$errorMessage,\n name = _options.name;\n var Context = /*#__PURE__*/React.createContext(undefined);\n Context.displayName = name;\n\n function useContext() {\n var context = React.useContext(Context);\n\n if (!context && strict) {\n var error = new Error(errorMessage);\n error.name = \"ContextError\";\n Error.captureStackTrace == null ? void 0 : Error.captureStackTrace(error, useContext);\n throw error;\n }\n\n return context;\n }\n\n return [Context.Provider, useContext, Context];\n}\n\n/**\n * Gets only the valid children of a component,\n * and ignores any nullish or falsy child.\n *\n * @param children the children\n */\n\nfunction getValidChildren(children) {\n return React.Children.toArray(children).filter(function (child) {\n return /*#__PURE__*/React.isValidElement(child);\n });\n}\n\nexport { assignRef, createContext, getValidChildren, mergeRefs };\n","import { isBrowser, runIfFn, getOwnerWindow } from '@chakra-ui/utils';\nimport * as React from 'react';\nimport { useState, useEffect } from 'react';\n\n/**\n * useSafeLayoutEffect enables us to safely call `useLayoutEffect` on the browser\n * (for SSR reasons)\n *\n * React currently throws a warning when using useLayoutEffect on the server.\n * To get around it, we can conditionally useEffect on the server (no-op) and\n * useLayoutEffect in the browser.\n *\n * @see https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n */\n\nvar useSafeLayoutEffect = isBrowser ? React.useLayoutEffect : React.useEffect;\n\n/**\n * React hook to persist any value between renders,\n * but keeps it up-to-date if it changes.\n *\n * @param fn the function to persist\n * @param deps the function dependency list\n */\n\nfunction useCallbackRef(fn, deps) {\n if (deps === void 0) {\n deps = [];\n }\n\n var ref = React.useRef(fn);\n useSafeLayoutEffect(function () {\n ref.current = fn;\n }); // eslint-disable-next-line react-hooks/exhaustive-deps\n\n return React.useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return ref.current == null ? void 0 : ref.current.apply(ref, args);\n }, deps);\n}\n\n/**\n * React hook to manage browser event listeners\n *\n * @param event the event name\n * @param handler the event handler function to execute\n * @param env the dom environment to execute against (defaults to `document`)\n * @param options the event listener options\n *\n * @internal\n */\nfunction useEventListener(event, handler, env, options) {\n var listener = useCallbackRef(handler);\n React.useEffect(function () {\n var _runIfFn;\n\n var node = (_runIfFn = runIfFn(env)) != null ? _runIfFn : document;\n\n if (!handler) {\n return;\n }\n\n node.addEventListener(event, listener, options);\n return function () {\n node.removeEventListener(event, listener, options);\n };\n }, [event, env, options, listener, handler]);\n return function () {\n var _runIfFn2;\n\n var node = (_runIfFn2 = runIfFn(env)) != null ? _runIfFn2 : document;\n node.removeEventListener(event, listener, options);\n };\n}\n\nfunction useAnimationState(props) {\n var isOpen = props.isOpen,\n ref = props.ref;\n\n var _useState = useState(isOpen),\n mounted = _useState[0],\n setMounted = _useState[1];\n\n var _useState2 = useState(false),\n once = _useState2[0],\n setOnce = _useState2[1];\n\n useEffect(function () {\n if (!once) {\n setMounted(isOpen);\n setOnce(true);\n }\n }, [isOpen, once, mounted]);\n useEventListener(\"animationend\", function () {\n setMounted(isOpen);\n }, function () {\n return ref.current;\n });\n var hidden = isOpen ? false : !mounted;\n return {\n present: !hidden,\n onComplete: function onComplete() {\n var _ref$current;\n\n var win = getOwnerWindow(ref.current);\n var evt = new win.CustomEvent(\"animationend\", {\n bubbles: true\n });\n (_ref$current = ref.current) == null ? void 0 : _ref$current.dispatchEvent(evt);\n }\n };\n}\n\nexport { useSafeLayoutEffect as a, useEventListener as b, useAnimationState as c, useCallbackRef as u };\n","import * as React from 'react';\nimport React__default, { useState, useMemo, useCallback, useEffect, useRef } from 'react';\nimport { u as useCallbackRef, a as useSafeLayoutEffect, b as useEventListener } from './use-animation-state-5054a9f7.esm.js';\nexport { c as useAnimationState, u as useCallbackRef, b as useEventListener, a as useSafeLayoutEffect } from './use-animation-state-5054a9f7.esm.js';\nimport copy from 'copy-to-clipboard';\nimport { runIfFn, getBox, callAllHandlers, wrapPointerEventHandler, getPointerEventName, hasFocusWithin, focus, getActiveElement, contains, isTabbable, detectBrowser, isRefObject, isActiveElement, getOwnerDocument, getAllFocusable, noop, PanSession } from '@chakra-ui/utils';\n\n/**\n * React hook to manage boolean (on - off) states\n *\n * @param initialState the initial boolean state value\n */\nfunction useBoolean(initialState) {\n if (initialState === void 0) {\n initialState = false;\n }\n\n var _useState = useState(initialState),\n value = _useState[0],\n setValue = _useState[1];\n\n var callbacks = useMemo(function () {\n return {\n on: function on() {\n return setValue(true);\n },\n off: function off() {\n return setValue(false);\n },\n toggle: function toggle() {\n return setValue(function (prev) {\n return !prev;\n });\n }\n };\n }, []);\n return [value, callbacks];\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded = [\"timeout\"];\n\n/**\n * React hook to copy content to clipboard\n *\n * @param text the text or value to copy\n * @param {Number} [optionsOrTimeout=1500] optionsOrTimeout - delay (in ms) to switch back to initial state once copied.\n * @param {Object} optionsOrTimeout\n * @param {string} optionsOrTimeout.format - set the desired MIME type\n * @param {number} optionsOrTimeout.timeout - delay (in ms) to switch back to initial state once copied.\n */\nfunction useClipboard(text, optionsOrTimeout) {\n if (optionsOrTimeout === void 0) {\n optionsOrTimeout = {};\n }\n\n var _useState = useState(false),\n hasCopied = _useState[0],\n setHasCopied = _useState[1];\n\n var _ref = typeof optionsOrTimeout === \"number\" ? {\n timeout: optionsOrTimeout\n } : optionsOrTimeout,\n _ref$timeout = _ref.timeout,\n timeout = _ref$timeout === void 0 ? 1500 : _ref$timeout,\n copyOptions = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var onCopy = useCallback(function () {\n var didCopy = copy(text, copyOptions);\n setHasCopied(didCopy);\n }, [text, copyOptions]);\n useEffect(function () {\n var timeoutId = null;\n\n if (hasCopied) {\n timeoutId = window.setTimeout(function () {\n setHasCopied(false);\n }, timeout);\n }\n\n return function () {\n if (timeoutId) {\n window.clearTimeout(timeoutId);\n }\n };\n }, [timeout, hasCopied]);\n return {\n value: text,\n onCopy: onCopy,\n hasCopied: hasCopied\n };\n}\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 `useConst`\n * you can ensure that initializers don't execute twice or more.\n */\nfunction useConst(init) {\n // Use useRef to store the value because it's the least expensive built-in\n // hook that works here. We could also use `useState` but that's more\n // expensive internally due to reducer handling which we don't need.\n var ref = useRef(null);\n\n if (ref.current === null) {\n ref.current = typeof init === \"function\" ? init() : init;\n }\n\n return ref.current;\n}\n\nfunction useControllableProp(prop, state) {\n var isControlled = prop !== undefined;\n var value = isControlled && typeof prop !== \"undefined\" ? prop : state;\n return [isControlled, value];\n}\n\n/**\n * React hook for using controlling component state.\n * @param props\n */\nfunction useControllableState(props) {\n var valueProp = props.value,\n defaultValue = props.defaultValue,\n onChange = props.onChange,\n _props$shouldUpdate = props.shouldUpdate,\n shouldUpdate = _props$shouldUpdate === void 0 ? function (prev, next) {\n return prev !== next;\n } : _props$shouldUpdate;\n var onChangeProp = useCallbackRef(onChange);\n var shouldUpdateProp = useCallbackRef(shouldUpdate);\n\n var _React$useState = React.useState(defaultValue),\n valueState = _React$useState[0],\n setValue = _React$useState[1];\n\n var isControlled = valueProp !== undefined;\n var value = isControlled ? valueProp : valueState;\n var updateValue = React.useCallback(function (next) {\n var nextValue = runIfFn(next, value);\n\n if (!shouldUpdateProp(value, nextValue)) {\n return;\n }\n\n if (!isControlled) {\n setValue(nextValue);\n }\n\n onChangeProp(nextValue);\n }, [isControlled, onChangeProp, value, shouldUpdateProp]);\n return [value, updateValue];\n}\n\n/**\n * React hook to measure a component's dimensions\n *\n * @param ref ref of the component to measure\n * @param observe if `true`, resize and scroll observers will be turned on\n */\n\nfunction useDimensions(ref, observe) {\n var _React$useState = React.useState(null),\n dimensions = _React$useState[0],\n setDimensions = _React$useState[1];\n\n var rafId = React.useRef();\n useSafeLayoutEffect(function () {\n if (!ref.current) return undefined;\n var node = ref.current;\n\n function measure() {\n rafId.current = requestAnimationFrame(function () {\n var boxModel = getBox(node);\n setDimensions(boxModel);\n });\n }\n\n measure();\n\n if (observe) {\n window.addEventListener(\"resize\", measure);\n window.addEventListener(\"scroll\", measure);\n }\n\n return function () {\n if (observe) {\n window.removeEventListener(\"resize\", measure);\n window.removeEventListener(\"scroll\", measure);\n }\n\n if (rafId.current) {\n cancelAnimationFrame(rafId.current);\n }\n };\n }, [observe]);\n return dimensions;\n}\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n// This implementation is heavily inspired by react-aria's implementation\nfunction useId(idProp, prefix) {\n var id = React.useId();\n return React.useMemo(function () {\n return idProp || [prefix, id].filter(Boolean).join(\"-\");\n }, [idProp, prefix, id]);\n}\n/**\n * React hook to generate ids for use in compound components\n *\n * @param idProp the external id passed from the user\n * @param prefixes array of prefixes to use\n *\n * @example\n *\n * ```js\n * const [buttonId, menuId] = useIds(\"52\", \"button\", \"menu\")\n *\n * // buttonId will be `button-52`\n * // menuId will be `menu-52`\n * ```\n */\n\nfunction useIds(idProp) {\n for (var _len = arguments.length, prefixes = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n prefixes[_key - 1] = arguments[_key];\n }\n\n var id = useId(idProp);\n return React.useMemo(function () {\n return prefixes.map(function (prefix) {\n return prefix + \"-\" + id;\n });\n }, [id, prefixes]);\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 `aria-labelledby`.\n *\n * @param partId - The unique id for the component part\n *\n * @example\n * const { ref, id } = useOptionalPart<HTMLInputElement>(`${id}-label`)\n */\n\nfunction useOptionalPart(partId) {\n var _React$useState = React.useState(null),\n id = _React$useState[0],\n setId = _React$useState[1];\n\n var ref = React.useCallback(function (node) {\n setId(node ? partId : null);\n }, [partId]);\n return {\n ref: ref,\n id: id,\n isRendered: Boolean(id)\n };\n}\n\nfunction useDisclosure(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n onCloseProp = _props.onClose,\n onOpenProp = _props.onOpen,\n isOpenProp = _props.isOpen,\n idProp = _props.id;\n var onOpenPropCallbackRef = useCallbackRef(onOpenProp);\n var onClosePropCallbackRef = useCallbackRef(onCloseProp);\n\n var _React$useState = React.useState(props.defaultIsOpen || false),\n isOpenState = _React$useState[0],\n setIsOpen = _React$useState[1];\n\n var _useControllableProp = useControllableProp(isOpenProp, isOpenState),\n isControlled = _useControllableProp[0],\n isOpen = _useControllableProp[1];\n\n var id = useId(idProp, \"disclosure\");\n var onClose = React.useCallback(function () {\n if (!isControlled) {\n setIsOpen(false);\n }\n\n onClosePropCallbackRef == null ? void 0 : onClosePropCallbackRef();\n }, [isControlled, onClosePropCallbackRef]);\n var onOpen = React.useCallback(function () {\n if (!isControlled) {\n setIsOpen(true);\n }\n\n onOpenPropCallbackRef == null ? void 0 : onOpenPropCallbackRef();\n }, [isControlled, onOpenPropCallbackRef]);\n var onToggle = React.useCallback(function () {\n var action = isOpen ? onClose : onOpen;\n action();\n }, [isOpen, onOpen, onClose]);\n return {\n isOpen: !!isOpen,\n onOpen: onOpen,\n onClose: onClose,\n onToggle: onToggle,\n isControlled: isControlled,\n getButtonProps: function getButtonProps(props) {\n if (props === void 0) {\n props = {};\n }\n\n return _extends({}, props, {\n \"aria-expanded\": isOpen,\n \"aria-controls\": id,\n onClick: callAllHandlers(props.onClick, onToggle)\n });\n },\n getDisclosureProps: function getDisclosureProps(props) {\n if (props === void 0) {\n props = {};\n }\n\n return _extends({}, props, {\n hidden: !isOpen,\n id: id\n });\n }\n };\n}\n\nfunction useEventListenerMap() {\n var listeners = React.useRef(new Map());\n var currentListeners = listeners.current;\n var add = React.useCallback(function (el, type, listener, options) {\n var pointerEventListener = wrapPointerEventHandler(listener, type === \"pointerdown\");\n listeners.current.set(listener, {\n __listener: pointerEventListener,\n type: getPointerEventName(type),\n el: el,\n options: options\n });\n el.addEventListener(type, pointerEventListener, options);\n }, []);\n var remove = React.useCallback(function (el, type, listener, options) {\n var _listeners$current$ge = listeners.current.get(listener),\n pointerEventListener = _listeners$current$ge.__listener;\n\n el.removeEventListener(type, pointerEventListener, options);\n listeners.current[\"delete\"](pointerEventListener);\n }, []);\n React.useEffect(function () {\n return function () {\n currentListeners.forEach(function (value, key) {\n remove(value.el, value.type, key, value.options);\n });\n };\n }, [remove, currentListeners]);\n return {\n add: add,\n remove: remove\n };\n}\n\n/**\n * React effect hook that invokes only on update.\n * It doesn't invoke on mount\n */\n\nvar useUpdateEffect = function useUpdateEffect(effect, deps) {\n var renderCycleRef = React.useRef(false);\n var effectCycleRef = React.useRef(false);\n React.useEffect(function () {\n var isMounted = renderCycleRef.current;\n var shouldRun = isMounted && effectCycleRef.current;\n\n if (shouldRun) {\n return effect();\n }\n\n effectCycleRef.current = true; // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n React.useEffect(function () {\n renderCycleRef.current = true;\n return function () {\n renderCycleRef.current = false;\n };\n }, []);\n};\n\n/**\n * React hook to focus an element conditionally\n *\n * @param ref the ref of the element to focus\n * @param options focus management options\n */\nfunction useFocusEffect(ref, options) {\n var shouldFocus = options.shouldFocus,\n preventScroll = options.preventScroll;\n useUpdateEffect(function () {\n var node = ref.current;\n if (!node || !shouldFocus) return;\n\n if (!hasFocusWithin(node)) {\n focus(node, {\n preventScroll: preventScroll,\n nextTick: true\n });\n }\n }, [shouldFocus, ref, preventScroll]);\n}\n\nfunction preventReturnFocus(containerRef) {\n var el = containerRef.current;\n if (!el) return false;\n var activeElement = getActiveElement(el);\n if (!activeElement) return false;\n if (contains(el, activeElement)) return false;\n if (isTabbable(activeElement)) return true;\n return false;\n}\n/**\n * Popover hook to manage the focus when the popover closes or hides.\n *\n * We either want to return focus back to the popover trigger or\n * let focus proceed normally if user moved to another interactive\n * element in the viewport.\n */\n\n\nfunction useFocusOnHide(containerRef, options) {\n var shouldFocusProp = options.shouldFocus,\n visible = options.visible,\n focusRef = options.focusRef;\n var shouldFocus = shouldFocusProp && !visible;\n useUpdateEffect(function () {\n if (!shouldFocus) return;\n\n if (preventReturnFocus(containerRef)) {\n return;\n }\n\n var el = (focusRef == null ? void 0 : focusRef.current) || containerRef.current;\n\n if (el) {\n focus(el, {\n nextTick: true\n });\n }\n }, [shouldFocus, containerRef, focusRef]);\n}\n\n/**\n * Credit goes to `framer-motion` of this useful utilities.\n * License can be found here: https://github.com/framer/motion\n */\n/**\n * @internal\n */\n\nfunction usePointerEvent(env, eventName, handler, options) {\n return useEventListener(getPointerEventName(eventName), wrapPointerEventHandler(handler, eventName === \"pointerdown\"), env, options);\n}\n\n/**\n * Polyfill to get `relatedTarget` working correctly consistently\n * across all browsers.\n *\n * It ensures that elements receives focus on pointer down if\n * it's not the active element.\n *\n * @internal\n */\nfunction useFocusOnPointerDown(props) {\n var ref = props.ref,\n elements = props.elements,\n enabled = props.enabled;\n var isSafari = detectBrowser(\"Safari\");\n\n var doc = function doc() {\n return getOwnerDocument(ref.current);\n };\n\n usePointerEvent(doc, \"pointerdown\", function (event) {\n if (!isSafari || !enabled) return;\n var target = event.target;\n var els = elements != null ? elements : [ref];\n var isValidTarget = els.some(function (elementOrRef) {\n var el = isRefObject(elementOrRef) ? elementOrRef.current : elementOrRef;\n return contains(el, target);\n });\n\n if (!isActiveElement(target) && isValidTarget) {\n event.preventDefault();\n focus(target);\n }\n });\n}\n\nvar defaultOptions = {\n preventScroll: true,\n shouldFocus: false\n};\nfunction useFocusOnShow(target, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var _options = options,\n focusRef = _options.focusRef,\n preventScroll = _options.preventScroll,\n shouldFocus = _options.shouldFocus,\n visible = _options.visible;\n var element = isRefObject(target) ? target.current : target;\n var autoFocus = shouldFocus && visible;\n var onFocus = useCallback(function () {\n if (!element || !autoFocus) return;\n if (contains(element, document.activeElement)) return;\n\n if (focusRef != null && focusRef.current) {\n focus(focusRef.current, {\n preventScroll: preventScroll,\n nextTick: true\n });\n } else {\n var tabbableEls = getAllFocusable(element);\n\n if (tabbableEls.length > 0) {\n focus(tabbableEls[0], {\n preventScroll: preventScroll,\n nextTick: true\n });\n }\n }\n }, [autoFocus, preventScroll, element, focusRef]);\n useUpdateEffect(function () {\n onFocus();\n }, [onFocus]);\n useEventListener(\"transitionend\", onFocus, element);\n}\n\nfunction useUnmountEffect(fn, deps) {\n if (deps === void 0) {\n deps = [];\n }\n\n return React.useEffect(function () {\n return function () {\n return fn();\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n deps);\n}\n\nfunction useForceUpdate() {\n var unloadingRef = React.useRef(false);\n\n var _React$useState = React.useState(0),\n count = _React$useState[0],\n setCount = _React$useState[1];\n\n useUnmountEffect(function () {\n unloadingRef.current = true;\n });\n return React.useCallback(function () {\n if (!unloadingRef.current) {\n setCount(count + 1);\n }\n }, [count]);\n}\n\n/**\n * React Hook that provides a declarative `setInterval`\n *\n * @param callback the callback to execute at interval\n * @param delay the `setInterval` delay (in ms)\n */\n\nfunction useInterval(callback, delay) {\n var fn = useCallbackRef(callback);\n React.useEffect(function () {\n var intervalId = null;\n\n var tick = function tick() {\n return fn();\n };\n\n if (delay !== null) {\n intervalId = window.setInterval(tick, delay);\n }\n\n return function () {\n if (intervalId) {\n window.clearInterval(intervalId);\n }\n };\n }, [delay, fn]);\n}\n\n/**\n * React hook to persist any value between renders,\n * but keeps it up-to-date if it changes.\n *\n * @param value the value or function to persist\n */\n\nfunction useLatestRef(value) {\n var ref = React.useRef(null);\n ref.current = value;\n return ref;\n}\n\n/* eslint-disable react-hooks/exhaustive-deps */\nfunction assignRef(ref, value) {\n if (ref == null) return;\n\n if (typeof ref === \"function\") {\n ref(value);\n return;\n }\n\n try {\n // @ts-ignore\n ref.current = value;\n } catch (error) {\n throw new Error(\"Cannot assign value '\" + value + \"' to ref '\" + ref + \"'\");\n }\n}\n/**\n * React hook that merges react refs into a single memoized function\n *\n * @example\n * import React from \"react\";\n * import { useMergeRefs } from `@chakra-ui/hooks`;\n *\n * const Component = React.forwardRef((props, ref) => {\n * const internalRef = React.useRef();\n * return <div {...props} ref={useMergeRefs(internalRef, ref)} />;\n * });\n */\n\nfunction useMergeRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return React.useMemo(function () {\n if (refs.every(function (ref) {\n return ref == null;\n })) {\n return null;\n }\n\n return function (node) {\n refs.forEach(function (ref) {\n if (ref) assignRef(ref, node);\n });\n };\n }, refs);\n}\n\nfunction useMouseDownRef(shouldListen) {\n if (shouldListen === void 0) {\n shouldListen = true;\n }\n\n var mouseDownRef = React__default.useRef();\n useEventListener(\"mousedown\", function (event) {\n if (shouldListen) {\n mouseDownRef.current = event.target;\n }\n });\n return mouseDownRef;\n}\n\n/**\n * Example, used in components like Dialogs and Popovers, so they can close\n * when a user clicks outside them.\n */\nfunction useOutsideClick(props) {\n var ref = props.ref,\n handler = props.handler,\n _props$enabled = props.enabled,\n enabled = _props$enabled === void 0 ? true : _props$enabled;\n var savedHandler = useCallbackRef(handler);\n var stateRef = useRef({\n isPointerDown: false,\n ignoreEmulatedMouseEvents: false\n });\n var state = stateRef.current;\n useEffect(function () {\n if (!enabled) return;\n\n var onPointerDown = function onPointerDown(e) {\n if (isValidEvent(e, ref)) {\n state.isPointerDown = true;\n }\n };\n\n var onMouseUp = function onMouseUp(event) {\n if (state.ignoreEmulatedMouseEvents) {\n state.ignoreEmulatedMouseEvents = false;\n return;\n }\n\n if (state.isPointerDown && handler && isValidEvent(event, ref)) {\n state.isPointerDown = false;\n savedHandler(event);\n }\n };\n\n var onTouchEnd = function onTouchEnd(event) {\n state.ignoreEmulatedMouseEvents = true;\n\n if (handler && state.isPointerDown && isValidEvent(event, ref)) {\n state.isPointerDown = false;\n savedHandler(event);\n }\n };\n\n var doc = getOwnerDocument(ref.current);\n doc.addEventListener(\"mousedown\", onPointerDown, true);\n doc.addEventListener(\"mouseup\", onMouseUp, true);\n doc.addEventListener(\"touchstart\", onPointerDown, true);\n doc.addEventListener(\"touchend\", onTouchEnd, true);\n return function () {\n doc.removeEventListener(\"mousedown\", onPointerDown, true);\n doc.removeEventListener(\"mouseup\", onMouseUp, true);\n doc.removeEventListener(\"touchstart\", onPointerDown, true);\n doc.removeEventListener(\"touchend\", onTouchEnd, true);\n };\n }, [handler, ref, savedHandler, state, enabled]);\n}\n\nfunction isValidEvent(event, ref) {\n var _ref$current;\n\n var target = event.target;\n if (event.button > 0) return false; // if the event target is no longer in the document\n\n if (target) {\n var doc = getOwnerDocument(target);\n if (!doc.contains(target)) return false;\n }\n\n return !((_ref$current = ref.current) != null && _ref$current.contains(target));\n}\n\nfunction usePanGesture(ref, props) {\n var onPan = props.onPan,\n onPanStart = props.onPanStart,\n onPanEnd = props.onPanEnd,\n onPanSessionStart = props.onPanSessionStart,\n onPanSessionEnd = props.onPanSessionEnd,\n threshold = props.threshold;\n var hasPanEvents = Boolean(onPan || onPanStart || onPanEnd || onPanSessionStart || onPanSessionEnd);\n var panSession = useRef(null);\n var handlers = {\n onSessionStart: onPanSessionStart,\n onSessionEnd: onPanSessionEnd,\n onStart: onPanStart,\n onMove: onPan,\n onEnd: function onEnd(event, info) {\n panSession.current = null;\n onPanEnd == null ? void 0 : onPanEnd(event, info);\n }\n };\n useEffect(function () {\n var _panSession$current;\n\n (_panSession$current = panSession.current) == null ? void 0 : _panSession$current.updateHandlers(handlers);\n });\n\n function onPointerDown(event) {\n panSession.current = new PanSession(event, handlers, threshold);\n }\n\n usePointerEvent(function () {\n return ref.current;\n }, \"pointerdown\", hasPanEvents ? onPointerDown : noop);\n useUnmountEffect(function () {\n var _panSession$current2;\n\n (_panSession$current2 = panSession.current) == null ? void 0 : _panSession$current2.end();\n panSession.current = null;\n });\n}\n\nfunction usePrevious(value) {\n var ref = useRef();\n useEffect(function () {\n ref.current = value;\n }, [value]);\n return ref.current;\n}\n\n/**\n * Checks if the key pressed is a printable character\n * and can be used for shortcut navigation\n */\n\nfunction isPrintableCharacter(event) {\n var key = event.key;\n return key.length === 1 || key.length > 1 && /[^a-zA-Z0-9]/.test(key);\n}\n\n/**\n * React hook that provides an enhanced keydown handler,\n * that's used for key navigation within menus, select dropdowns.\n */\nfunction useShortcut(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n _props$timeout = _props.timeout,\n timeout = _props$timeout === void 0 ? 300 : _props$timeout,\n _props$preventDefault = _props.preventDefault,\n preventDefault = _props$preventDefault === void 0 ? function () {\n return true;\n } : _props$preventDefault;\n\n var _React$useState = React.useState([]),\n keys = _React$useState[0],\n setKeys = _React$useState[1];\n\n var timeoutRef = React.useRef();\n\n var flush = function flush() {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n }\n };\n\n var clearKeysAfterDelay = function clearKeysAfterDelay() {\n flush();\n timeoutRef.current = setTimeout(function () {\n setKeys([]);\n timeoutRef.current = null;\n }, timeout);\n };\n\n React.useEffect(function () {\n return flush;\n }, []);\n\n function onKeyDown(fn) {\n return function (event) {\n if (event.key === \"Backspace\") {\n var keysCopy = [].concat(keys);\n keysCopy.pop();\n setKeys(keysCopy);\n return;\n }\n\n if (isPrintableCharacter(event)) {\n var _keysCopy = keys.concat(event.key);\n\n if (preventDefault(event)) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n setKeys(_keysCopy);\n fn(_keysCopy.join(\"\"));\n clearKeysAfterDelay();\n }\n };\n }\n\n return onKeyDown;\n}\n\n/**\n * React hook that provides a declarative `setTimeout`\n *\n * @param callback the callback to run after specified delay\n * @param delay the delay (in ms)\n */\n\nfunction useTimeout(callback, delay) {\n var fn = useCallbackRef(callback);\n React.useEffect(function () {\n if (delay == null) return undefined;\n var timeoutId = null;\n timeoutId = window.setTimeout(function () {\n fn();\n }, delay);\n return function () {\n if (timeoutId) {\n window.clearTimeout(timeoutId);\n }\n };\n }, [delay, fn]);\n}\n\nfunction useWhyDidYouUpdate(name, props) {\n var previousProps = React.useRef();\n React.useEffect(function () {\n if (previousProps.current) {\n var allKeys = Object.keys(_extends({}, previousProps.current, props));\n var changesObj = {};\n allKeys.forEach(function (key) {\n if (previousProps.current[key] !== props[key]) {\n changesObj[key] = {\n from: previousProps.current[key],\n to: props[key]\n };\n }\n });\n\n if (Object.keys(changesObj).length) {\n console.log(\"[why-did-you-update]\", name, changesObj);\n }\n }\n\n previousProps.current = props;\n });\n}\n\nexport { assignRef, useBoolean, useClipboard, useConst, useControllableProp, useControllableState, useDimensions, useDisclosure, useEventListenerMap, useFocusEffect, useFocusOnHide, useFocusOnPointerDown, useFocusOnShow, useForceUpdate, useId, useIds, useInterval, useLatestRef, useMergeRefs, useMouseDownRef, useOptionalPart, useOutsideClick, usePanGesture, usePointerEvent, usePrevious, useShortcut, useTimeout, useUnmountEffect, useUpdateEffect, useWhyDidYouUpdate };\n","import { useSafeLayoutEffect } from '@chakra-ui/hooks';\nimport { isBrowser, __DEV__, noop } from '@chakra-ui/utils';\nimport * as React from 'react';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar classNames = {\n light: \"chakra-ui-light\",\n dark: \"chakra-ui-dark\"\n};\nfunction getColorModeUtils(options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$preventTrans = _options.preventTransition,\n preventTransition = _options$preventTrans === void 0 ? true : _options$preventTrans;\n var utils = {\n setDataset: function setDataset(value) {\n var cleanup = preventTransition ? utils.preventTransition() : undefined;\n document.documentElement.dataset.theme = value;\n document.documentElement.style.colorScheme = value;\n cleanup == null ? void 0 : cleanup();\n },\n setClassName: function setClassName(dark) {\n document.body.classList.add(dark ? classNames.dark : classNames.light);\n document.body.classList.remove(dark ? classNames.light : classNames.dark);\n },\n query: function query() {\n return window.matchMedia(\"(prefers-color-scheme: dark)\");\n },\n getSystemTheme: function getSystemTheme(fallback) {\n var _utils$query$matches;\n\n var dark = (_utils$query$matches = utils.query().matches) != null ? _utils$query$matches : fallback === \"dark\";\n return dark ? \"dark\" : \"light\";\n },\n addListener: function addListener(fn) {\n var mql = utils.query();\n\n var listener = function listener(e) {\n fn(e.matches ? \"dark\" : \"light\");\n };\n\n mql.addEventListener(\"change\", listener);\n return function () {\n return mql.removeEventListener(\"change\", listener);\n };\n },\n preventTransition: function preventTransition() {\n var css = document.createElement(\"style\");\n css.appendChild(document.createTextNode(\"*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\"));\n document.head.appendChild(css);\n return function () {\n\n (function () {\n return window.getComputedStyle(document.body);\n })(); // wait for next tick\n\n\n requestAnimationFrame(function () {\n requestAnimationFrame(function () {\n document.head.removeChild(css);\n });\n });\n };\n }\n };\n return utils;\n}\n\nvar STORAGE_KEY = \"chakra-ui-color-mode\";\nfunction createLocalStorageManager(key) {\n return {\n ssr: false,\n type: \"localStorage\",\n get: function get(init) {\n if (!isBrowser) return init;\n var value;\n\n try {\n value = localStorage.getItem(key) || init;\n } catch (e) {// no op\n }\n\n return value || init;\n },\n set: function set(value) {\n try {\n localStorage.setItem(key, value);\n } catch (e) {// no op\n }\n }\n };\n}\nvar localStorageManager = createLocalStorageManager(STORAGE_KEY);\n\nfunction parseCookie(cookie, key) {\n var match = cookie.match(new RegExp(\"(^| )\" + key + \"=([^;]+)\"));\n return match == null ? void 0 : match[2];\n}\n\nfunction createCookieStorageManager(key, cookie) {\n return {\n ssr: !!cookie,\n type: \"cookie\",\n get: function get(init) {\n if (cookie) return parseCookie(cookie, key);\n if (!isBrowser) return init;\n return parseCookie(document.cookie, key) || init;\n },\n set: function set(value) {\n document.cookie = key + \"=\" + value + \"; max-age=31536000; path=/\";\n }\n };\n}\nvar cookieStorageManager = createCookieStorageManager(STORAGE_KEY);\nvar cookieStorageManagerSSR = function cookieStorageManagerSSR(cookie) {\n return createCookieStorageManager(STORAGE_KEY, cookie);\n};\n\nvar ColorModeContext = /*#__PURE__*/React.createContext({});\n\nif (__DEV__) {\n ColorModeContext.displayName = \"ColorModeContext\";\n}\n/**\n * React hook that reads from `ColorModeProvider` context\n * Returns the color mode and function to toggle it\n */\n\n\nfunction useColorMode() {\n var context = React.useContext(ColorModeContext);\n\n if (context === undefined) {\n throw new Error(\"useColorMode must be used within a ColorModeProvider\");\n }\n\n return context;\n}\n\nfunction getTheme(manager, fallback) {\n return manager.type === \"cookie\" && manager.ssr ? manager.get(fallback) : fallback;\n}\n/**\n * Provides context for the color mode based on config in `theme`\n * Returns the color mode and function to toggle the color mode\n */\n\n\nfunction ColorModeProvider(props) {\n var value = props.value,\n children = props.children,\n _props$options = props.options;\n _props$options = _props$options === void 0 ? {} : _props$options;\n var useSystemColorMode = _props$options.useSystemColorMode,\n initialColorMode = _props$options.initialColorMode,\n disableTransitionOnChange = _props$options.disableTransitionOnChange,\n _props$colorModeManag = props.colorModeManager,\n colorModeManager = _props$colorModeManag === void 0 ? localStorageManager : _props$colorModeManag;\n var defaultColorMode = initialColorMode === \"dark\" ? \"dark\" : \"light\";\n\n var _React$useState = React.useState(function () {\n return getTheme(colorModeManager, defaultColorMode);\n }),\n colorMode = _React$useState[0],\n rawSetColorMode = _React$useState[1];\n\n var _React$useState2 = React.useState(function () {\n return getTheme(colorModeManager);\n }),\n resolvedColorMode = _React$useState2[0],\n setResolvedColorMode = _React$useState2[1];\n\n var _React$useMemo = React.useMemo(function () {\n return getColorModeUtils({\n preventTransition: disableTransitionOnChange\n });\n }, [disableTransitionOnChange]),\n getSystemTheme = _React$useMemo.getSystemTheme,\n setClassName = _React$useMemo.setClassName,\n setDataset = _React$useMemo.setDataset,\n addListener = _React$useMemo.addListener;\n\n var resolvedValue = initialColorMode === \"system\" && !colorMode ? resolvedColorMode : colorMode;\n var setColorMode = React.useCallback(function (value) {\n //\n var resolved = value === \"system\" ? getSystemTheme() : value;\n rawSetColorMode(resolved);\n setClassName(resolved === \"dark\");\n setDataset(resolved);\n colorModeManager.set(resolved);\n }, [colorModeManager, getSystemTheme, setClassName, setDataset]);\n useSafeLayoutEffect(function () {\n if (initialColorMode === \"system\") {\n setResolvedColorMode(getSystemTheme());\n } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, []);\n useSafeLayoutEffect(function () {\n var managerValue = colorModeManager.get();\n\n if (managerValue) {\n setColorMode(managerValue);\n return;\n }\n\n if (initialColorMode === \"system\") {\n setColorMode(\"system\");\n return;\n }\n\n setColorMode(defaultColorMode); //\n }, [colorModeManager, defaultColorMode, initialColorMode, getSystemTheme]);\n var toggleColorMode = React.useCallback(function () {\n setColorMode(resolvedValue === \"dark\" ? \"light\" : \"dark\");\n }, [resolvedValue, setColorMode]);\n React.useEffect(function () {\n if (!useSystemColorMode) return;\n return addListener(setColorMode);\n }, [useSystemColorMode, addListener, setColorMode]); // presence of `value` indicates a controlled context\n\n var context = React.useMemo(function () {\n return {\n colorMode: value != null ? value : resolvedValue,\n toggleColorMode: value ? noop : toggleColorMode,\n setColorMode: value ? noop : setColorMode\n };\n }, [resolvedValue, toggleColorMode, setColorMode, value]);\n return /*#__PURE__*/React.createElement(ColorModeContext.Provider, {\n value: context\n }, children);\n}\n\nif (__DEV__) {\n ColorModeProvider.displayName = \"ColorModeProvider\";\n}\n/**\n * Locks the color mode to `dark`, without any way to change it.\n */\n\n\nvar DarkMode = function DarkMode(props) {\n var context = React.useMemo(function () {\n return {\n colorMode: \"dark\",\n toggleColorMode: noop,\n setColorMode: noop\n };\n }, []);\n return /*#__PURE__*/React.createElement(ColorModeContext.Provider, _extends({\n value: context\n }, props));\n};\n\nif (__DEV__) {\n DarkMode.displayName = \"DarkMode\";\n}\n/**\n * Locks the color mode to `light` without any way to change it.\n */\n\n\nvar LightMode = function LightMode(props) {\n var context = React.useMemo(function () {\n return {\n colorMode: \"light\",\n toggleColorMode: noop,\n setColorMode: noop\n };\n }, []);\n return /*#__PURE__*/React.createElement(ColorModeContext.Provider, _extends({\n value: context\n }, props));\n};\n\nif (__DEV__) {\n LightMode.displayName = \"LightMode\";\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 */\n\n\nfunction useColorModeValue(light, dark) {\n var _useColorMode = useColorMode(),\n colorMode = _useColorMode.colorMode;\n\n return colorMode === \"dark\" ? dark : light;\n}\n\nvar VALID_VALUES = new Set([\"dark\", \"light\", \"system\"]);\n/**\n * runtime safe-guard against invalid color mode values\n */\n\nfunction normalize(initialColorMode) {\n var value = initialColorMode;\n if (!VALID_VALUES.has(value)) value = \"light\";\n return value;\n}\n\nfunction getScriptSrc(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n _props$initialColorMo = _props.initialColorMode,\n initialColorMode = _props$initialColorMo === void 0 ? \"light\" : _props$initialColorMo,\n _props$type = _props.type,\n type = _props$type === void 0 ? \"localStorage\" : _props$type,\n _props$storageKey = _props.storageKey,\n key = _props$storageKey === void 0 ? \"chakra-ui-color-mode\" : _props$storageKey; // runtime safe-guard against invalid color mode values\n\n var init = normalize(initialColorMode);\n var isCookie = type === \"cookie\";\n var cookieScript = \"(function(){try{var a=function(o){var l=\\\"(prefers-color-scheme: dark)\\\",v=window.matchMedia(l).matches?\\\"dark\\\":\\\"light\\\",e=o===\\\"system\\\"?v:o,d=document.documentElement,m=document.body,i=\\\"chakra-ui-light\\\",n=\\\"chakra-ui-dark\\\",s=e===\\\"dark\\\";return m.classList.add(s?n:i),m.classList.remove(s?i:n),d.style.colorScheme=e,d.dataset.theme=e,e},u=a,h=\\\"\" + init + \"\\\",r=\\\"\" + key + \"\\\",t=document.cookie.match(new RegExp(\\\"(^| )\\\".concat(r,\\\"=([^;]+)\\\"))),c=t?t[2]:null;c?a(c):document.cookie=\\\"\\\".concat(r,\\\"=\\\").concat(a(h),\\\"; max-age=31536000; path=/\\\")}catch(a){}})();\\n \";\n var localStorageScript = \"(function(){try{var a=function(c){var v=\\\"(prefers-color-scheme: dark)\\\",h=window.matchMedia(v).matches?\\\"dark\\\":\\\"light\\\",r=c===\\\"system\\\"?h:c,o=document.documentElement,s=document.body,l=\\\"chakra-ui-light\\\",d=\\\"chakra-ui-dark\\\",i=r===\\\"dark\\\";return s.classList.add(i?d:l),s.classList.remove(i?l:d),o.style.colorScheme=r,o.dataset.theme=r,r},n=a,m=\\\"\" + init + \"\\\",e=\\\"\" + key + \"\\\",t=localStorage.getItem(e);t?a(t):localStorage.setItem(e,a(m))}catch(a){}})();\\n \";\n var fn = isCookie ? cookieScript : localStorageScript;\n return (\"!\" + fn).trim();\n}\nfunction ColorModeScript(props) {\n if (props === void 0) {\n props = {};\n }\n\n return /*#__PURE__*/React.createElement(\"script\", {\n id: \"chakra-script\",\n dangerouslySetInnerHTML: {\n __html: getScriptSrc(props)\n }\n });\n}\n\nexport { ColorModeContext, ColorModeProvider, ColorModeScript, DarkMode, LightMode, STORAGE_KEY, cookieStorageManager, cookieStorageManagerSSR, createCookieStorageManager, createLocalStorageManager, getScriptSrc, localStorageManager, useColorMode, useColorModeValue };\n","import { isString, isObject, isNumber, isCssVar, memoizedGet, objectKeys, mergeWith, pick, flatten, fromEntries, analyzeBreakpoints, runIfFn, isArray, toMediaQueryString } from '@chakra-ui/utils';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar isImportant = function isImportant(value) {\n return /!(important)?$/.test(value);\n};\n\nvar withoutImportant = function withoutImportant(value) {\n return isString(value) ? value.replace(/!(important)?$/, \"\").trim() : value;\n};\n\nvar tokenToCSSVar = function tokenToCSSVar(scale, value) {\n return function (theme) {\n var valueStr = String(value);\n var important = isImportant(valueStr);\n var valueWithoutImportant = withoutImportant(valueStr);\n var key = scale ? scale + \".\" + valueWithoutImportant : valueWithoutImportant;\n var transformed = isObject(theme.__cssMap) && key in theme.__cssMap ? theme.__cssMap[key].varRef : value;\n transformed = withoutImportant(transformed);\n return important ? transformed + \" !important\" : transformed;\n };\n};\nfunction createTransform(options) {\n var scale = options.scale,\n transform = options.transform,\n compose = options.compose;\n\n var fn = function fn(value, theme) {\n var _transform;\n\n var _value = tokenToCSSVar(scale, value)(theme);\n\n var result = (_transform = transform == null ? void 0 : transform(_value, theme)) != null ? _transform : _value;\n\n if (compose) {\n result = compose(result, theme);\n }\n\n return result;\n };\n\n return fn;\n}\n\nfunction toConfig(scale, transform) {\n return function (property) {\n var result = {\n property: property,\n scale: scale\n };\n result.transform = createTransform({\n scale: scale,\n transform: transform\n });\n return result;\n };\n}\n\nvar getRtl = function getRtl(_ref) {\n var rtl = _ref.rtl,\n ltr = _ref.ltr;\n return function (theme) {\n return theme.direction === \"rtl\" ? rtl : ltr;\n };\n};\n\nfunction logical(options) {\n var property = options.property,\n scale = options.scale,\n transform = options.transform;\n return {\n scale: scale,\n property: getRtl(property),\n transform: scale ? createTransform({\n scale: scale,\n compose: transform\n }) : transform\n };\n}\n\nvar _spaceXTemplate, _spaceYTemplate;\n\n/**\n * The CSS transform order following the upcoming spec from CSSWG\n * translate => rotate => scale => skew\n * @see https://drafts.csswg.org/css-transforms-2/#ctm\n * @see https://www.stefanjudis.com/blog/order-in-css-transformation-transform-functions-vs-individual-transforms/\n */\nvar transformTemplate = [\"rotate(var(--chakra-rotate, 0))\", \"scaleX(var(--chakra-scale-x, 1))\", \"scaleY(var(--chakra-scale-y, 1))\", \"skewX(var(--chakra-skew-x, 0))\", \"skewY(var(--chakra-skew-y, 0))\"];\nfunction getTransformTemplate() {\n return [\"translateX(var(--chakra-translate-x, 0))\", \"translateY(var(--chakra-translate-y, 0))\"].concat(transformTemplate).join(\" \");\n}\nfunction getTransformGpuTemplate() {\n return [\"translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)\"].concat(transformTemplate).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: [\"var(--chakra-blur)\", \"var(--chakra-brightness)\", \"var(--chakra-contrast)\", \"var(--chakra-grayscale)\", \"var(--chakra-hue-rotate)\", \"var(--chakra-invert)\", \"var(--chakra-saturate)\", \"var(--chakra-sepia)\", \"var(--chakra-drop-shadow)\"].join(\" \")\n};\nvar backdropFilterTemplate = {\n backdropFilter: [\"var(--chakra-backdrop-blur)\", \"var(--chakra-backdrop-brightness)\", \"var(--chakra-backdrop-contrast)\", \"var(--chakra-backdrop-grayscale)\", \"var(--chakra-backdrop-hue-rotate)\", \"var(--chakra-backdrop-invert)\", \"var(--chakra-backdrop-opacity)\", \"var(--chakra-backdrop-saturate)\", \"var(--chakra-backdrop-sepia)\"].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: [\"var(--chakra-ring-offset-shadow)\", \"var(--chakra-ring-shadow)\", \"var(--chakra-shadow, 0 0 #0000)\"].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};\nvar owlSelector = \"& > :not(style) ~ :not(style)\";\nvar spaceXTemplate = (_spaceXTemplate = {}, _spaceXTemplate[owlSelector] = {\n marginInlineStart: \"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))\",\n marginInlineEnd: \"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))\"\n}, _spaceXTemplate);\nvar spaceYTemplate = (_spaceYTemplate = {}, _spaceYTemplate[owlSelector] = {\n marginTop: \"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))\",\n marginBottom: \"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))\"\n}, _spaceYTemplate);\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _wrapRegExp() {\n _wrapRegExp = function (re, groups) {\n return new BabelRegExp(re, void 0, groups);\n };\n\n var _super = RegExp.prototype,\n _groups = new WeakMap();\n\n function BabelRegExp(re, flags, groups) {\n var _this = new RegExp(re, flags);\n\n return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype);\n }\n\n function buildGroups(result, re) {\n var g = _groups.get(re);\n\n return Object.keys(g).reduce(function (groups, name) {\n return groups[name] = result[g[name]], groups;\n }, Object.create(null));\n }\n\n return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {\n var result = _super.exec.call(this, str);\n\n return result && (result.groups = buildGroups(result, this)), result;\n }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {\n if (\"string\" == typeof substitution) {\n var groups = _groups.get(this);\n\n return _super[Symbol.replace].call(this, str, substitution.replace(/\\$<([^>]+)>/g, function (_, name) {\n return \"$\" + groups[name];\n }));\n }\n\n if (\"function\" == typeof substitution) {\n var _this = this;\n\n return _super[Symbol.replace].call(this, str, function () {\n var args = arguments;\n return \"object\" != typeof args[args.length - 1] && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args);\n });\n }\n\n return _super[Symbol.replace].call(this, str, substitution);\n }, _wrapRegExp.apply(this, arguments);\n}\n\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 = new Set([\"none\", \"-moz-initial\", \"inherit\", \"initial\", \"revert\", \"unset\"]);\n\nvar trimSpace = function trimSpace(str) {\n return str.trim();\n};\n\nfunction parseGradient(value, theme) {\n var _regex$exec$groups, _regex$exec;\n\n if (value == null || globalSet.has(value)) return value;\n\n var regex = /*#__PURE__*/_wrapRegExp(/(^[a-z-A-Z]+)\\(((.*))\\)/g, {\n type: 1,\n values: 2\n });\n\n var _ref = (_regex$exec$groups = (_regex$exec = regex.exec(value)) == null ? void 0 : _regex$exec.groups) != null ? _regex$exec$groups : {},\n type = _ref.type,\n values = _ref.values;\n\n if (!type || !values) return value;\n\n var _type = type.includes(\"-gradient\") ? type : type + \"-gradient\";\n\n var _values$split$map$fil = values.split(\",\").map(trimSpace).filter(Boolean),\n maybeDirection = _values$split$map$fil[0],\n stops = _values$split$map$fil.slice(1);\n\n if ((stops == null ? void 0 : stops.length) === 0) return value;\n var direction = maybeDirection in directionMap ? directionMap[maybeDirection] : maybeDirection;\n stops.unshift(direction);\n\n var _values = stops.map(function (stop) {\n // if stop is valid shorthand direction, return it\n if (valueSet.has(stop)) return stop;\n var firstStop = stop.indexOf(\" \"); // color stop could be `red.200 20%` based on css gradient spec\n\n var _ref2 = firstStop !== -1 ? [stop.substr(0, firstStop), stop.substr(firstStop + 1)] : [stop],\n _color = _ref2[0],\n _stop = _ref2[1];\n\n var _stopOrFunc = isCSSFunction(_stop) ? _stop : _stop && _stop.split(\" \"); // else, get and transform the color token or css value\n\n\n var key = \"colors.\" + _color;\n var color = key in theme.__cssMap ? theme.__cssMap[key].varRef : _color;\n return _stopOrFunc ? [color].concat(Array.isArray(_stopOrFunc) ? _stopOrFunc : [_stopOrFunc]).join(\" \") : color;\n });\n\n return _type + \"(\" + _values.join(\", \") + \")\";\n}\nvar isCSSFunction = function isCSSFunction(value) {\n return isString(value) && value.includes(\"(\") && value.includes(\")\");\n};\nvar gradientTransform = function gradientTransform(value, theme) {\n return parseGradient(value, theme != null ? theme : {});\n};\n\nvar analyzeCSSValue = function analyzeCSSValue(value) {\n var num = parseFloat(value.toString());\n var unit = value.toString().replace(String(num), \"\");\n return {\n unitless: !unit,\n value: num,\n unit: unit\n };\n};\n\nvar wrap = function wrap(str) {\n return function (value) {\n return str + \"(\" + value + \")\";\n };\n};\n\nvar transformFunctions = {\n filter: function filter(value) {\n return value !== \"auto\" ? value : filterTemplate;\n },\n backdropFilter: function backdropFilter(value) {\n return value !== \"auto\" ? value : backdropFilterTemplate;\n },\n ring: function ring(value) {\n return getRingTemplate(transformFunctions.px(value));\n },\n bgClip: function bgClip(value) {\n return value === \"text\" ? {\n color: \"transparent\",\n backgroundClip: \"text\"\n } : {\n backgroundClip: value\n };\n },\n transform: function transform(value) {\n if (value === \"auto\") return getTransformTemplate();\n if (value === \"auto-gpu\") return getTransformGpuTemplate();\n return value;\n },\n px: function px(value) {\n if (value == null) return value;\n\n var _analyzeCSSValue = analyzeCSSValue(value),\n unitless = _analyzeCSSValue.unitless;\n\n return unitless || isNumber(value) ? value + \"px\" : value;\n },\n fraction: function fraction(value) {\n return !isNumber(value) || value > 1 ? value : value * 100 + \"%\";\n },\n \"float\": function float(value, theme) {\n var map = {\n left: \"right\",\n right: \"left\"\n };\n return theme.direction === \"rtl\" ? map[value] : value;\n },\n degree: function degree(value) {\n if (isCssVar(value) || value == null) return value;\n var unitless = isString(value) && !value.endsWith(\"deg\");\n return isNumber(value) || 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: wrap(\"hue-rotate\"),\n invert: wrap(\"invert\"),\n saturate: wrap(\"saturate\"),\n sepia: wrap(\"sepia\"),\n bgImage: function bgImage(value) {\n if (value == null) return value;\n var prevent = isCSSFunction(value) || globalSet.has(value);\n return !prevent ? \"url(\" + value + \")\" : value;\n },\n outline: function outline(value) {\n var isNoneOrZero = String(value) === \"0\" || String(value) === \"none\";\n return value !== null && isNoneOrZero ? {\n outline: \"2px solid transparent\",\n outlineOffset: \"2px\"\n } : {\n outline: value\n };\n },\n flexDirection: function flexDirection(value) {\n var _value;\n\n var _ref = (_value = flexDirectionTemplate[value]) != null ? _value : {},\n space = _ref.space,\n divide = _ref.divide;\n\n var result = {\n flexDirection: value\n };\n if (space) result[space] = 1;\n if (divide) result[divide] = 1;\n return result;\n }\n};\n\nvar t = {\n borderWidths: toConfig(\"borderWidths\"),\n borderStyles: toConfig(\"borderStyles\"),\n colors: toConfig(\"colors\"),\n borders: toConfig(\"borders\"),\n radii: toConfig(\"radii\", transformFunctions.px),\n space: toConfig(\"space\", transformFunctions.px),\n spaceT: toConfig(\"space\", transformFunctions.px),\n degreeT: function degreeT(property) {\n return {\n property: property,\n transform: transformFunctions.degree\n };\n },\n prop: function prop(property, scale, transform) {\n return _extends({\n property: property,\n scale: scale\n }, scale && {\n transform: createTransform({\n scale: scale,\n transform: transform\n })\n });\n },\n propT: function propT(property, transform) {\n return {\n property: property,\n transform: transform\n };\n },\n sizes: toConfig(\"sizes\", transformFunctions.px),\n sizesT: toConfig(\"sizes\", transformFunctions.fraction),\n shadows: toConfig(\"shadows\"),\n logical: logical,\n blur: toConfig(\"blur\", transformFunctions.blur)\n};\n\nvar background = {\n background: t.colors(\"background\"),\n backgroundColor: t.colors(\"backgroundColor\"),\n backgroundImage: t.propT(\"backgroundImage\", transformFunctions.bgImage),\n backgroundSize: true,\n backgroundPosition: true,\n backgroundRepeat: true,\n backgroundAttachment: true,\n backgroundClip: {\n transform: transformFunctions.bgClip\n },\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.propT(\"backgroundImage\", transformFunctions.gradient),\n bgClip: {\n transform: transformFunctions.bgClip\n }\n};\nObject.assign(background, {\n bgImage: background.backgroundImage,\n bgImg: background.backgroundImage\n});\n\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([\"borderBottomLeftRadius\", \"borderBottomRightRadius\"]),\n borderLeftRadius: t.radii([\"borderTopLeftRadius\", \"borderBottomLeftRadius\"]),\n borderRightRadius: t.radii([\"borderTopRightRadius\", \"borderBottomRightRadius\"])\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 * The prop types for border properties listed above\n */\n\nvar color = {\n color: t.colors(\"color\"),\n textColor: t.colors(\"color\"),\n fill: t.colors(\"fill\"),\n stroke: t.colors(\"stroke\")\n};\n\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 * Types for box and text shadow properties\n */\n\nvar filter = {\n filter: {\n transform: transformFunctions.filter\n },\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.degreeT(\"--chakra-hue-rotate\"),\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: {\n transform: transformFunctions.backdropFilter\n },\n backdropBlur: t.blur(\"--chakra-backdrop-blur\"),\n backdropBrightness: t.propT(\"--chakra-backdrop-brightness\", transformFunctions.brightness),\n backdropContrast: t.propT(\"--chakra-backdrop-contrast\", transformFunctions.contrast),\n backdropHueRotate: t.degreeT(\"--chakra-backdrop-hue-rotate\"),\n backdropInvert: t.propT(\"--chakra-backdrop-invert\", transformFunctions.invert),\n backdropSaturate: t.propT(\"--chakra-backdrop-saturate\", transformFunctions.saturate)\n};\n\nvar flexbox = {\n alignItems: true,\n alignContent: true,\n justifyItems: true,\n justifyContent: true,\n flexWrap: true,\n flexDirection: {\n transform: transformFunctions.flexDirection\n },\n experimental_spaceX: {\n \"static\": spaceXTemplate,\n transform: createTransform({\n scale: \"space\",\n transform: function transform(value) {\n return value !== null ? {\n \"--chakra-space-x\": value\n } : null;\n }\n })\n },\n experimental_spaceY: {\n \"static\": spaceYTemplate,\n transform: createTransform({\n scale: \"space\",\n transform: function transform(value) {\n return value != null ? {\n \"--chakra-space-y\": value\n } : null;\n }\n })\n },\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\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\nvar interactivity = {\n appearance: true,\n cursor: true,\n resize: true,\n userSelect: true,\n pointerEvents: true,\n outline: {\n transform: transformFunctions.outline\n },\n outlineOffset: true,\n outlineColor: t.colors(\"outlineColor\")\n};\n\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 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 * Types for layout related CSS properties\n */\n\nvar list = {\n listStyleType: true,\n listStylePosition: true,\n listStylePos: t.prop(\"listStylePosition\"),\n listStyleImage: true,\n listStyleImg: t.prop(\"listStyleImage\")\n};\n\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};\n\nvar getWithPriority = function getWithPriority(theme, key, styles) {\n var result = {};\n var obj = memoizedGet(theme, key, {});\n\n for (var prop in obj) {\n var isInStyles = prop in styles && styles[prop] != null;\n if (!isInStyles) result[prop] = obj[prop];\n }\n\n return result;\n};\n\nvar others = {\n srOnly: {\n transform: function transform(value) {\n if (value === true) return srOnly;\n if (value === \"focusable\") return srFocusable;\n return {};\n }\n },\n layerStyle: {\n processResult: true,\n transform: function transform(value, theme, styles) {\n return getWithPriority(theme, \"layerStyles.\" + value, styles);\n }\n },\n textStyle: {\n processResult: true,\n transform: function transform(value, theme, styles) {\n return getWithPriority(theme, \"textStyles.\" + value, styles);\n }\n },\n apply: {\n processResult: true,\n transform: function transform(value, theme, styles) {\n return getWithPriority(theme, value, styles);\n }\n }\n};\n\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: {\n ltr: \"left\",\n rtl: \"right\"\n }\n }),\n right: t.spaceT(\"right\"),\n insetInlineEnd: t.logical({\n scale: \"space\",\n property: {\n ltr: \"right\",\n rtl: \"left\"\n }\n })\n};\nObject.assign(position, {\n insetStart: position.insetInlineStart,\n insetEnd: position.insetInlineEnd\n});\n/**\n * Types for position CSS properties\n */\n\n/**\n * The parser configuration for common outline properties\n */\nvar ring = {\n ring: {\n transform: transformFunctions.ring\n },\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\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 * Types for space related CSS properties\n */\n\nvar textDecoration = {\n textDecorationColor: t.colors(\"textDecorationColor\"),\n textDecoration: true,\n textDecor: {\n property: \"textDecoration\"\n },\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationThickness: true,\n textUnderlineOffset: true,\n textShadow: t.shadows(\"textShadow\")\n};\n\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\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(\"transitionTimingFunction\", \"transition.easing\")\n};\n\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 wordBreak: true,\n overflowWrap: true,\n textOverflow: true,\n textTransform: true,\n whiteSpace: true,\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 * Types for typography related CSS properties\n */\n\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/**\n * Thank you @markdalgleish for this piece of art!\n */\n\nfunction resolveReference(operand) {\n if (isObject(operand) && operand.reference) {\n return operand.reference;\n }\n\n return String(operand);\n}\n\nvar toExpression = function toExpression(operator) {\n for (var _len = arguments.length, operands = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n operands[_key - 1] = arguments[_key];\n }\n\n return operands.map(resolveReference).join(\" \" + operator + \" \").replace(/calc/g, \"\");\n};\n\nvar _add = function add() {\n for (var _len2 = arguments.length, operands = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n operands[_key2] = arguments[_key2];\n }\n\n return \"calc(\" + toExpression.apply(void 0, [\"+\"].concat(operands)) + \")\";\n};\n\nvar _subtract = function subtract() {\n for (var _len3 = arguments.length, operands = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n operands[_key3] = arguments[_key3];\n }\n\n return \"calc(\" + toExpression.apply(void 0, [\"-\"].concat(operands)) + \")\";\n};\n\nvar _multiply = function multiply() {\n for (var _len4 = arguments.length, operands = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n operands[_key4] = arguments[_key4];\n }\n\n return \"calc(\" + toExpression.apply(void 0, [\"*\"].concat(operands)) + \")\";\n};\n\nvar _divide = function divide() {\n for (var _len5 = arguments.length, operands = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n operands[_key5] = arguments[_key5];\n }\n\n return \"calc(\" + toExpression.apply(void 0, [\"/\"].concat(operands)) + \")\";\n};\n\nvar _negate = function negate(x) {\n var value = resolveReference(x);\n\n if (value != null && !Number.isNaN(parseFloat(value))) {\n return String(value).startsWith(\"-\") ? String(value).slice(1) : \"-\" + value;\n }\n\n return _multiply(value, -1);\n};\n\nvar calc = Object.assign(function (x) {\n return {\n add: function add() {\n for (var _len6 = arguments.length, operands = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n operands[_key6] = arguments[_key6];\n }\n\n return calc(_add.apply(void 0, [x].concat(operands)));\n },\n subtract: function subtract() {\n for (var _len7 = arguments.length, operands = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n operands[_key7] = arguments[_key7];\n }\n\n return calc(_subtract.apply(void 0, [x].concat(operands)));\n },\n multiply: function multiply() {\n for (var _len8 = arguments.length, operands = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n operands[_key8] = arguments[_key8];\n }\n\n return calc(_multiply.apply(void 0, [x].concat(operands)));\n },\n divide: function divide() {\n for (var _len9 = arguments.length, operands = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {\n operands[_key9] = arguments[_key9];\n }\n\n return calc(_divide.apply(void 0, [x].concat(operands)));\n },\n negate: function negate() {\n return calc(_negate(x));\n },\n toString: function toString() {\n return x.toString();\n }\n };\n}, {\n add: _add,\n subtract: _subtract,\n multiply: _multiply,\n divide: _divide,\n negate: _negate\n});\n\nfunction replaceWhiteSpace(value, replaceValue) {\n if (replaceValue === void 0) {\n replaceValue = \"-\";\n }\n\n return value.replace(/\\s+/g, replaceValue);\n}\n\nfunction escape(value) {\n var valueStr = replaceWhiteSpace(value.toString());\n if (valueStr.includes(\"\\\\.\")) return value;\n var isDecimal = !Number.isInteger(parseFloat(value.toString()));\n return isDecimal ? valueStr.replace(\".\", \"\\\\.\") : value;\n}\n\nfunction addPrefix(value, prefix) {\n if (prefix === void 0) {\n prefix = \"\";\n }\n\n return [prefix, escape(value)].filter(Boolean).join(\"-\");\n}\nfunction toVarReference(name, fallback) {\n return \"var(\" + escape(name) + (fallback ? \", \" + fallback : \"\") + \")\";\n}\nfunction toVarDefinition(value, prefix) {\n if (prefix === void 0) {\n prefix = \"\";\n }\n\n return \"--\" + addPrefix(value, prefix);\n}\nfunction cssVar(name, fallback, cssVarPrefix) {\n var cssVariable = toVarDefinition(name, cssVarPrefix);\n return {\n variable: cssVariable,\n reference: toVarReference(cssVariable, fallback)\n };\n}\n\nvar state = {\n hover: function hover(str, post) {\n return str + \":hover \" + post + \", \" + str + \"[data-hover] \" + post;\n },\n focus: function focus(str, post) {\n return str + \":focus \" + post + \", \" + str + \"[data-focus] \" + post;\n },\n focusVisible: function focusVisible(str, post) {\n return str + \":focus-visible \" + post;\n },\n focusWithin: function focusWithin(str, post) {\n return str + \":focus-within \" + post;\n },\n active: function active(str, post) {\n return str + \":active \" + post + \", \" + str + \"[data-active] \" + post;\n },\n disabled: function disabled(str, post) {\n return str + \":disabled \" + post + \", \" + str + \"[data-disabled] \" + post;\n },\n invalid: function invalid(str, post) {\n return str + \":invalid \" + post + \", \" + str + \"[data-invalid] \" + post;\n },\n checked: function checked(str, post) {\n return str + \":checked \" + post + \", \" + str + \"[data-checked] \" + post;\n },\n indeterminate: function indeterminate(str, post) {\n return str + \":indeterminate \" + post + \", \" + str + \"[aria-checked=mixed] \" + post + \", \" + str + \"[data-indeterminate] \" + post;\n },\n readOnly: function readOnly(str, post) {\n return str + \":read-only \" + post + \", \" + str + \"[readonly] \" + post + \", \" + str + \"[data-read-only] \" + post;\n },\n expanded: function expanded(str, post) {\n return str + \":read-only \" + post + \", \" + str + \"[aria-expanded=true] \" + post + \", \" + str + \"[data-expanded] \" + post;\n },\n placeholderShown: function placeholderShown(str, post) {\n return str + \":placeholder-shown \" + post;\n }\n};\n\nvar toGroup = function toGroup(fn) {\n return merge(function (v) {\n return fn(v, \"&\");\n }, \"[role=group]\", \"[data-group]\", \".group\");\n};\n\nvar toPeer = function toPeer(fn) {\n return merge(function (v) {\n return fn(v, \"~ &\");\n }, \"[data-peer]\", \".peer\");\n};\n\nvar merge = function merge(fn) {\n for (var _len = arguments.length, selectors = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n selectors[_key - 1] = arguments[_key];\n }\n\n return selectors.map(fn).join(\", \");\n};\n\nvar pseudoSelectors = {\n /**\n * Styles for CSS selector `&:hover`\n */\n _hover: \"&:hover, &[data-hover]\",\n\n /**\n * Styles for CSS Selector `&:active`\n */\n _active: \"&:active, &[data-active]\",\n\n /**\n * Styles for CSS selector `&:focus`\n *\n */\n _focus: \"&:focus, &[data-focus]\",\n\n /**\n * Styles for the highlighted state.\n */\n _highlighted: \"&[data-highlighted]\",\n\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 /**\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 /**\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 */\n _disabled: \"&[disabled], &[aria-disabled=true], &[data-disabled]\",\n\n /**\n * Styles for CSS Selector `&:readonly`\n */\n _readOnly: \"&[aria-readonly=true], &[readonly], &[data-readonly]\",\n\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 /**\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 /**\n * Styles for CSS selector `&:empty`\n */\n _empty: \"&:empty\",\n\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 /**\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 /**\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 /**\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 /**\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 /**\n * Styles for the valid state\n * - CSS selector `&[data-valid], &[data-state=valid]`\n */\n _valid: \"&[data-valid], &[data-state=valid]\",\n\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 /**\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 /**\n * Styles for CSS Selector `[hidden=true]`\n */\n _hidden: \"&[hidden], &[data-hidden]\",\n\n /**\n * Styles for CSS Selector `&:-webkit-autofill`\n */\n _autofill: \"&:-webkit-autofill\",\n\n /**\n * Styles for CSS Selector `&:nth-child(even)`\n */\n _even: \"&:nth-of-type(even)\",\n\n /**\n * Styles for CSS Selector `&:nth-child(odd)`\n */\n _odd: \"&:nth-of-type(odd)\",\n\n /**\n * Styles for CSS Selector `&:first-of-type`\n */\n _first: \"&:first-of-type\",\n\n /**\n * Styles for CSS Selector `&:last-of-type`\n */\n _last: \"&:last-of-type\",\n\n /**\n * Styles for CSS Selector `&:not(:first-of-type)`\n */\n _notFirst: \"&:not(:first-of-type)\",\n\n /**\n * Styles for CSS Selector `&:not(:last-of-type)`\n */\n _notLast: \"&:not(:last-of-type)\",\n\n /**\n * Styles for CSS Selector `&:visited`\n */\n _visited: \"&:visited\",\n\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 /**\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 /**\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 /**\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 /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is hovered\n */\n _peerHover: toPeer(state.hover),\n\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 /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is focused\n */\n _peerFocus: toPeer(state.focus),\n\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 /**\n * Styles to apply when a sibling element with `.peer`or `data-peer` has visible focus\n */\n _peerFocusVisible: toPeer(state.focusVisible),\n\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 /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is active\n */\n _peerActive: toPeer(state.active),\n\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 /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is disabled\n */\n _peerDisabled: toPeer(state.disabled),\n\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 /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is invalid\n */\n _peerInvalid: toPeer(state.invalid),\n\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 /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is checked\n */\n _peerChecked: toPeer(state.checked),\n\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 /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` has focus within\n */\n _peerFocusWithin: toPeer(state.focusWithin),\n\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 /**\n * Styles for CSS Selector `&::placeholder`.\n */\n _placeholder: \"&::placeholder\",\n\n /**\n * Styles for CSS Selector `&:placeholder-shown`.\n */\n _placeholderShown: \"&:placeholder-shown\",\n\n /**\n * Styles for CSS Selector `&:fullscreen`.\n */\n _fullScreen: \"&:fullscreen\",\n\n /**\n * Styles for CSS Selector `&::selection`\n */\n _selection: \"&::selection\",\n\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 /**\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 /**\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 /**\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 /**\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 /**\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};\nvar pseudoPropNames = objectKeys(pseudoSelectors);\n\n/**\n * Convert a token name to a css variable\n *\n * @example\n * tokenToCssVar('colors.red.500', 'chakra')\n * => {\n * variable: '--chakra-colors-red-500',\n * reference: 'var(--chakra-colors-red-500)'\n * }\n */\nfunction tokenToCssVar(token, prefix) {\n return cssVar(String(token).replace(/\\./g, \"-\"), undefined, prefix);\n}\n\nfunction createThemeVars(flatTokens, options) {\n var cssVars = {};\n var cssMap = {};\n\n var _loop = function _loop() {\n var _Object$entries$_i = _Object$entries[_i],\n token = _Object$entries$_i[0],\n tokenValue = _Object$entries$_i[1];\n var isSemantic = tokenValue.isSemantic,\n value = tokenValue.value;\n\n var _tokenToCssVar = tokenToCssVar(token, options == null ? void 0 : options.cssVarPrefix),\n variable = _tokenToCssVar.variable,\n reference = _tokenToCssVar.reference;\n\n if (!isSemantic) {\n if (token.startsWith(\"space\")) {\n var keys = token.split(\".\");\n var firstKey = keys[0],\n referenceKeys = keys.slice(1);\n /** @example space.-4 */\n\n var negativeLookupKey = firstKey + \".-\" + referenceKeys.join(\".\");\n var negativeValue = calc.negate(value);\n var negatedReference = calc.negate(reference);\n cssMap[negativeLookupKey] = {\n value: negativeValue,\n \"var\": variable,\n varRef: negatedReference\n };\n }\n\n cssVars[variable] = value;\n cssMap[token] = {\n value: value,\n \"var\": variable,\n varRef: reference\n };\n return \"continue\";\n }\n\n var lookupToken = function lookupToken(maybeToken) {\n var scale = String(token).split(\".\")[0];\n var withScale = [scale, maybeToken].join(\".\");\n /** @example flatTokens['space.4'] === '16px' */\n\n var resolvedTokenValue = flatTokens[withScale];\n if (!resolvedTokenValue) return maybeToken;\n\n var _tokenToCssVar2 = tokenToCssVar(withScale, options == null ? void 0 : options.cssVarPrefix),\n reference = _tokenToCssVar2.reference;\n\n return reference;\n };\n\n var normalizedValue = isObject(value) ? value : {\n \"default\": value\n };\n cssVars = mergeWith(cssVars, Object.entries(normalizedValue).reduce(function (acc, _ref) {\n var _conditionAlias, _acc$conditionSelecto;\n\n var conditionAlias = _ref[0],\n conditionValue = _ref[1];\n var maybeReference = lookupToken(conditionValue);\n\n if (conditionAlias === \"default\") {\n acc[variable] = maybeReference;\n return acc;\n }\n /** @example { _dark: \"#fff\" } => { '.chakra-ui-dark': \"#fff\" } */\n\n\n var conditionSelector = (_conditionAlias = pseudoSelectors == null ? void 0 : pseudoSelectors[conditionAlias]) != null ? _conditionAlias : conditionAlias;\n acc[conditionSelector] = (_acc$conditionSelecto = {}, _acc$conditionSelecto[variable] = maybeReference, _acc$conditionSelecto);\n return acc;\n }, {}));\n cssMap[token] = {\n value: reference,\n \"var\": variable,\n varRef: reference\n };\n };\n\n for (var _i = 0, _Object$entries = Object.entries(flatTokens); _i < _Object$entries.length; _i++) {\n var _ret = _loop();\n\n if (_ret === \"continue\") continue;\n }\n\n return {\n cssVars: cssVars,\n cssMap: cssMap\n };\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded = [\"__cssMap\", \"__cssVars\", \"__breakpoints\"];\nvar tokens = [\"colors\", \"borders\", \"borderWidths\", \"borderStyles\", \"fonts\", \"fontSizes\", \"fontWeights\", \"letterSpacings\", \"lineHeights\", \"radii\", \"space\", \"shadows\", \"sizes\", \"zIndices\", \"transition\", \"blur\"];\nfunction extractTokens(theme) {\n var _tokens = tokens;\n return pick(theme, _tokens);\n}\nfunction extractSemanticTokens(theme) {\n return theme.semanticTokens;\n}\nfunction omitVars(rawTheme) {\n rawTheme.__cssMap;\n rawTheme.__cssVars;\n rawTheme.__breakpoints;\n var cleanTheme = _objectWithoutPropertiesLoose(rawTheme, _excluded);\n\n return cleanTheme;\n}\n\nfunction flattenTokens(_ref) {\n var _flatten, _flatten2;\n\n var tokens = _ref.tokens,\n semanticTokens = _ref.semanticTokens;\n var tokenEntries = Object.entries((_flatten = flatten(tokens)) != null ? _flatten : {}).map(function (_ref2) {\n var token = _ref2[0],\n value = _ref2[1];\n var enhancedToken = {\n isSemantic: false,\n value: value\n };\n return [token, enhancedToken];\n });\n var semanticTokenEntries = Object.entries((_flatten2 = flatten(semanticTokens, 1)) != null ? _flatten2 : {}).map(function (_ref3) {\n var token = _ref3[0],\n value = _ref3[1];\n var enhancedToken = {\n isSemantic: true,\n value: value\n };\n return [token, enhancedToken];\n });\n return fromEntries([].concat(tokenEntries, semanticTokenEntries));\n}\n\nfunction toCSSVar(rawTheme) {\n var _theme$config;\n\n /**\n * In the case the theme has already been converted to css-var (e.g. extending the theme),\n * we can omit the computed css vars and recompute it for the extended theme.\n */\n var theme = omitVars(rawTheme); // omit components and breakpoints from css variable map\n\n var tokens = extractTokens(theme);\n var semanticTokens = extractSemanticTokens(theme);\n var flatTokens = flattenTokens({\n tokens: tokens,\n semanticTokens: semanticTokens\n });\n var cssVarPrefix = (_theme$config = theme.config) == null ? void 0 : _theme$config.cssVarPrefix;\n\n var _createThemeVars = createThemeVars(flatTokens, {\n cssVarPrefix: cssVarPrefix\n }),\n cssMap = _createThemeVars.cssMap,\n cssVars = _createThemeVars.cssVars;\n\n var 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: _extends({}, defaultCssVars, cssVars),\n __cssMap: cssMap,\n __breakpoints: analyzeBreakpoints(theme.breakpoints)\n });\n return theme;\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (it) return (it = it.call(o)).next.bind(it);\n\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar systemProps = mergeWith({}, background, border, color, flexbox, layout, filter, ring, interactivity, grid, others, position, effect, space, scroll, typography, textDecoration, transform, list, transition);\nvar layoutSystem = Object.assign({}, space, layout, flexbox, grid, position);\nvar layoutPropNames = objectKeys(layoutSystem);\nvar propNames = [].concat(objectKeys(systemProps), pseudoPropNames);\n\nvar styleProps = _extends({}, systemProps, pseudoSelectors);\n\nvar isStyleProp = function isStyleProp(prop) {\n return prop in styleProps;\n};\n\n/**\n * Expands an array or object syntax responsive style.\n *\n * @example\n * expandResponsive({ mx: [1, 2] })\n * // or\n * expandResponsive({ mx: { base: 1, sm: 2 } })\n *\n * // => { mx: 1, \"@media(min-width:<sm>)\": { mx: 2 } }\n */\n\nvar expandResponsive = function expandResponsive(styles) {\n return function (theme) {\n /**\n * Before any style can be processed, the user needs to call `toCSSVar`\n * which analyzes the theme's breakpoint and appends a `__breakpoints` property\n * to the theme with more details of the breakpoints.\n *\n * To learn more, go here: packages/utils/src/responsive.ts #analyzeBreakpoints\n */\n if (!theme.__breakpoints) return styles;\n var _theme$__breakpoints = theme.__breakpoints,\n isResponsive = _theme$__breakpoints.isResponsive,\n toArrayValue = _theme$__breakpoints.toArrayValue,\n medias = _theme$__breakpoints.media;\n var computedStyles = {};\n\n for (var key in styles) {\n var value = runIfFn(styles[key], theme);\n if (value == null) continue; // converts the object responsive syntax to array syntax\n\n value = isObject(value) && isResponsive(value) ? toArrayValue(value) : value;\n\n if (!Array.isArray(value)) {\n computedStyles[key] = value;\n continue;\n }\n\n var queries = value.slice(0, medias.length).length;\n\n for (var index = 0; index < queries; index += 1) {\n var media = medias == null ? void 0 : medias[index];\n\n if (!media) {\n computedStyles[key] = value[index];\n continue;\n }\n\n computedStyles[media] = computedStyles[media] || {};\n\n if (value[index] == null) {\n continue;\n }\n\n computedStyles[media][key] = value[index];\n }\n }\n\n return computedStyles;\n };\n};\n\nvar isCSSVariableTokenValue = function isCSSVariableTokenValue(key, value) {\n return key.startsWith(\"--\") && isString(value) && !isCssVar(value);\n};\n\nvar resolveTokenValue = function resolveTokenValue(theme, value) {\n var _ref, _getVar2;\n\n if (value == null) return value;\n\n var getVar = function getVar(val) {\n var _theme$__cssMap, _theme$__cssMap$val;\n\n return (_theme$__cssMap = theme.__cssMap) == null ? void 0 : (_theme$__cssMap$val = _theme$__cssMap[val]) == null ? void 0 : _theme$__cssMap$val.varRef;\n };\n\n var getValue = function getValue(val) {\n var _getVar;\n\n return (_getVar = getVar(val)) != null ? _getVar : val;\n };\n\n var valueSplit = value.split(\",\").map(function (v) {\n return v.trim();\n });\n var tokenValue = valueSplit[0],\n fallbackValue = valueSplit[1];\n value = (_ref = (_getVar2 = getVar(tokenValue)) != null ? _getVar2 : getValue(fallbackValue)) != null ? _ref : getValue(value);\n return value;\n};\n\nfunction getCss(options) {\n var _options$configs = options.configs,\n configs = _options$configs === void 0 ? {} : _options$configs,\n _options$pseudos = options.pseudos,\n pseudos = _options$pseudos === void 0 ? {} : _options$pseudos,\n theme = options.theme;\n\n var css = function css(stylesOrFn, nested) {\n if (nested === void 0) {\n nested = false;\n }\n\n var _styles = runIfFn(stylesOrFn, theme);\n\n var styles = expandResponsive(_styles)(theme);\n var computedStyles = {};\n\n for (var key in styles) {\n var _config$transform, _config, _config2, _config3, _config4;\n\n var valueOrFn = styles[key];\n /**\n * allows the user to pass functional values\n * boxShadow: theme => `0 2px 2px ${theme.colors.red}`\n */\n\n var value = runIfFn(valueOrFn, theme);\n /**\n * converts pseudo shorthands to valid selector\n * \"_hover\" => \"&:hover\"\n */\n\n if (key in pseudos) {\n key = pseudos[key];\n }\n /**\n * allows the user to use theme tokens in css vars\n * { --banner-height: \"sizes.md\" } => { --banner-height: \"var(--chakra-sizes-md)\" }\n *\n * You can also provide fallback values\n * { --banner-height: \"sizes.no-exist, 40px\" } => { --banner-height: \"40px\" }\n */\n\n\n if (isCSSVariableTokenValue(key, value)) {\n value = resolveTokenValue(theme, value);\n }\n\n var config = configs[key];\n\n if (config === true) {\n config = {\n property: key\n };\n }\n\n if (isObject(value)) {\n var _computedStyles$key;\n\n computedStyles[key] = (_computedStyles$key = computedStyles[key]) != null ? _computedStyles$key : {};\n computedStyles[key] = mergeWith({}, computedStyles[key], css(value, true));\n continue;\n }\n\n var rawValue = (_config$transform = (_config = config) == null ? void 0 : _config.transform == null ? void 0 : _config.transform(value, theme, _styles)) != null ? _config$transform : value;\n /**\n * Used for `layerStyle`, `textStyle` and `apply`. After getting the\n * styles in the theme, we need to process them since they might\n * contain theme tokens.\n *\n * `processResult` is the config property we pass to `layerStyle`, `textStyle` and `apply`\n */\n\n rawValue = (_config2 = config) != null && _config2.processResult ? css(rawValue, true) : rawValue;\n /**\n * allows us to define css properties for RTL and LTR.\n *\n * const marginStart = {\n * property: theme => theme.direction === \"rtl\" ? \"marginRight\": \"marginLeft\",\n * }\n */\n\n var configProperty = runIfFn((_config3 = config) == null ? void 0 : _config3.property, theme);\n\n if (!nested && (_config4 = config) != null && _config4[\"static\"]) {\n var staticStyles = runIfFn(config[\"static\"], theme);\n computedStyles = mergeWith({}, computedStyles, staticStyles);\n }\n\n if (configProperty && Array.isArray(configProperty)) {\n for (var _iterator = _createForOfIteratorHelperLoose(configProperty), _step; !(_step = _iterator()).done;) {\n var property = _step.value;\n computedStyles[property] = rawValue;\n }\n\n continue;\n }\n\n if (configProperty) {\n if (configProperty === \"&\" && isObject(rawValue)) {\n computedStyles = mergeWith({}, computedStyles, rawValue);\n } else {\n computedStyles[configProperty] = rawValue;\n }\n\n continue;\n }\n\n if (isObject(rawValue)) {\n computedStyles = mergeWith({}, computedStyles, rawValue);\n continue;\n }\n\n computedStyles[key] = rawValue;\n }\n\n return computedStyles;\n };\n\n return css;\n}\nvar css = function css(styles) {\n return function (theme) {\n var cssFn = getCss({\n theme: theme,\n pseudos: pseudoSelectors,\n configs: systemProps\n });\n return cssFn(styles);\n };\n};\n\nfunction normalize(value, toArray) {\n if (isArray(value)) return value;\n if (isObject(value)) return toArray(value);\n if (value != null) return [value];\n} //given [ 'sm', null, null, 'md' ] and i'm at \"sm\", find the next index that has non-null value\n\n\nfunction getNextIndex(values, i) {\n for (var j = i + 1; j < values.length; j++) {\n if (values[j] != null) return j;\n }\n\n return -1;\n}\n\nfunction createResolver(theme) {\n var breakpointUtil = theme.__breakpoints;\n return function resolver(config, prop, value, props) {\n //\n if (!breakpointUtil) return;\n var result = {};\n var normalized = normalize(value, breakpointUtil.toArrayValue);\n if (!normalized) return result;\n var len = normalized.length;\n var isSingle = len === 1;\n var isMultipart = !!config.parts;\n\n var _loop = function _loop(i) {\n var _config$prop;\n\n var key = breakpointUtil.details[i];\n var nextKey = breakpointUtil.details[getNextIndex(normalized, i)];\n var query = toMediaQueryString(key.minW, nextKey == null ? void 0 : nextKey._minW);\n var styles = runIfFn((_config$prop = config[prop]) == null ? void 0 : _config$prop[normalized[i]], props);\n if (!styles) return \"continue\";\n\n if (isMultipart) {\n var _config$parts;\n\n (_config$parts = config.parts) == null ? void 0 : _config$parts.forEach(function (part) {\n var _ref, _mergeWith;\n\n mergeWith(result, (_mergeWith = {}, _mergeWith[part] = isSingle ? styles[part] : (_ref = {}, _ref[query] = styles[part], _ref), _mergeWith));\n });\n return \"continue\";\n }\n\n if (!isMultipart) {\n if (isSingle) mergeWith(result, styles);else result[query] = styles;\n return \"continue\";\n }\n\n result[query] = styles;\n };\n\n for (var i = 0; i < len; i++) {\n var _ret = _loop(i);\n\n if (_ret === \"continue\") continue;\n }\n\n return result;\n };\n}\n\nfunction resolveStyleConfig(config) {\n return function (props) {\n var _config$baseStyle;\n\n var variant = props.variant,\n size = props.size,\n theme = props.theme;\n var recipe = createResolver(theme);\n return mergeWith({}, runIfFn((_config$baseStyle = config.baseStyle) != null ? _config$baseStyle : {}, props), recipe(config, \"sizes\", size, props), recipe(config, \"variants\", variant, props));\n };\n}\n\nexport { addPrefix, background, border, calc, color, css, cssVar, effect, filter, flattenTokens, flexbox, getCss, grid, interactivity, isStyleProp, layout, layoutPropNames, list, others, position, propNames, pseudoPropNames, pseudoSelectors, resolveStyleConfig, ring, scroll, space, systemProps, textDecoration, toCSSVar, toVarDefinition, toVarReference, tokenToCSSVar, transform, transition, typography };\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.1\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 if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\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","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 default isPropValid;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport * as React from 'react';\nimport { useContext, createElement, Fragment } 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';\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 useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : function useInsertionEffect(create) {\n create();\n};\nfunction useInsertionEffectMaybe(create) {\n\n useInsertionEffect(create);\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 var rules = useInsertionEffectMaybe(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 = 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__*/createElement(Fragment, null, /*#__PURE__*/createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof FinalTag === 'string'\n }), /*#__PURE__*/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 default createStyled;\n","import '@babel/runtime/helpers/extends';\nimport 'react';\nimport '@emotion/is-prop-valid';\nimport createStyled from '../base/dist/emotion-styled-base.browser.esm.js';\nimport '@emotion/react';\nimport '@emotion/utils';\nimport '@emotion/serialize';\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 default newStyled;\n","import { useColorMode } from '@chakra-ui/color-mode';\nexport * from '@chakra-ui/color-mode';\nimport { toCSSVar, css, propNames, isStyleProp, resolveStyleConfig } from '@chakra-ui/styled-system';\nexport * from '@chakra-ui/styled-system';\nimport { ThemeProvider as ThemeProvider$1, Global, ThemeContext } from '@emotion/react';\nexport { keyframes } from '@emotion/react';\nimport { memoizedGet, runIfFn, omit, filterUndefined, mergeWith, objectFilter } from '@chakra-ui/utils';\nimport * as React from 'react';\nimport { useRef, useMemo } from 'react';\nimport isEqual from 'react-fast-compare';\nimport { createContext } from '@chakra-ui/react-utils';\nimport _styled from '@emotion/styled';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar ThemeProvider = function ThemeProvider(props) {\n var cssVarsRoot = props.cssVarsRoot,\n theme = props.theme,\n children = props.children;\n var computedTheme = React.useMemo(function () {\n return toCSSVar(theme);\n }, [theme]);\n return /*#__PURE__*/React.createElement(ThemeProvider$1, {\n theme: computedTheme\n }, /*#__PURE__*/React.createElement(CSSVars, {\n root: cssVarsRoot\n }), children);\n};\nvar CSSVars = function CSSVars(_ref) {\n var _ref$root = _ref.root,\n root = _ref$root === void 0 ? \":host, :root\" : _ref$root;\n\n /**\n * Append color mode selector to allow semantic tokens to change according to the color mode\n */\n var selector = [root, \"[data-theme]\"].join(\",\");\n return /*#__PURE__*/React.createElement(Global, {\n styles: function styles(theme) {\n var _ref2;\n\n return _ref2 = {}, _ref2[selector] = theme.__cssVars, _ref2;\n }\n });\n};\nfunction useTheme() {\n var theme = React.useContext(ThemeContext);\n\n if (!theme) {\n throw Error(\"useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`\");\n }\n\n return theme;\n}\n/**\n * @deprecated - Prefer to use `createStylesContext` to provide better error messages\n *\n * @example\n *\n * ```jsx\n * import { createStylesContext } from \"@chakra-ui/react\"\n *\n * const [StylesProvider, useStyles] = createStylesContext(\"Component\")\n * ```\n */\n\nvar _createContext = createContext({\n name: \"StylesContext\",\n errorMessage: \"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` \"\n}),\n StylesProvider = _createContext[0],\n useStyles = _createContext[1];\n/**\n * Helper function that creates context with a standardized errorMessage related to the component\n * @param componentName\n * @returns [StylesProvider, useStyles]\n */\n\nvar createStylesContext = function createStylesContext(componentName) {\n return createContext({\n name: componentName + \"StylesContext\",\n errorMessage: \"useStyles: \\\"styles\\\" is undefined. Seems you forgot to wrap the components in \\\"<\" + componentName + \" />\\\" \"\n });\n};\n/**\n * Applies styles defined in `theme.styles.global` globally\n * using emotion's `Global` component\n */\n\nvar GlobalStyle = function GlobalStyle() {\n var _useColorMode = useColorMode(),\n colorMode = _useColorMode.colorMode;\n\n return /*#__PURE__*/React.createElement(Global, {\n styles: function styles(theme) {\n var styleObjectOrFn = memoizedGet(theme, \"styles.global\");\n var globalStyles = runIfFn(styleObjectOrFn, {\n theme: theme,\n colorMode: colorMode\n });\n if (!globalStyles) return undefined;\n var styles = css(globalStyles)(theme);\n return styles;\n }\n });\n};\n\nfunction omitThemingProps(props) {\n return omit(props, [\"styleConfig\", \"size\", \"variant\", \"colorScheme\"]);\n}\n\nfunction useChakra() {\n var colorModeResult = useColorMode();\n var theme = useTheme();\n return _extends({}, colorModeResult, {\n theme: theme\n });\n}\n\nvar resolveBreakpointValue = function resolveBreakpointValue(theme, tokenValue, fallbackValue) {\n var _ref, _getValue;\n\n if (tokenValue === null) return tokenValue;\n\n var getValue = function getValue(val) {\n var _theme$__breakpoints, _theme$__breakpoints$;\n\n return (_theme$__breakpoints = theme.__breakpoints) == null ? void 0 : (_theme$__breakpoints$ = _theme$__breakpoints.asArray) == null ? void 0 : _theme$__breakpoints$[val];\n };\n\n return (_ref = (_getValue = getValue(tokenValue)) != null ? _getValue : getValue(fallbackValue)) != null ? _ref : fallbackValue;\n}; // inspired from ./css.ts : resolveTokenValue\n\n\nvar resolveTokenValue = function resolveTokenValue(theme, tokenValue, fallbackValue) {\n var _ref2, _getValue2;\n\n if (tokenValue == null) return tokenValue;\n\n var getValue = function getValue(val) {\n var _theme$__cssMap, _theme$__cssMap$val;\n\n return (_theme$__cssMap = theme.__cssMap) == null ? void 0 : (_theme$__cssMap$val = _theme$__cssMap[val]) == null ? void 0 : _theme$__cssMap$val.value;\n };\n\n return (_ref2 = (_getValue2 = getValue(tokenValue)) != null ? _getValue2 : getValue(fallbackValue)) != null ? _ref2 : fallbackValue;\n};\n\nfunction useToken(scale, token, fallback) {\n var theme = useTheme();\n\n if (Array.isArray(token)) {\n var fallbackArr = [];\n\n if (fallback) {\n fallbackArr = Array.isArray(fallback) ? fallback : [fallback];\n }\n\n return token.map(function (token, index) {\n var _fallbackArr$index2;\n\n if (scale === \"breakpoints\") {\n var _fallbackArr$index;\n\n return resolveBreakpointValue(theme, token, (_fallbackArr$index = fallbackArr[index]) != null ? _fallbackArr$index : token);\n }\n\n var path = scale + \".\" + token;\n return resolveTokenValue(theme, path, (_fallbackArr$index2 = fallbackArr[index]) != null ? _fallbackArr$index2 : token);\n });\n }\n\n if (scale === \"breakpoints\") {\n return resolveBreakpointValue(theme, token, fallback);\n }\n\n var path = scale + \".\" + token;\n return resolveTokenValue(theme, path, fallback);\n}\nfunction useProps(themeKey, props) {\n var _theme$components, _styleConfig$defaultP;\n\n var _useChakra = useChakra(),\n theme = _useChakra.theme,\n colorMode = _useChakra.colorMode;\n\n var styleConfig = props.styleConfig || ((_theme$components = theme.components) == null ? void 0 : _theme$components[themeKey]);\n var defaultProps = (_styleConfig$defaultP = styleConfig == null ? void 0 : styleConfig.defaultProps) != null ? _styleConfig$defaultP : {};\n\n var propsWithDefault = _extends({}, defaultProps, filterUndefined(props));\n\n var stylesRef = useRef({});\n var mergedProps = mergeWith({}, propsWithDefault, {\n theme: theme,\n colorMode: colorMode\n });\n var memoizedStyles = useMemo(function () {\n if (styleConfig) {\n var _styleConfig$baseStyl, _styleConfig$variants, _styleConfig$variants2, _styleConfig$sizes, _styleConfig$sizes2;\n\n var baseStyles = runIfFn((_styleConfig$baseStyl = styleConfig.baseStyle) != null ? _styleConfig$baseStyl : {}, mergedProps);\n var variants = runIfFn((_styleConfig$variants = (_styleConfig$variants2 = styleConfig.variants) == null ? void 0 : _styleConfig$variants2[mergedProps.variant]) != null ? _styleConfig$variants : {}, mergedProps);\n var sizes = runIfFn((_styleConfig$sizes = (_styleConfig$sizes2 = styleConfig.sizes) == null ? void 0 : _styleConfig$sizes2[mergedProps.size]) != null ? _styleConfig$sizes : {}, mergedProps);\n var styles = mergeWith(baseStyles, sizes, variants);\n\n if (styleConfig.parts) {\n styleConfig.parts.forEach(function (part) {\n var _styles$part;\n\n styles[part] = (_styles$part = styles[part]) != null ? _styles$part : {};\n });\n }\n\n var isStyleEqual = isEqual(stylesRef.current, styles);\n\n if (!isStyleEqual) {\n stylesRef.current = styles;\n }\n }\n\n return stylesRef.current;\n }, [styleConfig, mergedProps]);\n return {\n styles: memoizedStyles,\n props: omitThemingProps(propsWithDefault)\n };\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\n/**\n * List of props for emotion to omit from DOM.\n * It mostly consists of Chakra props\n */\n\nvar allPropNames = new Set([].concat(propNames, [\"textStyle\", \"layerStyle\", \"apply\", \"noOfLines\", \"focusBorderColor\", \"errorBorderColor\", \"as\", \"__css\", \"css\", \"sx\"]));\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 */\n\nvar validHTMLProps = new Set([\"htmlWidth\", \"htmlHeight\", \"htmlSize\"]);\nvar shouldForwardProp = function shouldForwardProp(prop) {\n return validHTMLProps.has(prop) || !allPropNames.has(prop);\n};\n\nvar _excluded$1 = [\"theme\", \"css\", \"__css\", \"sx\"],\n _excluded2 = [\"baseStyle\"];\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 */\nvar toCSSObject = function toCSSObject(_ref) {\n var baseStyle = _ref.baseStyle;\n return function (props) {\n props.theme;\n var cssProp = props.css,\n __css = props.__css,\n sx = props.sx,\n rest = _objectWithoutPropertiesLoose(props, _excluded$1);\n\n var styleProps = objectFilter(rest, function (_, prop) {\n return isStyleProp(prop);\n });\n var finalBaseStyle = runIfFn(baseStyle, props);\n var finalStyles = Object.assign({}, __css, finalBaseStyle, filterUndefined(styleProps), sx);\n var computedCSS = css(finalStyles)(props.theme);\n return cssProp ? [computedCSS, cssProp] : computedCSS;\n };\n};\nfunction styled(component, options) {\n var _ref2 = options != null ? options : {},\n baseStyle = _ref2.baseStyle,\n styledOptions = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n\n if (!styledOptions.shouldForwardProp) {\n styledOptions.shouldForwardProp = shouldForwardProp;\n }\n\n var styleObject = toCSSObject({\n baseStyle: baseStyle\n });\n return _styled(component, styledOptions)(styleObject);\n}\n\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 */\nfunction forwardRef(component) {\n return /*#__PURE__*/React.forwardRef(component);\n}\n\nvar _excluded = [\"styleConfig\"];\n\nfunction useStyleConfigImpl(themeKey, props) {\n var _styleConfig$defaultP;\n\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n styleConfigProp = _props.styleConfig,\n rest = _objectWithoutPropertiesLoose(_props, _excluded);\n\n var _useChakra = useChakra(),\n theme = _useChakra.theme,\n colorMode = _useChakra.colorMode;\n\n var themeStyleConfig = memoizedGet(theme, \"components.\" + themeKey);\n var styleConfig = styleConfigProp || themeStyleConfig;\n var mergedProps = mergeWith({\n theme: theme,\n colorMode: colorMode\n }, (_styleConfig$defaultP = styleConfig == null ? void 0 : styleConfig.defaultProps) != null ? _styleConfig$defaultP : {}, filterUndefined(omit(rest, [\"children\"])));\n /**\n * Store the computed styles in a `ref` to avoid unneeded re-computation\n */\n\n var stylesRef = useRef({});\n\n if (styleConfig) {\n var getStyles = resolveStyleConfig(styleConfig);\n var styles = getStyles(mergedProps);\n var isStyleEqual = isEqual(stylesRef.current, styles);\n\n if (!isStyleEqual) {\n stylesRef.current = styles;\n }\n }\n\n return stylesRef.current;\n}\n\nfunction useStyleConfig(themeKey, props) {\n if (props === void 0) {\n props = {};\n }\n\n return useStyleConfigImpl(themeKey, props);\n}\nfunction useMultiStyleConfig(themeKey, props) {\n if (props === void 0) {\n props = {};\n }\n\n return useStyleConfigImpl(themeKey, props);\n}\n\nfunction factory() {\n var cache = new Map();\n return new Proxy(styled, {\n /**\n * @example\n * const Div = chakra(\"div\")\n * const WithChakra = chakra(AnotherComponent)\n */\n apply: function apply(target, thisArg, argArray) {\n return styled.apply(void 0, argArray);\n },\n\n /**\n * @example\n * <chakra.div />\n */\n get: function get(_, element) {\n if (!cache.has(element)) {\n cache.set(element, styled(element));\n }\n\n return cache.get(element);\n }\n });\n}\n\nvar chakra = factory();\n\nexport { CSSVars, GlobalStyle, StylesProvider, ThemeProvider, chakra, createStylesContext, forwardRef, omitThemingProps, shouldForwardProp, styled, toCSSObject, useChakra, useMultiStyleConfig, useProps, useStyleConfig, useStyles, useTheme, useToken };\n","import { chakra } from '@chakra-ui/system';\nimport { __DEV__ } from '@chakra-ui/utils';\n\n/**\n * Styles to visually hide an element\n * but make it accessible to screen-readers\n */\nvar visuallyHiddenStyle = {\n border: \"0px\",\n clip: \"rect(0px, 0px, 0px, 0px)\",\n height: \"1px\",\n width: \"1px\",\n margin: \"-1px\",\n padding: \"0px\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\"\n};\n/**\n * Visually hidden component used to hide\n * elements on screen\n */\n\nvar VisuallyHidden = chakra(\"span\", {\n baseStyle: visuallyHiddenStyle\n});\n\nif (__DEV__) {\n VisuallyHidden.displayName = \"VisuallyHidden\";\n}\n/**\n * Visually hidden input component for designing\n * custom input components using the html `input`\n * as a proxy\n */\n\n\nvar VisuallyHiddenInput = chakra(\"input\", {\n baseStyle: visuallyHiddenStyle\n});\n\nif (__DEV__) {\n VisuallyHiddenInput.displayName = \"VisuallyHiddenInput\";\n}\n\nvar VisuallyHidden$1 = VisuallyHidden;\n\nexport { VisuallyHidden, VisuallyHiddenInput, VisuallyHidden$1 as default, visuallyHiddenStyle };\n","import { keyframes, forwardRef, useStyleConfig, omitThemingProps, chakra } from '@chakra-ui/system';\nimport { cx, __DEV__ } from '@chakra-ui/utils';\nimport { VisuallyHidden } from '@chakra-ui/visually-hidden';\nimport * as React from 'react';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded = [\"label\", \"thickness\", \"speed\", \"emptyColor\", \"className\"];\nvar spin = keyframes({\n \"0%\": {\n transform: \"rotate(0deg)\"\n },\n \"100%\": {\n transform: \"rotate(360deg)\"\n }\n});\n\n/**\n * Spinner is used to indicate the loading state of a page or a component,\n * It renders a `div` by default.\n *\n * @see Docs https://chakra-ui.com/spinner\n */\nvar Spinner = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyleConfig(\"Spinner\", props);\n\n var _omitThemingProps = omitThemingProps(props),\n _omitThemingProps$lab = _omitThemingProps.label,\n label = _omitThemingProps$lab === void 0 ? \"Loading...\" : _omitThemingProps$lab,\n _omitThemingProps$thi = _omitThemingProps.thickness,\n thickness = _omitThemingProps$thi === void 0 ? \"2px\" : _omitThemingProps$thi,\n _omitThemingProps$spe = _omitThemingProps.speed,\n speed = _omitThemingProps$spe === void 0 ? \"0.45s\" : _omitThemingProps$spe,\n _omitThemingProps$emp = _omitThemingProps.emptyColor,\n emptyColor = _omitThemingProps$emp === void 0 ? \"transparent\" : _omitThemingProps$emp,\n className = _omitThemingProps.className,\n rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded);\n\n var _className = cx(\"chakra-spinner\", className);\n\n var spinnerStyles = _extends({\n display: \"inline-block\",\n borderColor: \"currentColor\",\n borderStyle: \"solid\",\n borderRadius: \"99999px\",\n borderWidth: thickness,\n borderBottomColor: emptyColor,\n borderLeftColor: emptyColor,\n animation: spin + \" \" + speed + \" linear infinite\"\n }, styles);\n\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n ref: ref,\n __css: spinnerStyles,\n className: _className\n }, rest), label && /*#__PURE__*/React.createElement(VisuallyHidden, null, label));\n});\n\nif (__DEV__) {\n Spinner.displayName = \"Spinner\";\n}\n\nexport { Spinner };\n","import { forwardRef, chakra } from '@chakra-ui/system';\nimport { cx, __DEV__ } from '@chakra-ui/utils';\nimport * as React from 'react';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded = [\"as\", \"viewBox\", \"color\", \"focusable\", \"children\", \"className\", \"__css\"];\nvar fallbackIcon = {\n path: /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n strokeWidth: \"1.5\"\n }, /*#__PURE__*/React.createElement(\"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 }), /*#__PURE__*/React.createElement(\"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 }), /*#__PURE__*/React.createElement(\"circle\", {\n fill: \"none\",\n strokeMiterlimit: \"10\",\n cx: \"12\",\n cy: \"12\",\n r: \"11.25\"\n })),\n viewBox: \"0 0 24 24\"\n};\nvar Icon = /*#__PURE__*/forwardRef(function (props, ref) {\n var element = props.as,\n viewBox = props.viewBox,\n _props$color = props.color,\n color = _props$color === void 0 ? \"currentColor\" : _props$color,\n _props$focusable = props.focusable,\n focusable = _props$focusable === void 0 ? false : _props$focusable,\n children = props.children,\n className = props.className,\n __css = props.__css,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n\n var _className = cx(\"chakra-icon\", className);\n\n var styles = _extends({\n w: \"1em\",\n h: \"1em\",\n display: \"inline-block\",\n lineHeight: \"1em\",\n flexShrink: 0,\n color: color\n }, __css);\n\n var shared = {\n ref: ref,\n focusable: focusable,\n className: _className,\n __css: styles\n };\n\n var _viewBox = viewBox != null ? viewBox : fallbackIcon.viewBox;\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\n\n if (element && typeof element !== \"string\") {\n return /*#__PURE__*/React.createElement(chakra.svg, _extends({\n as: element\n }, shared, rest));\n }\n\n var _path = children != null ? children : fallbackIcon.path;\n\n return /*#__PURE__*/React.createElement(chakra.svg, _extends({\n verticalAlign: \"middle\",\n viewBox: _viewBox\n }, shared, rest), _path);\n});\n\nif (__DEV__) {\n Icon.displayName = \"Icon\";\n}\n\nvar Icon$1 = Icon;\n\nfunction createIcon(options) {\n var _options$viewBox = options.viewBox,\n viewBox = _options$viewBox === void 0 ? \"0 0 24 24\" : _options$viewBox,\n pathDefinition = options.d,\n displayName = options.displayName,\n _options$defaultProps = options.defaultProps,\n defaultProps = _options$defaultProps === void 0 ? {} : _options$defaultProps;\n var path = React.Children.toArray(options.path);\n var Comp = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(Icon, _extends({\n ref: ref,\n viewBox: viewBox\n }, defaultProps, props), path.length ? path : /*#__PURE__*/React.createElement(\"path\", {\n fill: \"currentColor\",\n d: pathDefinition\n }));\n });\n\n if (__DEV__) {\n Comp.displayName = displayName;\n }\n\n return Comp;\n}\n\nexport { Icon, createIcon, Icon$1 as default };\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","/**\n * Browser-safe usage of process\n */\nvar defaultEnvironment = \"production\";\nvar env = typeof process === \"undefined\" || process.env === undefined\n ? defaultEnvironment\n : process.env.NODE_ENV || defaultEnvironment;\n\nexport { env };\n","var createDefinition = function (propNames) { return ({\n isEnabled: function (props) { return propNames.some(function (name) { return !!props[name]; }); },\n}); };\nvar featureDefinitions = {\n measureLayout: createDefinition([\"layout\", \"layoutId\", \"drag\"]),\n animation: createDefinition([\n \"animate\",\n \"exit\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"whileFocus\",\n \"whileDrag\",\n \"whileInView\",\n ]),\n exit: createDefinition([\"exit\"]),\n drag: createDefinition([\"drag\", \"dragControls\"]),\n focus: createDefinition([\"whileFocus\"]),\n hover: createDefinition([\"whileHover\", \"onHoverStart\", \"onHoverEnd\"]),\n tap: createDefinition([\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"]),\n pan: createDefinition([\n \"onPan\",\n \"onPanStart\",\n \"onPanSessionStart\",\n \"onPanEnd\",\n ]),\n inView: createDefinition([\n \"whileInView\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n ]),\n};\nfunction loadFeatures(features) {\n for (var key in features) {\n if (features[key] === null)\n continue;\n if (key === \"projectionNodeConstructor\") {\n featureDefinitions.projectionNodeConstructor = features[key];\n }\n else {\n featureDefinitions[key].Component = features[key];\n }\n }\n}\n\nexport { featureDefinitions, loadFeatures };\n","var warning = function () { };\r\nvar invariant = function () { };\r\nif (process.env.NODE_ENV !== 'production') {\r\n warning = function (check, message) {\r\n if (!check && typeof console !== 'undefined') {\r\n console.warn(message);\r\n }\r\n };\r\n invariant = function (check, message) {\r\n if (!check) {\r\n throw new Error(message);\r\n }\r\n };\r\n}\n\nexport { invariant, warning };\n","import { createContext } from 'react';\n\nvar LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\n","import { __assign } from 'tslib';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { env } from '../../utils/process.mjs';\nimport { featureDefinitions } from './definitions.mjs';\nimport { invariant } from 'hey-listen';\nimport { LazyContext } from '../../context/LazyContext.mjs';\n\nvar featureNames = Object.keys(featureDefinitions);\nvar numFeatures = featureNames.length;\n/**\n * Load features via renderless components based on the provided MotionProps.\n */\nfunction useFeatures(props, visualElement, preloadedFeatures) {\n var features = [];\n var lazyContext = useContext(LazyContext);\n if (!visualElement)\n return null;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (env !== \"production\" && preloadedFeatures && lazyContext.strict) {\n invariant(false, \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\");\n }\n for (var i = 0; i < numFeatures; i++) {\n var name_1 = featureNames[i];\n var _a = featureDefinitions[name_1], isEnabled = _a.isEnabled, Component = _a.Component;\n /**\n * It might be possible in the future to use this moment to\n * dynamically request functionality. In initial tests this\n * was producing a lot of duplication amongst bundles.\n */\n if (isEnabled(props) && Component) {\n features.push(React.createElement(Component, __assign({ key: name_1 }, props, { visualElement: visualElement })));\n }\n }\n return features;\n}\n\nexport { useFeatures };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nvar MotionConfigContext = createContext({\n transformPagePoint: function (p) { return p; },\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n","import { createContext, useContext } from 'react';\n\nvar MotionContext = createContext({});\nfunction useVisualElementContext() {\n return useContext(MotionContext).visualElement;\n}\n\nexport { MotionContext, useVisualElementContext };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nvar PresenceContext = createContext(null);\n\nexport { PresenceContext };\n","var isBrowser = typeof document !== \"undefined\";\n\nexport { isBrowser };\n","import { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.mjs';\n\nvar useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n","import { __read } from 'tslib';\nimport { useState, useContext } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { isBrowser } from './is-browser.mjs';\n\n// Does this device prefer reduced motion? Returns `null` server-side.\nvar prefersReducedMotion = { current: null };\nvar hasDetected = false;\nfunction initPrefersReducedMotion() {\n hasDetected = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n var motionMediaQuery_1 = window.matchMedia(\"(prefers-reduced-motion)\");\n var setReducedMotionPreferences = function () {\n return (prefersReducedMotion.current = motionMediaQuery_1.matches);\n };\n motionMediaQuery_1.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n/**\n * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.\n *\n * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing\n * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.\n *\n * It will actively respond to changes and re-render your components with the latest setting.\n *\n * ```jsx\n * export function Sidebar({ isOpen }) {\n * const shouldReduceMotion = useReducedMotion()\n * const closedX = shouldReduceMotion ? 0 : \"-100%\"\n *\n * return (\n * <motion.div animate={{\n * opacity: isOpen ? 1 : 0,\n * x: isOpen ? 0 : closedX\n * }} />\n * )\n * }\n * ```\n *\n * @return boolean\n *\n * @public\n */\nfunction useReducedMotion() {\n /**\n * Lazy initialisation of prefersReducedMotion\n */\n !hasDetected && initPrefersReducedMotion();\n var _a = __read(useState(prefersReducedMotion.current), 1), shouldReduceMotion = _a[0];\n /**\n * TODO See if people miss automatically updating shouldReduceMotion setting\n */\n return shouldReduceMotion;\n}\nfunction useReducedMotionConfig() {\n var reducedMotionPreference = useReducedMotion();\n var reducedMotion = useContext(MotionConfigContext).reducedMotion;\n if (reducedMotion === \"never\") {\n return false;\n }\n else if (reducedMotion === \"always\") {\n return true;\n }\n else {\n return reducedMotionPreference;\n }\n}\n\nexport { useReducedMotion, useReducedMotionConfig };\n","function isRefObject(ref) {\n return (typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n\nexport { isRefObject };\n","/**\n * Decides if the supplied variable is an array of variant labels\n */\nfunction isVariantLabels(v) {\n return Array.isArray(v);\n}\n/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || isVariantLabels(v);\n}\n/**\n * Creates an object containing the latest state of every MotionValue on a VisualElement\n */\nfunction getCurrent(visualElement) {\n var current = {};\n visualElement.forEachValue(function (value, key) { return (current[key] = value.get()); });\n return current;\n}\n/**\n * Creates an object containing the latest velocity of every MotionValue on a VisualElement\n */\nfunction getVelocity(visualElement) {\n var velocity = {};\n visualElement.forEachValue(function (value, key) { return (velocity[key] = value.getVelocity()); });\n return velocity;\n}\nfunction resolveVariantFromProps(props, definition, custom, currentValues, currentVelocity) {\n var _a;\n if (currentValues === void 0) { currentValues = {}; }\n if (currentVelocity === void 0) { currentVelocity = {}; }\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = (_a = props.variants) === null || _a === void 0 ? void 0 : _a[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity);\n }\n return definition;\n}\nfunction resolveVariant(visualElement, definition, custom) {\n var props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== null && custom !== void 0 ? custom : props.custom, getCurrent(visualElement), getVelocity(visualElement));\n}\nfunction checkIfControllingVariants(props) {\n var _a;\n return (typeof ((_a = props.animate) === null || _a === void 0 ? void 0 : _a.start) === \"function\" ||\n isVariantLabel(props.initial) ||\n isVariantLabel(props.animate) ||\n isVariantLabel(props.whileHover) ||\n isVariantLabel(props.whileDrag) ||\n isVariantLabel(props.whileTap) ||\n isVariantLabel(props.whileFocus) ||\n isVariantLabel(props.exit));\n}\nfunction checkIfVariantNode(props) {\n return Boolean(checkIfControllingVariants(props) || props.variants);\n}\n\nexport { checkIfControllingVariants, checkIfVariantNode, isVariantLabel, isVariantLabels, resolveVariant, resolveVariantFromProps };\n","import { useMemo, useContext } from 'react';\nimport { MotionContext } from './index.mjs';\nimport { getCurrentTreeVariants } from './utils.mjs';\n\nfunction useCreateMotionContext(props) {\n var _a = getCurrentTreeVariants(props, useContext(MotionContext)), initial = _a.initial, animate = _a.animate;\n return useMemo(function () { return ({ initial: initial, animate: animate }); }, [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n","import { useRef } from 'react';\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nfunction useConstant(init) {\n var ref = useRef(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n\nexport { useConstant };\n","const defaultTimestep = (1 / 60) * 1000;\nconst getCurrentTime = typeof performance !== \"undefined\"\n ? () => performance.now()\n : () => Date.now();\nconst onNextFrame = typeof window !== \"undefined\"\n ? (callback) => window.requestAnimationFrame(callback)\n : (callback) => setTimeout(() => callback(getCurrentTime()), defaultTimestep);\n\nexport { defaultTimestep, onNextFrame };\n","import { onNextFrame, defaultTimestep } from './on-next-frame.mjs';\nimport { createRenderStep } from './create-render-step.mjs';\n\nconst maxElapsed = 40;\nlet useDefaultElapsed = true;\nlet runNextFrame = false;\nlet isProcessing = false;\nconst frame = {\n delta: 0,\n timestamp: 0,\n};\nconst stepsOrder = [\n \"read\",\n \"update\",\n \"preRender\",\n \"render\",\n \"postRender\",\n];\nconst steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(() => (runNextFrame = true));\n return acc;\n}, {});\nconst sync = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n startLoop();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n}, {});\nconst cancelSync = stepsOrder.reduce((acc, key) => {\n acc[key] = steps[key].cancel;\n return acc;\n}, {});\nconst flushSync = stepsOrder.reduce((acc, key) => {\n acc[key] = () => steps[key].process(frame);\n return acc;\n}, {});\nconst processStep = (stepId) => steps[stepId].process(frame);\nconst processFrame = (timestamp) => {\n runNextFrame = false;\n frame.delta = useDefaultElapsed\n ? defaultTimestep\n : Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);\n frame.timestamp = timestamp;\n isProcessing = true;\n stepsOrder.forEach(processStep);\n isProcessing = false;\n if (runNextFrame) {\n useDefaultElapsed = false;\n onNextFrame(processFrame);\n }\n};\nconst startLoop = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!isProcessing)\n onNextFrame(processFrame);\n};\nconst getFrameData = () => frame;\n\nexport default sync;\nexport { cancelSync, flushSync, getFrameData };\n","function createRenderStep(runNextFrame) {\n let toRun = [];\n let toRunNextFrame = [];\n let numToRun = 0;\n let isProcessing = false;\n let flushNextFrame = false;\n const toKeepAlive = new WeakSet();\n const step = {\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const buffer = addToCurrentFrame ? toRun : toRunNextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (buffer.indexOf(callback) === -1) {\n buffer.push(callback);\n if (addToCurrentFrame && isProcessing)\n numToRun = toRun.length;\n }\n return callback;\n },\n cancel: (callback) => {\n const index = toRunNextFrame.indexOf(callback);\n if (index !== -1)\n toRunNextFrame.splice(index, 1);\n toKeepAlive.delete(callback);\n },\n process: (frameData) => {\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [toRun, toRunNextFrame] = [toRunNextFrame, toRun];\n toRunNextFrame.length = 0;\n numToRun = toRun.length;\n if (numToRun) {\n for (let i = 0; i < numToRun; i++) {\n const callback = toRun[i];\n callback(frameData);\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n }\n }\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n","const clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nexport { clamp };\n","import { warning } from 'hey-listen';\nimport { clamp } from '../../utils/clamp.mjs';\n\nconst safeMin = 0.001;\nconst minDuration = 0.01;\nconst maxDuration = 10.0;\nconst minDamping = 0.05;\nconst maxDamping = 1;\nfunction findSpring({ duration = 800, bounce = 0.25, velocity = 0, mass = 1, }) {\n let envelope;\n let derivative;\n warning(duration <= maxDuration * 1000, \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n dampingRatio = clamp(minDamping, maxDamping, dampingRatio);\n duration = clamp(minDuration, maxDuration, duration / 1000);\n if (dampingRatio < 1) {\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = duration * 1000;\n if (isNaN(undampedFreq)) {\n return {\n stiffness: 100,\n damping: 10,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring, maxDamping, maxDuration, minDamping, minDuration };\n","import { __rest } from 'tslib';\nimport { findSpring, calcAngularFreq } from '../utils/find-spring.mjs';\n\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = Object.assign({ velocity: 0.0, stiffness: 100, damping: 10, mass: 1.0, isResolvedFromDuration: false }, options);\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n const derived = findSpring(options);\n springOptions = Object.assign(Object.assign(Object.assign({}, springOptions), derived), { velocity: 0.0, mass: 1.0 });\n springOptions.isResolvedFromDuration = true;\n }\n return springOptions;\n}\nfunction spring(_a) {\n var { from = 0.0, to = 1.0, restSpeed = 2, restDelta } = _a, options = __rest(_a, [\"from\", \"to\", \"restSpeed\", \"restDelta\"]);\n const state = { done: false, value: from };\n let { stiffness, damping, mass, velocity, duration, isResolvedFromDuration, } = getSpringOptions(options);\n let resolveSpring = zero;\n let resolveVelocity = zero;\n function createSpring() {\n const initialVelocity = velocity ? -(velocity / 1000) : 0.0;\n const initialDelta = to - from;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000;\n if (restDelta === undefined) {\n restDelta = Math.min(Math.abs(to - from) / 100, 0.4);\n }\n if (dampingRatio < 1) {\n const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (to -\n envelope *\n (((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq) *\n Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (dampingRatio *\n undampedAngularFreq *\n envelope *\n ((Math.sin(angularFreq * t) *\n (initialVelocity +\n dampingRatio *\n undampedAngularFreq *\n initialDelta)) /\n angularFreq +\n initialDelta * Math.cos(angularFreq * t)) -\n envelope *\n (Math.cos(angularFreq * t) *\n (initialVelocity +\n dampingRatio *\n undampedAngularFreq *\n initialDelta) -\n angularFreq *\n initialDelta *\n Math.sin(angularFreq * t)));\n };\n }\n else if (dampingRatio === 1) {\n resolveSpring = (t) => to -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) *\n t);\n }\n else {\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (to -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n }\n }\n createSpring();\n return {\n next: (t) => {\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n const currentVelocity = resolveVelocity(t) * 1000;\n const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;\n const isBelowDisplacementThreshold = Math.abs(to - current) <= restDelta;\n state.done =\n isBelowVelocityThreshold && isBelowDisplacementThreshold;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? to : current;\n return state;\n },\n flipTarget: () => {\n velocity = -velocity;\n [from, to] = [to, from];\n createSpring();\n },\n };\n}\nspring.needsInterpolation = (a, b) => typeof a === \"string\" || typeof b === \"string\";\nconst zero = (_t) => 0;\n\nexport { spring };\n","const progress = (from, to, value) => {\n const toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\n","const mix = (from, to, progress) => -progress * from + progress * to + from;\n\nexport { mix };\n","const clamp = (min, max) => (v) => Math.max(Math.min(v, max), min);\nconst sanitize = (v) => (v % 1 ? Number(v.toFixed(5)) : v);\nconst floatRegex = /(-)?([\\d]*\\.?[\\d])+/g;\nconst colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2,3}\\s*\\/*\\s*[\\d\\.]+%?\\))/gi;\nconst singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2,3}\\s*\\/*\\s*[\\d\\.]+%?\\))$/i;\nfunction isString(v) {\n return typeof v === 'string';\n}\n\nexport { clamp, colorRegex, floatRegex, isString, sanitize, singleColorRegex };\n","import { clamp } from '../utils.mjs';\n\nconst number = {\n test: (v) => typeof v === 'number',\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = Object.assign(Object.assign({}, number), { transform: clamp(0, 1) });\nconst scale = Object.assign(Object.assign({}, number), { default: 1 });\n\nexport { alpha, number, scale };\n","import { isString } from '../utils.mjs';\n\nconst createUnitType = (unit) => ({\n test: (v) => isString(v) && v.endsWith(unit) && v.split(' ').length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = createUnitType('deg');\nconst percent = createUnitType('%');\nconst px = createUnitType('px');\nconst vh = createUnitType('vh');\nconst vw = createUnitType('vw');\nconst progressPercentage = Object.assign(Object.assign({}, percent), { parse: (v) => percent.parse(v) / 100, transform: (v) => percent.transform(v * 100) });\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n","import { isString, singleColorRegex, floatRegex } from '../utils.mjs';\n\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((isString(v) && singleColorRegex.test(v) && v.startsWith(type)) ||\n (testProp && Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (!isString(v))\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst hsla = {\n test: isColorString('hsl', 'hue'),\n parse: splitColor('hue', 'saturation', 'lightness'),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return ('hsla(' +\n Math.round(hue) +\n ', ' +\n percent.transform(sanitize(saturation)) +\n ', ' +\n percent.transform(sanitize(lightness)) +\n ', ' +\n sanitize(alpha.transform(alpha$1)) +\n ')');\n },\n};\n\nexport { hsla };\n","import { number, alpha } from '../numbers/index.mjs';\nimport { sanitize, clamp } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst clampRgbUnit = clamp(0, 255);\nconst rgbUnit = Object.assign(Object.assign({}, number), { transform: (v) => Math.round(clampRgbUnit(v)) });\nconst rgba = {\n test: isColorString('rgb', 'red'),\n parse: splitColor('red', 'green', 'blue'),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => 'rgba(' +\n rgbUnit.transform(red) +\n ', ' +\n rgbUnit.transform(green) +\n ', ' +\n rgbUnit.transform(blue) +\n ', ' +\n sanitize(alpha.transform(alpha$1)) +\n ')',\n};\n\nexport { rgbUnit, rgba };\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = '';\n let g = '';\n let b = '';\n let a = '';\n if (v.length > 5) {\n r = v.substr(1, 2);\n g = v.substr(3, 2);\n b = v.substr(5, 2);\n a = v.substr(7, 2);\n }\n else {\n r = v.substr(1, 1);\n g = v.substr(2, 1);\n b = v.substr(3, 1);\n a = v.substr(4, 1);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: isColorString('#'),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n","import { isString } from '../utils.mjs';\nimport { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return isString(v)\n ? v\n : v.hasOwnProperty('red')\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n};\n\nexport { color };\n","import { color } from '../color/index.mjs';\nimport { number } from '../numbers/index.mjs';\nimport { isString, floatRegex, colorRegex, sanitize } from '../utils.mjs';\n\nconst colorToken = '${c}';\nconst numberToken = '${n}';\nfunction test(v) {\n var _a, _b, _c, _d;\n return (isNaN(v) &&\n isString(v) &&\n ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0);\n}\nfunction analyse(v) {\n if (typeof v === 'number')\n v = `${v}`;\n const values = [];\n let numColors = 0;\n const colors = v.match(colorRegex);\n if (colors) {\n numColors = colors.length;\n v = v.replace(colorRegex, colorToken);\n values.push(...colors.map(color.parse));\n }\n const numbers = v.match(floatRegex);\n if (numbers) {\n v = v.replace(floatRegex, numberToken);\n values.push(...numbers.map(number.parse));\n }\n return { values, numColors, tokenised: v };\n}\nfunction parse(v) {\n return analyse(v).values;\n}\nfunction createTransformer(v) {\n const { values, numColors, tokenised } = analyse(v);\n const numValues = values.length;\n return (v) => {\n let output = tokenised;\n for (let i = 0; i < numValues; i++) {\n output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? color.transform(v[i]) : sanitize(v[i]));\n }\n return output;\n };\n}\nconst convertNumbersToZero = (v) => typeof v === 'number' ? 0 : v;\nfunction getAnimatableNone(v) {\n const parsed = parse(v);\n const transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = { test, parse, createTransformer, getAnimatableNone };\n\nexport { complex };\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils.mjs';\n\nconst maxDefaults = new Set(['brightness', 'contrast', 'saturate', 'opacity']);\nfunction applyDefaultFilter(v) {\n let [name, value] = v.slice(0, -1).split('(');\n if (name === 'drop-shadow')\n return v;\n const [number] = value.match(floatRegex) || [];\n if (!number)\n return v;\n const unit = value.replace(number, '');\n let defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number !== value)\n defaultValue *= 100;\n return name + '(' + defaultValue + unit + ')';\n}\nconst functionRegex = /([a-z-]*)\\(.*?\\)/g;\nconst filter = Object.assign(Object.assign({}, complex), { getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(' ') : v;\n } });\n\nexport { filter };\n","function hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n","import { mix } from './mix.mjs';\nimport { hsla, rgba, hex } from 'style-value-types';\nimport { invariant } from 'hey-listen';\nimport { hslaToRgba } from './hsla-to-rgba.mjs';\n\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const toExpo = to * to;\n return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo));\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nconst notAnimatable = (color) => `'${color}' is not an animatable color. Use the equivalent color code instead.`;\nconst mixColor = (from, to) => {\n let fromColorType = getColorType(from);\n let toColorType = getColorType(to);\n invariant(!!fromColorType, notAnimatable(from));\n invariant(!!toColorType, notAnimatable(to));\n let fromColor = fromColorType.parse(from);\n let toColor = toColorType.parse(to);\n if (fromColorType === hsla) {\n fromColor = hslaToRgba(fromColor);\n fromColorType = rgba;\n }\n if (toColorType === hsla) {\n toColor = hslaToRgba(toColor);\n toColorType = rgba;\n }\n const blended = Object.assign({}, fromColor);\n return (v) => {\n for (const key in blended) {\n if (key !== \"alpha\") {\n blended[key] = mixLinearColor(fromColor[key], toColor[key], v);\n }\n }\n blended.alpha = mix(fromColor.alpha, toColor.alpha, v);\n return fromColorType.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n","const zeroPoint = {\n x: 0,\n y: 0,\n z: 0\n};\nconst isNum = (v) => typeof v === 'number';\n\nexport { isNum, zeroPoint };\n","const combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\n","import { complex, color } from 'style-value-types';\nimport { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { isNum } from './inc.mjs';\nimport { pipe } from './pipe.mjs';\nimport { warning } from 'hey-listen';\n\nfunction getMixer(origin, target) {\n if (isNum(origin)) {\n return (v) => mix(origin, target, v);\n }\n else if (color.test(origin)) {\n return mixColor(origin, target);\n }\n else {\n return mixComplex(origin, target);\n }\n}\nconst mixArray = (from, to) => {\n const output = [...from];\n const numValues = output.length;\n const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i]));\n return (v) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](v);\n }\n return output;\n };\n};\nconst mixObject = (origin, target) => {\n const output = Object.assign(Object.assign({}, origin), target);\n const blendValue = {};\n for (const key in output) {\n if (origin[key] !== undefined && target[key] !== undefined) {\n blendValue[key] = getMixer(origin[key], target[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n};\nfunction analyse(value) {\n const parsed = complex.parse(value);\n const numValues = parsed.length;\n let numNumbers = 0;\n let numRGB = 0;\n let numHSL = 0;\n for (let i = 0; i < numValues; i++) {\n if (numNumbers || typeof parsed[i] === \"number\") {\n numNumbers++;\n }\n else {\n if (parsed[i].hue !== undefined) {\n numHSL++;\n }\n else {\n numRGB++;\n }\n }\n }\n return { parsed, numNumbers, numRGB, numHSL };\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyse(origin);\n const targetStats = analyse(target);\n const canInterpolate = originStats.numHSL === targetStats.numHSL &&\n originStats.numRGB === targetStats.numRGB &&\n originStats.numNumbers >= targetStats.numNumbers;\n if (canInterpolate) {\n return pipe(mixArray(originStats.parsed, targetStats.parsed), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);\n return (p) => `${p > 0 ? target : origin}`;\n }\n};\n\nexport { mixArray, mixComplex, mixObject };\n","import { progress } from './progress.mjs';\nimport { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { mixComplex, mixArray, mixObject } from './mix-complex.mjs';\nimport { color } from 'style-value-types';\nimport { clamp } from './clamp.mjs';\nimport { pipe } from './pipe.mjs';\nimport { invariant } from 'hey-listen';\n\nconst mixNumber = (from, to) => (p) => mix(from, to, p);\nfunction detectMixerFactory(v) {\n if (typeof v === 'number') {\n return mixNumber;\n }\n else if (typeof v === 'string') {\n if (color.test(v)) {\n return mixColor;\n }\n else {\n return mixComplex;\n }\n }\n else if (Array.isArray(v)) {\n return mixArray;\n }\n else if (typeof v === 'object') {\n return mixObject;\n }\n}\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || detectMixerFactory(output[0]);\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\nfunction fastInterpolate([from, to], [mixer]) {\n return (v) => mixer(progress(from, to, v));\n}\nfunction slowInterpolate(input, mixers) {\n const inputLength = input.length;\n const lastInputIndex = inputLength - 1;\n return (v) => {\n let mixerIndex = 0;\n let foundMixerIndex = false;\n if (v <= input[0]) {\n foundMixerIndex = true;\n }\n else if (v >= input[lastInputIndex]) {\n mixerIndex = lastInputIndex - 1;\n foundMixerIndex = true;\n }\n if (!foundMixerIndex) {\n let i = 1;\n for (; i < inputLength; i++) {\n if (input[i] > v || i === lastInputIndex) {\n break;\n }\n }\n mixerIndex = i - 1;\n }\n const progressInRange = progress(input[mixerIndex], input[mixerIndex + 1], v);\n return mixers[mixerIndex](progressInRange);\n };\n}\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, 'Both input and output ranges must be the same length');\n invariant(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.');\n if (input[0] > input[inputLength - 1]) {\n input = [].concat(input);\n output = [].concat(output);\n input.reverse();\n output.reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const interpolator = inputLength === 2\n ? fastInterpolate(input, mixers)\n : slowInterpolate(input, mixers);\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n","const reverseEasing = easing => p => 1 - easing(1 - p);\nconst mirrorEasing = easing => p => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\nconst createExpoIn = (power) => p => Math.pow(p, power);\nconst createBackIn = (power) => p => p * p * ((power + 1) * p - power);\nconst createAnticipate = (power) => {\n const backEasing = createBackIn(power);\n return p => (p *= 2) < 1\n ? 0.5 * backEasing(p)\n : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n};\n\nexport { createAnticipate, createBackIn, createExpoIn, mirrorEasing, reverseEasing };\n","import { createExpoIn, reverseEasing, mirrorEasing, createBackIn, createAnticipate } from './utils.mjs';\n\nconst DEFAULT_OVERSHOOT_STRENGTH = 1.525;\nconst BOUNCE_FIRST_THRESHOLD = 4.0 / 11.0;\nconst BOUNCE_SECOND_THRESHOLD = 8.0 / 11.0;\nconst BOUNCE_THIRD_THRESHOLD = 9.0 / 10.0;\nconst linear = p => p;\nconst easeIn = createExpoIn(2);\nconst easeOut = reverseEasing(easeIn);\nconst easeInOut = mirrorEasing(easeIn);\nconst circIn = p => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circOut);\nconst backIn = createBackIn(DEFAULT_OVERSHOOT_STRENGTH);\nconst backOut = reverseEasing(backIn);\nconst backInOut = mirrorEasing(backIn);\nconst anticipate = createAnticipate(DEFAULT_OVERSHOOT_STRENGTH);\nconst ca = 4356.0 / 361.0;\nconst cb = 35442.0 / 1805.0;\nconst cc = 16061.0 / 1805.0;\nconst bounceOut = (p) => {\n if (p === 1 || p === 0)\n return p;\n const p2 = p * p;\n return p < BOUNCE_FIRST_THRESHOLD\n ? 7.5625 * p2\n : p < BOUNCE_SECOND_THRESHOLD\n ? 9.075 * p2 - 9.9 * p + 3.4\n : p < BOUNCE_THIRD_THRESHOLD\n ? ca * p2 - cb * p + cc\n : 10.8 * p * p - 20.52 * p + 10.72;\n};\nconst bounceIn = reverseEasing(bounceOut);\nconst bounceInOut = (p) => p < 0.5\n ? 0.5 * (1.0 - bounceOut(1.0 - p * 2.0))\n : 0.5 * bounceOut(p * 2.0 - 1.0) + 0.5;\n\nexport { anticipate, backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, easeIn, easeInOut, easeOut, linear };\n","import { interpolate } from '../../utils/interpolate.mjs';\nimport { easeInOut } from '../../easing/index.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction defaultOffset(values) {\n const numValues = values.length;\n return values.map((_value, i) => i !== 0 ? i / (numValues - 1) : 0);\n}\nfunction convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\nfunction keyframes({ from = 0, to = 1, ease, offset, duration = 300, }) {\n const state = { done: false, value: from };\n const values = Array.isArray(to) ? to : [from, to];\n const times = convertOffsetToTimes(offset && offset.length === values.length\n ? offset\n : defaultOffset(values), duration);\n function createInterpolator() {\n return interpolate(times, values, {\n ease: Array.isArray(ease) ? ease : defaultEasing(values, ease),\n });\n }\n let interpolator = createInterpolator();\n return {\n next: (t) => {\n state.value = interpolator(t);\n state.done = t >= duration;\n return state;\n },\n flipTarget: () => {\n values.reverse();\n interpolator = createInterpolator();\n },\n };\n}\n\nexport { convertOffsetToTimes, defaultEasing, defaultOffset, keyframes };\n","import { spring } from '../generators/spring.mjs';\nimport { keyframes } from '../generators/keyframes.mjs';\nimport { decay } from '../generators/decay.mjs';\n\nconst types = { keyframes, spring, decay };\nfunction detectAnimationFromOptions(config) {\n if (Array.isArray(config.to)) {\n return keyframes;\n }\n else if (types[config.type]) {\n return types[config.type];\n }\n const keys = new Set(Object.keys(config));\n if (keys.has(\"ease\") ||\n (keys.has(\"duration\") && !keys.has(\"dampingRatio\"))) {\n return keyframes;\n }\n else if (keys.has(\"dampingRatio\") ||\n keys.has(\"stiffness\") ||\n keys.has(\"mass\") ||\n keys.has(\"damping\") ||\n keys.has(\"restSpeed\") ||\n keys.has(\"restDelta\")) {\n return spring;\n }\n return keyframes;\n}\n\nexport { detectAnimationFromOptions };\n","function decay({ velocity = 0, from = 0, power = 0.8, timeConstant = 350, restDelta = 0.5, modifyTarget, }) {\n const state = { done: false, value: from };\n let amplitude = power * velocity;\n const ideal = from + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n if (target !== ideal)\n amplitude = target - from;\n return {\n next: (t) => {\n const delta = -amplitude * Math.exp(-t / timeConstant);\n state.done = !(delta > restDelta || delta < -restDelta);\n state.value = state.done ? target : target + delta;\n return state;\n },\n flipTarget: () => { },\n };\n}\n\nexport { decay };\n","function loopElapsed(elapsed, duration, delay = 0) {\n return elapsed - duration - delay;\n}\nfunction reverseElapsed(elapsed, duration, delay = 0, isForwardPlayback = true) {\n return isForwardPlayback\n ? loopElapsed(duration + -elapsed, duration, delay)\n : duration - (elapsed - duration) + delay;\n}\nfunction hasRepeatDelayElapsed(elapsed, duration, delay, isForwardPlayback) {\n return isForwardPlayback ? elapsed >= duration + delay : elapsed <= -delay;\n}\n\nexport { hasRepeatDelayElapsed, loopElapsed, reverseElapsed };\n","import { __rest } from 'tslib';\nimport { detectAnimationFromOptions } from './utils/detect-animation-from-options.mjs';\nimport sync, { cancelSync } from 'framesync';\nimport { interpolate } from '../utils/interpolate.mjs';\nimport { hasRepeatDelayElapsed, reverseElapsed, loopElapsed } from './utils/elapsed.mjs';\n\nconst framesync = (update) => {\n const passTimestamp = ({ delta }) => update(delta);\n return {\n start: () => sync.update(passTimestamp, true),\n stop: () => cancelSync.update(passTimestamp),\n };\n};\nfunction animate(_a) {\n var _b, _c;\n var { from, autoplay = true, driver = framesync, elapsed = 0, repeat: repeatMax = 0, repeatType = \"loop\", repeatDelay = 0, onPlay, onStop, onComplete, onRepeat, onUpdate } = _a, options = __rest(_a, [\"from\", \"autoplay\", \"driver\", \"elapsed\", \"repeat\", \"repeatType\", \"repeatDelay\", \"onPlay\", \"onStop\", \"onComplete\", \"onRepeat\", \"onUpdate\"]);\n let { to } = options;\n let driverControls;\n let repeatCount = 0;\n let computedDuration = options.duration;\n let latest;\n let isComplete = false;\n let isForwardPlayback = true;\n let interpolateFromNumber;\n const animator = detectAnimationFromOptions(options);\n if ((_c = (_b = animator).needsInterpolation) === null || _c === void 0 ? void 0 : _c.call(_b, from, to)) {\n interpolateFromNumber = interpolate([0, 100], [from, to], {\n clamp: false,\n });\n from = 0;\n to = 100;\n }\n const animation = animator(Object.assign(Object.assign({}, options), { from, to }));\n function repeat() {\n repeatCount++;\n if (repeatType === \"reverse\") {\n isForwardPlayback = repeatCount % 2 === 0;\n elapsed = reverseElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback);\n }\n else {\n elapsed = loopElapsed(elapsed, computedDuration, repeatDelay);\n if (repeatType === \"mirror\")\n animation.flipTarget();\n }\n isComplete = false;\n onRepeat && onRepeat();\n }\n function complete() {\n driverControls.stop();\n onComplete && onComplete();\n }\n function update(delta) {\n if (!isForwardPlayback)\n delta = -delta;\n elapsed += delta;\n if (!isComplete) {\n const state = animation.next(Math.max(0, elapsed));\n latest = state.value;\n if (interpolateFromNumber)\n latest = interpolateFromNumber(latest);\n isComplete = isForwardPlayback ? state.done : elapsed <= 0;\n }\n onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest);\n if (isComplete) {\n if (repeatCount === 0)\n computedDuration !== null && computedDuration !== void 0 ? computedDuration : (computedDuration = elapsed);\n if (repeatCount < repeatMax) {\n hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat();\n }\n else {\n complete();\n }\n }\n }\n function play() {\n onPlay === null || onPlay === void 0 ? void 0 : onPlay();\n driverControls = driver(update);\n driverControls.start();\n }\n autoplay && play();\n return {\n stop: () => {\n onStop === null || onStop === void 0 ? void 0 : onStop();\n driverControls.stop();\n },\n };\n}\n\nexport { animate };\n","function velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n","const isPoint = (point) => point.hasOwnProperty('x') && point.hasOwnProperty('y');\n\nexport { isPoint };\n","import { isPoint } from './is-point.mjs';\n\nconst isPoint3D = (point) => isPoint(point) && point.hasOwnProperty('z');\n\nexport { isPoint3D };\n","import { isPoint } from './is-point.mjs';\nimport { isPoint3D } from './is-point-3d.mjs';\nimport { isNum } from './inc.mjs';\n\nconst distance1D = (a, b) => Math.abs(a - b);\nfunction distance(a, b) {\n if (isNum(a) && isNum(b)) {\n return distance1D(a, b);\n }\n else if (isPoint(a) && isPoint(b)) {\n const xDelta = distance1D(a.x, b.x);\n const yDelta = distance1D(a.y, b.y);\n const zDelta = isPoint3D(a) && isPoint3D(b) ? distance1D(a.z, b.z) : 0;\n return Math.sqrt(Math.pow(xDelta, 2) + Math.pow(yDelta, 2) + Math.pow(zDelta, 2));\n }\n}\n\nexport { distance };\n","import { linear } from './index.mjs';\n\nconst a = (a1, a2) => 1.0 - 3.0 * a2 + 3.0 * a1;\nconst b = (a1, a2) => 3.0 * a2 - 6.0 * a1;\nconst c = (a1) => 3.0 * a1;\nconst calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\nconst getSlope = (t, a1, a2) => 3.0 * a(a1, a2) * t * t + 2.0 * b(a1, a2) * t + c(a1);\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 10;\nfunction binarySubdivide(aX, aA, aB, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) {\n aB = currentT;\n }\n else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\nconst newtonIterations = 8;\nconst newtonMinSlope = 0.001;\nfunction newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for (let i = 0; i < newtonIterations; ++i) {\n const currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n const currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\nconst kSplineTableSize = 11;\nconst kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n if (mX1 === mY1 && mX2 === mY2)\n return linear;\n const sampleValues = new Float32Array(kSplineTableSize);\n for (let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n function getTForX(aX) {\n let intervalStart = 0.0;\n let currentSample = 1;\n const lastSample = kSplineTableSize - 1;\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n const dist = (aX - sampleValues[currentSample]) /\n (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n const guessForT = intervalStart + dist * kSampleStepSize;\n const initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= newtonMinSlope) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n }\n else if (initialSlope === 0.0) {\n return guessForT;\n }\n else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n","import { __read } from 'tslib';\n\nfunction addUniqueItem(arr, item) {\n arr.indexOf(item) === -1 && arr.push(item);\n}\nfunction removeItem(arr, item) {\n var index = arr.indexOf(item);\n index > -1 && arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem(_a, fromIndex, toIndex) {\n var _b = __read(_a), arr = _b.slice(0);\n var startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n var endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n var _c = __read(arr.splice(fromIndex, 1), 1), item = _c[0];\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nvar SubscriptionManager = /** @class */ (function () {\n function SubscriptionManager() {\n this.subscriptions = [];\n }\n SubscriptionManager.prototype.add = function (handler) {\n var _this = this;\n addUniqueItem(this.subscriptions, handler);\n return function () { return removeItem(_this.subscriptions, handler); };\n };\n SubscriptionManager.prototype.notify = function (a, b, c) {\n var numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n }\n else {\n for (var i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n var handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n };\n SubscriptionManager.prototype.getSize = function () {\n return this.subscriptions.length;\n };\n SubscriptionManager.prototype.clear = function () {\n this.subscriptions.length = 0;\n };\n return SubscriptionManager;\n}());\n\nexport { SubscriptionManager };\n","import sync, { getFrameData } from 'framesync';\nimport { velocityPerSecond } from 'popmotion';\nimport { SubscriptionManager } from '../utils/subscription-manager.mjs';\n\nvar isFloat = function (value) {\n return !isNaN(parseFloat(value));\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nvar MotionValue = /** @class */ (function () {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n *\n * @internal\n */\n function MotionValue(init) {\n var _this = this;\n /**\n * This will be replaced by the build step with the latest version number.\n * When MotionValues are provided to motion components, warn if versions are mixed.\n */\n this.version = \"6.3.10\";\n /**\n * Duration, in milliseconds, since last updating frame.\n *\n * @internal\n */\n this.timeDelta = 0;\n /**\n * Timestamp of the last time this `MotionValue` was updated.\n *\n * @internal\n */\n this.lastUpdated = 0;\n /**\n * Functions to notify when the `MotionValue` updates.\n *\n * @internal\n */\n this.updateSubscribers = new SubscriptionManager();\n /**\n * Functions to notify when the velocity updates.\n *\n * @internal\n */\n this.velocityUpdateSubscribers = new SubscriptionManager();\n /**\n * Functions to notify when the `MotionValue` updates and `render` is set to `true`.\n *\n * @internal\n */\n this.renderSubscribers = new SubscriptionManager();\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = false;\n this.updateAndNotify = function (v, render) {\n if (render === void 0) { render = true; }\n _this.prev = _this.current;\n _this.current = v;\n // Update timestamp\n var _a = getFrameData(), delta = _a.delta, timestamp = _a.timestamp;\n if (_this.lastUpdated !== timestamp) {\n _this.timeDelta = delta;\n _this.lastUpdated = timestamp;\n sync.postRender(_this.scheduleVelocityCheck);\n }\n // Update update subscribers\n if (_this.prev !== _this.current) {\n _this.updateSubscribers.notify(_this.current);\n }\n // Update velocity subscribers\n if (_this.velocityUpdateSubscribers.getSize()) {\n _this.velocityUpdateSubscribers.notify(_this.getVelocity());\n }\n // Update render subscribers\n if (render) {\n _this.renderSubscribers.notify(_this.current);\n }\n };\n /**\n * Schedule a velocity check for the next frame.\n *\n * This is an instanced and bound function to prevent generating a new\n * function once per frame.\n *\n * @internal\n */\n this.scheduleVelocityCheck = function () { return sync.postRender(_this.velocityCheck); };\n /**\n * Updates `prev` with `current` if the value hasn't been updated this frame.\n * This ensures velocity calculations return `0`.\n *\n * This is an instanced and bound function to prevent generating a new\n * function once per frame.\n *\n * @internal\n */\n this.velocityCheck = function (_a) {\n var timestamp = _a.timestamp;\n if (timestamp !== _this.lastUpdated) {\n _this.prev = _this.current;\n _this.velocityUpdateSubscribers.notify(_this.getVelocity());\n }\n };\n this.hasAnimated = false;\n this.prev = this.current = init;\n this.canTrackVelocity = isFloat(this.current);\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.onChange(updateOpacity)\n * const unsubscribeY = y.onChange(updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <motion.div style={{ x }} />\n * }\n * ```\n *\n * @internalremarks\n *\n * We could look into a `useOnChange` hook if the above lifecycle management proves confusing.\n *\n * ```jsx\n * useOnChange(x, () => {})\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @public\n */\n MotionValue.prototype.onChange = function (subscription) {\n return this.updateSubscribers.add(subscription);\n };\n MotionValue.prototype.clearListeners = function () {\n this.updateSubscribers.clear();\n };\n /**\n * Adds a function that will be notified when the `MotionValue` requests a render.\n *\n * @param subscriber - A function that's provided the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @internal\n */\n MotionValue.prototype.onRenderRequest = function (subscription) {\n // Render immediately\n subscription(this.get());\n return this.renderSubscribers.add(subscription);\n };\n /**\n * Attaches a passive effect to the `MotionValue`.\n *\n * @internal\n */\n MotionValue.prototype.attach = function (passiveEffect) {\n this.passiveEffect = passiveEffect;\n };\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n MotionValue.prototype.set = function (v, render) {\n if (render === void 0) { render = true; }\n if (!render || !this.passiveEffect) {\n this.updateAndNotify(v, render);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n };\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n MotionValue.prototype.get = function () {\n return this.current;\n };\n /**\n * @public\n */\n MotionValue.prototype.getPrevious = function () {\n return this.prev;\n };\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n MotionValue.prototype.getVelocity = function () {\n // This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful\n return this.canTrackVelocity\n ? // These casts could be avoided if parseFloat would be typed better\n velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prev), this.timeDelta)\n : 0;\n };\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n *\n * @internal\n */\n MotionValue.prototype.start = function (animation) {\n var _this = this;\n this.stop();\n return new Promise(function (resolve) {\n _this.hasAnimated = true;\n _this.stopAnimation = animation(resolve);\n }).then(function () { return _this.clearAnimation(); });\n };\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n MotionValue.prototype.stop = function () {\n if (this.stopAnimation)\n this.stopAnimation();\n this.clearAnimation();\n };\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n MotionValue.prototype.isAnimating = function () {\n return !!this.stopAnimation;\n };\n MotionValue.prototype.clearAnimation = function () {\n this.stopAnimation = null;\n };\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n MotionValue.prototype.destroy = function () {\n this.updateSubscribers.clear();\n this.renderSubscribers.clear();\n this.stop();\n };\n return MotionValue;\n}());\n/**\n * @internal\n */\nfunction motionValue(init) {\n return new MotionValue(init);\n}\n\nexport { MotionValue, motionValue };\n","var isMotionValue = function (value) {\n return Boolean(value !== null && typeof value === \"object\" && value.getVelocity);\n};\n\nexport { isMotionValue };\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\nvar secondsToMilliseconds = function (seconds) { return seconds * 1000; };\n\nexport { secondsToMilliseconds };\n","import { __read } from 'tslib';\nimport { invariant } from 'hey-listen';\nimport { cubicBezier, linear, easeIn, easeInOut, easeOut, circIn, circInOut, circOut, backIn, backInOut, backOut, anticipate, bounceIn, bounceInOut, bounceOut } from 'popmotion';\n\nvar easingLookup = {\n linear: linear,\n easeIn: easeIn,\n easeInOut: easeInOut,\n easeOut: easeOut,\n circIn: circIn,\n circInOut: circInOut,\n circOut: circOut,\n backIn: backIn,\n backInOut: backInOut,\n backOut: backOut,\n anticipate: anticipate,\n bounceIn: bounceIn,\n bounceInOut: bounceInOut,\n bounceOut: bounceOut,\n};\nvar easingDefinitionToFunction = function (definition) {\n if (Array.isArray(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, \"Cubic bezier arrays must contain four numerical values.\");\n var _a = __read(definition, 4), x1 = _a[0], y1 = _a[1], x2 = _a[2], y2 = _a[3];\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (typeof definition === \"string\") {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, \"Invalid easing type '\".concat(definition, \"'\"));\n return easingLookup[definition];\n }\n return definition;\n};\nvar isEasingArray = function (ease) {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { easingDefinitionToFunction, isEasingArray };\n","import { complex } from 'style-value-types';\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nvar isAnimatable = function (key, value) {\n // If the list of keys tat might be non-animatable grows, replace with Set\n if (key === \"zIndex\")\n return false;\n // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n if (typeof value === \"number\" || Array.isArray(value))\n return true;\n if (typeof value === \"string\" && // It's animatable if we have a string\n complex.test(value) && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true;\n }\n return false;\n};\n\nexport { isAnimatable };\n","var isKeyframesTarget = function (v) {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n","import { __assign } from 'tslib';\nimport { isKeyframesTarget } from './is-keyframes-target.mjs';\n\nvar underDampedSpring = function () { return ({\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n}); };\nvar criticallyDampedSpring = function (to) { return ({\n type: \"spring\",\n stiffness: 550,\n damping: to === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n}); };\nvar linearTween = function () { return ({\n type: \"keyframes\",\n ease: \"linear\",\n duration: 0.3,\n}); };\nvar keyframes = function (values) { return ({\n type: \"keyframes\",\n duration: 0.8,\n values: values,\n}); };\nvar defaultTransitions = {\n x: underDampedSpring,\n y: underDampedSpring,\n z: underDampedSpring,\n rotate: underDampedSpring,\n rotateX: underDampedSpring,\n rotateY: underDampedSpring,\n rotateZ: underDampedSpring,\n scaleX: criticallyDampedSpring,\n scaleY: criticallyDampedSpring,\n scale: criticallyDampedSpring,\n opacity: linearTween,\n backgroundColor: linearTween,\n color: linearTween,\n default: criticallyDampedSpring,\n};\nvar getDefaultTransition = function (valueKey, to) {\n var transitionFactory;\n if (isKeyframesTarget(to)) {\n transitionFactory = keyframes;\n }\n else {\n transitionFactory =\n defaultTransitions[valueKey] || defaultTransitions.default;\n }\n return __assign({ to: to }, transitionFactory(to));\n};\n\nexport { criticallyDampedSpring, getDefaultTransition, linearTween, underDampedSpring };\n","import { __assign } from 'tslib';\nimport { number } from 'style-value-types';\n\nvar int = __assign(__assign({}, number), { transform: Math.round });\n\nexport { int };\n","import { px, degrees, scale, alpha, progressPercentage } from 'style-value-types';\nimport { int } from './type-int.mjs';\n\nvar numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n radius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n size: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n // Transform props\n rotate: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale: scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n // Misc\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n","import { __assign } from 'tslib';\nimport { color, filter } from 'style-value-types';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nvar defaultValueTypes = __assign(__assign({}, numberValueTypes), { \n // Color props\n color: color, backgroundColor: color, outlineColor: color, fill: color, stroke: color, \n // Border props\n borderColor: color, borderTopColor: color, borderRightColor: color, borderBottomColor: color, borderLeftColor: color, filter: filter, WebkitFilter: filter });\n/**\n * Gets the default ValueType for the provided value key\n */\nvar getDefaultValueType = function (key) { return defaultValueTypes[key]; };\n\nexport { defaultValueTypes, getDefaultValueType };\n","import { filter, complex } from 'style-value-types';\nimport { getDefaultValueType } from './defaults.mjs';\n\nfunction getAnimatableNone(key, value) {\n var _a;\n var defaultValueType = getDefaultValueType(key);\n if (defaultValueType !== filter)\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return (_a = defaultValueType.getAnimatableNone) === null || _a === void 0 ? void 0 : _a.call(defaultValueType, value);\n}\n\nexport { getAnimatableNone };\n","var instantAnimationState = {\n current: false,\n};\n\nexport { instantAnimationState };\n","import { isKeyframesTarget } from '../animation/utils/is-keyframes-target.mjs';\n\nvar isCustomValue = function (v) {\n return Boolean(v && typeof v === \"object\" && v.mix && v.toValue);\n};\nvar resolveFinalValueInKeyframes = function (v) {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n};\n\nexport { isCustomValue, resolveFinalValueInKeyframes };\n","import { __assign, __rest, __spreadArray, __read } from 'tslib';\nimport { inertia, animate } from 'popmotion';\nimport { secondsToMilliseconds } from '../../utils/time-conversion.mjs';\nimport { isEasingArray, easingDefinitionToFunction } from './easing.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\nimport { getDefaultTransition } from './default-transitions.mjs';\nimport { warning } from 'hey-listen';\nimport { getAnimatableNone } from '../../render/dom/value-types/animatable-none.mjs';\nimport { instantAnimationState } from '../../utils/use-instant-transition-state.mjs';\nimport { resolveFinalValueInKeyframes } from '../../utils/resolve-value.mjs';\n\n/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nfunction isTransitionDefined(_a) {\n _a.when; _a.delay; _a.delayChildren; _a.staggerChildren; _a.staggerDirection; _a.repeat; _a.repeatType; _a.repeatDelay; _a.from; var transition = __rest(_a, [\"when\", \"delay\", \"delayChildren\", \"staggerChildren\", \"staggerDirection\", \"repeat\", \"repeatType\", \"repeatDelay\", \"from\"]);\n return !!Object.keys(transition).length;\n}\nvar legacyRepeatWarning = false;\n/**\n * Convert Framer Motion's Transition type into Popmotion-compatible options.\n */\nfunction convertTransitionToAnimationOptions(_a) {\n var ease = _a.ease, times = _a.times, yoyo = _a.yoyo, flip = _a.flip, loop = _a.loop, transition = __rest(_a, [\"ease\", \"times\", \"yoyo\", \"flip\", \"loop\"]);\n var options = __assign({}, transition);\n if (times)\n options[\"offset\"] = times;\n /**\n * Convert any existing durations from seconds to milliseconds\n */\n if (transition.duration)\n options[\"duration\"] = secondsToMilliseconds(transition.duration);\n if (transition.repeatDelay)\n options.repeatDelay = secondsToMilliseconds(transition.repeatDelay);\n /**\n * Map easing names to Popmotion's easing functions\n */\n if (ease) {\n options[\"ease\"] = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n }\n /**\n * Support legacy transition API\n */\n if (transition.type === \"tween\")\n options.type = \"keyframes\";\n /**\n * TODO: These options are officially removed from the API.\n */\n if (yoyo || loop || flip) {\n warning(!legacyRepeatWarning, \"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options.\");\n legacyRepeatWarning = true;\n if (yoyo) {\n options.repeatType = \"reverse\";\n }\n else if (loop) {\n options.repeatType = \"loop\";\n }\n else if (flip) {\n options.repeatType = \"mirror\";\n }\n options.repeat = loop || yoyo || flip || transition.repeat;\n }\n /**\n * TODO: Popmotion 9 has the ability to automatically detect whether to use\n * a keyframes or spring animation, but does so by detecting velocity and other spring options.\n * It'd be good to introduce a similar thing here.\n */\n if (transition.type !== \"spring\")\n options.type = \"keyframes\";\n return options;\n}\n/**\n * Get the delay for a value by checking Transition with decreasing specificity.\n */\nfunction getDelayFromTransition(transition, key) {\n var _a, _b;\n var valueTransition = getValueTransition(transition, key) || {};\n return (_b = (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : transition.delay) !== null && _b !== void 0 ? _b : 0;\n}\nfunction hydrateKeyframes(options) {\n if (Array.isArray(options.to) && options.to[0] === null) {\n options.to = __spreadArray([], __read(options.to), false);\n options.to[0] = options.from;\n }\n return options;\n}\nfunction getPopmotionAnimationOptions(transition, options, key) {\n var _a;\n if (Array.isArray(options.to)) {\n (_a = transition.duration) !== null && _a !== void 0 ? _a : (transition.duration = 0.8);\n }\n hydrateKeyframes(options);\n /**\n * Get a default transition if none is determined to be defined.\n */\n if (!isTransitionDefined(transition)) {\n transition = __assign(__assign({}, transition), getDefaultTransition(key, options.to));\n }\n return __assign(__assign({}, options), convertTransitionToAnimationOptions(transition));\n}\n/**\n *\n */\nfunction getAnimation(key, value, target, transition, onComplete) {\n var _a;\n var valueTransition = getValueTransition(transition, key);\n var origin = (_a = valueTransition.from) !== null && _a !== void 0 ? _a : value.get();\n var isTargetAnimatable = isAnimatable(key, target);\n if (origin === \"none\" && isTargetAnimatable && typeof target === \"string\") {\n /**\n * If we're trying to animate from \"none\", try and get an animatable version\n * of the target. This could be improved to work both ways.\n */\n origin = getAnimatableNone(key, target);\n }\n else if (isZero(origin) && typeof target === \"string\") {\n origin = getZeroUnit(target);\n }\n else if (!Array.isArray(target) &&\n isZero(target) &&\n typeof origin === \"string\") {\n target = getZeroUnit(origin);\n }\n var isOriginAnimatable = isAnimatable(key, origin);\n warning(isOriginAnimatable === isTargetAnimatable, \"You are trying to animate \".concat(key, \" from \\\"\").concat(origin, \"\\\" to \\\"\").concat(target, \"\\\". \").concat(origin, \" is not an animatable value - to enable this animation set \").concat(origin, \" to a value animatable to \").concat(target, \" via the `style` property.\"));\n function start() {\n var options = {\n from: origin,\n to: target,\n velocity: value.getVelocity(),\n onComplete: onComplete,\n onUpdate: function (v) { return value.set(v); },\n };\n return valueTransition.type === \"inertia\" ||\n valueTransition.type === \"decay\"\n ? inertia(__assign(__assign({}, options), valueTransition))\n : animate(__assign(__assign({}, getPopmotionAnimationOptions(valueTransition, options, key)), { onUpdate: function (v) {\n var _a;\n options.onUpdate(v);\n (_a = valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, v);\n }, onComplete: function () {\n var _a;\n options.onComplete();\n (_a = valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition);\n } }));\n }\n function set() {\n var _a, _b;\n var finalTarget = resolveFinalValueInKeyframes(target);\n value.set(finalTarget);\n onComplete();\n (_a = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, finalTarget);\n (_b = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onComplete) === null || _b === void 0 ? void 0 : _b.call(valueTransition);\n return { stop: function () { } };\n }\n return !isOriginAnimatable ||\n !isTargetAnimatable ||\n valueTransition.type === false\n ? set\n : start;\n}\nfunction isZero(value) {\n return (value === 0 ||\n (typeof value === \"string\" &&\n parseFloat(value) === 0 &&\n value.indexOf(\" \") === -1));\n}\nfunction getZeroUnit(potentialUnitType) {\n return typeof potentialUnitType === \"number\"\n ? 0\n : getAnimatableNone(\"\", potentialUnitType);\n}\nfunction getValueTransition(transition, key) {\n return transition[key] || transition[\"default\"] || transition;\n}\n/**\n * Start animation on a MotionValue. This function is an interface between\n * Framer Motion and Popmotion\n *\n * @internal\n */\nfunction startAnimation(key, value, target, transition) {\n if (transition === void 0) { transition = {}; }\n if (instantAnimationState.current) {\n transition = { type: false };\n }\n return value.start(function (onComplete) {\n var delayTimer;\n var controls;\n var animation = getAnimation(key, value, target, transition, onComplete);\n var delay = getDelayFromTransition(transition, key);\n var start = function () { return (controls = animation()); };\n if (delay) {\n delayTimer = window.setTimeout(start, secondsToMilliseconds(delay));\n }\n else {\n start();\n }\n return function () {\n clearTimeout(delayTimer);\n controls === null || controls === void 0 ? void 0 : controls.stop();\n };\n });\n}\n\nexport { convertTransitionToAnimationOptions, getDelayFromTransition, getPopmotionAnimationOptions, getValueTransition, getZeroUnit, hydrateKeyframes, isTransitionDefined, isZero, startAnimation };\n","import { animate } from './index.mjs';\nimport { velocityPerSecond } from '../utils/velocity-per-second.mjs';\nimport { getFrameData } from 'framesync';\n\nfunction inertia({ from = 0, velocity = 0, min, max, power = 0.8, timeConstant = 750, bounceStiffness = 500, bounceDamping = 10, restDelta = 1, modifyTarget, driver, onUpdate, onComplete, onStop, }) {\n let currentAnimation;\n function isOutOfBounds(v) {\n return (min !== undefined && v < min) || (max !== undefined && v > max);\n }\n function boundaryNearest(v) {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n }\n function startAnimation(options) {\n currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop();\n currentAnimation = animate(Object.assign(Object.assign({}, options), { driver, onUpdate: (v) => {\n var _a;\n onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(v);\n (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, v);\n }, onComplete,\n onStop }));\n }\n function startSpring(options) {\n startAnimation(Object.assign({ type: \"spring\", stiffness: bounceStiffness, damping: bounceDamping, restDelta }, options));\n }\n if (isOutOfBounds(from)) {\n startSpring({ from, velocity, to: boundaryNearest(from) });\n }\n else {\n let target = power * velocity + from;\n if (typeof modifyTarget !== \"undefined\")\n target = modifyTarget(target);\n const boundary = boundaryNearest(target);\n const heading = boundary === min ? -1 : 1;\n let prev;\n let current;\n const checkBoundary = (v) => {\n prev = current;\n current = v;\n velocity = velocityPerSecond(v - prev, getFrameData().delta);\n if ((heading === 1 && v > boundary) ||\n (heading === -1 && v < boundary)) {\n startSpring({ from: v, to: boundary, velocity });\n }\n };\n startAnimation({\n type: \"decay\",\n from,\n velocity,\n timeConstant,\n power,\n restDelta,\n modifyTarget,\n onUpdate: isOutOfBounds(target) ? checkBoundary : undefined,\n });\n }\n return {\n stop: () => currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop(),\n };\n}\n\nexport { inertia };\n","import { mix, progress, linear, circOut } from 'popmotion';\nimport { px, percent } from 'style-value-types';\n\nvar borders = [\"TopLeft\", \"TopRight\", \"BottomLeft\", \"BottomRight\"];\nvar numBorders = borders.length;\nvar asNumber = function (value) {\n return typeof value === \"string\" ? parseFloat(value) : value;\n};\nvar isPx = function (value) {\n return typeof value === \"number\" || px.test(value);\n};\nfunction mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {\n var _a, _b, _c, _d;\n if (shouldCrossfadeOpacity) {\n target.opacity = mix(0, \n // (follow?.opacity as number) ?? 0,\n // TODO Reinstate this if only child\n (_a = lead.opacity) !== null && _a !== void 0 ? _a : 1, easeCrossfadeIn(progress));\n target.opacityExit = mix((_b = follow.opacity) !== null && _b !== void 0 ? _b : 1, 0, easeCrossfadeOut(progress));\n }\n else if (isOnlyMember) {\n target.opacity = mix((_c = follow.opacity) !== null && _c !== void 0 ? _c : 1, (_d = lead.opacity) !== null && _d !== void 0 ? _d : 1, progress);\n }\n /**\n * Mix border radius\n */\n for (var i = 0; i < numBorders; i++) {\n var borderLabel = \"border\".concat(borders[i], \"Radius\");\n var followRadius = getRadius(follow, borderLabel);\n var leadRadius = getRadius(lead, borderLabel);\n if (followRadius === undefined && leadRadius === undefined)\n continue;\n followRadius || (followRadius = 0);\n leadRadius || (leadRadius = 0);\n var canMix = followRadius === 0 ||\n leadRadius === 0 ||\n isPx(followRadius) === isPx(leadRadius);\n if (canMix) {\n target[borderLabel] = Math.max(mix(asNumber(followRadius), asNumber(leadRadius), progress), 0);\n if (percent.test(leadRadius) || percent.test(followRadius)) {\n target[borderLabel] += \"%\";\n }\n }\n else {\n target[borderLabel] = leadRadius;\n }\n }\n /**\n * Mix rotation\n */\n if (follow.rotate || lead.rotate) {\n target.rotate = mix(follow.rotate || 0, lead.rotate || 0, progress);\n }\n}\nfunction getRadius(values, radiusName) {\n var _a;\n return (_a = values[radiusName]) !== null && _a !== void 0 ? _a : values.borderRadius;\n}\n// /**\n// * We only want to mix the background color if there's a follow element\n// * that we're not crossfading opacity between. For instance with switch\n// * AnimateSharedLayout animations, this helps the illusion of a continuous\n// * element being animated but also cuts down on the number of paints triggered\n// * for elements where opacity is doing that work for us.\n// */\n// if (\n// !hasFollowElement &&\n// latestLeadValues.backgroundColor &&\n// latestFollowValues.backgroundColor\n// ) {\n// /**\n// * This isn't ideal performance-wise as mixColor is creating a new function every frame.\n// * We could probably create a mixer that runs at the start of the animation but\n// * the idea behind the crossfader is that it runs dynamically between two potentially\n// * changing targets (ie opacity or borderRadius may be animating independently via variants)\n// */\n// leadState.backgroundColor = followState.backgroundColor = mixColor(\n// latestFollowValues.backgroundColor as string,\n// latestLeadValues.backgroundColor as string\n// )(p)\n// }\nvar easeCrossfadeIn = compress(0, 0.5, circOut);\nvar easeCrossfadeOut = compress(0.5, 0.95, linear);\nfunction compress(min, max, easing) {\n return function (p) {\n // Could replace ifs with clamp\n if (p < min)\n return 0;\n if (p > max)\n return 1;\n return easing(progress(min, max, p));\n };\n}\n\nexport { mixValues };\n","/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisInto(axis, originAxis) {\n axis.min = originAxis.min;\n axis.max = originAxis.max;\n}\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyBoxInto(box, originBox) {\n copyAxisInto(box.x, originBox.x);\n copyAxisInto(box.y, originBox.y);\n}\n\nexport { copyAxisInto, copyBoxInto };\n","function isIdentityScale(scale) {\n return scale === undefined || scale === 1;\n}\nfunction hasScale(_a) {\n var scale = _a.scale, scaleX = _a.scaleX, scaleY = _a.scaleY;\n return (!isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY));\n}\nfunction hasTransform(values) {\n return (hasScale(values) ||\n hasTranslate(values.x) ||\n hasTranslate(values.y) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY);\n}\nfunction hasTranslate(value) {\n return value && value !== \"0%\";\n}\n\nexport { hasScale, hasTransform };\n","import { __read } from 'tslib';\nimport { mix } from 'popmotion';\nimport { hasTransform } from '../utils/has-transform.mjs';\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nfunction scalePoint(point, scale, originPoint) {\n var distanceFromOrigin = point - originPoint;\n var scaled = scale * distanceFromOrigin;\n return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint);\n }\n return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\nfunction applyAxisDelta(axis, translate, scale, originPoint, boxScale) {\n if (translate === void 0) { translate = 0; }\n if (scale === void 0) { scale = 1; }\n axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\nfunction applyBoxDelta(box, _a) {\n var x = _a.x, y = _a.y;\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition) {\n var _a, _b;\n if (isSharedTransition === void 0) { isSharedTransition = false; }\n var treeLength = treePath.length;\n if (!treeLength)\n return;\n // Reset the treeScale\n treeScale.x = treeScale.y = 1;\n var node;\n var delta;\n for (var i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n if (((_b = (_a = node.instance) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.display) === \"contents\")\n continue;\n if (isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(box, { x: -node.scroll.x, y: -node.scroll.y });\n }\n if (delta) {\n // Incoporate each ancestor's scale into a culmulative treeScale for this component\n treeScale.x *= delta.x.scale;\n treeScale.y *= delta.y.scale;\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta);\n }\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues);\n }\n }\n}\nfunction translateAxis(axis, distance) {\n axis.min = axis.min + distance;\n axis.max = axis.max + distance;\n}\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nfunction transformAxis(axis, transforms, _a) {\n var _b = __read(_a, 3), key = _b[0], scaleKey = _b[1], originKey = _b[2];\n var axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5;\n var originPoint = mix(axis.min, axis.max, axisOrigin);\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, transforms[key], transforms[scaleKey], originPoint, transforms.scale);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nvar xKeys = [\"x\", \"scaleX\", \"originX\"];\nvar yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nfunction transformBox(box, transform) {\n transformAxis(box.x, transform, xKeys);\n transformAxis(box.y, transform, yKeys);\n}\n\nexport { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };\n","import { mix, distance } from 'popmotion';\n\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target, maxDistance) {\n if (target === void 0) { target = 0; }\n if (maxDistance === void 0) { maxDistance = 0.01; }\n return distance(value, target) < maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin) {\n if (origin === void 0) { origin = 0.5; }\n delta.origin = origin;\n delta.originPoint = mix(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n if (isNear(delta.scale, 1, 0.0001) || isNaN(delta.scale))\n delta.scale = 1;\n delta.translate =\n mix(target.min, target.max, delta.origin) - delta.originPoint;\n if (isNear(delta.translate) || isNaN(delta.translate))\n delta.translate = 0;\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n calcAxisDelta(delta.x, source.x, target.x, origin === null || origin === void 0 ? void 0 : origin.originX);\n calcAxisDelta(delta.y, source.y, target.y, origin === null || origin === void 0 ? void 0 : origin.originY);\n}\nfunction calcRelativeAxis(target, relative, parent) {\n target.min = parent.min + relative.min;\n target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent) {\n calcRelativeAxis(target.x, relative.x, parent.x);\n calcRelativeAxis(target.y, relative.y, parent.y);\n}\nfunction calcRelativeAxisPosition(target, layout, parent) {\n target.min = layout.min - parent.min;\n target.max = target.min + calcLength(layout);\n}\nfunction calcRelativePosition(target, layout, parent) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x);\n calcRelativeAxisPosition(target.y, layout.y, parent.y);\n}\n\nexport { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };\n","import { __read } from 'tslib';\nimport { mix } from 'popmotion';\nimport { percent } from 'style-value-types';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate, scale, origin, boxScale, originAxis, sourceAxis) {\n if (translate === void 0) { translate = 0; }\n if (scale === void 0) { scale = 1; }\n if (origin === void 0) { origin = 0.5; }\n if (originAxis === void 0) { originAxis = axis; }\n if (sourceAxis === void 0) { sourceAxis = axis; }\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n var relativeProgress = mix(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n var originPoint = mix(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, _a, origin, sourceAxis) {\n var _b = __read(_a, 3), key = _b[0], scaleKey = _b[1], originKey = _b[2];\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nvar xKeys = [\"x\", \"scaleX\", \"originX\"];\nvar yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox === null || originBox === void 0 ? void 0 : originBox.x, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.x);\n removeAxisTransforms(box.y, transforms, yKeys, originBox === null || originBox === void 0 ? void 0 : originBox.y, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.y);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n","function isAxisDeltaZero(delta) {\n return delta.translate === 0 && delta.scale === 1;\n}\nfunction isDeltaZero(delta) {\n return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);\n}\nfunction boxEquals(a, b) {\n return (a.x.min === b.x.min &&\n a.x.max === b.x.max &&\n a.y.min === b.y.min &&\n a.y.max === b.y.max);\n}\n\nexport { boxEquals, isDeltaZero };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\n\nvar NodeStack = /** @class */ (function () {\n function NodeStack() {\n this.members = [];\n }\n NodeStack.prototype.add = function (node) {\n addUniqueItem(this.members, node);\n node.scheduleRender();\n };\n NodeStack.prototype.remove = function (node) {\n removeItem(this.members, node);\n if (node === this.prevLead) {\n this.prevLead = undefined;\n }\n if (node === this.lead) {\n var prevLead = this.members[this.members.length - 1];\n if (prevLead) {\n this.promote(prevLead);\n }\n }\n };\n NodeStack.prototype.relegate = function (node) {\n var indexOfNode = this.members.findIndex(function (member) { return node === member; });\n if (indexOfNode === 0)\n return false;\n /**\n * Find the next projection node that is present\n */\n var prevLead;\n for (var i = indexOfNode; i >= 0; i--) {\n var member = this.members[i];\n if (member.isPresent !== false) {\n prevLead = member;\n break;\n }\n }\n if (prevLead) {\n this.promote(prevLead);\n return true;\n }\n else {\n return false;\n }\n };\n NodeStack.prototype.promote = function (node, preserveFollowOpacity) {\n var _a;\n var prevLead = this.lead;\n if (node === prevLead)\n return;\n this.prevLead = prevLead;\n this.lead = node;\n node.show();\n if (prevLead) {\n prevLead.instance && prevLead.scheduleRender();\n node.scheduleRender();\n node.resumeFrom = prevLead;\n if (preserveFollowOpacity) {\n node.resumeFrom.preserveOpacity = true;\n }\n if (prevLead.snapshot) {\n node.snapshot = prevLead.snapshot;\n node.snapshot.latestValues =\n prevLead.animationValues || prevLead.latestValues;\n node.snapshot.isShared = true;\n }\n if ((_a = node.root) === null || _a === void 0 ? void 0 : _a.isUpdating) {\n node.isLayoutDirty = true;\n }\n var crossfade = node.options.crossfade;\n if (crossfade === false) {\n prevLead.hide();\n }\n /**\n * TODO:\n * - Test border radius when previous node was deleted\n * - boxShadow mixing\n * - Shared between element A in scrolled container and element B (scroll stays the same or changes)\n * - Shared between element A in transformed container and element B (transform stays the same or changes)\n * - Shared between element A in scrolled page and element B (scroll stays the same or changes)\n * ---\n * - Crossfade opacity of root nodes\n * - layoutId changes after animation\n * - layoutId changes mid animation\n */\n }\n };\n NodeStack.prototype.exitAnimationComplete = function () {\n this.members.forEach(function (node) {\n var _a, _b, _c, _d, _e;\n (_b = (_a = node.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a);\n (_e = (_c = node.resumingFrom) === null || _c === void 0 ? void 0 : (_d = _c.options).onExitComplete) === null || _e === void 0 ? void 0 : _e.call(_d);\n });\n };\n NodeStack.prototype.scheduleRender = function () {\n this.members.forEach(function (node) {\n node.instance && node.scheduleRender(false);\n });\n };\n /**\n * Clear any leads that have been removed this render to prevent them from being\n * used in future animations and to prevent memory leaks\n */\n NodeStack.prototype.removeLeadSnapshot = function () {\n if (this.lead && this.lead.snapshot) {\n this.lead.snapshot = undefined;\n }\n };\n return NodeStack;\n}());\n\nexport { NodeStack };\n","var scaleCorrectors = {};\nfunction addScaleCorrector(correctors) {\n Object.assign(scaleCorrectors, correctors);\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n","var identityProjection = \"translate3d(0px, 0px, 0) scale(1, 1)\";\nfunction buildProjectionTransform(delta, treeScale, latestTransform) {\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n var xTranslate = delta.x.translate / treeScale.x;\n var yTranslate = delta.y.translate / treeScale.y;\n var transform = \"translate3d(\".concat(xTranslate, \"px, \").concat(yTranslate, \"px, 0) \");\n if (latestTransform) {\n var rotate = latestTransform.rotate, rotateX = latestTransform.rotateX, rotateY = latestTransform.rotateY;\n if (rotate)\n transform += \"rotate(\".concat(rotate, \"deg) \");\n if (rotateX)\n transform += \"rotateX(\".concat(rotateX, \"deg) \");\n if (rotateY)\n transform += \"rotateY(\".concat(rotateY, \"deg) \");\n }\n transform += \"scale(\".concat(delta.x.scale, \", \").concat(delta.y.scale, \")\");\n return transform === identityProjection ? \"none\" : transform;\n}\n\nexport { buildProjectionTransform, identityProjection };\n","function eachAxis(callback) {\n return [callback(\"x\"), callback(\"y\")];\n}\n\nexport { eachAxis };\n","/**\n * A list of all transformable axes. We'll use this list to generated a version\n * of each axes for each transform.\n */\nvar transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\n/**\n * An ordered array of each transformable value. By default, transform values\n * will be sorted to this order.\n */\nvar order = [\"translate\", \"scale\", \"rotate\", \"skew\"];\n/**\n * Generate a list of every possible transform key.\n */\nvar transformProps = [\"transformPerspective\", \"x\", \"y\", \"z\"];\norder.forEach(function (operationKey) {\n return transformAxes.forEach(function (axesKey) {\n return transformProps.push(operationKey + axesKey);\n });\n});\n/**\n * A function to use with Array.sort to sort transform keys by their default order.\n */\nfunction sortTransformProps(a, b) {\n return transformProps.indexOf(a) - transformProps.indexOf(b);\n}\n/**\n * A quick lookup for transform props.\n */\nvar transformPropSet = new Set(transformProps);\nfunction isTransformProp(key) {\n return transformPropSet.has(key);\n}\n/**\n * A quick lookup for transform origin props\n */\nvar transformOriginProps = new Set([\"originX\", \"originY\", \"originZ\"]);\nfunction isTransformOriginProp(key) {\n return transformOriginProps.has(key);\n}\n\nexport { isTransformOriginProp, isTransformProp, sortTransformProps, transformAxes, transformProps };\n","var compareByDepth = function (a, b) {\n return a.depth - b.depth;\n};\n\nexport { compareByDepth };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\nimport { compareByDepth } from './compare-by-depth.mjs';\n\nvar FlatTree = /** @class */ (function () {\n function FlatTree() {\n this.children = [];\n this.isDirty = false;\n }\n FlatTree.prototype.add = function (child) {\n addUniqueItem(this.children, child);\n this.isDirty = true;\n };\n FlatTree.prototype.remove = function (child) {\n removeItem(this.children, child);\n this.isDirty = true;\n };\n FlatTree.prototype.forEach = function (callback) {\n this.isDirty && this.children.sort(compareByDepth);\n this.isDirty = false;\n this.children.forEach(callback);\n };\n return FlatTree;\n}());\n\nexport { FlatTree };\n","import { 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 *\n * @internal\n */\nfunction resolveMotionValue(value) {\n var unwrappedValue = isMotionValue(value) ? value.get() : value;\n return isCustomValue(unwrappedValue)\n ? unwrappedValue.toValue()\n : unwrappedValue;\n}\n\nexport { resolveMotionValue };\n","import { __spreadArray, __read, __assign } from 'tslib';\nimport sync, { cancelSync, flushSync } from 'framesync';\nimport { mix } from 'popmotion';\nimport { animate } from '../../animation/animate.mjs';\nimport { SubscriptionManager } from '../../utils/subscription-manager.mjs';\nimport { mixValues } from '../animation/mix-values.mjs';\nimport { copyBoxInto } from '../geometry/copy.mjs';\nimport { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from '../geometry/delta-apply.mjs';\nimport { calcRelativePosition, calcRelativeBox, calcBoxDelta, calcLength } from '../geometry/delta-calc.mjs';\nimport { removeBoxTransforms } from '../geometry/delta-remove.mjs';\nimport { createBox, createDelta } from '../geometry/models.mjs';\nimport { getValueTransition } from '../../animation/utils/transitions.mjs';\nimport { boxEquals, isDeltaZero } from '../geometry/utils.mjs';\nimport { NodeStack } from '../shared/stack.mjs';\nimport { scaleCorrectors } from '../styles/scale-correction.mjs';\nimport { buildProjectionTransform } from '../styles/transform.mjs';\nimport { eachAxis } from '../utils/each-axis.mjs';\nimport { hasTransform, hasScale } from '../utils/has-transform.mjs';\nimport { transformAxes } from '../../render/html/utils/transform.mjs';\nimport { FlatTree } from '../../render/utils/flat-tree.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\n\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nvar animationTarget = 1000;\n/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nvar globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false,\n};\nfunction createProjectionNode(_a) {\n var attachResizeListener = _a.attachResizeListener, defaultParent = _a.defaultParent, measureScroll = _a.measureScroll, resetTransform = _a.resetTransform;\n return /** @class */ (function () {\n function ProjectionNode(id, latestValues, parent) {\n var _this = this;\n if (latestValues === void 0) { latestValues = {}; }\n if (parent === void 0) { parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent(); }\n /**\n * A Set containing all this component's children. This is used to iterate\n * through the children.\n *\n * TODO: This could be faster to iterate as a flat array stored on the root node.\n */\n this.children = new Set();\n /**\n * Options for the node. We use this to configure what kind of layout animations\n * we should perform (if any).\n */\n this.options = {};\n /**\n * We use this to detect when its safe to shut down part of a projection tree.\n * We have to keep projecting children for scale correction and relative projection\n * until all their parents stop performing layout animations.\n */\n this.isTreeAnimating = false;\n this.isAnimationBlocked = false;\n /**\n * Flag to true if we think this layout has been changed. We can't always know this,\n * currently we set it to true every time a component renders, or if it has a layoutDependency\n * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n * and if one node is dirtied, they all are.\n */\n this.isLayoutDirty = false;\n /**\n * Block layout updates for instant layout transitions throughout the tree.\n */\n this.updateManuallyBlocked = false;\n this.updateBlockedByResize = false;\n /**\n * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n * call.\n */\n this.isUpdating = false;\n /**\n * If this is an SVG element we currently disable projection transforms\n */\n this.isSVG = false;\n /**\n * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n * its projection styles.\n */\n this.needsReset = false;\n /**\n * Flags whether this node should have its transform reset prior to measuring.\n */\n this.shouldResetTransform = false;\n /**\n * An object representing the calculated contextual/accumulated/tree scale.\n * This will be used to scale calculcated projection transforms, as these are\n * calculated in screen-space but need to be scaled for elements to actually\n * make it to their calculated destinations.\n *\n * TODO: Lazy-init\n */\n this.treeScale = { x: 1, y: 1 };\n /**\n *\n */\n this.eventHandlers = new Map();\n // Note: Currently only running on root node\n this.potentialNodes = new Map();\n this.checkUpdateFailed = function () {\n if (_this.isUpdating) {\n _this.isUpdating = false;\n _this.clearAllSnapshots();\n }\n };\n this.updateProjection = function () {\n _this.nodes.forEach(resolveTargetDelta);\n _this.nodes.forEach(calcProjection);\n };\n this.hasProjected = false;\n this.isVisible = true;\n this.animationProgress = 0;\n /**\n * Shared layout\n */\n // TODO Only running on root node\n this.sharedNodes = new Map();\n this.id = id;\n this.latestValues = latestValues;\n this.root = parent ? parent.root || parent : this;\n this.path = parent ? __spreadArray(__spreadArray([], __read(parent.path), false), [parent], false) : [];\n this.parent = parent;\n this.depth = parent ? parent.depth + 1 : 0;\n id && this.root.registerPotentialNode(id, this);\n for (var i = 0; i < this.path.length; i++) {\n this.path[i].shouldResetTransform = true;\n }\n if (this.root === this)\n this.nodes = new FlatTree();\n }\n ProjectionNode.prototype.addEventListener = function (name, handler) {\n if (!this.eventHandlers.has(name)) {\n this.eventHandlers.set(name, new SubscriptionManager());\n }\n return this.eventHandlers.get(name).add(handler);\n };\n ProjectionNode.prototype.notifyListeners = function (name) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var subscriptionManager = this.eventHandlers.get(name);\n subscriptionManager === null || subscriptionManager === void 0 ? void 0 : subscriptionManager.notify.apply(subscriptionManager, __spreadArray([], __read(args), false));\n };\n ProjectionNode.prototype.hasListeners = function (name) {\n return this.eventHandlers.has(name);\n };\n ProjectionNode.prototype.registerPotentialNode = function (id, node) {\n this.potentialNodes.set(id, node);\n };\n /**\n * Lifecycles\n */\n ProjectionNode.prototype.mount = function (instance, isLayoutDirty) {\n var _this = this;\n var _a;\n if (isLayoutDirty === void 0) { isLayoutDirty = false; }\n if (this.instance)\n return;\n this.isSVG =\n instance instanceof SVGElement && instance.tagName !== \"svg\";\n this.instance = instance;\n var _b = this.options, layoutId = _b.layoutId, layout = _b.layout, visualElement = _b.visualElement;\n if (visualElement && !visualElement.getInstance()) {\n visualElement.mount(instance);\n }\n this.root.nodes.add(this);\n (_a = this.parent) === null || _a === void 0 ? void 0 : _a.children.add(this);\n this.id && this.root.potentialNodes.delete(this.id);\n if (isLayoutDirty && (layout || layoutId)) {\n this.isLayoutDirty = true;\n }\n if (attachResizeListener) {\n var unblockTimeout_1;\n var resizeUnblockUpdate_1 = function () {\n return (_this.root.updateBlockedByResize = false);\n };\n attachResizeListener(instance, function () {\n _this.root.updateBlockedByResize = true;\n clearTimeout(unblockTimeout_1);\n unblockTimeout_1 = window.setTimeout(resizeUnblockUpdate_1, 250);\n if (globalProjectionState.hasAnimatedSinceResize) {\n globalProjectionState.hasAnimatedSinceResize = false;\n _this.nodes.forEach(finishAnimation);\n }\n });\n }\n if (layoutId) {\n this.root.registerSharedNode(layoutId, this);\n }\n // Only register the handler if it requires layout animation\n if (this.options.animate !== false &&\n visualElement &&\n (layoutId || layout)) {\n this.addEventListener(\"didUpdate\", function (_a) {\n var _b, _c, _d, _e, _f;\n var delta = _a.delta, hasLayoutChanged = _a.hasLayoutChanged, hasRelativeTargetChanged = _a.hasRelativeTargetChanged, newLayout = _a.layout;\n if (_this.isTreeAnimationBlocked()) {\n _this.target = undefined;\n _this.relativeTarget = undefined;\n return;\n }\n // TODO: Check here if an animation exists\n var layoutTransition = (_c = (_b = _this.options.transition) !== null && _b !== void 0 ? _b : visualElement.getDefaultTransition()) !== null && _c !== void 0 ? _c : defaultLayoutTransition;\n var _g = visualElement.getProps(), onLayoutAnimationStart = _g.onLayoutAnimationStart, onLayoutAnimationComplete = _g.onLayoutAnimationComplete;\n /**\n * The target layout of the element might stay the same,\n * but its position relative to its parent has changed.\n */\n var targetChanged = !_this.targetLayout ||\n !boxEquals(_this.targetLayout, newLayout) ||\n hasRelativeTargetChanged;\n /**\n * If the layout hasn't seemed to have changed, it might be that the\n * element is visually in the same place in the document but its position\n * relative to its parent has indeed changed. So here we check for that.\n */\n var hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;\n if (((_d = _this.resumeFrom) === null || _d === void 0 ? void 0 : _d.instance) ||\n hasOnlyRelativeTargetChanged ||\n (hasLayoutChanged &&\n (targetChanged || !_this.currentAnimation))) {\n if (_this.resumeFrom) {\n _this.resumingFrom = _this.resumeFrom;\n _this.resumingFrom.resumingFrom = undefined;\n }\n _this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);\n var animationOptions = __assign(__assign({}, getValueTransition(layoutTransition, \"layout\")), { onPlay: onLayoutAnimationStart, onComplete: onLayoutAnimationComplete });\n if (visualElement.shouldReduceMotion) {\n animationOptions.delay = 0;\n animationOptions.type = false;\n }\n _this.startAnimation(animationOptions);\n }\n else {\n /**\n * If the layout hasn't changed and we have an animation that hasn't started yet,\n * finish it immediately. Otherwise it will be animating from a location\n * that was probably never commited to screen and look like a jumpy box.\n */\n if (!hasLayoutChanged &&\n _this.animationProgress === 0) {\n _this.finishAnimation();\n }\n _this.isLead() && ((_f = (_e = _this.options).onExitComplete) === null || _f === void 0 ? void 0 : _f.call(_e));\n }\n _this.targetLayout = newLayout;\n });\n }\n };\n ProjectionNode.prototype.unmount = function () {\n var _a, _b;\n this.options.layoutId && this.willUpdate();\n this.root.nodes.remove(this);\n (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.remove(this);\n (_b = this.parent) === null || _b === void 0 ? void 0 : _b.children.delete(this);\n this.instance = undefined;\n cancelSync.preRender(this.updateProjection);\n };\n // only on the root\n ProjectionNode.prototype.blockUpdate = function () {\n this.updateManuallyBlocked = true;\n };\n ProjectionNode.prototype.unblockUpdate = function () {\n this.updateManuallyBlocked = false;\n };\n ProjectionNode.prototype.isUpdateBlocked = function () {\n return this.updateManuallyBlocked || this.updateBlockedByResize;\n };\n ProjectionNode.prototype.isTreeAnimationBlocked = function () {\n var _a;\n return (this.isAnimationBlocked ||\n ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimationBlocked()) ||\n false);\n };\n // Note: currently only running on root node\n ProjectionNode.prototype.startUpdate = function () {\n var _a;\n if (this.isUpdateBlocked())\n return;\n this.isUpdating = true;\n (_a = this.nodes) === null || _a === void 0 ? void 0 : _a.forEach(resetRotation);\n };\n ProjectionNode.prototype.willUpdate = function (shouldNotifyListeners) {\n var _a, _b, _c;\n if (shouldNotifyListeners === void 0) { shouldNotifyListeners = true; }\n if (this.root.isUpdateBlocked()) {\n (_b = (_a = this.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a);\n return;\n }\n !this.root.isUpdating && this.root.startUpdate();\n if (this.isLayoutDirty)\n return;\n this.isLayoutDirty = true;\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n node.shouldResetTransform = true;\n /**\n * TODO: Check we haven't updated the scroll\n * since the last didUpdate\n */\n node.updateScroll();\n }\n var _d = this.options, layoutId = _d.layoutId, layout = _d.layout;\n if (layoutId === undefined && !layout)\n return;\n var transformTemplate = (_c = this.options.visualElement) === null || _c === void 0 ? void 0 : _c.getProps().transformTemplate;\n this.prevTransformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, \"\");\n this.updateSnapshot();\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\");\n };\n // Note: Currently only running on root node\n ProjectionNode.prototype.didUpdate = function () {\n var updateWasBlocked = this.isUpdateBlocked();\n // When doing an instant transition, we skip the layout update,\n // but should still clean up the measurements so that the next\n // snapshot could be taken correctly.\n if (updateWasBlocked) {\n this.unblockUpdate();\n this.clearAllSnapshots();\n this.nodes.forEach(clearMeasurements);\n return;\n }\n if (!this.isUpdating)\n return;\n this.isUpdating = false;\n /**\n * Search for and mount newly-added projection elements.\n *\n * TODO: Every time a new component is rendered we could search up the tree for\n * the closest mounted node and query from there rather than document.\n */\n if (this.potentialNodes.size) {\n this.potentialNodes.forEach(mountNodeEarly);\n this.potentialNodes.clear();\n }\n /**\n * Write\n */\n this.nodes.forEach(resetTransformStyle);\n /**\n * Read ==================\n */\n // Update layout measurements of updated children\n this.nodes.forEach(updateLayout);\n /**\n * Write\n */\n // Notify listeners that the layout is updated\n this.nodes.forEach(notifyLayoutUpdate);\n this.clearAllSnapshots();\n // Flush any scheduled updates\n flushSync.update();\n flushSync.preRender();\n flushSync.render();\n };\n ProjectionNode.prototype.clearAllSnapshots = function () {\n this.nodes.forEach(clearSnapshot);\n this.sharedNodes.forEach(removeLeadSnapshots);\n };\n ProjectionNode.prototype.scheduleUpdateProjection = function () {\n sync.preRender(this.updateProjection, false, true);\n };\n ProjectionNode.prototype.scheduleCheckAfterUnmount = function () {\n var _this = this;\n /**\n * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n * we manually call didUpdate to give a chance to the siblings to animate.\n * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n */\n sync.postRender(function () {\n if (_this.isLayoutDirty) {\n _this.root.didUpdate();\n }\n else {\n _this.root.checkUpdateFailed();\n }\n });\n };\n /**\n * Update measurements\n */\n ProjectionNode.prototype.updateSnapshot = function () {\n if (this.snapshot || !this.instance)\n return;\n var measured = this.measure();\n var layout = this.removeTransform(this.removeElementScroll(measured));\n roundBox(layout);\n this.snapshot = {\n measured: measured,\n layout: layout,\n latestValues: {},\n };\n };\n ProjectionNode.prototype.updateLayout = function () {\n var _a;\n if (!this.instance)\n return;\n // TODO: Incorporate into a forwarded scroll offset\n this.updateScroll();\n if (!(this.options.alwaysMeasureLayout && this.isLead()) &&\n !this.isLayoutDirty) {\n return;\n }\n /**\n * When a node is mounted, it simply resumes from the prevLead's\n * snapshot instead of taking a new one, but the ancestors scroll\n * might have updated while the prevLead is unmounted. We need to\n * update the scroll again to make sure the layout we measure is\n * up to date.\n */\n if (this.resumeFrom && !this.resumeFrom.instance) {\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n node.updateScroll();\n }\n }\n var measured = this.measure();\n roundBox(measured);\n var prevLayout = this.layout;\n this.layout = {\n measured: measured,\n actual: this.removeElementScroll(measured),\n };\n this.layoutCorrected = createBox();\n this.isLayoutDirty = false;\n this.projectionDelta = undefined;\n this.notifyListeners(\"measure\", this.layout.actual);\n (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.notifyLayoutMeasure(this.layout.actual, prevLayout === null || prevLayout === void 0 ? void 0 : prevLayout.actual);\n };\n ProjectionNode.prototype.updateScroll = function () {\n if (this.options.layoutScroll && this.instance) {\n this.scroll = measureScroll(this.instance);\n }\n };\n ProjectionNode.prototype.resetTransform = function () {\n var _a;\n if (!resetTransform)\n return;\n var isResetRequested = this.isLayoutDirty || this.shouldResetTransform;\n var hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);\n var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate;\n var transformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, \"\");\n var transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;\n if (isResetRequested &&\n (hasProjection ||\n hasTransform(this.latestValues) ||\n transformTemplateHasChanged)) {\n resetTransform(this.instance, transformTemplateValue);\n this.shouldResetTransform = false;\n this.scheduleRender();\n }\n };\n ProjectionNode.prototype.measure = function () {\n var visualElement = this.options.visualElement;\n if (!visualElement)\n return createBox();\n var box = visualElement.measureViewportBox();\n // Remove viewport scroll to give page-relative coordinates\n var scroll = this.root.scroll;\n if (scroll) {\n translateAxis(box.x, scroll.x);\n translateAxis(box.y, scroll.y);\n }\n return box;\n };\n ProjectionNode.prototype.removeElementScroll = function (box) {\n var boxWithoutScroll = createBox();\n copyBoxInto(boxWithoutScroll, box);\n /**\n * Performance TODO: Keep a cumulative scroll offset down the tree\n * rather than loop back up the path.\n */\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n var scroll_1 = node.scroll, options = node.options;\n if (node !== this.root && scroll_1 && options.layoutScroll) {\n translateAxis(boxWithoutScroll.x, scroll_1.x);\n translateAxis(boxWithoutScroll.y, scroll_1.y);\n }\n }\n return boxWithoutScroll;\n };\n ProjectionNode.prototype.applyTransform = function (box, transformOnly) {\n if (transformOnly === void 0) { transformOnly = false; }\n var withTransforms = createBox();\n copyBoxInto(withTransforms, box);\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n if (!transformOnly &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(withTransforms, {\n x: -node.scroll.x,\n y: -node.scroll.y,\n });\n }\n if (!hasTransform(node.latestValues))\n continue;\n transformBox(withTransforms, node.latestValues);\n }\n if (hasTransform(this.latestValues)) {\n transformBox(withTransforms, this.latestValues);\n }\n return withTransforms;\n };\n ProjectionNode.prototype.removeTransform = function (box) {\n var _a;\n var boxWithoutTransform = createBox();\n copyBoxInto(boxWithoutTransform, box);\n for (var i = 0; i < this.path.length; i++) {\n var node = this.path[i];\n if (!node.instance)\n continue;\n if (!hasTransform(node.latestValues))\n continue;\n hasScale(node.latestValues) && node.updateSnapshot();\n var sourceBox = createBox();\n var nodeBox = node.measure();\n copyBoxInto(sourceBox, nodeBox);\n removeBoxTransforms(boxWithoutTransform, node.latestValues, (_a = node.snapshot) === null || _a === void 0 ? void 0 : _a.layout, sourceBox);\n }\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues);\n }\n return boxWithoutTransform;\n };\n /**\n *\n */\n ProjectionNode.prototype.setTargetDelta = function (delta) {\n this.targetDelta = delta;\n this.root.scheduleUpdateProjection();\n };\n ProjectionNode.prototype.setOptions = function (options) {\n var _a;\n this.options = __assign(__assign(__assign({}, this.options), options), { crossfade: (_a = options.crossfade) !== null && _a !== void 0 ? _a : true });\n };\n ProjectionNode.prototype.clearMeasurements = function () {\n this.scroll = undefined;\n this.layout = undefined;\n this.snapshot = undefined;\n this.prevTransformTemplateValue = undefined;\n this.targetDelta = undefined;\n this.target = undefined;\n this.isLayoutDirty = false;\n };\n /**\n * Frame calculations\n */\n ProjectionNode.prototype.resolveTargetDelta = function () {\n var _a;\n var _b = this.options, layout = _b.layout, layoutId = _b.layoutId;\n /**\n * If we have no layout, we can't perform projection, so early return\n */\n if (!this.layout || !(layout || layoutId))\n return;\n /**\n * If we don't have a targetDelta but do have a layout, we can attempt to resolve\n * a relativeParent. This will allow a component to perform scale correction\n * even if no animation has started.\n */\n // TODO If this is unsuccessful this currently happens every frame\n if (!this.targetDelta && !this.relativeTarget) {\n // TODO: This is a semi-repetition of further down this function, make DRY\n this.relativeParent = this.getClosestProjectingParent();\n if (this.relativeParent && this.relativeParent.layout) {\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.layout.actual, this.relativeParent.layout.actual);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n }\n /**\n * If we have no relative target or no target delta our target isn't valid\n * for this frame.\n */\n if (!this.relativeTarget && !this.targetDelta)\n return;\n /**\n * Lazy-init target data structure\n */\n if (!this.target) {\n this.target = createBox();\n this.targetWithTransforms = createBox();\n }\n /**\n * If we've got a relative box for this component, resolve it into a target relative to the parent.\n */\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n ((_a = this.relativeParent) === null || _a === void 0 ? void 0 : _a.target)) {\n calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target);\n /**\n * If we've only got a targetDelta, resolve it into a target\n */\n }\n else if (this.targetDelta) {\n if (Boolean(this.resumingFrom)) {\n // TODO: This is creating a new object every frame\n this.target = this.applyTransform(this.layout.actual);\n }\n else {\n copyBoxInto(this.target, this.layout.actual);\n }\n applyBoxDelta(this.target, this.targetDelta);\n }\n else {\n /**\n * If no target, use own layout as target\n */\n copyBoxInto(this.target, this.layout.actual);\n }\n /**\n * If we've been told to attempt to resolve a relative target, do so.\n */\n if (this.attemptToResolveRelativeTarget) {\n this.attemptToResolveRelativeTarget = false;\n this.relativeParent = this.getClosestProjectingParent();\n if (this.relativeParent &&\n Boolean(this.relativeParent.resumingFrom) ===\n Boolean(this.resumingFrom) &&\n !this.relativeParent.options.layoutScroll &&\n this.relativeParent.target) {\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.target, this.relativeParent.target);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n }\n };\n ProjectionNode.prototype.getClosestProjectingParent = function () {\n if (!this.parent || hasTransform(this.parent.latestValues))\n return undefined;\n if ((this.parent.relativeTarget || this.parent.targetDelta) &&\n this.parent.layout) {\n return this.parent;\n }\n else {\n return this.parent.getClosestProjectingParent();\n }\n };\n ProjectionNode.prototype.calcProjection = function () {\n var _a;\n var _b = this.options, layout = _b.layout, layoutId = _b.layoutId;\n /**\n * If this section of the tree isn't animating we can\n * delete our target sources for the following frame.\n */\n this.isTreeAnimating = Boolean(((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimating) ||\n this.currentAnimation ||\n this.pendingAnimation);\n if (!this.isTreeAnimating) {\n this.targetDelta = this.relativeTarget = undefined;\n }\n if (!this.layout || !(layout || layoutId))\n return;\n var lead = this.getLead();\n /**\n * Reset the corrected box with the latest values from box, as we're then going\n * to perform mutative operations on it.\n */\n copyBoxInto(this.layoutCorrected, this.layout.actual);\n /**\n * Apply all the parent deltas to this box to produce the corrected box. This\n * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n */\n applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, Boolean(this.resumingFrom) || this !== lead);\n var target = lead.target;\n if (!target)\n return;\n if (!this.projectionDelta) {\n this.projectionDelta = createDelta();\n this.projectionDeltaWithTransform = createDelta();\n }\n var prevTreeScaleX = this.treeScale.x;\n var prevTreeScaleY = this.treeScale.y;\n var prevProjectionTransform = this.projectionTransform;\n /**\n * Update the delta between the corrected box and the target box before user-set transforms were applied.\n * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n * for our layout reprojection, but still allow them to be scaled correctly by the user.\n * It might be that to simplify this we may want to accept that user-set scale is also corrected\n * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n * to allow people to choose whether these styles are corrected based on just the\n * layout reprojection or the final bounding box.\n */\n calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);\n this.projectionTransform = buildProjectionTransform(this.projectionDelta, this.treeScale);\n if (this.projectionTransform !== prevProjectionTransform ||\n this.treeScale.x !== prevTreeScaleX ||\n this.treeScale.y !== prevTreeScaleY) {\n this.hasProjected = true;\n this.scheduleRender();\n this.notifyListeners(\"projectionUpdate\", target);\n }\n };\n ProjectionNode.prototype.hide = function () {\n this.isVisible = false;\n // TODO: Schedule render\n };\n ProjectionNode.prototype.show = function () {\n this.isVisible = true;\n // TODO: Schedule render\n };\n ProjectionNode.prototype.scheduleRender = function (notifyAll) {\n var _a, _b, _c;\n if (notifyAll === void 0) { notifyAll = true; }\n (_b = (_a = this.options).scheduleRender) === null || _b === void 0 ? void 0 : _b.call(_a);\n notifyAll && ((_c = this.getStack()) === null || _c === void 0 ? void 0 : _c.scheduleRender());\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = undefined;\n }\n };\n ProjectionNode.prototype.setAnimationOrigin = function (delta, hasOnlyRelativeTargetChanged) {\n var _this = this;\n var _a;\n if (hasOnlyRelativeTargetChanged === void 0) { hasOnlyRelativeTargetChanged = false; }\n var snapshot = this.snapshot;\n var snapshotLatestValues = (snapshot === null || snapshot === void 0 ? void 0 : snapshot.latestValues) || {};\n var mixedValues = __assign({}, this.latestValues);\n var targetDelta = createDelta();\n this.relativeTarget = this.relativeTargetOrigin = undefined;\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;\n var relativeLayout = createBox();\n var isSharedLayoutAnimation = snapshot === null || snapshot === void 0 ? void 0 : snapshot.isShared;\n var isOnlyMember = (((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.members.length) || 0) <= 1;\n var shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation &&\n !isOnlyMember &&\n this.options.crossfade === true &&\n !this.path.some(hasOpacityCrossfade));\n this.animationProgress = 0;\n this.mixTargetDelta = function (latest) {\n var _a;\n var progress = latest / 1000;\n mixAxisDelta(targetDelta.x, delta.x, progress);\n mixAxisDelta(targetDelta.y, delta.y, progress);\n _this.setTargetDelta(targetDelta);\n if (_this.relativeTarget &&\n _this.relativeTargetOrigin &&\n _this.layout &&\n ((_a = _this.relativeParent) === null || _a === void 0 ? void 0 : _a.layout)) {\n calcRelativePosition(relativeLayout, _this.layout.actual, _this.relativeParent.layout.actual);\n mixBox(_this.relativeTarget, _this.relativeTargetOrigin, relativeLayout, progress);\n }\n if (isSharedLayoutAnimation) {\n _this.animationValues = mixedValues;\n mixValues(mixedValues, snapshotLatestValues, _this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);\n }\n _this.root.scheduleUpdateProjection();\n _this.scheduleRender();\n _this.animationProgress = progress;\n };\n this.mixTargetDelta(0);\n };\n ProjectionNode.prototype.startAnimation = function (options) {\n var _this = this;\n var _a, _b;\n this.notifyListeners(\"animationStart\");\n (_a = this.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop();\n if (this.resumingFrom) {\n (_b = this.resumingFrom.currentAnimation) === null || _b === void 0 ? void 0 : _b.stop();\n }\n if (this.pendingAnimation) {\n cancelSync.update(this.pendingAnimation);\n this.pendingAnimation = undefined;\n }\n /**\n * Start the animation in the next frame to have a frame with progress 0,\n * where the target is the same as when the animation started, so we can\n * calculate the relative positions correctly for instant transitions.\n */\n this.pendingAnimation = sync.update(function () {\n globalProjectionState.hasAnimatedSinceResize = true;\n _this.currentAnimation = animate(0, animationTarget, __assign(__assign({}, options), { onUpdate: function (latest) {\n var _a;\n _this.mixTargetDelta(latest);\n (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, latest);\n }, onComplete: function () {\n var _a;\n (_a = options.onComplete) === null || _a === void 0 ? void 0 : _a.call(options);\n _this.completeAnimation();\n } }));\n if (_this.resumingFrom) {\n _this.resumingFrom.currentAnimation = _this.currentAnimation;\n }\n _this.pendingAnimation = undefined;\n });\n };\n ProjectionNode.prototype.completeAnimation = function () {\n var _a;\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = undefined;\n this.resumingFrom.preserveOpacity = undefined;\n }\n (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.exitAnimationComplete();\n this.resumingFrom =\n this.currentAnimation =\n this.animationValues =\n undefined;\n this.notifyListeners(\"animationComplete\");\n };\n ProjectionNode.prototype.finishAnimation = function () {\n var _a;\n if (this.currentAnimation) {\n (_a = this.mixTargetDelta) === null || _a === void 0 ? void 0 : _a.call(this, animationTarget);\n this.currentAnimation.stop();\n }\n this.completeAnimation();\n };\n ProjectionNode.prototype.applyTransformsToTarget = function () {\n var _a = this.getLead(), targetWithTransforms = _a.targetWithTransforms, target = _a.target, layout = _a.layout, latestValues = _a.latestValues;\n if (!targetWithTransforms || !target || !layout)\n return;\n copyBoxInto(targetWithTransforms, target);\n /**\n * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n * This is the final box that we will then project into by calculating a transform delta and\n * applying it to the corrected box.\n */\n transformBox(targetWithTransforms, latestValues);\n /**\n * Update the delta between the corrected box and the final target box, after\n * user-set transforms are applied to it. This will be used by the renderer to\n * create a transform style that will reproject the element from its actual layout\n * into the desired bounding box.\n */\n calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);\n };\n ProjectionNode.prototype.registerSharedNode = function (layoutId, node) {\n var _a, _b, _c;\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack());\n }\n var stack = this.sharedNodes.get(layoutId);\n stack.add(node);\n node.promote({\n transition: (_a = node.options.initialPromotionConfig) === null || _a === void 0 ? void 0 : _a.transition,\n preserveFollowOpacity: (_c = (_b = node.options.initialPromotionConfig) === null || _b === void 0 ? void 0 : _b.shouldPreserveFollowOpacity) === null || _c === void 0 ? void 0 : _c.call(_b, node),\n });\n };\n ProjectionNode.prototype.isLead = function () {\n var stack = this.getStack();\n return stack ? stack.lead === this : true;\n };\n ProjectionNode.prototype.getLead = function () {\n var _a;\n var layoutId = this.options.layoutId;\n return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;\n };\n ProjectionNode.prototype.getPrevLead = function () {\n var _a;\n var layoutId = this.options.layoutId;\n return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined;\n };\n ProjectionNode.prototype.getStack = function () {\n var layoutId = this.options.layoutId;\n if (layoutId)\n return this.root.sharedNodes.get(layoutId);\n };\n ProjectionNode.prototype.promote = function (_a) {\n var _b = _a === void 0 ? {} : _a, needsReset = _b.needsReset, transition = _b.transition, preserveFollowOpacity = _b.preserveFollowOpacity;\n var stack = this.getStack();\n if (stack)\n stack.promote(this, preserveFollowOpacity);\n if (needsReset) {\n this.projectionDelta = undefined;\n this.needsReset = true;\n }\n if (transition)\n this.setOptions({ transition: transition });\n };\n ProjectionNode.prototype.relegate = function () {\n var stack = this.getStack();\n if (stack) {\n return stack.relegate(this);\n }\n else {\n return false;\n }\n };\n ProjectionNode.prototype.resetRotation = function () {\n var visualElement = this.options.visualElement;\n if (!visualElement)\n return;\n // If there's no detected rotation values, we can early return without a forced render.\n var hasRotate = false;\n // Keep a record of all the values we've reset\n var resetValues = {};\n // Check the rotate value of all axes and reset to 0\n for (var i = 0; i < transformAxes.length; i++) {\n var axis = transformAxes[i];\n var key = \"rotate\" + axis;\n // If this rotation doesn't exist as a motion value, then we don't\n // need to reset it\n if (!visualElement.getStaticValue(key)) {\n continue;\n }\n hasRotate = true;\n // Record the rotation and then temporarily set it to 0\n resetValues[key] = visualElement.getStaticValue(key);\n visualElement.setStaticValue(key, 0);\n }\n // If there's no rotation values, we don't need to do any more.\n if (!hasRotate)\n return;\n // Force a render of this element to apply the transform with all rotations\n // set to 0.\n visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender();\n // Put back all the values we reset\n for (var key in resetValues) {\n visualElement.setStaticValue(key, resetValues[key]);\n }\n // Schedule a render for the next frame. This ensures we won't visually\n // see the element with the reset rotate value applied.\n visualElement.scheduleRender();\n };\n ProjectionNode.prototype.getProjectionStyles = function (styleProp) {\n var _a, _b, _c, _d, _e, _f;\n if (styleProp === void 0) { styleProp = {}; }\n // TODO: Return lifecycle-persistent object\n var styles = {};\n if (!this.instance || this.isSVG)\n return styles;\n if (!this.isVisible) {\n return { visibility: \"hidden\" };\n }\n else {\n styles.visibility = \"\";\n }\n var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate;\n if (this.needsReset) {\n this.needsReset = false;\n styles.opacity = \"\";\n styles.pointerEvents =\n resolveMotionValue(styleProp.pointerEvents) || \"\";\n styles.transform = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : \"none\";\n return styles;\n }\n var lead = this.getLead();\n if (!this.projectionDelta || !this.layout || !lead.target) {\n var emptyStyles = {};\n if (this.options.layoutId) {\n emptyStyles.opacity = (_b = this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1;\n emptyStyles.pointerEvents =\n resolveMotionValue(styleProp.pointerEvents) || \"\";\n }\n if (this.hasProjected && !hasTransform(this.latestValues)) {\n emptyStyles.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n this.hasProjected = false;\n }\n return emptyStyles;\n }\n var valuesToRender = lead.animationValues || lead.latestValues;\n this.applyTransformsToTarget();\n styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);\n if (transformTemplate) {\n styles.transform = transformTemplate(valuesToRender, styles.transform);\n }\n var _g = this.projectionDelta, x = _g.x, y = _g.y;\n styles.transformOrigin = \"\".concat(x.origin * 100, \"% \").concat(y.origin * 100, \"% 0\");\n if (lead.animationValues) {\n /**\n * If the lead component is animating, assign this either the entering/leaving\n * opacity\n */\n styles.opacity =\n lead === this\n ? (_d = (_c = valuesToRender.opacity) !== null && _c !== void 0 ? _c : this.latestValues.opacity) !== null && _d !== void 0 ? _d : 1\n : this.preserveOpacity\n ? this.latestValues.opacity\n : valuesToRender.opacityExit;\n }\n else {\n /**\n * Or we're not animating at all, set the lead component to its actual\n * opacity and other components to hidden.\n */\n styles.opacity =\n lead === this\n ? (_e = valuesToRender.opacity) !== null && _e !== void 0 ? _e : \"\"\n : (_f = valuesToRender.opacityExit) !== null && _f !== void 0 ? _f : 0;\n }\n /**\n * Apply scale correction\n */\n for (var key in scaleCorrectors) {\n if (valuesToRender[key] === undefined)\n continue;\n var _h = scaleCorrectors[key], correct = _h.correct, applyTo = _h.applyTo;\n var corrected = correct(valuesToRender[key], lead);\n if (applyTo) {\n var num = applyTo.length;\n for (var i = 0; i < num; i++) {\n styles[applyTo[i]] = corrected;\n }\n }\n else {\n styles[key] = corrected;\n }\n }\n /**\n * Disable pointer events on follow components. This is to ensure\n * that if a follow component covers a lead component it doesn't block\n * pointer events on the lead.\n */\n if (this.options.layoutId) {\n styles.pointerEvents =\n lead === this\n ? resolveMotionValue(styleProp.pointerEvents) || \"\"\n : \"none\";\n }\n return styles;\n };\n ProjectionNode.prototype.clearSnapshot = function () {\n this.resumeFrom = this.snapshot = undefined;\n };\n // Only run on root\n ProjectionNode.prototype.resetTree = function () {\n this.root.nodes.forEach(function (node) { var _a; return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); });\n this.root.nodes.forEach(clearMeasurements);\n this.root.sharedNodes.clear();\n };\n return ProjectionNode;\n }());\n}\nfunction updateLayout(node) {\n node.updateLayout();\n}\nfunction notifyLayoutUpdate(node) {\n var _a, _b, _c, _d;\n var snapshot = (_b = (_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) !== null && _b !== void 0 ? _b : node.snapshot;\n if (node.isLead() &&\n node.layout &&\n snapshot &&\n node.hasListeners(\"didUpdate\")) {\n var _e = node.layout, layout_1 = _e.actual, measuredLayout = _e.measured;\n // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n // animations for instance if layout=\"size\" and an element has only changed position\n if (node.options.animationType === \"size\") {\n eachAxis(function (axis) {\n var axisSnapshot = snapshot.isShared\n ? snapshot.measured[axis]\n : snapshot.layout[axis];\n var length = calcLength(axisSnapshot);\n axisSnapshot.min = layout_1[axis].min;\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n else if (node.options.animationType === \"position\") {\n eachAxis(function (axis) {\n var axisSnapshot = snapshot.isShared\n ? snapshot.measured[axis]\n : snapshot.layout[axis];\n var length = calcLength(layout_1[axis]);\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n var layoutDelta = createDelta();\n calcBoxDelta(layoutDelta, layout_1, snapshot.layout);\n var visualDelta = createDelta();\n if (snapshot.isShared) {\n calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measured);\n }\n else {\n calcBoxDelta(visualDelta, layout_1, snapshot.layout);\n }\n var hasLayoutChanged = !isDeltaZero(layoutDelta);\n var hasRelativeTargetChanged = false;\n if (!node.resumeFrom) {\n node.relativeParent = node.getClosestProjectingParent();\n /**\n * If the relativeParent is itself resuming from a different element then\n * the relative snapshot is not relavent\n */\n if (node.relativeParent && !node.relativeParent.resumeFrom) {\n var _f = node.relativeParent, parentSnapshot = _f.snapshot, parentLayout = _f.layout;\n if (parentSnapshot && parentLayout) {\n var relativeSnapshot = createBox();\n calcRelativePosition(relativeSnapshot, snapshot.layout, parentSnapshot.layout);\n var relativeLayout = createBox();\n calcRelativePosition(relativeLayout, layout_1, parentLayout.actual);\n if (!boxEquals(relativeSnapshot, relativeLayout)) {\n hasRelativeTargetChanged = true;\n }\n }\n }\n }\n node.notifyListeners(\"didUpdate\", {\n layout: layout_1,\n snapshot: snapshot,\n delta: visualDelta,\n layoutDelta: layoutDelta,\n hasLayoutChanged: hasLayoutChanged,\n hasRelativeTargetChanged: hasRelativeTargetChanged,\n });\n }\n else if (node.isLead()) {\n (_d = (_c = node.options).onExitComplete) === null || _d === void 0 ? void 0 : _d.call(_c);\n }\n /**\n * Clearing transition\n * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n * and why we need it at all\n */\n node.options.transition = undefined;\n}\nfunction clearSnapshot(node) {\n node.clearSnapshot();\n}\nfunction clearMeasurements(node) {\n node.clearMeasurements();\n}\nfunction resetTransformStyle(node) {\n var visualElement = node.options.visualElement;\n if (visualElement === null || visualElement === void 0 ? void 0 : visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notifyBeforeLayoutMeasure();\n }\n node.resetTransform();\n}\nfunction finishAnimation(node) {\n node.finishAnimation();\n node.targetDelta = node.relativeTarget = node.target = undefined;\n}\nfunction resolveTargetDelta(node) {\n node.resolveTargetDelta();\n}\nfunction calcProjection(node) {\n node.calcProjection();\n}\nfunction resetRotation(node) {\n node.resetRotation();\n}\nfunction removeLeadSnapshots(stack) {\n stack.removeLeadSnapshot();\n}\nfunction mixAxisDelta(output, delta, p) {\n output.translate = mix(delta.translate, 0, p);\n output.scale = mix(delta.scale, 1, p);\n output.origin = delta.origin;\n output.originPoint = delta.originPoint;\n}\nfunction mixAxis(output, from, to, p) {\n output.min = mix(from.min, to.min, p);\n output.max = mix(from.max, to.max, p);\n}\nfunction mixBox(output, from, to, p) {\n mixAxis(output.x, from.x, to.x, p);\n mixAxis(output.y, from.y, to.y, p);\n}\nfunction hasOpacityCrossfade(node) {\n return (node.animationValues && node.animationValues.opacityExit !== undefined);\n}\nvar defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1],\n};\nfunction mountNodeEarly(node, id) {\n /**\n * Rather than searching the DOM from document we can search the\n * path for the deepest mounted ancestor and search from there\n */\n var searchNode = node.root;\n for (var i = node.path.length - 1; i >= 0; i--) {\n if (Boolean(node.path[i].instance)) {\n searchNode = node.path[i];\n break;\n }\n }\n var searchElement = searchNode && searchNode !== node.root ? searchNode.instance : document;\n var element = searchElement.querySelector(\"[data-projection-id=\\\"\".concat(id, \"\\\"]\"));\n if (element)\n node.mount(element, true);\n}\nfunction roundAxis(axis) {\n axis.min = Math.round(axis.min);\n axis.max = Math.round(axis.max);\n}\nfunction roundBox(box) {\n roundAxis(box.x);\n roundAxis(box.y);\n}\n\nexport { createProjectionNode, globalProjectionState, mixAxis, mixAxisDelta, mixBox };\n","var createAxisDelta = function () { return ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n}); };\nvar createDelta = function () { return ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n}); };\nvar createAxis = function () { return ({ min: 0, max: 0 }); };\nvar createBox = function () { return ({\n x: createAxis(),\n y: createAxis(),\n}); };\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n","import { motionValue } from '../value/index.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { startAnimation } from './utils/transitions.mjs';\n\n/**\n * Animate a single value or a `MotionValue`.\n *\n * The first argument is either a `MotionValue` to animate, or an initial animation value.\n *\n * The second is either a value to animate to, or an array of keyframes to animate through.\n *\n * The third argument can be either tween or spring options, and optional lifecycle methods: `onUpdate`, `onPlay`, `onComplete`, `onRepeat` and `onStop`.\n *\n * Returns `AnimationPlaybackControls`, currently just a `stop` method.\n *\n * ```javascript\n * const x = useMotionValue(0)\n *\n * useEffect(() => {\n * const controls = animate(x, 100, {\n * type: \"spring\",\n * stiffness: 2000,\n * onComplete: v => {}\n * })\n *\n * return controls.stop\n * })\n * ```\n *\n * @public\n */\nfunction animate(from, to, transition) {\n if (transition === void 0) { transition = {}; }\n var value = isMotionValue(from) ? from : motionValue(from);\n startAnimation(\"\", value, to, transition);\n return {\n stop: function () { return value.stop(); },\n isAnimating: function () { return value.isAnimating(); },\n };\n}\n\nexport { animate };\n","import { useConstant } from '../../utils/use-constant.mjs';\nimport { globalProjectionState } from './create-projection-node.mjs';\n\nvar id = 1;\nfunction useProjectionId() {\n return useConstant(function () {\n if (globalProjectionState.hasEverUpdated) {\n return id++;\n }\n });\n}\n\nexport { useProjectionId };\n","import { createContext } from 'react';\n\n/**\n * @internal\n */\nvar LayoutGroupContext = createContext({});\n\nexport { LayoutGroupContext };\n","import { createContext } from 'react';\n\n/**\n * @internal\n */\nvar SwitchLayoutGroupContext = createContext({});\n\nexport { SwitchLayoutGroupContext };\n","import { __extends } from 'tslib';\nimport React__default from 'react';\n\nvar VisualElementHandler = /** @class */ (function (_super) {\n __extends(VisualElementHandler, _super);\n function VisualElementHandler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Update visual element props as soon as we know this update is going to be commited.\n */\n VisualElementHandler.prototype.getSnapshotBeforeUpdate = function () {\n this.updateProps();\n return null;\n };\n VisualElementHandler.prototype.componentDidUpdate = function () { };\n VisualElementHandler.prototype.updateProps = function () {\n var _a = this.props, visualElement = _a.visualElement, props = _a.props;\n if (visualElement)\n visualElement.setProps(props);\n };\n VisualElementHandler.prototype.render = function () {\n return this.props.children;\n };\n return VisualElementHandler;\n}(React__default.Component));\n\nexport { VisualElementHandler };\n","import { createMotionComponent } from '../../motion/index.mjs';\n\n/**\n * Convert any React component into a `motion` component. The provided component\n * **must** use `React.forwardRef` to the underlying DOM component you want to animate.\n *\n * ```jsx\n * const Component = React.forwardRef((props, ref) => {\n * return <div ref={ref} />\n * })\n *\n * const MotionComponent = motion(Component)\n * ```\n *\n * @public\n */\nfunction createMotionProxy(createConfig) {\n function custom(Component, customMotionComponentConfig) {\n if (customMotionComponentConfig === void 0) { customMotionComponentConfig = {}; }\n return createMotionComponent(createConfig(Component, customMotionComponentConfig));\n }\n if (typeof Proxy === \"undefined\") {\n return custom;\n }\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n var componentCache = new Map();\n return new Proxy(custom, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: function (_target, key) {\n /**\n * If this element doesn't exist in the component cache, create it and cache.\n */\n if (!componentCache.has(key)) {\n componentCache.set(key, custom(key));\n }\n return componentCache.get(key);\n },\n });\n}\n\nexport { createMotionProxy };\n","import { __assign } from 'tslib';\nimport * as React from 'react';\nimport { forwardRef, useContext } from 'react';\nimport { useFeatures } from './features/use-features.mjs';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { loadFeatures, featureDefinitions } from './features/definitions.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { useProjectionId } from '../projection/node/id.mjs';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { useProjection } from './features/use-projection.mjs';\nimport { VisualElementHandler } from './utils/VisualElementHandler.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n *\n * @internal\n */\nfunction createMotionComponent(_a) {\n var preloadedFeatures = _a.preloadedFeatures, createVisualElement = _a.createVisualElement, projectionNodeConstructor = _a.projectionNodeConstructor, useRender = _a.useRender, useVisualState = _a.useVisualState, Component = _a.Component;\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n var layoutId = useLayoutId(props);\n props = __assign(__assign({}, props), { layoutId: layoutId });\n /**\n * If we're rendering in a static environment, we only visually update the component\n * as a result of a React-rerender rather than interactions or animations. This\n * means we don't need to load additional memory structures like VisualElement,\n * or any gesture/animation features.\n */\n var config = useContext(MotionConfigContext);\n var features = null;\n var context = useCreateMotionContext(props);\n /**\n * Create a unique projection ID for this component. If a new component is added\n * during a layout animation we'll use this to query the DOM and hydrate its ref early, allowing\n * us to measure it as soon as any layout effect flushes pending layout animations.\n *\n * Performance note: It'd be better not to have to search the DOM for these elements.\n * For newly-entering components it could be enough to only correct treeScale, in which\n * case we could mount in a scale-correction mode. This wouldn't be enough for\n * shared element transitions however. Perhaps for those we could revert to a root node\n * that gets forceRendered and layout animations are triggered on its layout effect.\n */\n var projectionId = config.isStatic ? undefined : useProjectionId();\n /**\n *\n */\n var visualState = useVisualState(props, config.isStatic);\n if (!config.isStatic && isBrowser) {\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, __assign(__assign({}, config), props), createVisualElement);\n useProjection(projectionId, props, context.visualElement, projectionNodeConstructor ||\n featureDefinitions.projectionNodeConstructor);\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n features = useFeatures(props, context.visualElement, preloadedFeatures);\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (React.createElement(VisualElementHandler, { visualElement: context.visualElement, props: __assign(__assign({}, config), props) },\n features,\n React.createElement(MotionContext.Provider, { value: context }, useRender(Component, props, projectionId, useMotionRef(visualState, context.visualElement, externalRef), visualState, config.isStatic, context.visualElement))));\n }\n return forwardRef(MotionComponent);\n}\nfunction useLayoutId(_a) {\n var _b;\n var layoutId = _a.layoutId;\n var layoutGroupId = (_b = useContext(LayoutGroupContext)) === null || _b === void 0 ? void 0 : _b.id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\n\nexport { createMotionComponent };\n","import { checkIfControllingVariants, isVariantLabel } from '../../render/utils/variants.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n if (checkIfControllingVariants(props)) {\n var initial = props.initial, animate = props.animate;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n","import { useContext, useRef, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useVisualElementContext } from '../../context/MotionContext/index.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { useReducedMotionConfig } from '../../utils/use-reduced-motion.mjs';\n\nfunction useVisualElement(Component, visualState, props, createVisualElement) {\n var lazyContext = useContext(LazyContext);\n var parent = useVisualElementContext();\n var presenceContext = useContext(PresenceContext);\n var shouldReduceMotion = useReducedMotionConfig();\n var visualElementRef = useRef(undefined);\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n if (!createVisualElement)\n createVisualElement = lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState: visualState,\n parent: parent,\n props: props,\n presenceId: presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id,\n blockInitialAnimation: (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false,\n shouldReduceMotion: shouldReduceMotion,\n });\n }\n var visualElement = visualElementRef.current;\n useIsomorphicLayoutEffect(function () {\n visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender();\n });\n useEffect(function () {\n var _a;\n (_a = visualElement === null || visualElement === void 0 ? void 0 : visualElement.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges();\n });\n useIsomorphicLayoutEffect(function () { return function () { return visualElement === null || visualElement === void 0 ? void 0 : visualElement.notifyUnmount(); }; }, []);\n return visualElement;\n}\n\nexport { useVisualElement };\n","import { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { useContext } from 'react';\nimport { SwitchLayoutGroupContext } from '../../context/SwitchLayoutGroupContext.mjs';\n\nfunction useProjection(projectionId, _a, visualElement, ProjectionNodeConstructor) {\n var _b;\n var layoutId = _a.layoutId, layout = _a.layout, drag = _a.drag, dragConstraints = _a.dragConstraints, layoutScroll = _a.layoutScroll;\n var initialPromotionConfig = useContext(SwitchLayoutGroupContext);\n if (!ProjectionNodeConstructor ||\n !visualElement ||\n (visualElement === null || visualElement === void 0 ? void 0 : visualElement.projection)) {\n return;\n }\n visualElement.projection = new ProjectionNodeConstructor(projectionId, visualElement.getLatestValues(), (_b = visualElement.parent) === null || _b === void 0 ? void 0 : _b.projection);\n visualElement.projection.setOptions({\n layoutId: layoutId,\n layout: layout,\n alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n visualElement: visualElement,\n scheduleRender: function () { return visualElement.scheduleRender(); },\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout === \"string\" ? layout : \"both\",\n initialPromotionConfig: initialPromotionConfig,\n layoutScroll: layoutScroll,\n });\n}\n\nexport { useProjection };\n","import { useCallback } from 'react';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nfunction useMotionRef(visualState, visualElement, externalRef) {\n return useCallback(function (instance) {\n var _a;\n instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance));\n if (visualElement) {\n instance\n ? visualElement.mount(instance)\n : visualElement.unmount();\n }\n if (externalRef) {\n if (typeof externalRef === \"function\") {\n externalRef(instance);\n }\n else if (isRefObject(externalRef)) {\n externalRef.current = instance;\n }\n }\n }, \n /**\n * Only pass a new ref callback to React if we've received a visual element\n * factory. Otherwise we'll be mounting/remounting every time externalRef\n * or other dependencies change.\n */\n [visualElement]);\n}\n\nexport { useMotionRef };\n","/**\n * We keep these listed seperately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nvar lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"svg\",\n \"switch\",\n \"symbol\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n];\n\nexport { lowercaseSVGElements };\n","import { lowercaseSVGElements } from '../../svg/lowercase-elements.mjs';\n\nfunction isSVGComponent(Component) {\n if (\n /**\n * If it's not a string, it's a custom React component. Currently we only support\n * HTML custom React components.\n */\n typeof Component !== \"string\" ||\n /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component.includes(\"-\")) {\n return false;\n }\n else if (\n /**\n * If it's in our list of lowercase SVG tags, it's an SVG component\n */\n lowercaseSVGElements.indexOf(Component) > -1 ||\n /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/.test(Component)) {\n return true;\n }\n return false;\n}\n\nexport { isSVGComponent };\n","import { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nimport { isTransformProp, isTransformOriginProp } from '../../render/html/utils/transform.mjs';\n\nfunction isForcedMotionValue(key, _a) {\n var layout = _a.layout, layoutId = _a.layoutId;\n return (isTransformProp(key) ||\n isTransformOriginProp(key) ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue };\n","import { sortTransformProps } from './transform.mjs';\n\nvar translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(_a, _b, transformIsDefault, transformTemplate) {\n var transform = _a.transform, transformKeys = _a.transformKeys;\n var _c = _b.enableHardwareAcceleration, enableHardwareAcceleration = _c === void 0 ? true : _c, _d = _b.allowTransformNone, allowTransformNone = _d === void 0 ? true : _d;\n // The transform string we're going to build into.\n var transformString = \"\";\n // Transform keys into their default order - this will determine the output order.\n transformKeys.sort(sortTransformProps);\n // Track whether the defined transform has a defined z so we don't add a\n // second to enable hardware acceleration\n var transformHasZ = false;\n // Loop over each transform and build them into transformString\n var numTransformKeys = transformKeys.length;\n for (var i = 0; i < numTransformKeys; i++) {\n var key = transformKeys[i];\n transformString += \"\".concat(translateAlias[key] || key, \"(\").concat(transform[key], \") \");\n if (key === \"z\")\n transformHasZ = true;\n }\n if (!transformHasZ && enableHardwareAcceleration) {\n transformString += \"translateZ(0)\";\n }\n else {\n transformString = transformString.trim();\n }\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n }\n else if (allowTransformNone && transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n/**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\nfunction buildTransformOrigin(_a) {\n var _b = _a.originX, originX = _b === void 0 ? \"50%\" : _b, _c = _a.originY, originY = _c === void 0 ? \"50%\" : _c, _d = _a.originZ, originZ = _d === void 0 ? 0 : _d;\n return \"\".concat(originX, \" \").concat(originY, \" \").concat(originZ);\n}\n\nexport { buildTransform, buildTransformOrigin };\n","/**\n * Returns true if the provided key is a CSS variable\n */\nfunction isCSSVariable(key) {\n return key.startsWith(\"--\");\n}\n\nexport { isCSSVariable };\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nvar getValueAsType = function (value, type) {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n\nexport { getValueAsType };\n","import { buildTransform, buildTransformOrigin } from './build-transform.mjs';\nimport { isCSSVariable } from '../../dom/utils/is-css-variable.mjs';\nimport { isTransformProp, isTransformOriginProp } from './transform.mjs';\nimport { getValueAsType } from '../../dom/value-types/get-as-type.mjs';\nimport { numberValueTypes } from '../../dom/value-types/number.mjs';\n\nfunction buildHTMLStyles(state, latestValues, options, transformTemplate) {\n var _a;\n var style = state.style, vars = state.vars, transform = state.transform, transformKeys = state.transformKeys, transformOrigin = state.transformOrigin;\n // Empty the transformKeys array. As we're throwing out refs to its items\n // this might not be as cheap as suspected. Maybe using the array as a buffer\n // with a manual incrementation would be better.\n transformKeys.length = 0;\n // Track whether we encounter any transform or transformOrigin values.\n var hasTransform = false;\n var hasTransformOrigin = false;\n // Does the calculated transform essentially equal \"none\"?\n var transformIsNone = true;\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept seperately for further processing.\n */\n for (var key in latestValues) {\n var value = latestValues[key];\n /**\n * If this is a CSS variable we don't do any further processing.\n */\n if (isCSSVariable(key)) {\n vars[key] = value;\n continue;\n }\n // Convert the value to its default value type, ie 0 -> \"0px\"\n var valueType = numberValueTypes[key];\n var valueAsType = getValueAsType(value, valueType);\n if (isTransformProp(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n transform[key] = valueAsType;\n transformKeys.push(key);\n // If we already know we have a non-default transform, early return\n if (!transformIsNone)\n continue;\n // Otherwise check to see if this is a default transform\n if (value !== ((_a = valueType.default) !== null && _a !== void 0 ? _a : 0))\n transformIsNone = false;\n }\n else if (isTransformOriginProp(key)) {\n transformOrigin[key] = valueAsType;\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n }\n else {\n style[key] = valueAsType;\n }\n }\n if (hasTransform) {\n style.transform = buildTransform(state, options, transformIsNone, transformTemplate);\n }\n else if (transformTemplate) {\n style.transform = transformTemplate({}, \"\");\n }\n else if (!latestValues.transform && style.transform) {\n style.transform = \"none\";\n }\n if (hasTransformOrigin) {\n style.transformOrigin = buildTransformOrigin(transformOrigin);\n }\n}\n\nexport { buildHTMLStyles };\n","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nfunction copyRawValuesOnly(target, source, props) {\n for (var key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues(_a, visualState, isStatic) {\n var transformTemplate = _a.transformTemplate;\n return useMemo(function () {\n var state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);\n var vars = state.vars, style = state.style;\n return __assign(__assign({}, vars), style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState, isStatic) {\n var styleProp = props.style || {};\n var style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState, isStatic));\n if (props.transformValues) {\n style = props.transformValues(style);\n }\n return style;\n}\nfunction useHTMLProps(props, visualState, isStatic) {\n // The `any` isn't ideal but it is the type of createElement props argument\n var htmlProps = {};\n var style = useStyle(props, visualState, isStatic);\n if (Boolean(props.drag) && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false;\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\";\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : \"pan-\".concat(props.drag === \"x\" ? \"y\" : \"x\");\n }\n htmlProps.style = style;\n return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps, useStyle };\n","var createHtmlRenderState = function () { return ({\n style: {},\n transform: {},\n transformKeys: [],\n transformOrigin: {},\n vars: {},\n}); };\n\nexport { createHtmlRenderState };\n","/**\n * A list of all valid MotionProps.\n *\n * @internalremarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nvar validMotionProps = new Set([\n \"initial\",\n \"animate\",\n \"exit\",\n \"style\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"transformValues\",\n \"custom\",\n \"inherit\",\n \"layout\",\n \"layoutId\",\n \"layoutDependency\",\n \"onLayoutAnimationStart\",\n \"onLayoutAnimationComplete\",\n \"onLayoutMeasure\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"drag\",\n \"dragControls\",\n \"dragListener\",\n \"dragConstraints\",\n \"dragDirectionLock\",\n \"dragSnapToOrigin\",\n \"_dragX\",\n \"_dragY\",\n \"dragElastic\",\n \"dragMomentum\",\n \"dragPropagation\",\n \"dragTransition\",\n \"whileDrag\",\n \"onPan\",\n \"onPanStart\",\n \"onPanEnd\",\n \"onPanSessionStart\",\n \"onTap\",\n \"onTapStart\",\n \"onTapCancel\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"whileFocus\",\n \"whileTap\",\n \"whileHover\",\n \"whileInView\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"viewport\",\n \"layoutScroll\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nfunction isValidMotionProp(key) {\n return validMotionProps.has(key);\n}\n\nexport { isValidMotionProp };\n","import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nvar shouldForward = function (key) { return !isValidMotionProp(key); };\nfunction loadExternalIsValidProp(isValidProp) {\n if (!isValidProp)\n return;\n // Explicitly filter our events\n shouldForward = function (key) {\n return key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n };\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n */\n loadExternalIsValidProp(require(\"@emotion/is-prop-valid\").default);\n}\ncatch (_a) {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n var filteredProps = {};\n for (var key in props) {\n if (shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\"] && key.startsWith(\"onDrag\"))) {\n filteredProps[key] = props[key];\n }\n }\n return filteredProps;\n}\n\nexport { filterProps, loadExternalIsValidProp };\n","import { px } from 'style-value-types';\n\nfunction calcOrigin(origin, offset, size) {\n return typeof origin === \"string\"\n ? origin\n : px.transform(offset + size * origin);\n}\n/**\n * The SVG transform origin defaults are different to CSS and is less intuitive,\n * so we use the measured dimensions of the SVG to reconcile these.\n */\nfunction calcSVGTransformOrigin(dimensions, originX, originY) {\n var pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);\n var pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);\n return \"\".concat(pxOriginX, \" \").concat(pxOriginY);\n}\n\nexport { calcSVGTransformOrigin };\n","import { px } from 'style-value-types';\n\nvar dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nvar camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n */\nfunction buildSVGPath(attrs, length, spacing, offset, useDashCase) {\n if (spacing === void 0) { spacing = 1; }\n if (offset === void 0) { offset = 0; }\n if (useDashCase === void 0) { useDashCase = true; }\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n var keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = px.transform(-offset);\n // Build the dash array\n var pathLength = px.transform(length);\n var pathSpacing = px.transform(spacing);\n attrs[keys.array] = \"\".concat(pathLength, \" \").concat(pathSpacing);\n}\n\nexport { buildSVGPath };\n","import { __rest } from 'tslib';\nimport { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { calcSVGTransformOrigin } from './transform-origin.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * Build SVG visual attrbutes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, _a, options, transformTemplate) {\n var attrX = _a.attrX, attrY = _a.attrY, originX = _a.originX, originY = _a.originY, pathLength = _a.pathLength, _b = _a.pathSpacing, pathSpacing = _b === void 0 ? 1 : _b, _c = _a.pathOffset, pathOffset = _c === void 0 ? 0 : _c, \n // This is object creation, which we try to avoid per-frame.\n latest = __rest(_a, [\"attrX\", \"attrY\", \"originX\", \"originY\", \"pathLength\", \"pathSpacing\", \"pathOffset\"]);\n buildHTMLStyles(state, latest, options, transformTemplate);\n state.attrs = state.style;\n state.style = {};\n var attrs = state.attrs, style = state.style, dimensions = state.dimensions;\n /**\n * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs\n * and copy it into style.\n */\n if (attrs.transform) {\n if (dimensions)\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n // Parse transformOrigin\n if (dimensions &&\n (originX !== undefined || originY !== undefined || style.transform)) {\n style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);\n }\n // Treat x/y not as shortcuts but as actual attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };\n","import { __assign } from 'tslib';\nimport { createHtmlRenderState } from '../../html/utils/create-render-state.mjs';\n\nvar createSvgRenderState = function () { return (__assign(__assign({}, createHtmlRenderState()), { attrs: {} })); };\n\nexport { createSvgRenderState };\n","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\n\nfunction useSVGProps(props, visualState) {\n var visualProps = useMemo(function () {\n var state = createSvgRenderState();\n buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, props.transformTemplate);\n return __assign(__assign({}, state.attrs), { style: __assign({}, state.style) });\n }, [visualState]);\n if (props.style) {\n var rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = __assign(__assign({}, rawStyles), visualProps.style);\n }\n return visualProps;\n}\n\nexport { useSVGProps };\n","import { __assign } from 'tslib';\nimport { createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.mjs';\nimport { filterProps } from './utils/filter-props.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\nimport { useSVGProps } from '../svg/use-props.mjs';\n\nfunction createUseRender(forwardMotionProps) {\n if (forwardMotionProps === void 0) { forwardMotionProps = false; }\n var useRender = function (Component, props, projectionId, ref, _a, isStatic) {\n var latestValues = _a.latestValues;\n var useVisualProps = isSVGComponent(Component)\n ? useSVGProps\n : useHTMLProps;\n var visualProps = useVisualProps(props, latestValues, isStatic);\n var filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n var elementProps = __assign(__assign(__assign({}, filteredProps), visualProps), { ref: ref });\n if (projectionId) {\n elementProps[\"data-projection-id\"] = projectionId;\n }\n return createElement(Component, elementProps);\n };\n return useRender;\n}\n\nexport { createUseRender };\n","var CAMEL_CASE_PATTERN = /([a-z])([A-Z])/g;\nvar REPLACE_TEMPLATE = \"$1-$2\";\n/**\n * Convert camelCase to dash-case properties.\n */\nvar camelToDash = function (str) {\n return str.replace(CAMEL_CASE_PATTERN, REPLACE_TEMPLATE).toLowerCase();\n};\n\nexport { camelToDash };\n","function renderHTML(element, _a, styleProp, projection) {\n var style = _a.style, vars = _a.vars;\n Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));\n // Loop over any CSS variables and assign those.\n for (var key in vars) {\n element.style.setProperty(key, vars[key]);\n }\n}\n\nexport { renderHTML };\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nvar camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n]);\n\nexport { camelCaseAttributes };\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState, _styleProp, projection) {\n renderHTML(element, renderState, undefined, projection);\n for (var key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\nexport { renderSVG };\n","import { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props) {\n var style = props.style;\n var newValues = {};\n for (var key in style) {\n if (isMotionValue(style[key]) || isForcedMotionValue(key, props)) {\n newValues[key] = style[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\n\nfunction scrapeMotionValuesFromProps(props) {\n var newValues = scrapeMotionValuesFromProps$1(props);\n for (var key in props) {\n if (isMotionValue(props[key])) {\n var targetKey = key === \"x\" || key === \"y\" ? \"attr\" + key.toUpperCase() : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","function isAnimationControls(v) {\n return typeof v === \"object\" && typeof v.start === \"function\";\n}\n\nexport { isAnimationControls };\n","import { __rest } from 'tslib';\nimport { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { checkIfControllingVariants, checkIfVariantNode, resolveVariantFromProps } from '../../render/utils/variants.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\n\nfunction makeState(_a, props, context, presenceContext) {\n var scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps, createRenderState = _a.createRenderState, onMount = _a.onMount;\n var state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n if (onMount) {\n state.mount = function (instance) { return onMount(props, instance, state); };\n }\n return state;\n}\nvar makeUseVisualState = function (config) {\n return function (props, isStatic) {\n var context = useContext(MotionContext);\n var presenceContext = useContext(PresenceContext);\n return isStatic\n ? makeState(config, props, context, presenceContext)\n : useConstant(function () {\n return makeState(config, props, context, presenceContext);\n });\n };\n};\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n var values = {};\n var blockInitialAnimation = (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false;\n var motionValues = scrapeMotionValues(props);\n for (var key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n var initial = props.initial, animate = props.animate;\n var isControllingVariants = checkIfControllingVariants(props);\n var isVariantNode = checkIfVariantNode(props);\n if (context &&\n isVariantNode &&\n !isControllingVariants &&\n props.inherit !== false) {\n initial !== null && initial !== void 0 ? initial : (initial = context.initial);\n animate !== null && animate !== void 0 ? animate : (animate = context.animate);\n }\n var initialAnimationIsBlocked = blockInitialAnimation || initial === false;\n var variantToSet = initialAnimationIsBlocked ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n var list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n list.forEach(function (definition) {\n var resolved = resolveVariantFromProps(props, definition);\n if (!resolved)\n return;\n var transitionEnd = resolved.transitionEnd; resolved.transition; var target = __rest(resolved, [\"transitionEnd\", \"transition\"]);\n for (var key in target) {\n var valueTarget = target[key];\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n var index = initialAnimationIsBlocked\n ? valueTarget.length - 1\n : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (var key in transitionEnd)\n values[key] = transitionEnd[key];\n });\n }\n return values;\n}\n\nexport { makeUseVisualState };\n","import { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\n\nvar svgMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n onMount: function (props, instance, _a) {\n var renderState = _a.renderState, latestValues = _a.latestValues;\n try {\n renderState.dimensions =\n typeof instance.getBBox ===\n \"function\"\n ? instance.getBBox()\n : instance.getBoundingClientRect();\n }\n catch (e) {\n // Most likely trying to measure an unrendered element under Firefox\n renderState.dimensions = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n buildSVGAttrs(renderState, latestValues, { enableHardwareAcceleration: false }, props.transformTemplate);\n renderSVG(instance, renderState);\n },\n }),\n};\n\nexport { svgMotionConfig };\n","var AnimationType;\n(function (AnimationType) {\n AnimationType[\"Animate\"] = \"animate\";\n AnimationType[\"Hover\"] = \"whileHover\";\n AnimationType[\"Tap\"] = \"whileTap\";\n AnimationType[\"Drag\"] = \"whileDrag\";\n AnimationType[\"Focus\"] = \"whileFocus\";\n AnimationType[\"InView\"] = \"whileInView\";\n AnimationType[\"Exit\"] = \"exit\";\n})(AnimationType || (AnimationType = {}));\n\nexport { AnimationType };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nvar htmlMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n }),\n};\n\nexport { htmlMotionConfig };\n","import { useEffect } from 'react';\n\nfunction addDomEvent(target, eventName, handler, options) {\n if (options === void 0) { options = { passive: true }; }\n target.addEventListener(eventName, handler, options);\n return function () { return target.removeEventListener(eventName, handler); };\n}\n/**\n * Attaches an event listener directly to the provided DOM element.\n *\n * Bypassing React's event system can be desirable, for instance when attaching non-passive\n * event handlers.\n *\n * ```jsx\n * const ref = useRef(null)\n *\n * useDomEvent(ref, 'wheel', onWheel, { passive: false })\n *\n * return <div ref={ref} />\n * ```\n *\n * @param ref - React.RefObject that's been provided to the element you want to bind the listener to.\n * @param eventName - Name of the event you want listen for.\n * @param handler - Function to fire when receiving the event.\n * @param options - Options to pass to `Event.addEventListener`.\n *\n * @public\n */\nfunction useDomEvent(ref, eventName, handler, options) {\n useEffect(function () {\n var element = ref.current;\n if (handler && element) {\n return addDomEvent(element, eventName, handler, options);\n }\n }, [ref, eventName, handler, options]);\n}\n\nexport { addDomEvent, useDomEvent };\n","function isMouseEvent(event) {\n // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check.\n if (typeof PointerEvent !== \"undefined\" && event instanceof PointerEvent) {\n return !!(event.pointerType === \"mouse\");\n }\n return event instanceof MouseEvent;\n}\nfunction isTouchEvent(event) {\n var hasTouches = !!event.touches;\n return hasTouches;\n}\n\nexport { isMouseEvent, isTouchEvent };\n","import { isTouchEvent } from '../gestures/utils/event-type.mjs';\n\n/**\n * Filters out events not attached to the primary pointer (currently left mouse button)\n * @param eventHandler\n */\nfunction filterPrimaryPointer(eventHandler) {\n return function (event) {\n var isMouseEvent = event instanceof MouseEvent;\n var isPrimaryPointer = !isMouseEvent ||\n (isMouseEvent && event.button === 0);\n if (isPrimaryPointer) {\n eventHandler(event);\n }\n };\n}\nvar defaultPagePoint = { pageX: 0, pageY: 0 };\nfunction pointFromTouch(e, pointType) {\n if (pointType === void 0) { pointType = \"page\"; }\n var primaryTouch = e.touches[0] || e.changedTouches[0];\n var point = primaryTouch || defaultPagePoint;\n return {\n x: point[pointType + \"X\"],\n y: point[pointType + \"Y\"],\n };\n}\nfunction pointFromMouse(point, pointType) {\n if (pointType === void 0) { pointType = \"page\"; }\n return {\n x: point[pointType + \"X\"],\n y: point[pointType + \"Y\"],\n };\n}\nfunction extractEventInfo(event, pointType) {\n if (pointType === void 0) { pointType = \"page\"; }\n return {\n point: isTouchEvent(event)\n ? pointFromTouch(event, pointType)\n : pointFromMouse(event, pointType),\n };\n}\nvar wrapHandler = function (handler, shouldFilterPrimaryPointer) {\n if (shouldFilterPrimaryPointer === void 0) { shouldFilterPrimaryPointer = false; }\n var listener = function (event) {\n return handler(event, extractEventInfo(event));\n };\n return shouldFilterPrimaryPointer\n ? filterPrimaryPointer(listener)\n : listener;\n};\n\nexport { extractEventInfo, wrapHandler };\n","import { addDomEvent, useDomEvent } from './use-dom-event.mjs';\nimport { wrapHandler } from './event-info.mjs';\nimport { supportsPointerEvents, supportsTouchEvents, supportsMouseEvents } from './utils.mjs';\n\nvar mouseEventNames = {\n pointerdown: \"mousedown\",\n pointermove: \"mousemove\",\n pointerup: \"mouseup\",\n pointercancel: \"mousecancel\",\n pointerover: \"mouseover\",\n pointerout: \"mouseout\",\n pointerenter: \"mouseenter\",\n pointerleave: \"mouseleave\",\n};\nvar touchEventNames = {\n pointerdown: \"touchstart\",\n pointermove: \"touchmove\",\n pointerup: \"touchend\",\n pointercancel: \"touchcancel\",\n};\nfunction getPointerEventName(name) {\n if (supportsPointerEvents()) {\n return name;\n }\n else if (supportsTouchEvents()) {\n return touchEventNames[name];\n }\n else if (supportsMouseEvents()) {\n return mouseEventNames[name];\n }\n return name;\n}\nfunction addPointerEvent(target, eventName, handler, options) {\n return addDomEvent(target, getPointerEventName(eventName), wrapHandler(handler, eventName === \"pointerdown\"), options);\n}\nfunction usePointerEvent(ref, eventName, handler, options) {\n return useDomEvent(ref, getPointerEventName(eventName), handler && wrapHandler(handler, eventName === \"pointerdown\"), options);\n}\n\nexport { addPointerEvent, usePointerEvent };\n","import { isBrowser } from '../utils/is-browser.mjs';\n\n// We check for event support via functions in case they've been mocked by a testing suite.\nvar supportsPointerEvents = function () {\n return isBrowser && window.onpointerdown === null;\n};\nvar supportsTouchEvents = function () {\n return isBrowser && window.ontouchstart === null;\n};\nvar supportsMouseEvents = function () {\n return isBrowser && window.onmousedown === null;\n};\n\nexport { supportsMouseEvents, supportsPointerEvents, supportsTouchEvents };\n","function createLock(name) {\n var lock = null;\n return function () {\n var openLock = function () {\n lock = null;\n };\n if (lock === null) {\n lock = name;\n return openLock;\n }\n return false;\n };\n}\nvar globalHorizontalLock = createLock(\"dragHorizontal\");\nvar globalVerticalLock = createLock(\"dragVertical\");\nfunction getGlobalLock(drag) {\n var lock = false;\n if (drag === \"y\") {\n lock = globalVerticalLock();\n }\n else if (drag === \"x\") {\n lock = globalHorizontalLock();\n }\n else {\n var openHorizontal_1 = globalHorizontalLock();\n var openVertical_1 = globalVerticalLock();\n if (openHorizontal_1 && openVertical_1) {\n lock = function () {\n openHorizontal_1();\n openVertical_1();\n };\n }\n else {\n // Release the locks because we don't use them\n if (openHorizontal_1)\n openHorizontal_1();\n if (openVertical_1)\n openVertical_1();\n }\n }\n return lock;\n}\nfunction isDragActive() {\n // Check the gesture lock - if we get it, it means no drag gesture is active\n // and we can safely fire the tap gesture.\n var openGestureLock = getGlobalLock(true);\n if (!openGestureLock)\n return true;\n openGestureLock();\n return false;\n}\n\nexport { createLock, getGlobalLock, isDragActive };\n","import { isMouseEvent } from './utils/event-type.mjs';\nimport { AnimationType } from '../render/utils/types.mjs';\nimport { usePointerEvent } from '../events/use-pointer-event.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\n\nfunction createHoverEvent(visualElement, isActive, callback) {\n return function (event, info) {\n var _a;\n if (!isMouseEvent(event) || isDragActive())\n return;\n /**\n * Ensure we trigger animations before firing event callback\n */\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Hover, isActive);\n callback === null || callback === void 0 ? void 0 : callback(event, info);\n };\n}\nfunction useHoverGesture(_a) {\n var onHoverStart = _a.onHoverStart, onHoverEnd = _a.onHoverEnd, whileHover = _a.whileHover, visualElement = _a.visualElement;\n usePointerEvent(visualElement, \"pointerenter\", onHoverStart || whileHover\n ? createHoverEvent(visualElement, true, onHoverStart)\n : undefined, { passive: !onHoverStart });\n usePointerEvent(visualElement, \"pointerleave\", onHoverEnd || whileHover\n ? createHoverEvent(visualElement, false, onHoverEnd)\n : undefined, { passive: !onHoverEnd });\n}\n\nexport { useHoverGesture };\n","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nvar isNodeOrChild = function (parent, child) {\n if (!child) {\n return false;\n }\n else if (parent === child) {\n return true;\n }\n else {\n return isNodeOrChild(parent, child.parentElement);\n }\n};\n\nexport { isNodeOrChild };\n","import { useEffect } from 'react';\n\nfunction useUnmountEffect(callback) {\n return useEffect(function () { return function () { return callback(); }; }, []);\n}\n\nexport { useUnmountEffect };\n","var warned = new Set();\nfunction warnOnce(condition, message, element) {\n if (condition || warned.has(message))\n return;\n console.warn(message);\n if (element)\n console.warn(element);\n warned.add(message);\n}\n\nexport { warnOnce };\n","import { __rest, __assign } from 'tslib';\n\n/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nvar observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nvar observers = new WeakMap();\nvar fireObserverCallback = function (entry) {\n var _a;\n (_a = observerCallbacks.get(entry.target)) === null || _a === void 0 ? void 0 : _a(entry);\n};\nvar fireAllObserverCallbacks = function (entries) {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver(_a) {\n var root = _a.root, options = __rest(_a, [\"root\"]);\n var lookupRoot = root || document;\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n var rootObservers = observers.get(lookupRoot);\n var key = JSON.stringify(options);\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, __assign({ root: root }, options));\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n var rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return function () {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\nexport { observeIntersection };\n","import { env } from '../../../utils/process.mjs';\nimport { useRef, useEffect } from 'react';\nimport { AnimationType } from '../../../render/utils/types.mjs';\nimport { warnOnce } from '../../../utils/warn-once.mjs';\nimport { observeIntersection } from './observers.mjs';\n\nfunction useViewport(_a) {\n var visualElement = _a.visualElement, whileInView = _a.whileInView, onViewportEnter = _a.onViewportEnter, onViewportLeave = _a.onViewportLeave, _b = _a.viewport, viewport = _b === void 0 ? {} : _b;\n var state = useRef({\n hasEnteredView: false,\n isInView: false,\n });\n var shouldObserve = Boolean(whileInView || onViewportEnter || onViewportLeave);\n if (viewport.once && state.current.hasEnteredView)\n shouldObserve = false;\n var useObserver = typeof IntersectionObserver === \"undefined\"\n ? useMissingIntersectionObserver\n : useIntersectionObserver;\n useObserver(shouldObserve, state.current, visualElement, viewport);\n}\nvar thresholdNames = {\n some: 0,\n all: 1,\n};\nfunction useIntersectionObserver(shouldObserve, state, visualElement, _a) {\n var root = _a.root, rootMargin = _a.margin, _b = _a.amount, amount = _b === void 0 ? \"some\" : _b, once = _a.once;\n useEffect(function () {\n if (!shouldObserve)\n return;\n var options = {\n root: root === null || root === void 0 ? void 0 : root.current,\n rootMargin: rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n var intersectionCallback = function (entry) {\n var _a;\n var isIntersecting = entry.isIntersecting;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (state.isInView === isIntersecting)\n return;\n state.isInView = isIntersecting;\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && state.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n state.hasEnteredView = true;\n }\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.InView, isIntersecting);\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n var props = visualElement.getProps();\n var callback = isIntersecting\n ? props.onViewportEnter\n : props.onViewportLeave;\n callback === null || callback === void 0 ? void 0 : callback(entry);\n };\n return observeIntersection(visualElement.getInstance(), options, intersectionCallback);\n }, [shouldObserve, root, rootMargin, amount]);\n}\n/**\n * If IntersectionObserver is missing, we activate inView and fire onViewportEnter\n * on mount. This way, the page will be in the state the author expects users\n * to see it in for everyone.\n */\nfunction useMissingIntersectionObserver(shouldObserve, state, visualElement, _a) {\n var _b = _a.fallback, fallback = _b === void 0 ? true : _b;\n useEffect(function () {\n if (!shouldObserve || !fallback)\n return;\n if (env !== \"production\") {\n warnOnce(false, \"IntersectionObserver not available on this device. whileInView animations will trigger on mount.\");\n }\n /**\n * Fire this in an rAF because, at this point, the animation state\n * won't have flushed for the first time and there's certain logic in\n * there that behaves differently on the initial animation.\n *\n * This hook should be quite rarely called so setting this in an rAF\n * is preferred to changing the behaviour of the animation state.\n */\n requestAnimationFrame(function () {\n var _a;\n state.hasEnteredView = true;\n var onViewportEnter = visualElement.getProps().onViewportEnter;\n onViewportEnter === null || onViewportEnter === void 0 ? void 0 : onViewportEnter(null);\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.InView, true);\n });\n }, [shouldObserve]);\n}\n\nexport { useViewport };\n","var makeRenderlessComponent = function (hook) { return function (props) {\n hook(props);\n return null;\n}; };\n\nexport { makeRenderlessComponent };\n","import { useFocusGesture } from '../../gestures/use-focus-gesture.mjs';\nimport { useHoverGesture } from '../../gestures/use-hover-gesture.mjs';\nimport { useTapGesture } from '../../gestures/use-tap-gesture.mjs';\nimport { useViewport } from './viewport/use-viewport.mjs';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.mjs';\n\nvar gestureAnimations = {\n inView: makeRenderlessComponent(useViewport),\n tap: makeRenderlessComponent(useTapGesture),\n focus: makeRenderlessComponent(useFocusGesture),\n hover: makeRenderlessComponent(useHoverGesture),\n};\n\nexport { gestureAnimations };\n","import { useRef } from 'react';\nimport { isNodeOrChild } from './utils/is-node-or-child.mjs';\nimport { usePointerEvent, addPointerEvent } from '../events/use-pointer-event.mjs';\nimport { useUnmountEffect } from '../utils/use-unmount-effect.mjs';\nimport { pipe } from 'popmotion';\nimport { AnimationType } from '../render/utils/types.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\n\n/**\n * @param handlers -\n * @internal\n */\nfunction useTapGesture(_a) {\n var onTap = _a.onTap, onTapStart = _a.onTapStart, onTapCancel = _a.onTapCancel, whileTap = _a.whileTap, visualElement = _a.visualElement;\n var hasPressListeners = onTap || onTapStart || onTapCancel || whileTap;\n var isPressing = useRef(false);\n var cancelPointerEndListeners = useRef(null);\n /**\n * Only set listener to passive if there are no external listeners.\n */\n var eventOptions = {\n passive: !(onTapStart || onTap || onTapCancel || onPointerDown),\n };\n function removePointerEndListener() {\n var _a;\n (_a = cancelPointerEndListeners.current) === null || _a === void 0 ? void 0 : _a.call(cancelPointerEndListeners);\n cancelPointerEndListeners.current = null;\n }\n function checkPointerEnd() {\n var _a;\n removePointerEndListener();\n isPressing.current = false;\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, false);\n return !isDragActive();\n }\n function onPointerUp(event, info) {\n if (!checkPointerEnd())\n return;\n /**\n * We only count this as a tap gesture if the event.target is the same\n * as, or a child of, this component's element\n */\n !isNodeOrChild(visualElement.getInstance(), event.target)\n ? onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info)\n : onTap === null || onTap === void 0 ? void 0 : onTap(event, info);\n }\n function onPointerCancel(event, info) {\n if (!checkPointerEnd())\n return;\n onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info);\n }\n function onPointerDown(event, info) {\n var _a;\n removePointerEndListener();\n if (isPressing.current)\n return;\n isPressing.current = true;\n cancelPointerEndListeners.current = pipe(addPointerEvent(window, \"pointerup\", onPointerUp, eventOptions), addPointerEvent(window, \"pointercancel\", onPointerCancel, eventOptions));\n /**\n * Ensure we trigger animations before firing event callback\n */\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, true);\n onTapStart === null || onTapStart === void 0 ? void 0 : onTapStart(event, info);\n }\n usePointerEvent(visualElement, \"pointerdown\", hasPressListeners ? onPointerDown : undefined, eventOptions);\n useUnmountEffect(removePointerEndListener);\n}\n\nexport { useTapGesture };\n","import { AnimationType } from '../render/utils/types.mjs';\nimport { useDomEvent } from '../events/use-dom-event.mjs';\n\n/**\n *\n * @param props\n * @param ref\n * @internal\n */\nfunction useFocusGesture(_a) {\n var whileFocus = _a.whileFocus, visualElement = _a.visualElement;\n var onFocus = function () {\n var _a;\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, true);\n };\n var onBlur = function () {\n var _a;\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, false);\n };\n useDomEvent(visualElement, \"focus\", whileFocus ? onFocus : undefined);\n useDomEvent(visualElement, \"blur\", whileFocus ? onBlur : undefined);\n}\n\nexport { useFocusGesture };\n","import { useConstant } from './use-constant.mjs';\n\nvar counter = 0;\nvar incrementId = function () { return counter++; };\nvar useId = function () { return useConstant(incrementId); };\n/**\n * Ideally we'd use the following code to support React 18 optionally.\n * But this fairly fails in Webpack (otherwise treeshaking wouldn't work at all).\n * Need to come up with a different way of figuring this out.\n */\n// export const useId = (React as any).useId\n// ? (React as any).useId\n// : () => useConstant(incrementId)\n\nexport { useId };\n","import { useContext, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useId } from '../../utils/use-id.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed the tree, but\n * `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence() {\n var context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n var isPresent = context.isPresent, onExitComplete = context.onExitComplete, register = context.register;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n // Replace with useId when released in React\n var id = useId();\n useEffect(function () { return register(id); }, []);\n var safeToRemove = function () { return onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete(id); };\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n","function shallowCompare(next, prev) {\n if (!Array.isArray(prev))\n return false;\n var prevLength = prev.length;\n if (prevLength !== next.length)\n return false;\n for (var i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i])\n return false;\n }\n return true;\n}\n\nexport { shallowCompare };\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nvar isNumericalString = function (v) { return /^\\-?\\d*\\.?\\d+$/.test(v); };\n\nexport { isNumericalString };\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nvar isZeroValueString = function (v) { return /^0[^.\\s]+$/.test(v); };\n\nexport { isZeroValueString };\n","/**\n * Tests a provided value against a ValueType\n */\nvar testValueType = function (v) { return function (type) { return type.test(v); }; };\n\nexport { testValueType };\n","import { number, px, percent, degrees, vw, vh } from 'style-value-types';\nimport { testValueType } from './test.mjs';\nimport { auto } from './type-auto.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nvar dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nvar findDimensionValueType = function (v) {\n return dimensionValueTypes.find(testValueType(v));\n};\n\nexport { dimensionValueTypes, findDimensionValueType };\n","/**\n * ValueType for \"auto\"\n */\nvar auto = {\n test: function (v) { return v === \"auto\"; },\n parse: function (v) { return v; },\n};\n\nexport { auto };\n","import { __spreadArray, __read } from 'tslib';\nimport { color, complex } from 'style-value-types';\nimport { dimensionValueTypes } from './dimensions.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nvar valueTypes = __spreadArray(__spreadArray([], __read(dimensionValueTypes), false), [color, complex], false);\n/**\n * Tests a value against the list of ValueTypes\n */\nvar findValueType = function (v) { return valueTypes.find(testValueType(v)); };\n\nexport { findValueType };\n","import { __rest, __assign, __spreadArray, __read } from 'tslib';\nimport { complex } from 'style-value-types';\nimport { isNumericalString } from '../../utils/is-numerical-string.mjs';\nimport { isZeroValueString } from '../../utils/is-zero-value-string.mjs';\nimport { resolveFinalValueInKeyframes } from '../../utils/resolve-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { getAnimatableNone } from '../dom/value-types/animatable-none.mjs';\nimport { findValueType } from '../dom/value-types/find.mjs';\nimport { resolveVariant } from './variants.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}\nfunction setTarget(visualElement, definition) {\n var resolved = resolveVariant(visualElement, definition);\n var _a = resolved ? visualElement.makeTargetAnimatable(resolved, false) : {}, _b = _a.transitionEnd, transitionEnd = _b === void 0 ? {} : _b; _a.transition; var target = __rest(_a, [\"transitionEnd\", \"transition\"]);\n target = __assign(__assign({}, target), transitionEnd);\n for (var key in target) {\n var value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\nfunction setVariants(visualElement, variantLabels) {\n var reversedLabels = __spreadArray([], __read(variantLabels), false).reverse();\n reversedLabels.forEach(function (key) {\n var _a;\n var variant = visualElement.getVariant(key);\n variant && setTarget(visualElement, variant);\n (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n setVariants(child, variantLabels);\n });\n });\n}\nfunction setValues(visualElement, definition) {\n if (Array.isArray(definition)) {\n return setVariants(visualElement, definition);\n }\n else if (typeof definition === \"string\") {\n return setVariants(visualElement, [definition]);\n }\n else {\n setTarget(visualElement, definition);\n }\n}\nfunction checkTargetForNewValues(visualElement, target, origin) {\n var _a, _b, _c;\n var _d;\n var newValueKeys = Object.keys(target).filter(function (key) { return !visualElement.hasValue(key); });\n var numNewValues = newValueKeys.length;\n if (!numNewValues)\n return;\n for (var i = 0; i < numNewValues; i++) {\n var key = newValueKeys[i];\n var targetValue = target[key];\n var value = null;\n /**\n * If the target is a series of keyframes, we can use the first value\n * in the array. If this first value is null, we'll still need to read from the DOM.\n */\n if (Array.isArray(targetValue)) {\n value = targetValue[0];\n }\n /**\n * If the target isn't keyframes, or the first keyframe was null, we need to\n * first check if an origin value was explicitly defined in the transition as \"from\",\n * if not read the value from the DOM. As an absolute fallback, take the defined target value.\n */\n if (value === null) {\n value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key];\n }\n /**\n * If value is still undefined or null, ignore it. Preferably this would throw,\n * but this was causing issues in Framer.\n */\n if (value === undefined || value === null)\n continue;\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(targetValue)) {\n value = getAnimatableNone(key, targetValue);\n }\n visualElement.addValue(key, motionValue(value));\n (_c = (_d = origin)[key]) !== null && _c !== void 0 ? _c : (_d[key] = value);\n visualElement.setBaseTarget(key, value);\n }\n}\nfunction getOriginFromTransition(key, transition) {\n if (!transition)\n return;\n var valueTransition = transition[key] || transition[\"default\"] || transition;\n return valueTransition.from;\n}\nfunction getOrigin(target, transition, visualElement) {\n var _a, _b;\n var origin = {};\n for (var key in target) {\n origin[key] =\n (_a = getOriginFromTransition(key, transition)) !== null && _a !== void 0 ? _a : (_b = visualElement.getValue(key)) === null || _b === void 0 ? void 0 : _b.get();\n }\n return origin;\n}\n\nexport { checkTargetForNewValues, getOrigin, getOriginFromTransition, setTarget, setValues };\n","import { __read, __rest, __assign } from 'tslib';\nimport { startAnimation } from '../../animation/utils/transitions.mjs';\nimport { setTarget } from './setters.mjs';\nimport { resolveVariant } from './variants.mjs';\nimport { isTransformProp } from '../html/utils/transform.mjs';\n\n/**\n * @internal\n */\nfunction animateVisualElement(visualElement, definition, options) {\n if (options === void 0) { options = {}; }\n visualElement.notifyAnimationStart(definition);\n var animation;\n if (Array.isArray(definition)) {\n var animations = definition.map(function (variant) {\n return animateVariant(visualElement, variant, options);\n });\n animation = Promise.all(animations);\n }\n else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n }\n else {\n var resolvedDefinition = typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition;\n animation = animateTarget(visualElement, resolvedDefinition, options);\n }\n return animation.then(function () {\n return visualElement.notifyAnimationComplete(definition);\n });\n}\nfunction animateVariant(visualElement, variant, options) {\n var _a;\n if (options === void 0) { options = {}; }\n var resolved = resolveVariant(visualElement, variant, options.custom);\n var _b = (resolved || {}).transition, transition = _b === void 0 ? visualElement.getDefaultTransition() || {} : _b;\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n var getAnimation = resolved\n ? function () { return animateTarget(visualElement, resolved, options); }\n : function () { return Promise.resolve(); };\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n var getChildAnimations = ((_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.size)\n ? function (forwardDelay) {\n if (forwardDelay === void 0) { forwardDelay = 0; }\n var _a = transition.delayChildren, delayChildren = _a === void 0 ? 0 : _a, staggerChildren = transition.staggerChildren, staggerDirection = transition.staggerDirection;\n return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);\n }\n : function () { return Promise.resolve(); };\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n var when = transition.when;\n if (when) {\n var _c = __read(when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation], 2), first = _c[0], last = _c[1];\n return first().then(last);\n }\n else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\n/**\n * @internal\n */\nfunction animateTarget(visualElement, definition, _a) {\n var _b;\n var _c = _a === void 0 ? {} : _a, _d = _c.delay, delay = _d === void 0 ? 0 : _d, transitionOverride = _c.transitionOverride, type = _c.type;\n var _e = visualElement.makeTargetAnimatable(definition), _f = _e.transition, transition = _f === void 0 ? visualElement.getDefaultTransition() : _f, transitionEnd = _e.transitionEnd, target = __rest(_e, [\"transition\", \"transitionEnd\"]);\n if (transitionOverride)\n transition = transitionOverride;\n var animations = [];\n var animationTypeState = type && ((_b = visualElement.animationState) === null || _b === void 0 ? void 0 : _b.getState()[type]);\n for (var key in target) {\n var value = visualElement.getValue(key);\n var valueTarget = target[key];\n if (!value ||\n valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n var valueTransition = __assign({ delay: delay }, transition);\n /**\n * Make animation instant if this is a transform prop and we should reduce motion.\n */\n if (visualElement.shouldReduceMotion && isTransformProp(key)) {\n valueTransition = __assign(__assign({}, valueTransition), { type: false, delay: 0 });\n }\n var animation = startAnimation(key, value, valueTarget, valueTransition);\n animations.push(animation);\n }\n return Promise.all(animations).then(function () {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n}\nfunction animateChildren(visualElement, variant, delayChildren, staggerChildren, staggerDirection, options) {\n if (delayChildren === void 0) { delayChildren = 0; }\n if (staggerChildren === void 0) { staggerChildren = 0; }\n if (staggerDirection === void 0) { staggerDirection = 1; }\n var animations = [];\n var maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;\n var generateStaggerDuration = staggerDirection === 1\n ? function (i) {\n if (i === void 0) { i = 0; }\n return i * staggerChildren;\n }\n : function (i) {\n if (i === void 0) { i = 0; }\n return maxStaggerDuration - i * staggerChildren;\n };\n Array.from(visualElement.variantChildren)\n .sort(sortByTreeOrder)\n .forEach(function (child, i) {\n animations.push(animateVariant(child, variant, __assign(__assign({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function () { return child.notifyAnimationComplete(variant); }));\n });\n return Promise.all(animations);\n}\nfunction stopAnimation(visualElement) {\n visualElement.forEachValue(function (value) { return value.stop(); });\n}\nfunction sortByTreeOrder(a, b) {\n return a.sortNodePosition(b);\n}\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation(_a, key) {\n var protectedKeys = _a.protectedKeys, needsAnimating = _a.needsAnimating;\n var shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\n\nexport { animateVisualElement, sortByTreeOrder, stopAnimation };\n","import { __spreadArray, __read, __assign, __rest } from 'tslib';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { shallowCompare } from '../../utils/shallow-compare.mjs';\nimport { animateVisualElement } from './animation.mjs';\nimport { AnimationType } from './types.mjs';\nimport { isVariantLabels, resolveVariant, isVariantLabel } from './variants.mjs';\n\nvar variantPriorityOrder = [\n AnimationType.Animate,\n AnimationType.InView,\n AnimationType.Focus,\n AnimationType.Hover,\n AnimationType.Tap,\n AnimationType.Drag,\n AnimationType.Exit,\n];\nvar reversePriorityOrder = __spreadArray([], __read(variantPriorityOrder), false).reverse();\nvar numAnimationTypes = variantPriorityOrder.length;\nfunction animateList(visualElement) {\n return function (animations) {\n return Promise.all(animations.map(function (_a) {\n var animation = _a.animation, options = _a.options;\n return animateVisualElement(visualElement, animation, options);\n }));\n };\n}\nfunction createAnimationState(visualElement) {\n var animate = animateList(visualElement);\n var state = createState();\n var allAnimatedKeys = {};\n var isInitialRender = true;\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n var buildResolvedTypeValues = function (acc, definition) {\n var resolved = resolveVariant(visualElement, definition);\n if (resolved) {\n resolved.transition; var transitionEnd = resolved.transitionEnd, target = __rest(resolved, [\"transition\", \"transitionEnd\"]);\n acc = __assign(__assign(__assign({}, acc), target), transitionEnd);\n }\n return acc;\n };\n function isAnimated(key) {\n return allAnimatedKeys[key] !== undefined;\n }\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(makeAnimator) {\n animate = makeAnimator(visualElement);\n }\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(options, changedActiveType) {\n var _a;\n var props = visualElement.getProps();\n var context = visualElement.getVariantContext(true) || {};\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n var animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n var removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n var encounteredKeys = {};\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n var removedVariantIndex = Infinity;\n var _loop_1 = function (i) {\n var type = reversePriorityOrder[i];\n var typeState = state[type];\n var prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type];\n var propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n var activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n var isInherited = prop === context[type] && prop !== props[type] && propIsVariant;\n /**\n *\n */\n if (isInherited &&\n isInitialRender &&\n visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = __assign({}, encounteredKeys);\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n return \"continue\";\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n var variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n var shouldAnimateType = variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant);\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n var definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n var resolvedValues = definitionList.reduce(buildResolvedTypeValues, {});\n if (activeDelta === false)\n resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n var _b = typeState.prevResolvedValues, prevResolvedValues = _b === void 0 ? {} : _b;\n var allKeys = __assign(__assign({}, prevResolvedValues), resolvedValues);\n var markToAnimate = function (key) {\n shouldAnimateType = true;\n removedKeys.delete(key);\n typeState.needsAnimating[key] = true;\n };\n for (var key in allKeys) {\n var next = resolvedValues[key];\n var prev = prevResolvedValues[key];\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n /**\n * If the value has changed, we probably want to animate it.\n */\n if (next !== prev) {\n /**\n * If both values are keyframes, we need to shallow compare them to\n * detect whether any value has changed. If it has, we animate it.\n */\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n if (!shallowCompare(next, prev) || variantDidChange) {\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we want to ensure it doesn't animate by\n * adding it to the list of protected keys.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n else if (next !== undefined) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key);\n }\n else {\n // If it's undefined, it's been removed.\n removedKeys.add(key);\n }\n }\n else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n /**\n *\n */\n if (typeState.isActive) {\n encounteredKeys = __assign(__assign({}, encounteredKeys), resolvedValues);\n }\n if (isInitialRender && visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n /**\n * If this is an inherited prop we want to hard-block animations\n * TODO: Test as this should probably still handle animations triggered\n * by removed values?\n */\n if (shouldAnimateType && !isInherited) {\n animations.push.apply(animations, __spreadArray([], __read(definitionList.map(function (animation) { return ({\n animation: animation,\n options: __assign({ type: type }, options),\n }); })), false));\n }\n };\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (var i = 0; i < numAnimationTypes; i++) {\n _loop_1(i);\n }\n allAnimatedKeys = __assign({}, encounteredKeys);\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n var fallbackAnimation_1 = {};\n removedKeys.forEach(function (key) {\n var fallbackTarget = visualElement.getBaseTarget(key);\n if (fallbackTarget !== undefined) {\n fallbackAnimation_1[key] = fallbackTarget;\n }\n });\n animations.push({ animation: fallbackAnimation_1 });\n }\n var shouldAnimate = Boolean(animations.length);\n if (isInitialRender &&\n props.initial === false &&\n !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n return shouldAnimate ? animate(animations) : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type, isActive, options) {\n var _a;\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive)\n return Promise.resolve();\n // Propagate active change to children\n (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { var _a; return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); });\n state[type].isActive = isActive;\n var animations = animateChanges(options, type);\n for (var key in state) {\n state[key].protectedKeys = {};\n }\n return animations;\n }\n return {\n isAnimated: isAnimated,\n animateChanges: animateChanges,\n setActive: setActive,\n setAnimateFunction: setAnimateFunction,\n getState: function () { return state; },\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n }\n else if (isVariantLabels(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive) {\n if (isActive === void 0) { isActive = false; }\n return {\n isActive: isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n}\nfunction createState() {\n var _a;\n return _a = {},\n _a[AnimationType.Animate] = createTypeState(true),\n _a[AnimationType.InView] = createTypeState(),\n _a[AnimationType.Hover] = createTypeState(),\n _a[AnimationType.Tap] = createTypeState(),\n _a[AnimationType.Drag] = createTypeState(),\n _a[AnimationType.Focus] = createTypeState(),\n _a[AnimationType.Exit] = createTypeState(),\n _a;\n}\n\nexport { checkVariantsDidChange, createAnimationState, variantPriorityOrder };\n","import { __read } from 'tslib';\nimport { useEffect, useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { usePresence } from '../../components/AnimatePresence/use-presence.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { createAnimationState } from '../../render/utils/animation-state.mjs';\nimport { AnimationType } from '../../render/utils/types.mjs';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.mjs';\n\nvar animations = {\n animation: makeRenderlessComponent(function (_a) {\n var visualElement = _a.visualElement, animate = _a.animate;\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n visualElement.animationState || (visualElement.animationState = createAnimationState(visualElement));\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n if (isAnimationControls(animate)) {\n useEffect(function () { return animate.subscribe(visualElement); }, [animate]);\n }\n }),\n exit: makeRenderlessComponent(function (props) {\n var custom = props.custom, visualElement = props.visualElement;\n var _a = __read(usePresence(), 2), isPresent = _a[0], safeToRemove = _a[1];\n var presenceContext = useContext(PresenceContext);\n useEffect(function () {\n var _a, _b;\n visualElement.isPresent = isPresent;\n var animation = (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Exit, !isPresent, { custom: (_b = presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.custom) !== null && _b !== void 0 ? _b : custom });\n !isPresent && (animation === null || animation === void 0 ? void 0 : animation.then(safeToRemove));\n }, [isPresent]);\n }),\n};\n\nexport { animations };\n","import { __assign } from 'tslib';\nimport { isMouseEvent, isTouchEvent } from './utils/event-type.mjs';\nimport { extractEventInfo } from '../events/event-info.mjs';\nimport sync, { getFrameData, cancelSync } from 'framesync';\nimport { secondsToMilliseconds } from '../utils/time-conversion.mjs';\nimport { addPointerEvent } from '../events/use-pointer-event.mjs';\nimport { distance, pipe } from 'popmotion';\n\n/**\n * @internal\n */\nvar PanSession = /** @class */ (function () {\n function PanSession(event, handlers, _a) {\n var _this = this;\n var _b = _a === void 0 ? {} : _a, transformPagePoint = _b.transformPagePoint;\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n this.updatePoint = function () {\n if (!(_this.lastMoveEvent && _this.lastMoveEventInfo))\n return;\n var info = getPanInfo(_this.lastMoveEventInfo, _this.history);\n var isPanStarted = _this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursoe.\n var isDistancePastThreshold = distance(info.offset, { x: 0, y: 0 }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n var point = info.point;\n var timestamp = getFrameData().timestamp;\n _this.history.push(__assign(__assign({}, point), { timestamp: timestamp }));\n var _a = _this.handlers, onStart = _a.onStart, onMove = _a.onMove;\n if (!isPanStarted) {\n onStart && onStart(_this.lastMoveEvent, info);\n _this.startEvent = _this.lastMoveEvent;\n }\n onMove && onMove(_this.lastMoveEvent, info);\n };\n this.handlePointerMove = function (event, info) {\n _this.lastMoveEvent = event;\n _this.lastMoveEventInfo = transformPoint(info, _this.transformPagePoint);\n // Because Safari doesn't trigger mouseup events when it's above a `<select>`\n if (isMouseEvent(event) && event.buttons === 0) {\n _this.handlePointerUp(event, info);\n return;\n }\n // Throttle mouse move event to once per frame\n sync.update(_this.updatePoint, true);\n };\n this.handlePointerUp = function (event, info) {\n _this.end();\n var _a = _this.handlers, onEnd = _a.onEnd, onSessionEnd = _a.onSessionEnd;\n var panInfo = getPanInfo(transformPoint(info, _this.transformPagePoint), _this.history);\n if (_this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (isTouchEvent(event) && event.touches.length > 1)\n return;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n var info = extractEventInfo(event);\n var initialInfo = transformPoint(info, this.transformPagePoint);\n var point = initialInfo.point;\n var timestamp = getFrameData().timestamp;\n this.history = [__assign(__assign({}, point), { timestamp: timestamp })];\n var onSessionStart = handlers.onSessionStart;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(window, \"pointermove\", this.handlePointerMove), addPointerEvent(window, \"pointerup\", this.handlePointerUp), addPointerEvent(window, \"pointercancel\", this.handlePointerUp));\n }\n PanSession.prototype.updateHandlers = function (handlers) {\n this.handlers = handlers;\n };\n PanSession.prototype.end = function () {\n this.removeListeners && this.removeListeners();\n cancelSync.update(this.updatePoint);\n };\n return PanSession;\n}());\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo(_a, history) {\n var point = _a.point;\n return {\n point: point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n var i = history.length - 1;\n var timestampedPoint = null;\n var lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n var time = (lastPoint.timestamp - timestampedPoint.timestamp) / 1000;\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n var currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n","import { __read } from 'tslib';\nimport { clamp, mix, progress } from 'popmotion';\nimport { calcLength } from '../../../projection/geometry/delta-calc.mjs';\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nfunction applyConstraints(point, _a, elastic) {\n var min = _a.min, max = _a.max;\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic ? mix(min, point, elastic.min) : Math.max(point, min);\n }\n else if (max !== undefined && point > max) {\n // If we have a max point defined, and this is outside of that, constrain\n point = elastic ? mix(max, point, elastic.max) : Math.min(point, max);\n }\n return point;\n}\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nfunction calcRelativeAxisConstraints(axis, min, max) {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max: max !== undefined\n ? axis.max + max - (axis.max - axis.min)\n : undefined,\n };\n}\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nfunction calcRelativeConstraints(layoutBox, _a) {\n var top = _a.top, left = _a.left, bottom = _a.bottom, right = _a.right;\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nfunction calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n var _a;\n var min = constraintsAxis.min - layoutAxis.min;\n var max = constraintsAxis.max - layoutAxis.max;\n // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n if (constraintsAxis.max - constraintsAxis.min <\n layoutAxis.max - layoutAxis.min) {\n _a = __read([max, min], 2), min = _a[0], max = _a[1];\n }\n return { min: min, max: max };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nfunction calcViewportConstraints(layoutBox, constraintsBox) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n };\n}\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nfunction calcOrigin(source, target) {\n var origin = 0.5;\n var sourceLength = calcLength(source);\n var targetLength = calcLength(target);\n if (targetLength > sourceLength) {\n origin = progress(target.min, target.max - sourceLength, source.min);\n }\n else if (sourceLength > targetLength) {\n origin = progress(source.min, source.max - targetLength, target.min);\n }\n return clamp(0, 1, origin);\n}\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nfunction rebaseAxisConstraints(layout, constraints) {\n var relativeConstraints = {};\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min;\n }\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min;\n }\n return relativeConstraints;\n}\nvar defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nfunction resolveDragElastic(dragElastic) {\n if (dragElastic === void 0) { dragElastic = defaultElastic; }\n if (dragElastic === false) {\n dragElastic = 0;\n }\n else if (dragElastic === true) {\n dragElastic = defaultElastic;\n }\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n };\n}\nfunction resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel),\n };\n}\nfunction resolvePointElastic(dragElastic, label) {\n var _a;\n return typeof dragElastic === \"number\"\n ? dragElastic\n : (_a = dragElastic[label]) !== null && _a !== void 0 ? _a : 0;\n}\n\nexport { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };\n","/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox(_a) {\n var top = _a.top, left = _a.left, right = _a.right, bottom = _a.bottom;\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox(_a) {\n var x = _a.x, y = _a.y;\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n if (!transformPoint)\n return point;\n var topLeft = transformPoint({ x: point.left, y: point.top });\n var bottomRight = transformPoint({ x: point.right, y: point.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n","import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n var viewportBox = measureViewportBox(element, transformPagePoint);\n var scroll = rootProjectionNode.scroll;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.x);\n translateAxis(viewportBox.y, scroll.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n","import { __assign } from 'tslib';\nimport { invariant } from 'hey-listen';\nimport { PanSession } from '../PanSession.mjs';\nimport { getGlobalLock } from './utils/lock.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { addPointerEvent } from '../../events/use-pointer-event.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\nimport { AnimationType } from '../../render/utils/types.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { eachAxis } from '../../projection/utils/each-axis.mjs';\nimport { measurePageBox } from '../../projection/utils/measure.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { startAnimation } from '../../animation/utils/transitions.mjs';\nimport { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';\nimport { addDomEvent } from '../../events/use-dom-event.mjs';\nimport { mix } from 'popmotion';\nimport { percent } from 'style-value-types';\nimport { calcLength } from '../../projection/geometry/delta-calc.mjs';\n\nvar elementDragControls = new WeakMap();\n/**\n *\n */\n// let latestPointerEvent: AnyPointerEvent\nvar VisualElementDragControls = /** @class */ (function () {\n function VisualElementDragControls(visualElement) {\n // This is a reference to the global drag gesture lock, ensuring only one component\n // can \"capture\" the drag of one or both axes.\n // TODO: Look into moving this into pansession?\n this.openGlobalLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n this.visualElement = visualElement;\n }\n VisualElementDragControls.prototype.start = function (originEvent, _a) {\n var _this = this;\n var _b = _a === void 0 ? {} : _a, _c = _b.snapToCursor, snapToCursor = _c === void 0 ? false : _c;\n /**\n * Don't start dragging if this component is exiting\n */\n if (this.visualElement.isPresent === false)\n return;\n var onSessionStart = function (event) {\n // Stop any animations on both axis values immediately. This allows the user to throw and catch\n // the component.\n _this.stopAnimation();\n if (snapToCursor) {\n _this.snapToCursor(extractEventInfo(event, \"page\").point);\n }\n };\n var onStart = function (event, info) {\n var _a;\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n var _b = _this.getProps(), drag = _b.drag, dragPropagation = _b.dragPropagation, onDragStart = _b.onDragStart;\n if (drag && !dragPropagation) {\n if (_this.openGlobalLock)\n _this.openGlobalLock();\n _this.openGlobalLock = getGlobalLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!_this.openGlobalLock)\n return;\n }\n _this.isDragging = true;\n _this.currentDirection = null;\n _this.resolveConstraints();\n if (_this.visualElement.projection) {\n _this.visualElement.projection.isAnimationBlocked = true;\n _this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin\n */\n eachAxis(function (axis) {\n var _a, _b;\n var current = _this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n var measuredAxis = (_b = (_a = _this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.actual[axis];\n if (measuredAxis) {\n var length_1 = calcLength(measuredAxis);\n current = length_1 * (parseFloat(current) / 100);\n }\n }\n _this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart(event, info);\n (_a = _this.visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Drag, true);\n };\n var onMove = function (event, info) {\n // latestPointerEvent = event\n var _a = _this.getProps(), dragPropagation = _a.dragPropagation, dragDirectionLock = _a.dragDirectionLock, onDirectionLock = _a.onDirectionLock, onDrag = _a.onDrag;\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !_this.openGlobalLock)\n return;\n var offset = info.offset;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && _this.currentDirection === null) {\n _this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (_this.currentDirection !== null) {\n onDirectionLock === null || onDirectionLock === void 0 ? void 0 : onDirectionLock(_this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n _this.updateAxis(\"x\", info.point, offset);\n _this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n _this.visualElement.syncRender();\n /**\n * This must fire after the syncRender call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n onDrag === null || onDrag === void 0 ? void 0 : onDrag(event, info);\n };\n var onSessionEnd = function (event, info) {\n return _this.stop(event, info);\n };\n this.panSession = new PanSession(originEvent, {\n onSessionStart: onSessionStart,\n onStart: onStart,\n onMove: onMove,\n onSessionEnd: onSessionEnd,\n }, { transformPagePoint: this.visualElement.getTransformPagePoint() });\n };\n VisualElementDragControls.prototype.stop = function (event, info) {\n var isDragging = this.isDragging;\n this.cancel();\n if (!isDragging)\n return;\n var velocity = info.velocity;\n this.startAnimation(velocity);\n var onDragEnd = this.getProps().onDragEnd;\n onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd(event, info);\n };\n VisualElementDragControls.prototype.cancel = function () {\n var _a, _b;\n this.isDragging = false;\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = false;\n }\n (_a = this.panSession) === null || _a === void 0 ? void 0 : _a.end();\n this.panSession = undefined;\n var dragPropagation = this.getProps().dragPropagation;\n if (!dragPropagation && this.openGlobalLock) {\n this.openGlobalLock();\n this.openGlobalLock = null;\n }\n (_b = this.visualElement.animationState) === null || _b === void 0 ? void 0 : _b.setActive(AnimationType.Drag, false);\n };\n VisualElementDragControls.prototype.updateAxis = function (axis, _point, offset) {\n var drag = this.getProps().drag;\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n var axisValue = this.getAxisMotionValue(axis);\n var next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n };\n VisualElementDragControls.prototype.resolveConstraints = function () {\n var _this = this;\n var _a = this.getProps(), dragConstraints = _a.dragConstraints, dragElastic = _a.dragElastic;\n var layout = (this.visualElement.projection || {}).layout;\n var prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.actual, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative.\n */\n if (prevConstraints !== this.constraints &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis(function (axis) {\n if (_this.getAxisMotionValue(axis)) {\n _this.constraints[axis] = rebaseAxisConstraints(layout.actual[axis], _this.constraints[axis]);\n }\n });\n }\n };\n VisualElementDragControls.prototype.resolveRefConstraints = function () {\n var _a = this.getProps(), constraints = _a.dragConstraints, onMeasureDragConstraints = _a.onMeasureDragConstraints;\n if (!constraints || !isRefObject(constraints))\n return false;\n var constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n var projection = this.visualElement.projection;\n // TODO\n if (!projection || !projection.layout)\n return false;\n var constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n var measuredConstraints = calcViewportConstraints(projection.layout.actual, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n var userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n };\n VisualElementDragControls.prototype.startAnimation = function (velocity) {\n var _this = this;\n var _a = this.getProps(), drag = _a.drag, dragMomentum = _a.dragMomentum, dragElastic = _a.dragElastic, dragTransition = _a.dragTransition, dragSnapToOrigin = _a.dragSnapToOrigin, onDragTransitionEnd = _a.onDragTransitionEnd;\n var constraints = this.constraints || {};\n var momentumAnimations = eachAxis(function (axis) {\n var _a;\n if (!shouldDrag(axis, drag, _this.currentDirection)) {\n return;\n }\n var transition = (_a = constraints === null || constraints === void 0 ? void 0 : constraints[axis]) !== null && _a !== void 0 ? _a : {};\n if (dragSnapToOrigin)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n var bounceStiffness = dragElastic ? 200 : 1000000;\n var bounceDamping = dragElastic ? 40 : 10000000;\n var inertia = __assign(__assign({ type: \"inertia\", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness: bounceStiffness, bounceDamping: bounceDamping, timeConstant: 750, restDelta: 1, restSpeed: 10 }, dragTransition), transition);\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return _this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n };\n VisualElementDragControls.prototype.startAxisValueAnimation = function (axis, transition) {\n var axisValue = this.getAxisMotionValue(axis);\n return startAnimation(axis, axisValue, 0, transition);\n };\n VisualElementDragControls.prototype.stopAnimation = function () {\n var _this = this;\n eachAxis(function (axis) { return _this.getAxisMotionValue(axis).stop(); });\n };\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n VisualElementDragControls.prototype.getAxisMotionValue = function (axis) {\n var _a, _b;\n var dragKey = \"_drag\" + axis.toUpperCase();\n var externalMotionValue = this.visualElement.getProps()[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, (_b = (_a = this.visualElement.getProps().initial) === null || _a === void 0 ? void 0 : _a[axis]) !== null && _b !== void 0 ? _b : 0);\n };\n VisualElementDragControls.prototype.snapToCursor = function (point) {\n var _this = this;\n eachAxis(function (axis) {\n var drag = _this.getProps().drag;\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, _this.currentDirection))\n return;\n var projection = _this.visualElement.projection;\n var axisValue = _this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n var _a = projection.layout.actual[axis], min = _a.min, max = _a.max;\n axisValue.set(point[axis] - mix(min, max, 0.5));\n }\n });\n };\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n VisualElementDragControls.prototype.scalePositionWithinConstraints = function () {\n var _this = this;\n var _a;\n var _b = this.getProps(), drag = _b.drag, dragConstraints = _b.dragConstraints;\n var projection = this.visualElement.projection;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n var boxProgress = { x: 0, y: 0 };\n eachAxis(function (axis) {\n var axisValue = _this.getAxisMotionValue(axis);\n if (axisValue) {\n var latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, _this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n var transformTemplate = this.visualElement.getProps().transformTemplate;\n this.visualElement.getInstance().style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll();\n projection.updateLayout();\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis(function (axis) {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n var axisValue = _this.getAxisMotionValue(axis);\n var _a = _this.constraints[axis], min = _a.min, max = _a.max;\n axisValue.set(mix(min, max, boxProgress[axis]));\n });\n };\n VisualElementDragControls.prototype.addListeners = function () {\n var _this = this;\n var _a;\n elementDragControls.set(this.visualElement, this);\n var element = this.visualElement.getInstance();\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n var stopPointerListener = addPointerEvent(element, \"pointerdown\", function (event) {\n var _a = _this.getProps(), drag = _a.drag, _b = _a.dragListener, dragListener = _b === void 0 ? true : _b;\n drag && dragListener && _this.start(event);\n });\n var measureDragConstraints = function () {\n var dragConstraints = _this.getProps().dragConstraints;\n if (isRefObject(dragConstraints)) {\n _this.constraints = _this.resolveRefConstraints();\n }\n };\n var projection = this.visualElement.projection;\n var stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll();\n projection.updateLayout();\n }\n measureDragConstraints();\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n var stopResizeListener = addDomEvent(window, \"resize\", function () {\n return _this.scalePositionWithinConstraints();\n });\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n projection.addEventListener(\"didUpdate\", (function (_a) {\n var delta = _a.delta, hasLayoutChanged = _a.hasLayoutChanged;\n if (_this.isDragging && hasLayoutChanged) {\n eachAxis(function (axis) {\n var motionValue = _this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n _this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n _this.visualElement.syncRender();\n }\n }));\n return function () {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n };\n };\n VisualElementDragControls.prototype.getProps = function () {\n var props = this.visualElement.getProps();\n var _a = props.drag, drag = _a === void 0 ? false : _a, _b = props.dragDirectionLock, dragDirectionLock = _b === void 0 ? false : _b, _c = props.dragPropagation, dragPropagation = _c === void 0 ? false : _c, _d = props.dragConstraints, dragConstraints = _d === void 0 ? false : _d, _e = props.dragElastic, dragElastic = _e === void 0 ? defaultElastic : _e, _f = props.dragMomentum, dragMomentum = _f === void 0 ? true : _f;\n return __assign(__assign({}, props), { drag: drag, dragDirectionLock: dragDirectionLock, dragPropagation: dragPropagation, dragConstraints: dragConstraints, dragElastic: dragElastic, dragMomentum: dragMomentum });\n };\n return VisualElementDragControls;\n}());\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold) {\n if (lockThreshold === void 0) { lockThreshold = 10; }\n var direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n","import { useDrag } from '../../gestures/drag/use-drag.mjs';\nimport { usePanGesture } from '../../gestures/use-pan-gesture.mjs';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.mjs';\n\nvar drag = {\n pan: makeRenderlessComponent(usePanGesture),\n drag: makeRenderlessComponent(useDrag),\n};\n\nexport { drag };\n","import { useRef, useContext, useEffect } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { useUnmountEffect } from '../utils/use-unmount-effect.mjs';\nimport { usePointerEvent } from '../events/use-pointer-event.mjs';\nimport { PanSession } from './PanSession.mjs';\n\n/**\n *\n * @param handlers -\n * @param ref -\n *\n * @internalremarks\n * Currently this sets new pan gesture functions every render. The memo route has been explored\n * in the past but ultimately we're still creating new functions every render. An optimisation\n * to explore is creating the pan gestures and loading them into a `ref`.\n *\n * @internal\n */\nfunction usePanGesture(_a) {\n var onPan = _a.onPan, onPanStart = _a.onPanStart, onPanEnd = _a.onPanEnd, onPanSessionStart = _a.onPanSessionStart, visualElement = _a.visualElement;\n var hasPanEvents = onPan || onPanStart || onPanEnd || onPanSessionStart;\n var panSession = useRef(null);\n var transformPagePoint = useContext(MotionConfigContext).transformPagePoint;\n var handlers = {\n onSessionStart: onPanSessionStart,\n onStart: onPanStart,\n onMove: onPan,\n onEnd: function (event, info) {\n panSession.current = null;\n onPanEnd && onPanEnd(event, info);\n },\n };\n useEffect(function () {\n if (panSession.current !== null) {\n panSession.current.updateHandlers(handlers);\n }\n });\n function onPointerDown(event) {\n panSession.current = new PanSession(event, handlers, {\n transformPagePoint: transformPagePoint,\n });\n }\n usePointerEvent(visualElement, \"pointerdown\", hasPanEvents && onPointerDown);\n useUnmountEffect(function () { return panSession.current && panSession.current.end(); });\n}\n\nexport { usePanGesture };\n","import { useEffect } from 'react';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\n\n/**\n * A hook that allows an element to be dragged.\n *\n * @internal\n */\nfunction useDrag(props) {\n var groupDragControls = props.dragControls, visualElement = props.visualElement;\n var dragControls = useConstant(function () { return new VisualElementDragControls(visualElement); });\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n useEffect(function () { return groupDragControls && groupDragControls.subscribe(dragControls); }, [dragControls, groupDragControls]);\n // Apply the event listeners to the element\n useEffect(function () { return dragControls.addListeners(); }, [dragControls]);\n}\n\nexport { useDrag };\n","import { __spreadArray, __read } from 'tslib';\nimport { SubscriptionManager } from '../../utils/subscription-manager.mjs';\n\nvar names = [\n \"LayoutMeasure\",\n \"BeforeLayoutMeasure\",\n \"LayoutUpdate\",\n \"ViewportBoxUpdate\",\n \"Update\",\n \"Render\",\n \"AnimationComplete\",\n \"LayoutAnimationComplete\",\n \"AnimationStart\",\n \"LayoutAnimationStart\",\n \"SetAxisTarget\",\n \"Unmount\",\n];\nfunction createLifecycles() {\n var managers = names.map(function () { return new SubscriptionManager(); });\n var propSubscriptions = {};\n var lifecycles = {\n clearAllListeners: function () { return managers.forEach(function (manager) { return manager.clear(); }); },\n updatePropListeners: function (props) {\n names.forEach(function (name) {\n var _a;\n var on = \"on\" + name;\n var propListener = props[on];\n // Unsubscribe existing subscription\n (_a = propSubscriptions[name]) === null || _a === void 0 ? void 0 : _a.call(propSubscriptions);\n // Add new subscription\n if (propListener) {\n propSubscriptions[name] = lifecycles[on](propListener);\n }\n });\n },\n };\n managers.forEach(function (manager, i) {\n lifecycles[\"on\" + names[i]] = function (handler) { return manager.add(handler); };\n lifecycles[\"notify\" + names[i]] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return manager.notify.apply(manager, __spreadArray([], __read(args), false));\n };\n });\n return lifecycles;\n}\n\nexport { createLifecycles };\n","import { __assign, __spreadArray, __read } from 'tslib';\nimport sync, { cancelSync } from 'framesync';\nimport { motionValue } from '../value/index.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { variantPriorityOrder } from './utils/animation-state.mjs';\nimport { createLifecycles } from './utils/lifecycles.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { checkIfControllingVariants, checkIfVariantNode, isVariantLabel } from './utils/variants.mjs';\n\nvar visualElement = function (_a) {\n var _b = _a.treeType, treeType = _b === void 0 ? \"\" : _b, build = _a.build, getBaseTarget = _a.getBaseTarget, makeTargetAnimatable = _a.makeTargetAnimatable, measureViewportBox = _a.measureViewportBox, renderInstance = _a.render, readValueFromInstance = _a.readValueFromInstance, removeValueFromRenderState = _a.removeValueFromRenderState, sortNodePosition = _a.sortNodePosition, scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps;\n return function (_a, options) {\n var parent = _a.parent, props = _a.props, presenceId = _a.presenceId, blockInitialAnimation = _a.blockInitialAnimation, visualState = _a.visualState, shouldReduceMotion = _a.shouldReduceMotion;\n if (options === void 0) { options = {}; }\n var isMounted = false;\n var latestValues = visualState.latestValues, renderState = visualState.renderState;\n /**\n * The instance of the render-specific node that will be hydrated by the\n * exposed React ref. So for example, this visual element can host a\n * HTMLElement, plain object, or Three.js object. The functions provided\n * in VisualElementConfig allow us to interface with this instance.\n */\n var instance;\n /**\n * Manages the subscriptions for a visual element's lifecycle, for instance\n * onRender\n */\n var lifecycles = createLifecycles();\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n var values = new Map();\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n var valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n var prevMotionValues = {};\n /**\n * When values are removed from all animation props we need to search\n * for a fallback value to animate to. These values are tracked in baseTarget.\n */\n var baseTarget = __assign({}, latestValues);\n // Internal methods ========================\n /**\n * On mount, this will be hydrated with a callback to disconnect\n * this visual element from its parent on unmount.\n */\n var removeFromVariantTree;\n /**\n * Render the element with the latest styles outside of the React\n * render lifecycle\n */\n function render() {\n if (!instance || !isMounted)\n return;\n triggerBuild();\n renderInstance(instance, renderState, props.style, element.projection);\n }\n function triggerBuild() {\n build(element, renderState, latestValues, options, props);\n }\n function update() {\n lifecycles.notifyUpdate(latestValues);\n }\n /**\n *\n */\n function bindToMotionValue(key, value) {\n var removeOnChange = value.onChange(function (latestValue) {\n latestValues[key] = latestValue;\n props.onUpdate && sync.update(update, false, true);\n });\n var removeOnRenderRequest = value.onRenderRequest(element.scheduleRender);\n valueSubscriptions.set(key, function () {\n removeOnChange();\n removeOnRenderRequest();\n });\n }\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't neccessarily a breaking change,\n * more a reflection of the test.\n */\n var initialMotionValues = scrapeMotionValuesFromProps(props);\n for (var key in initialMotionValues) {\n var value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key], false);\n }\n }\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n var isControllingVariants = checkIfControllingVariants(props);\n var isVariantNode = checkIfVariantNode(props);\n var element = __assign(__assign({ treeType: treeType, \n /**\n * This is a mirror of the internal instance prop, which keeps\n * VisualElement type-compatible with React's RefObject.\n */\n current: null, \n /**\n * The depth of this visual element within the visual element tree.\n */\n depth: parent ? parent.depth + 1 : 0, parent: parent, children: new Set(), \n /**\n *\n */\n presenceId: presenceId, shouldReduceMotion: shouldReduceMotion, \n /**\n * If this component is part of the variant tree, it should track\n * any children that are also part of the tree. This is essentially\n * a shadow tree to simplify logic around how to stagger over children.\n */\n variantChildren: isVariantNode ? new Set() : undefined, \n /**\n * Whether this instance is visible. This can be changed imperatively\n * by the projection tree, is analogous to CSS's visibility in that\n * hidden elements should take up layout, and needs enacting by the configured\n * render function.\n */\n isVisible: undefined, \n /**\n * Normally, if a component is controlled by a parent's variants, it can\n * rely on that ancestor to trigger animations further down the tree.\n * However, if a component is created after its parent is mounted, the parent\n * won't trigger that mount animation so the child needs to.\n *\n * TODO: This might be better replaced with a method isParentMounted\n */\n manuallyAnimateOnMount: Boolean(parent === null || parent === void 0 ? void 0 : parent.isMounted()), \n /**\n * This can be set by AnimatePresence to force components that mount\n * at the same time as it to mount as if they have initial={false} set.\n */\n blockInitialAnimation: blockInitialAnimation, \n /**\n * Determine whether this component has mounted yet. This is mostly used\n * by variant children to determine whether they need to trigger their\n * own animations on mount.\n */\n isMounted: function () { return Boolean(instance); }, mount: function (newInstance) {\n isMounted = true;\n instance = element.current = newInstance;\n if (element.projection) {\n element.projection.mount(newInstance);\n }\n if (isVariantNode && parent && !isControllingVariants) {\n removeFromVariantTree = parent === null || parent === void 0 ? void 0 : parent.addVariantChild(element);\n }\n values.forEach(function (value, key) { return bindToMotionValue(key, value); });\n parent === null || parent === void 0 ? void 0 : parent.children.add(element);\n element.setProps(props);\n }, \n /**\n *\n */\n unmount: function () {\n var _a;\n (_a = element.projection) === null || _a === void 0 ? void 0 : _a.unmount();\n cancelSync.update(update);\n cancelSync.render(render);\n valueSubscriptions.forEach(function (remove) { return remove(); });\n removeFromVariantTree === null || removeFromVariantTree === void 0 ? void 0 : removeFromVariantTree();\n parent === null || parent === void 0 ? void 0 : parent.children.delete(element);\n lifecycles.clearAllListeners();\n instance = undefined;\n isMounted = false;\n }, \n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild: function (child) {\n var _a;\n var closestVariantNode = element.getClosestVariantNode();\n if (closestVariantNode) {\n (_a = closestVariantNode.variantChildren) === null || _a === void 0 ? void 0 : _a.add(child);\n return function () {\n return closestVariantNode.variantChildren.delete(child);\n };\n }\n }, sortNodePosition: function (other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!sortNodePosition || treeType !== other.treeType)\n return 0;\n return sortNodePosition(element.getInstance(), other.getInstance());\n }, \n /**\n * Returns the closest variant node in the tree starting from\n * this visual element.\n */\n getClosestVariantNode: function () {\n return isVariantNode ? element : parent === null || parent === void 0 ? void 0 : parent.getClosestVariantNode();\n }, \n /**\n * Expose the latest layoutId prop.\n */\n getLayoutId: function () { return props.layoutId; }, \n /**\n * Returns the current instance.\n */\n getInstance: function () { return instance; }, \n /**\n * Get/set the latest static values.\n */\n getStaticValue: function (key) { return latestValues[key]; }, setStaticValue: function (key, value) { return (latestValues[key] = value); }, \n /**\n * Returns the latest motion value state. Currently only used to take\n * a snapshot of the visual element - perhaps this can return the whole\n * visual state\n */\n getLatestValues: function () { return latestValues; }, \n /**\n * Set the visiblity of the visual element. If it's changed, schedule\n * a render to reflect these changes.\n */\n setVisibility: function (visibility) {\n if (element.isVisible === visibility)\n return;\n element.isVisible = visibility;\n element.scheduleRender();\n }, \n /**\n * Make a target animatable by Popmotion. For instance, if we're\n * trying to animate width from 100px to 100vw we need to measure 100vw\n * in pixels to determine what we really need to animate to. This is also\n * pluggable to support Framer's custom value types like Color,\n * and CSS variables.\n */\n makeTargetAnimatable: function (target, canMutate) {\n if (canMutate === void 0) { canMutate = true; }\n return makeTargetAnimatable(element, target, props, canMutate);\n }, \n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox: function () {\n return measureViewportBox(instance, props);\n }, \n // Motion values ========================\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue: function (key, value) {\n // Remove existing value if it exists\n if (element.hasValue(key))\n element.removeValue(key);\n values.set(key, value);\n latestValues[key] = value.get();\n bindToMotionValue(key, value);\n }, \n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue: function (key) {\n var _a;\n values.delete(key);\n (_a = valueSubscriptions.get(key)) === null || _a === void 0 ? void 0 : _a();\n valueSubscriptions.delete(key);\n delete latestValues[key];\n removeValueFromRenderState(key, renderState);\n }, \n /**\n * Check whether we have a motion value for this key\n */\n hasValue: function (key) { return values.has(key); }, \n /**\n * Get a motion value for this key. If called with a default\n * value, we'll create one if none exists.\n */\n getValue: function (key, defaultValue) {\n var value = values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue);\n element.addValue(key, value);\n }\n return value;\n }, \n /**\n * Iterate over our motion values.\n */\n forEachValue: function (callback) { return values.forEach(callback); }, \n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue: function (key) {\n var _a;\n return (_a = latestValues[key]) !== null && _a !== void 0 ? _a : readValueFromInstance(instance, key, options);\n }, \n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget: function (key, value) {\n baseTarget[key] = value;\n }, \n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget: function (key) {\n if (getBaseTarget) {\n var target = getBaseTarget(props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n }\n return baseTarget[key];\n } }, lifecycles), { \n /**\n * Build the renderer state based on the latest visual state.\n */\n build: function () {\n triggerBuild();\n return renderState;\n }, \n /**\n * Schedule a render on the next animation frame.\n */\n scheduleRender: function () {\n sync.render(render, false, true);\n }, \n /**\n * Synchronously fire render. It's prefered that we batch renders but\n * in many circumstances, like layout measurement, we need to run this\n * synchronously. However in those instances other measures should be taken\n * to batch reads/writes.\n */\n syncRender: render, \n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n setProps: function (newProps) {\n if (newProps.transformTemplate || props.transformTemplate) {\n element.scheduleRender();\n }\n props = newProps;\n lifecycles.updatePropListeners(newProps);\n prevMotionValues = updateMotionValuesFromProps(element, scrapeMotionValuesFromProps(props), prevMotionValues);\n }, getProps: function () { return props; }, \n // Variants ==============================\n /**\n * Returns the variant definition with a given name.\n */\n getVariant: function (name) { var _a; return (_a = props.variants) === null || _a === void 0 ? void 0 : _a[name]; }, \n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition: function () { return props.transition; }, getTransformPagePoint: function () {\n return props.transformPagePoint;\n }, \n /**\n * Used by child variant nodes to get the closest ancestor variant props.\n */\n getVariantContext: function (startAtParent) {\n if (startAtParent === void 0) { startAtParent = false; }\n if (startAtParent)\n return parent === null || parent === void 0 ? void 0 : parent.getVariantContext();\n if (!isControllingVariants) {\n var context_1 = (parent === null || parent === void 0 ? void 0 : parent.getVariantContext()) || {};\n if (props.initial !== undefined) {\n context_1.initial = props.initial;\n }\n return context_1;\n }\n var context = {};\n for (var i = 0; i < numVariantProps; i++) {\n var name_1 = variantProps[i];\n var prop = props[name_1];\n if (isVariantLabel(prop) || prop === false) {\n context[name_1] = prop;\n }\n }\n return context;\n } });\n return element;\n };\n};\nvar variantProps = __spreadArray([\"initial\"], __read(variantPriorityOrder), false);\nvar numVariantProps = variantProps.length;\n\nexport { visualElement };\n","import { warnOnce } from '../../utils/warn-once.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction updateMotionValuesFromProps(element, next, prev) {\n var _a;\n for (var key in next) {\n var nextValue = next[key];\n var prevValue = prev[key];\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue);\n /**\n * Check the version of the incoming motion value with this version\n * and warn against mismatches.\n */\n if (process.env.NODE_ENV === \"development\") {\n warnOnce(nextValue.version === \"6.3.10\", \"Attempting to mix Framer Motion versions \".concat(nextValue.version, \" with 6.3.10 may not work as expected.\"));\n }\n }\n else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping to a new motion value, create a new motion value\n * from that\n */\n element.addValue(key, motionValue(nextValue));\n }\n else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n var existingValue = element.getValue(key);\n // TODO: Only update values that aren't being animated or even looked at\n !existingValue.hasAnimated && existingValue.set(nextValue);\n }\n else {\n element.addValue(key, motionValue((_a = element.getStaticValue(key)) !== null && _a !== void 0 ? _a : nextValue));\n }\n }\n }\n // Handle removed values\n for (var key in prev) {\n if (next[key] === undefined)\n element.removeValue(key);\n }\n return next;\n}\n\nexport { updateMotionValuesFromProps };\n","import { __rest, __assign, __read } from 'tslib';\nimport { invariant } from 'hey-listen';\n\nfunction isCSSVariable(value) {\n return typeof value === \"string\" && value.startsWith(\"var(--\");\n}\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\nvar cssVariableRegex = /var\\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\\)/;\nfunction parseCSSVariable(current) {\n var match = cssVariableRegex.exec(current);\n if (!match)\n return [,];\n var _a = __read(match, 3), token = _a[1], fallback = _a[2];\n return [token, fallback];\n}\nvar maxDepth = 4;\nfunction getVariableValue(current, element, depth) {\n if (depth === void 0) { depth = 1; }\n invariant(depth <= maxDepth, \"Max CSS variable fallback depth detected in property \\\"\".concat(current, \"\\\". This may indicate a circular fallback dependency.\"));\n var _a = __read(parseCSSVariable(current), 2), token = _a[0], fallback = _a[1];\n // No CSS variable detected\n if (!token)\n return;\n // Attempt to read this CSS variable off the element\n var resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n return resolved.trim();\n }\n else if (isCSSVariable(fallback)) {\n // The fallback might itself be a CSS variable, in which case we attempt to resolve it too.\n return getVariableValue(fallback, element, depth + 1);\n }\n else {\n return fallback;\n }\n}\n/**\n * Resolve CSS variables from\n *\n * @internal\n */\nfunction resolveCSSVariables(visualElement, _a, transitionEnd) {\n var _b;\n var target = __rest(_a, []);\n var element = visualElement.getInstance();\n if (!(element instanceof Element))\n return { target: target, transitionEnd: transitionEnd };\n // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`\n // only if they change but I think this reads clearer and this isn't a performance-critical path.\n if (transitionEnd) {\n transitionEnd = __assign({}, transitionEnd);\n }\n // Go through existing `MotionValue`s and ensure any existing CSS variables are resolved\n visualElement.forEachValue(function (value) {\n var current = value.get();\n if (!isCSSVariable(current))\n return;\n var resolved = getVariableValue(current, element);\n if (resolved)\n value.set(resolved);\n });\n // Cycle through every target property and resolve CSS variables. Currently\n // we only read single-var properties like `var(--foo)`, not `calc(var(--foo) + 20px)`\n for (var key in target) {\n var current = target[key];\n if (!isCSSVariable(current))\n continue;\n var resolved = getVariableValue(current, element);\n if (!resolved)\n continue;\n // Clone target if it hasn't already been\n target[key] = resolved;\n // If the user hasn't already set this key on `transitionEnd`, set it to the unresolved\n // CSS variable. This will ensure that after the animation the component will reflect\n // changes in the value of the CSS variable.\n if (transitionEnd)\n (_b = transitionEnd[key]) !== null && _b !== void 0 ? _b : (transitionEnd[key] = current);\n }\n return { target: target, transitionEnd: transitionEnd };\n}\n\nexport { cssVariableRegex, parseCSSVariable, resolveCSSVariables };\n","import { __assign, __read } from 'tslib';\nimport { number, px } from 'style-value-types';\nimport { isKeyframesTarget } from '../../../animation/utils/is-keyframes-target.mjs';\nimport { invariant } from 'hey-listen';\nimport { transformProps } from '../../html/utils/transform.mjs';\nimport { findDimensionValueType } from '../value-types/dimensions.mjs';\n\nvar positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n \"x\",\n \"y\",\n]);\nvar isPositionalKey = function (key) { return positionalKeys.has(key); };\nvar hasPositionalKey = function (target) {\n return Object.keys(target).some(isPositionalKey);\n};\nvar setAndResetVelocity = function (value, to) {\n // Looks odd but setting it twice doesn't render, it'll just\n // set both prev and current to the latest value\n value.set(to, false);\n value.set(to);\n};\nvar isNumOrPxType = function (v) {\n return v === number || v === px;\n};\nvar BoundingBoxDimension;\n(function (BoundingBoxDimension) {\n BoundingBoxDimension[\"width\"] = \"width\";\n BoundingBoxDimension[\"height\"] = \"height\";\n BoundingBoxDimension[\"left\"] = \"left\";\n BoundingBoxDimension[\"right\"] = \"right\";\n BoundingBoxDimension[\"top\"] = \"top\";\n BoundingBoxDimension[\"bottom\"] = \"bottom\";\n})(BoundingBoxDimension || (BoundingBoxDimension = {}));\nvar getPosFromMatrix = function (matrix, pos) {\n return parseFloat(matrix.split(\", \")[pos]);\n};\nvar getTranslateFromMatrix = function (pos2, pos3) {\n return function (_bbox, _a) {\n var transform = _a.transform;\n if (transform === \"none\" || !transform)\n return 0;\n var matrix3d = transform.match(/^matrix3d\\((.+)\\)$/);\n if (matrix3d) {\n return getPosFromMatrix(matrix3d[1], pos3);\n }\n else {\n var matrix = transform.match(/^matrix\\((.+)\\)$/);\n if (matrix) {\n return getPosFromMatrix(matrix[1], pos2);\n }\n else {\n return 0;\n }\n }\n };\n};\nvar transformKeys = new Set([\"x\", \"y\", \"z\"]);\nvar nonTranslationalTransformKeys = transformProps.filter(function (key) { return !transformKeys.has(key); });\nfunction removeNonTranslationalTransform(visualElement) {\n var removedTransforms = [];\n nonTranslationalTransformKeys.forEach(function (key) {\n var value = visualElement.getValue(key);\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n // Apply changes to element before measurement\n if (removedTransforms.length)\n visualElement.syncRender();\n return removedTransforms;\n}\nvar positionalValues = {\n // Dimensions\n width: function (_a, _b) {\n var x = _a.x;\n var _c = _b.paddingLeft, paddingLeft = _c === void 0 ? \"0\" : _c, _d = _b.paddingRight, paddingRight = _d === void 0 ? \"0\" : _d;\n return x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight);\n },\n height: function (_a, _b) {\n var y = _a.y;\n var _c = _b.paddingTop, paddingTop = _c === void 0 ? \"0\" : _c, _d = _b.paddingBottom, paddingBottom = _d === void 0 ? \"0\" : _d;\n return y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom);\n },\n top: function (_bbox, _a) {\n var top = _a.top;\n return parseFloat(top);\n },\n left: function (_bbox, _a) {\n var left = _a.left;\n return parseFloat(left);\n },\n bottom: function (_a, _b) {\n var y = _a.y;\n var top = _b.top;\n return parseFloat(top) + (y.max - y.min);\n },\n right: function (_a, _b) {\n var x = _a.x;\n var left = _b.left;\n return parseFloat(left) + (x.max - x.min);\n },\n // Transform\n x: getTranslateFromMatrix(4, 13),\n y: getTranslateFromMatrix(5, 14),\n};\nvar convertChangedValueTypes = function (target, visualElement, changedKeys) {\n var originBbox = visualElement.measureViewportBox();\n var element = visualElement.getInstance();\n var elementComputedStyle = getComputedStyle(element);\n var display = elementComputedStyle.display;\n var origin = {};\n // If the element is currently set to display: \"none\", make it visible before\n // measuring the target bounding box\n if (display === \"none\") {\n visualElement.setStaticValue(\"display\", target.display || \"block\");\n }\n /**\n * Record origins before we render and update styles\n */\n changedKeys.forEach(function (key) {\n origin[key] = positionalValues[key](originBbox, elementComputedStyle);\n });\n // Apply the latest values (as set in checkAndConvertChangedValueTypes)\n visualElement.syncRender();\n var targetBbox = visualElement.measureViewportBox();\n changedKeys.forEach(function (key) {\n // Restore styles to their **calculated computed style**, not their actual\n // originally set style. This allows us to animate between equivalent pixel units.\n var value = visualElement.getValue(key);\n setAndResetVelocity(value, origin[key]);\n target[key] = positionalValues[key](targetBbox, elementComputedStyle);\n });\n return target;\n};\nvar checkAndConvertChangedValueTypes = function (visualElement, target, origin, transitionEnd) {\n if (origin === void 0) { origin = {}; }\n if (transitionEnd === void 0) { transitionEnd = {}; }\n target = __assign({}, target);\n transitionEnd = __assign({}, transitionEnd);\n var targetPositionalKeys = Object.keys(target).filter(isPositionalKey);\n // We want to remove any transform values that could affect the element's bounding box before\n // it's measured. We'll reapply these later.\n var removedTransformValues = [];\n var hasAttemptedToRemoveTransformValues = false;\n var changedValueTypeKeys = [];\n targetPositionalKeys.forEach(function (key) {\n var value = visualElement.getValue(key);\n if (!visualElement.hasValue(key))\n return;\n var from = origin[key];\n var fromType = findDimensionValueType(from);\n var to = target[key];\n var toType;\n // TODO: The current implementation of this basically throws an error\n // if you try and do value conversion via keyframes. There's probably\n // a way of doing this but the performance implications would need greater scrutiny,\n // as it'd be doing multiple resize-remeasure operations.\n if (isKeyframesTarget(to)) {\n var numKeyframes = to.length;\n var fromIndex = to[0] === null ? 1 : 0;\n from = to[fromIndex];\n fromType = findDimensionValueType(from);\n for (var i = fromIndex; i < numKeyframes; i++) {\n if (!toType) {\n toType = findDimensionValueType(to[i]);\n invariant(toType === fromType ||\n (isNumOrPxType(fromType) && isNumOrPxType(toType)), \"Keyframes must be of the same dimension as the current value\");\n }\n else {\n invariant(findDimensionValueType(to[i]) === toType, \"All keyframes must be of the same type\");\n }\n }\n }\n else {\n toType = findDimensionValueType(to);\n }\n if (fromType !== toType) {\n // If they're both just number or px, convert them both to numbers rather than\n // relying on resize/remeasure to convert (which is wasteful in this situation)\n if (isNumOrPxType(fromType) && isNumOrPxType(toType)) {\n var current = value.get();\n if (typeof current === \"string\") {\n value.set(parseFloat(current));\n }\n if (typeof to === \"string\") {\n target[key] = parseFloat(to);\n }\n else if (Array.isArray(to) && toType === px) {\n target[key] = to.map(parseFloat);\n }\n }\n else if ((fromType === null || fromType === void 0 ? void 0 : fromType.transform) &&\n (toType === null || toType === void 0 ? void 0 : toType.transform) &&\n (from === 0 || to === 0)) {\n // If one or the other value is 0, it's safe to coerce it to the\n // type of the other without measurement\n if (from === 0) {\n value.set(toType.transform(from));\n }\n else {\n target[key] = fromType.transform(to);\n }\n }\n else {\n // If we're going to do value conversion via DOM measurements, we first\n // need to remove non-positional transform values that could affect the bbox measurements.\n if (!hasAttemptedToRemoveTransformValues) {\n removedTransformValues =\n removeNonTranslationalTransform(visualElement);\n hasAttemptedToRemoveTransformValues = true;\n }\n changedValueTypeKeys.push(key);\n transitionEnd[key] =\n transitionEnd[key] !== undefined\n ? transitionEnd[key]\n : target[key];\n setAndResetVelocity(value, to);\n }\n }\n });\n if (changedValueTypeKeys.length) {\n var scrollY_1 = changedValueTypeKeys.indexOf(\"height\") >= 0\n ? window.pageYOffset\n : null;\n var convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys);\n // If we removed transform values, reapply them before the next render\n if (removedTransformValues.length) {\n removedTransformValues.forEach(function (_a) {\n var _b = __read(_a, 2), key = _b[0], value = _b[1];\n visualElement.getValue(key).set(value);\n });\n }\n // Reapply original values\n visualElement.syncRender();\n // Restore scroll position\n if (scrollY_1 !== null)\n window.scrollTo({ top: scrollY_1 });\n return { target: convertedTarget, transitionEnd: transitionEnd };\n }\n else {\n return { target: target, transitionEnd: transitionEnd };\n }\n};\n/**\n * Convert value types for x/y/width/height/top/left/bottom/right\n *\n * Allows animation between `'auto'` -> `'100%'` or `0` -> `'calc(50% - 10vw)'`\n *\n * @internal\n */\nfunction unitConversion(visualElement, target, origin, transitionEnd) {\n return hasPositionalKey(target)\n ? checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd)\n : { target: target, transitionEnd: transitionEnd };\n}\n\nexport { BoundingBoxDimension, positionalValues, unitConversion };\n","import { __rest, __assign } from 'tslib';\nimport { visualElement } from '../index.mjs';\nimport { getOrigin, checkTargetForNewValues } from '../utils/setters.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { isCSSVariable } from '../dom/utils/is-css-variable.mjs';\nimport { parseDomVariant } from '../dom/utils/parse-dom-variant.mjs';\nimport { isTransformProp } from './utils/transform.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nvar htmlConfig = {\n treeType: \"dom\",\n readValueFromInstance: function (domElement, key) {\n if (isTransformProp(key)) {\n var defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n else {\n var computedStyle = getComputedStyle(domElement);\n return ((isCSSVariable(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0);\n }\n },\n sortNodePosition: function (a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n },\n getBaseTarget: function (props, key) {\n var _a;\n return (_a = props.style) === null || _a === void 0 ? void 0 : _a[key];\n },\n measureViewportBox: function (element, _a) {\n var transformPagePoint = _a.transformPagePoint;\n return measureViewportBox(element, transformPagePoint);\n },\n /**\n * Reset the transform on the current Element. This is called as part\n * of a batched process across the entire layout tree. To remove this write\n * cycle it'd be interesting to see if it's possible to \"undo\" all the current\n * layout transforms up the tree in the same way this.getBoundingBoxWithoutTransforms\n * works\n */\n resetTransform: function (element, domElement, props) {\n var transformTemplate = props.transformTemplate;\n domElement.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n // Ensure that whatever happens next, we restore our transform on the next frame\n element.scheduleRender();\n },\n restoreTransform: function (instance, mutableState) {\n instance.style.transform = mutableState.style.transform;\n },\n removeValueFromRenderState: function (key, _a) {\n var vars = _a.vars, style = _a.style;\n delete vars[key];\n delete style[key];\n },\n /**\n * Ensure that HTML and Framer-specific value types like `px`->`%` and `Color`\n * can be animated by Motion.\n */\n makeTargetAnimatable: function (element, _a, _b, isMounted) {\n var transformValues = _b.transformValues;\n if (isMounted === void 0) { isMounted = true; }\n var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest(_a, [\"transition\", \"transitionEnd\"]);\n var origin = getOrigin(target, transition || {}, element);\n /**\n * If Framer has provided a function to convert `Color` etc value types, convert them\n */\n if (transformValues) {\n if (transitionEnd)\n transitionEnd = transformValues(transitionEnd);\n if (target)\n target = transformValues(target);\n if (origin)\n origin = transformValues(origin);\n }\n if (isMounted) {\n checkTargetForNewValues(element, target, origin);\n var parsed = parseDomVariant(element, target, origin, transitionEnd);\n transitionEnd = parsed.transitionEnd;\n target = parsed.target;\n }\n return __assign({ transition: transition, transitionEnd: transitionEnd }, target);\n },\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n build: function (element, renderState, latestValues, options, props) {\n if (element.isVisible !== undefined) {\n renderState.style.visibility = element.isVisible\n ? \"visible\"\n : \"hidden\";\n }\n buildHTMLStyles(renderState, latestValues, options, props.transformTemplate);\n },\n render: renderHTML,\n};\nvar htmlVisualElement = visualElement(htmlConfig);\n\nexport { getComputedStyle, htmlConfig, htmlVisualElement };\n","import { resolveCSSVariables } from './css-variables-conversion.mjs';\nimport { unitConversion } from './unit-conversion.mjs';\n\n/**\n * Parse a DOM variant to make it animatable. This involves resolving CSS variables\n * and ensuring animations like \"20%\" => \"calc(50vw)\" are performed in pixels.\n */\nvar parseDomVariant = function (visualElement, target, origin, transitionEnd) {\n var resolved = resolveCSSVariables(visualElement, target, transitionEnd);\n target = resolved.target;\n transitionEnd = resolved.transitionEnd;\n return unitConversion(visualElement, target, origin, transitionEnd);\n};\n\nexport { parseDomVariant };\n","import { __assign } from 'tslib';\nimport { visualElement } from '../index.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { htmlConfig } from '../html/visual-element.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { isTransformProp } from '../html/utils/transform.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\n\nvar svgVisualElement = visualElement(__assign(__assign({}, htmlConfig), { getBaseTarget: function (props, key) {\n return props[key];\n }, readValueFromInstance: function (domElement, key) {\n var _a;\n if (isTransformProp(key)) {\n return ((_a = getDefaultValueType(key)) === null || _a === void 0 ? void 0 : _a.default) || 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return domElement.getAttribute(key);\n }, scrapeMotionValuesFromProps: scrapeMotionValuesFromProps, build: function (_element, renderState, latestValues, options, props) {\n buildSVGAttrs(renderState, latestValues, options, props.transformTemplate);\n }, render: renderSVG }));\n\nexport { svgVisualElement };\n","import { htmlVisualElement } from '../html/visual-element.mjs';\nimport { svgVisualElement } from '../svg/visual-element.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nvar createDomVisualElement = function (Component, options) {\n return isSVGComponent(Component)\n ? svgVisualElement(options, { enableHardwareAcceleration: false })\n : htmlVisualElement(options, { enableHardwareAcceleration: true });\n};\n\nexport { createDomVisualElement };\n","import { px } from 'style-value-types';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nvar correctBorderRadius = {\n correct: function (latest, node) {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n var x = pixelsToPercent(latest, node.target.x);\n var y = pixelsToPercent(latest, node.target.y);\n return \"\".concat(x, \"% \").concat(y, \"%\");\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n","import { mix } from 'popmotion';\nimport { complex } from 'style-value-types';\nimport { cssVariableRegex } from '../../render/dom/utils/css-variables-conversion.mjs';\n\nvar varToken = \"_$css\";\nvar correctBoxShadow = {\n correct: function (latest, _a) {\n var treeScale = _a.treeScale, projectionDelta = _a.projectionDelta;\n var original = latest;\n /**\n * We need to first strip and store CSS variables from the string.\n */\n var containsCSSVariables = latest.includes(\"var(\");\n var cssVariables = [];\n if (containsCSSVariables) {\n latest = latest.replace(cssVariableRegex, function (match) {\n cssVariables.push(match);\n return varToken;\n });\n }\n var shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n var template = complex.createTransformer(latest);\n var offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n var xScale = projectionDelta.x.scale * treeScale.x;\n var yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n var averageScale = mix(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n var output = template(shadow);\n if (containsCSSVariables) {\n var i_1 = 0;\n output = output.replace(varToken, function () {\n var cssVariable = cssVariables[i_1];\n i_1++;\n return cssVariable;\n });\n }\n return output;\n },\n};\n\nexport { correctBoxShadow };\n","import { __extends, __assign, __read } from 'tslib';\nimport sync from 'framesync';\nimport React__default, { useContext } from 'react';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';\nimport { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';\nimport { globalProjectionState } from '../../../projection/node/create-projection-node.mjs';\nimport { correctBorderRadius } from '../../../projection/styles/scale-border-radius.mjs';\nimport { correctBoxShadow } from '../../../projection/styles/scale-box-shadow.mjs';\nimport { addScaleCorrector } from '../../../projection/styles/scale-correction.mjs';\n\nvar MeasureLayoutWithContext = /** @class */ (function (_super) {\n __extends(MeasureLayoutWithContext, _super);\n function MeasureLayoutWithContext() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n MeasureLayoutWithContext.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, visualElement = _a.visualElement, layoutGroup = _a.layoutGroup, switchLayoutGroup = _a.switchLayoutGroup, layoutId = _a.layoutId;\n var projection = visualElement.projection;\n addScaleCorrector(defaultScaleCorrectors);\n if (projection) {\n if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group)\n layoutGroup.group.add(projection);\n if ((switchLayoutGroup === null || switchLayoutGroup === void 0 ? void 0 : switchLayoutGroup.register) && layoutId) {\n switchLayoutGroup.register(projection);\n }\n projection.root.didUpdate();\n projection.addEventListener(\"animationComplete\", function () {\n _this.safeToRemove();\n });\n projection.setOptions(__assign(__assign({}, projection.options), { onExitComplete: function () { return _this.safeToRemove(); } }));\n }\n globalProjectionState.hasEverUpdated = true;\n };\n MeasureLayoutWithContext.prototype.getSnapshotBeforeUpdate = function (prevProps) {\n var _this = this;\n var _a = this.props, layoutDependency = _a.layoutDependency, visualElement = _a.visualElement, drag = _a.drag, isPresent = _a.isPresent;\n var projection = visualElement.projection;\n if (!projection)\n return null;\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined) {\n projection.willUpdate();\n }\n else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote();\n }\n else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n sync.postRender(function () {\n var _a;\n if (!((_a = projection.getStack()) === null || _a === void 0 ? void 0 : _a.members.length)) {\n _this.safeToRemove();\n }\n });\n }\n }\n return null;\n };\n MeasureLayoutWithContext.prototype.componentDidUpdate = function () {\n var projection = this.props.visualElement.projection;\n if (projection) {\n projection.root.didUpdate();\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n }\n };\n MeasureLayoutWithContext.prototype.componentWillUnmount = function () {\n var _a = this.props, visualElement = _a.visualElement, layoutGroup = _a.layoutGroup, promoteContext = _a.switchLayoutGroup;\n var projection = visualElement.projection;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext === null || promoteContext === void 0 ? void 0 : promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n };\n MeasureLayoutWithContext.prototype.safeToRemove = function () {\n var safeToRemove = this.props.safeToRemove;\n safeToRemove === null || safeToRemove === void 0 ? void 0 : safeToRemove();\n };\n MeasureLayoutWithContext.prototype.render = function () {\n return null;\n };\n return MeasureLayoutWithContext;\n}(React__default.Component));\nfunction MeasureLayout(props) {\n var _a = __read(usePresence(), 2), isPresent = _a[0], safeToRemove = _a[1];\n var layoutGroup = useContext(LayoutGroupContext);\n return (React__default.createElement(MeasureLayoutWithContext, __assign({}, props, { layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove })));\n}\nvar defaultScaleCorrectors = {\n borderRadius: __assign(__assign({}, correctBorderRadius), { applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ] }),\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\n\nexport { MeasureLayout };\n","import { MeasureLayout } from './MeasureLayout.mjs';\n\nvar layoutFeatures = {\n measureLayout: MeasureLayout,\n};\n\nexport { layoutFeatures };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { addDomEvent } from '../../events/use-dom-event.mjs';\n\nvar DocumentProjectionNode = createProjectionNode({\n attachResizeListener: function (ref, notify) { return addDomEvent(ref, \"resize\", notify); },\n measureScroll: function () { return ({\n x: document.documentElement.scrollLeft || document.body.scrollLeft,\n y: document.documentElement.scrollTop || document.body.scrollTop,\n }); },\n});\n\nexport { DocumentProjectionNode };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { DocumentProjectionNode } from './DocumentProjectionNode.mjs';\n\nvar rootProjectionNode = {\n current: undefined,\n};\nvar HTMLProjectionNode = createProjectionNode({\n measureScroll: function (instance) { return ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }); },\n defaultParent: function () {\n if (!rootProjectionNode.current) {\n var documentNode = new DocumentProjectionNode(0, {});\n documentNode.mount(window);\n documentNode.setOptions({ layoutScroll: true });\n rootProjectionNode.current = documentNode;\n }\n return rootProjectionNode.current;\n },\n resetTransform: function (instance, value) {\n instance.style.transform = value !== null && value !== void 0 ? value : \"none\";\n },\n});\n\nexport { HTMLProjectionNode, rootProjectionNode };\n","import { __assign } from 'tslib';\nimport { createMotionComponent } from '../../motion/index.mjs';\nimport { createMotionProxy } from './motion-proxy.mjs';\nimport { createDomMotionConfig } from './utils/create-config.mjs';\nimport { gestureAnimations } from '../../motion/features/gestures.mjs';\nimport { animations } from '../../motion/features/animations.mjs';\nimport { drag } from '../../motion/features/drag.mjs';\nimport { createDomVisualElement } from './create-visual-element.mjs';\nimport { layoutFeatures } from '../../motion/features/layout/index.mjs';\nimport { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\n\nvar featureBundle = __assign(__assign(__assign(__assign({}, animations), gestureAnimations), drag), layoutFeatures);\n/**\n * HTML & SVG components, optimised for use with gestures and animation. These can be used as\n * drop-in replacements for any HTML & SVG component, all CSS & SVG properties are supported.\n *\n * @public\n */\nvar motion = /*@__PURE__*/ createMotionProxy(function (Component, config) {\n return createDomMotionConfig(Component, config, featureBundle, createDomVisualElement, HTMLProjectionNode);\n});\n/**\n * Create a DOM `motion` component with the provided string. This is primarily intended\n * as a full alternative to `motion` for consumers who have to support environments that don't\n * support `Proxy`.\n *\n * ```javascript\n * import { createDomMotionComponent } from \"framer-motion\"\n *\n * const motion = {\n * div: createDomMotionComponent('div')\n * }\n * ```\n *\n * @public\n */\nfunction createDomMotionComponent(key) {\n return createMotionComponent(createDomMotionConfig(key, { forwardMotionProps: false }, featureBundle, createDomVisualElement, HTMLProjectionNode));\n}\n\nexport { createDomMotionComponent, motion };\n","import { __assign } from 'tslib';\nimport { isSVGComponent } from './is-svg-component.mjs';\nimport { createUseRender } from '../use-render.mjs';\nimport { svgMotionConfig } from '../../svg/config-motion.mjs';\nimport { htmlMotionConfig } from '../../html/config-motion.mjs';\n\nfunction createDomMotionConfig(Component, _a, preloadedFeatures, createVisualElement, projectionNodeConstructor) {\n var _b = _a.forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b;\n var baseConfig = isSVGComponent(Component)\n ? svgMotionConfig\n : htmlMotionConfig;\n return __assign(__assign({}, baseConfig), { preloadedFeatures: preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement: createVisualElement, projectionNodeConstructor: projectionNodeConstructor, Component: Component });\n}\n\nexport { createDomMotionConfig };\n","import { useRef } from 'react';\nimport { useIsomorphicLayoutEffect } from './use-isomorphic-effect.mjs';\n\nfunction useIsMounted() {\n var isMounted = useRef(false);\n useIsomorphicLayoutEffect(function () {\n isMounted.current = true;\n return function () {\n isMounted.current = false;\n };\n }, []);\n return isMounted;\n}\n\nexport { useIsMounted };\n","import { __values } from 'tslib';\nimport * as React from 'react';\nimport { useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useId } from '../../utils/use-id.mjs';\n\nvar PresenceChild = function (_a) {\n var children = _a.children, initial = _a.initial, isPresent = _a.isPresent, onExitComplete = _a.onExitComplete, custom = _a.custom, presenceAffectsLayout = _a.presenceAffectsLayout;\n var presenceChildren = useConstant(newChildrenMap);\n var id = useId();\n var context = useMemo(function () { return ({\n id: id,\n initial: initial,\n isPresent: isPresent,\n custom: custom,\n onExitComplete: function (childId) {\n var e_1, _a;\n presenceChildren.set(childId, true);\n try {\n for (var _b = __values(presenceChildren.values()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var isComplete = _c.value;\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete();\n },\n register: function (childId) {\n presenceChildren.set(childId, false);\n return function () { return presenceChildren.delete(childId); };\n },\n }); }, \n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n presenceAffectsLayout ? undefined : [isPresent]);\n useMemo(function () {\n presenceChildren.forEach(function (_, key) { return presenceChildren.set(key, false); });\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(function () {\n !isPresent && !presenceChildren.size && (onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete());\n }, [isPresent]);\n return (React.createElement(PresenceContext.Provider, { value: context }, children));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n","import { __read, __spreadArray } from 'tslib';\nimport * as React from 'react';\nimport { useContext, useRef, cloneElement, Children, isValidElement } from 'react';\nimport { env } from '../../utils/process.mjs';\nimport { useForceUpdate } from '../../utils/use-force-update.mjs';\nimport { useIsMounted } from '../../utils/use-is-mounted.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { useUnmountEffect } from '../../utils/use-unmount-effect.mjs';\n\nvar getChildKey = function (child) { return child.key || \"\"; };\nfunction updateChildLookup(children, allChildren) {\n children.forEach(function (child) {\n var key = getChildKey(child);\n allChildren.set(key, child);\n });\n}\nfunction onlyElements(children) {\n var filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, function (child) {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * <AnimatePresence>\n * {items.map(item => (\n * <motion.div\n * key={item.id}\n * initial={{ opacity: 0 }}\n * animate={{ opacity: 1 }}\n * exit={{ opacity: 0 }}\n * />\n * ))}\n * </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nvar AnimatePresence = function (_a) {\n var children = _a.children, custom = _a.custom, _b = _a.initial, initial = _b === void 0 ? true : _b, onExitComplete = _a.onExitComplete, exitBeforeEnter = _a.exitBeforeEnter, _c = _a.presenceAffectsLayout, presenceAffectsLayout = _c === void 0 ? true : _c;\n // We want to force a re-render once all exiting animations have finished. We\n // either use a local forceRender function, or one from a parent context if it exists.\n var _d = __read(useForceUpdate(), 1), forceRender = _d[0];\n var forceRenderLayoutGroup = useContext(LayoutGroupContext).forceRender;\n if (forceRenderLayoutGroup)\n forceRender = forceRenderLayoutGroup;\n var isMounted = useIsMounted();\n // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key\n var filteredChildren = onlyElements(children);\n var childrenToRender = filteredChildren;\n var exiting = new Set();\n // Keep a living record of the children we're actually rendering so we\n // can diff to figure out which are entering and exiting\n var presentChildren = useRef(childrenToRender);\n // A lookup table to quickly reference components by key\n var allChildren = useRef(new Map()).current;\n // If this is the initial component render, just deal with logic surrounding whether\n // we play onMount animations or not.\n var isInitialRender = useRef(true);\n useIsomorphicLayoutEffect(function () {\n isInitialRender.current = false;\n updateChildLookup(filteredChildren, allChildren);\n presentChildren.current = childrenToRender;\n });\n useUnmountEffect(function () {\n isInitialRender.current = true;\n allChildren.clear();\n exiting.clear();\n });\n if (isInitialRender.current) {\n return (React.createElement(React.Fragment, null, childrenToRender.map(function (child) { return (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? undefined : false, presenceAffectsLayout: presenceAffectsLayout }, child)); })));\n }\n // If this is a subsequent render, deal with entering and exiting children\n childrenToRender = __spreadArray([], __read(childrenToRender), false);\n // Diff the keys of the currently-present and target children to update our\n // exiting list.\n var presentKeys = presentChildren.current.map(getChildKey);\n var targetKeys = filteredChildren.map(getChildKey);\n // Diff the present children with our target children and mark those that are exiting\n var numPresent = presentKeys.length;\n for (var i = 0; i < numPresent; i++) {\n var key = presentKeys[i];\n if (targetKeys.indexOf(key) === -1) {\n exiting.add(key);\n }\n }\n // If we currently have exiting children, and we're deferring rendering incoming children\n // until after all current children have exiting, empty the childrenToRender array\n if (exitBeforeEnter && exiting.size) {\n childrenToRender = [];\n }\n // Loop through all currently exiting components and clone them to overwrite `animate`\n // with any `exit` prop they might have defined.\n exiting.forEach(function (key) {\n // If this component is actually entering again, early return\n if (targetKeys.indexOf(key) !== -1)\n return;\n var child = allChildren.get(key);\n if (!child)\n return;\n var insertionIndex = presentKeys.indexOf(key);\n var onExit = function () {\n allChildren.delete(key);\n exiting.delete(key);\n // Remove this child from the present children\n var removeIndex = presentChildren.current.findIndex(function (presentChild) { return presentChild.key === key; });\n presentChildren.current.splice(removeIndex, 1);\n // Defer re-rendering until all exiting children have indeed left\n if (!exiting.size) {\n presentChildren.current = filteredChildren;\n if (isMounted.current === false)\n return;\n forceRender();\n onExitComplete && onExitComplete();\n }\n };\n childrenToRender.splice(insertionIndex, 0, React.createElement(PresenceChild, { key: getChildKey(child), isPresent: false, onExitComplete: onExit, custom: custom, presenceAffectsLayout: presenceAffectsLayout }, child));\n });\n // Add `MotionContext` even to children that don't need it to ensure we're rendering\n // the same tree between renders\n childrenToRender = childrenToRender.map(function (child) {\n var key = child.key;\n return exiting.has(key) ? (child) : (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, presenceAffectsLayout: presenceAffectsLayout }, child));\n });\n if (env !== \"production\" &&\n exitBeforeEnter &&\n childrenToRender.length > 1) {\n console.warn(\"You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour.\");\n }\n return (React.createElement(React.Fragment, null, exiting.size\n ? childrenToRender\n : childrenToRender.map(function (child) { return cloneElement(child); })));\n};\n\nexport { AnimatePresence };\n","import { __read } from 'tslib';\nimport sync from 'framesync';\nimport { useState, useCallback } from 'react';\nimport { useIsMounted } from './use-is-mounted.mjs';\n\nfunction useForceUpdate() {\n var isMounted = useIsMounted();\n var _a = __read(useState(0), 2), forcedRenderCount = _a[0], setForcedRenderCount = _a[1];\n var forceRender = useCallback(function () {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1);\n }, [forcedRenderCount]);\n /**\n * Defer this to the end of the next animation frame in case there are multiple\n * synchronous calls.\n */\n var deferredForceRender = useCallback(function () { return sync.postRender(forceRender); }, [forceRender]);\n return [deferredForceRender, forcedRenderCount];\n}\n\nexport { useForceUpdate };\n","import { isNumber, warn, mergeWith, cx, __DEV__ } from '@chakra-ui/utils';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport * as React from 'react';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar TransitionEasings = {\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};\nvar TransitionVariants = {\n scale: {\n enter: {\n scale: 1\n },\n exit: {\n scale: 0.95\n }\n },\n fade: {\n enter: {\n opacity: 1\n },\n exit: {\n opacity: 0\n }\n },\n pushLeft: {\n enter: {\n x: \"100%\"\n },\n exit: {\n x: \"-30%\"\n }\n },\n pushRight: {\n enter: {\n x: \"-100%\"\n },\n exit: {\n x: \"30%\"\n }\n },\n pushUp: {\n enter: {\n y: \"100%\"\n },\n exit: {\n y: \"-30%\"\n }\n },\n pushDown: {\n enter: {\n y: \"-100%\"\n },\n exit: {\n y: \"30%\"\n }\n },\n slideLeft: {\n position: {\n left: 0,\n top: 0,\n bottom: 0,\n width: \"100%\"\n },\n enter: {\n x: 0,\n y: 0\n },\n exit: {\n x: \"-100%\",\n y: 0\n }\n },\n slideRight: {\n position: {\n right: 0,\n top: 0,\n bottom: 0,\n width: \"100%\"\n },\n enter: {\n x: 0,\n y: 0\n },\n exit: {\n x: \"100%\",\n y: 0\n }\n },\n slideUp: {\n position: {\n top: 0,\n left: 0,\n right: 0,\n maxWidth: \"100vw\"\n },\n enter: {\n x: 0,\n y: 0\n },\n exit: {\n x: 0,\n y: \"-100%\"\n }\n },\n slideDown: {\n position: {\n bottom: 0,\n left: 0,\n right: 0,\n maxWidth: \"100vw\"\n },\n enter: {\n x: 0,\n y: 0\n },\n exit: {\n x: 0,\n y: \"100%\"\n }\n }\n};\nfunction slideTransition(options) {\n var _options$direction;\n\n var side = (_options$direction = options == null ? void 0 : options.direction) != null ? _options$direction : \"right\";\n\n switch (side) {\n case \"right\":\n return TransitionVariants.slideRight;\n\n case \"left\":\n return TransitionVariants.slideLeft;\n\n case \"bottom\":\n return TransitionVariants.slideDown;\n\n case \"top\":\n return TransitionVariants.slideUp;\n\n default:\n return TransitionVariants.slideRight;\n }\n}\nvar TransitionDefaults = {\n enter: {\n duration: 0.2,\n ease: TransitionEasings.easeOut\n },\n exit: {\n duration: 0.1,\n ease: TransitionEasings.easeIn\n }\n};\nvar withDelay = {\n enter: function enter(transition, delay) {\n return _extends({}, transition, {\n delay: isNumber(delay) ? delay : delay == null ? void 0 : delay[\"enter\"]\n });\n },\n exit: function exit(transition, delay) {\n return _extends({}, transition, {\n delay: isNumber(delay) ? delay : delay == null ? void 0 : delay[\"exit\"]\n });\n }\n};\n\nvar _excluded$4 = [\"in\", \"unmountOnExit\", \"animateOpacity\", \"startingHeight\", \"endingHeight\", \"style\", \"className\", \"transition\", \"transitionEnd\"];\n\nvar isNumeric = function isNumeric(value) {\n return value != null && parseInt(value.toString(), 10) > 0;\n};\n\nvar defaultTransitions = {\n exit: {\n height: {\n duration: 0.2,\n ease: TransitionEasings.ease\n },\n opacity: {\n duration: 0.3,\n ease: TransitionEasings.ease\n }\n },\n enter: {\n height: {\n duration: 0.3,\n ease: TransitionEasings.ease\n },\n opacity: {\n duration: 0.4,\n ease: TransitionEasings.ease\n }\n }\n};\nvar variants$4 = {\n exit: function exit(_ref) {\n var _transition$exit;\n\n var animateOpacity = _ref.animateOpacity,\n startingHeight = _ref.startingHeight,\n transition = _ref.transition,\n transitionEnd = _ref.transitionEnd,\n delay = _ref.delay;\n return _extends({}, animateOpacity && {\n opacity: isNumeric(startingHeight) ? 1 : 0\n }, {\n height: startingHeight,\n transitionEnd: transitionEnd == null ? void 0 : transitionEnd.exit,\n transition: (_transition$exit = transition == null ? void 0 : transition.exit) != null ? _transition$exit : withDelay.exit(defaultTransitions.exit, delay)\n });\n },\n enter: function enter(_ref2) {\n var _transition$enter;\n\n var animateOpacity = _ref2.animateOpacity,\n endingHeight = _ref2.endingHeight,\n transition = _ref2.transition,\n transitionEnd = _ref2.transitionEnd,\n delay = _ref2.delay;\n return _extends({}, animateOpacity && {\n opacity: 1\n }, {\n height: endingHeight,\n transitionEnd: transitionEnd == null ? void 0 : transitionEnd.enter,\n transition: (_transition$enter = transition == null ? void 0 : transition.enter) != null ? _transition$enter : withDelay.enter(defaultTransitions.enter, delay)\n });\n }\n};\nvar Collapse = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var isOpen = props[\"in\"],\n unmountOnExit = props.unmountOnExit,\n _props$animateOpacity = props.animateOpacity,\n animateOpacity = _props$animateOpacity === void 0 ? true : _props$animateOpacity,\n _props$startingHeight = props.startingHeight,\n startingHeight = _props$startingHeight === void 0 ? 0 : _props$startingHeight,\n _props$endingHeight = props.endingHeight,\n endingHeight = _props$endingHeight === void 0 ? \"auto\" : _props$endingHeight,\n style = props.style,\n className = props.className,\n transition = props.transition,\n transitionEnd = props.transitionEnd,\n rest = _objectWithoutPropertiesLoose(props, _excluded$4);\n\n var _React$useState = React.useState(false),\n mounted = _React$useState[0],\n setMounted = _React$useState[1];\n\n React.useEffect(function () {\n var timeout = setTimeout(function () {\n setMounted(true);\n });\n return function () {\n return clearTimeout(timeout);\n };\n }, []);\n /**\n * Warn 🚨: `startingHeight` and `unmountOnExit` are mutually exclusive\n *\n * If you specify a starting height, the collapsed needs to be mounted\n * for the height to take effect.\n */\n\n warn({\n condition: Boolean(startingHeight > 0 && unmountOnExit),\n message: \"startingHeight and unmountOnExit are mutually exclusive. You can't use them together\"\n });\n var hasStartingHeight = parseFloat(startingHeight.toString()) > 0;\n var custom = {\n startingHeight: startingHeight,\n endingHeight: endingHeight,\n animateOpacity: animateOpacity,\n transition: !mounted ? {\n enter: {\n duration: 0\n }\n } : transition,\n transitionEnd: mergeWith(transitionEnd, {\n exit: unmountOnExit ? undefined : {\n display: hasStartingHeight ? \"block\" : \"none\"\n }\n })\n };\n var show = unmountOnExit ? isOpen : true;\n var animate = isOpen || unmountOnExit ? \"enter\" : \"exit\";\n return /*#__PURE__*/React.createElement(AnimatePresence, {\n initial: false,\n custom: custom\n }, show && /*#__PURE__*/React.createElement(motion.div, _extends({\n ref: ref\n }, rest, {\n className: cx(\"chakra-collapse\", className),\n style: _extends({\n overflow: \"hidden\",\n display: \"block\"\n }, style),\n custom: custom,\n variants: variants$4,\n initial: unmountOnExit ? \"exit\" : false,\n animate: animate,\n exit: \"exit\"\n })));\n});\n\nif (__DEV__) {\n Collapse.displayName = \"Collapse\";\n}\n\nvar _excluded$3 = [\"unmountOnExit\", \"in\", \"className\", \"transition\", \"transitionEnd\", \"delay\"];\nvar variants$3 = {\n enter: function enter(_temp) {\n var _transition$enter;\n\n var _ref = _temp === void 0 ? {} : _temp,\n transition = _ref.transition,\n transitionEnd = _ref.transitionEnd,\n delay = _ref.delay;\n\n return {\n opacity: 1,\n transition: (_transition$enter = transition == null ? void 0 : transition.enter) != null ? _transition$enter : withDelay.enter(TransitionDefaults.enter, delay),\n transitionEnd: transitionEnd == null ? void 0 : transitionEnd.enter\n };\n },\n exit: function exit(_temp2) {\n var _transition$exit;\n\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n transition = _ref2.transition,\n transitionEnd = _ref2.transitionEnd,\n delay = _ref2.delay;\n\n return {\n opacity: 0,\n transition: (_transition$exit = transition == null ? void 0 : transition.exit) != null ? _transition$exit : withDelay.exit(TransitionDefaults.exit, delay),\n transitionEnd: transitionEnd == null ? void 0 : transitionEnd.exit\n };\n }\n};\nvar fadeConfig = {\n initial: \"exit\",\n animate: \"enter\",\n exit: \"exit\",\n variants: variants$3\n};\nvar Fade = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var unmountOnExit = props.unmountOnExit,\n isOpen = props[\"in\"],\n className = props.className,\n transition = props.transition,\n transitionEnd = props.transitionEnd,\n delay = props.delay,\n rest = _objectWithoutPropertiesLoose(props, _excluded$3);\n\n var animate = isOpen || unmountOnExit ? \"enter\" : \"exit\";\n var show = unmountOnExit ? isOpen && unmountOnExit : true;\n var custom = {\n transition: transition,\n transitionEnd: transitionEnd,\n delay: delay\n };\n return /*#__PURE__*/React.createElement(AnimatePresence, {\n custom: custom\n }, show && /*#__PURE__*/React.createElement(motion.div, _extends({\n ref: ref,\n className: cx(\"chakra-fade\", className),\n custom: custom\n }, fadeConfig, {\n animate: animate\n }, rest)));\n});\n\nif (__DEV__) {\n Fade.displayName = \"Fade\";\n}\n\nvar _excluded$2 = [\"unmountOnExit\", \"in\", \"reverse\", \"initialScale\", \"className\", \"transition\", \"transitionEnd\", \"delay\"];\nvar variants$2 = {\n exit: function exit(_ref) {\n var _transition$exit;\n\n var reverse = _ref.reverse,\n initialScale = _ref.initialScale,\n transition = _ref.transition,\n transitionEnd = _ref.transitionEnd,\n delay = _ref.delay;\n return _extends({\n opacity: 0\n }, reverse ? {\n scale: initialScale,\n transitionEnd: transitionEnd == null ? void 0 : transitionEnd.exit\n } : {\n transitionEnd: _extends({\n scale: initialScale\n }, transitionEnd == null ? void 0 : transitionEnd.exit)\n }, {\n transition: (_transition$exit = transition == null ? void 0 : transition.exit) != null ? _transition$exit : withDelay.exit(TransitionDefaults.exit, delay)\n });\n },\n enter: function enter(_ref2) {\n var _transition$enter;\n\n var transitionEnd = _ref2.transitionEnd,\n transition = _ref2.transition,\n delay = _ref2.delay;\n return {\n opacity: 1,\n scale: 1,\n transition: (_transition$enter = transition == null ? void 0 : transition.enter) != null ? _transition$enter : withDelay.enter(TransitionDefaults.enter, delay),\n transitionEnd: transitionEnd == null ? void 0 : transitionEnd.enter\n };\n }\n};\nvar scaleFadeConfig = {\n initial: \"exit\",\n animate: \"enter\",\n exit: \"exit\",\n variants: variants$2\n};\nvar ScaleFade = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var unmountOnExit = props.unmountOnExit,\n isOpen = props[\"in\"],\n _props$reverse = props.reverse,\n reverse = _props$reverse === void 0 ? true : _props$reverse,\n _props$initialScale = props.initialScale,\n initialScale = _props$initialScale === void 0 ? 0.95 : _props$initialScale,\n className = props.className,\n transition = props.transition,\n transitionEnd = props.transitionEnd,\n delay = props.delay,\n rest = _objectWithoutPropertiesLoose(props, _excluded$2);\n\n var show = unmountOnExit ? isOpen && unmountOnExit : true;\n var animate = isOpen || unmountOnExit ? \"enter\" : \"exit\";\n var custom = {\n initialScale: initialScale,\n reverse: reverse,\n transition: transition,\n transitionEnd: transitionEnd,\n delay: delay\n };\n return /*#__PURE__*/React.createElement(AnimatePresence, {\n custom: custom\n }, show && /*#__PURE__*/React.createElement(motion.div, _extends({\n ref: ref,\n className: cx(\"chakra-offset-slide\", className)\n }, scaleFadeConfig, {\n animate: animate,\n custom: custom\n }, rest)));\n});\n\nif (__DEV__) {\n ScaleFade.displayName = \"ScaleFade\";\n}\n\nvar _excluded$1 = [\"direction\", \"style\", \"unmountOnExit\", \"in\", \"className\", \"transition\", \"transitionEnd\", \"delay\"];\nvar defaultTransition = {\n exit: {\n duration: 0.15,\n ease: TransitionEasings.easeInOut\n },\n enter: {\n type: \"spring\",\n damping: 25,\n stiffness: 180\n }\n};\nvar variants$1 = {\n exit: function exit(_ref) {\n var _transition$exit;\n\n var direction = _ref.direction,\n transition = _ref.transition,\n transitionEnd = _ref.transitionEnd,\n delay = _ref.delay;\n\n var _slideTransition = slideTransition({\n direction: direction\n }),\n exitStyles = _slideTransition.exit;\n\n return _extends({}, exitStyles, {\n transition: (_transition$exit = transition == null ? void 0 : transition.exit) != null ? _transition$exit : withDelay.exit(defaultTransition.exit, delay),\n transitionEnd: transitionEnd == null ? void 0 : transitionEnd.exit\n });\n },\n enter: function enter(_ref2) {\n var _transition$enter;\n\n var direction = _ref2.direction,\n transitionEnd = _ref2.transitionEnd,\n transition = _ref2.transition,\n delay = _ref2.delay;\n\n var _slideTransition2 = slideTransition({\n direction: direction\n }),\n enterStyles = _slideTransition2.enter;\n\n return _extends({}, enterStyles, {\n transition: (_transition$enter = transition == null ? void 0 : transition.enter) != null ? _transition$enter : withDelay.enter(defaultTransition.enter, delay),\n transitionEnd: transitionEnd == null ? void 0 : transitionEnd.enter\n });\n }\n};\nvar Slide = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _props$direction = props.direction,\n direction = _props$direction === void 0 ? \"right\" : _props$direction,\n style = props.style,\n unmountOnExit = props.unmountOnExit,\n isOpen = props[\"in\"],\n className = props.className,\n transition = props.transition,\n transitionEnd = props.transitionEnd,\n delay = props.delay,\n rest = _objectWithoutPropertiesLoose(props, _excluded$1);\n\n var transitionStyles = slideTransition({\n direction: direction\n });\n var computedStyle = Object.assign({\n position: \"fixed\"\n }, transitionStyles.position, style);\n var show = unmountOnExit ? isOpen && unmountOnExit : true;\n var animate = isOpen || unmountOnExit ? \"enter\" : \"exit\";\n var custom = {\n transitionEnd: transitionEnd,\n transition: transition,\n direction: direction,\n delay: delay\n };\n return /*#__PURE__*/React.createElement(AnimatePresence, {\n custom: custom\n }, show && /*#__PURE__*/React.createElement(motion.div, _extends({}, rest, {\n ref: ref,\n initial: \"exit\",\n className: cx(\"chakra-slide\", className),\n animate: animate,\n exit: \"exit\",\n custom: custom,\n variants: variants$1,\n style: computedStyle\n })));\n});\n\nif (__DEV__) {\n Slide.displayName = \"Slide\";\n}\n\nvar _excluded = [\"unmountOnExit\", \"in\", \"reverse\", \"className\", \"offsetX\", \"offsetY\", \"transition\", \"transitionEnd\", \"delay\"];\nvar variants = {\n initial: function initial(_ref) {\n var _transition$exit;\n\n var offsetX = _ref.offsetX,\n offsetY = _ref.offsetY,\n transition = _ref.transition,\n transitionEnd = _ref.transitionEnd,\n delay = _ref.delay;\n return {\n opacity: 0,\n x: offsetX,\n y: offsetY,\n transition: (_transition$exit = transition == null ? void 0 : transition.exit) != null ? _transition$exit : withDelay.exit(TransitionDefaults.exit, delay),\n transitionEnd: transitionEnd == null ? void 0 : transitionEnd.exit\n };\n },\n enter: function enter(_ref2) {\n var _transition$enter;\n\n var transition = _ref2.transition,\n transitionEnd = _ref2.transitionEnd,\n delay = _ref2.delay;\n return {\n opacity: 1,\n x: 0,\n y: 0,\n transition: (_transition$enter = transition == null ? void 0 : transition.enter) != null ? _transition$enter : withDelay.enter(TransitionDefaults.enter, delay),\n transitionEnd: transitionEnd == null ? void 0 : transitionEnd.enter\n };\n },\n exit: function exit(_ref3) {\n var _transition$exit2;\n\n var offsetY = _ref3.offsetY,\n offsetX = _ref3.offsetX,\n transition = _ref3.transition,\n transitionEnd = _ref3.transitionEnd,\n reverse = _ref3.reverse,\n delay = _ref3.delay;\n var offset = {\n x: offsetX,\n y: offsetY\n };\n return _extends({\n opacity: 0,\n transition: (_transition$exit2 = transition == null ? void 0 : transition.exit) != null ? _transition$exit2 : withDelay.exit(TransitionDefaults.exit, delay)\n }, reverse ? _extends({}, offset, {\n transitionEnd: transitionEnd == null ? void 0 : transitionEnd.exit\n }) : {\n transitionEnd: _extends({}, offset, transitionEnd == null ? void 0 : transitionEnd.exit)\n });\n }\n};\nvar slideFadeConfig = {\n initial: \"initial\",\n animate: \"enter\",\n exit: \"exit\",\n variants: variants\n};\nvar SlideFade = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var unmountOnExit = props.unmountOnExit,\n isOpen = props[\"in\"],\n _props$reverse = props.reverse,\n reverse = _props$reverse === void 0 ? true : _props$reverse,\n className = props.className,\n _props$offsetX = props.offsetX,\n offsetX = _props$offsetX === void 0 ? 0 : _props$offsetX,\n _props$offsetY = props.offsetY,\n offsetY = _props$offsetY === void 0 ? 8 : _props$offsetY,\n transition = props.transition,\n transitionEnd = props.transitionEnd,\n delay = props.delay,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n\n var show = unmountOnExit ? isOpen && unmountOnExit : true;\n var animate = isOpen || unmountOnExit ? \"enter\" : \"exit\";\n var custom = {\n offsetX: offsetX,\n offsetY: offsetY,\n reverse: reverse,\n transition: transition,\n transitionEnd: transitionEnd,\n delay: delay\n };\n return /*#__PURE__*/React.createElement(AnimatePresence, {\n custom: custom\n }, show && /*#__PURE__*/React.createElement(motion.div, _extends({\n ref: ref,\n className: cx(\"chakra-offset-slide\", className),\n custom: custom\n }, slideFadeConfig, {\n animate: animate\n }, rest)));\n});\n\nif (__DEV__) {\n SlideFade.displayName = \"SlideFade\";\n}\n\nexport { Collapse, TransitionEasings as EASINGS, Fade, ScaleFade, Slide, SlideFade, fadeConfig, scaleFadeConfig, slideFadeConfig };\n","import { createContext, mergeRefs } from '@chakra-ui/react-utils';\nimport { useLayoutEffect, useEffect, useRef, useState } from 'react';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n/**\n * Sort an array of DOM nodes according to the HTML tree order\n * @see http://www.w3.org/TR/html5/infrastructure.html#tree-order\n */\n\nfunction sortNodes(nodes) {\n return nodes.sort(function (a, b) {\n var compare = a.compareDocumentPosition(b);\n\n if (compare & Node.DOCUMENT_POSITION_FOLLOWING || compare & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n // a < b\n return -1;\n }\n\n if (compare & Node.DOCUMENT_POSITION_PRECEDING || compare & Node.DOCUMENT_POSITION_CONTAINS) {\n // a > b\n return 1;\n }\n\n if (compare & Node.DOCUMENT_POSITION_DISCONNECTED || compare & Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC) {\n throw Error(\"Cannot sort the given nodes.\");\n } else {\n return 0;\n }\n });\n}\nvar isElement = function isElement(el) {\n return typeof el == \"object\" && \"nodeType\" in el && el.nodeType === Node.ELEMENT_NODE;\n};\nfunction getNextIndex(current, max, loop) {\n var next = current + 1;\n if (loop && next >= max) next = 0;\n return next;\n}\nfunction getPrevIndex(current, max, loop) {\n var next = current - 1;\n if (loop && next < 0) next = max;\n return next;\n}\nvar useSafeLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\nvar cast = function cast(value) {\n return value;\n};\n\n/**\n * @internal\n *\n * Class to manage descendants and their relative indices in the DOM.\n * It uses `node.compareDocumentPosition(...)` under the hood\n */\nvar DescendantsManager = function DescendantsManager() {\n var _this = this;\n\n this.descendants = new Map();\n\n this.register = function (nodeOrOptions) {\n if (nodeOrOptions == null) return;\n\n if (isElement(nodeOrOptions)) {\n return _this.registerNode(nodeOrOptions);\n }\n\n return function (node) {\n _this.registerNode(node, nodeOrOptions);\n };\n };\n\n this.unregister = function (node) {\n _this.descendants[\"delete\"](node);\n\n var sorted = sortNodes(Array.from(_this.descendants.keys()));\n\n _this.assignIndex(sorted);\n };\n\n this.destroy = function () {\n _this.descendants.clear();\n };\n\n this.assignIndex = function (descendants) {\n _this.descendants.forEach(function (descendant) {\n var index = descendants.indexOf(descendant.node);\n descendant.index = index;\n descendant.node.dataset[\"index\"] = descendant.index.toString();\n });\n };\n\n this.count = function () {\n return _this.descendants.size;\n };\n\n this.enabledCount = function () {\n return _this.enabledValues().length;\n };\n\n this.values = function () {\n var values = Array.from(_this.descendants.values());\n return values.sort(function (a, b) {\n return a.index - b.index;\n });\n };\n\n this.enabledValues = function () {\n return _this.values().filter(function (descendant) {\n return !descendant.disabled;\n });\n };\n\n this.item = function (index) {\n if (_this.count() === 0) return undefined;\n return _this.values()[index];\n };\n\n this.enabledItem = function (index) {\n if (_this.enabledCount() === 0) return undefined;\n return _this.enabledValues()[index];\n };\n\n this.first = function () {\n return _this.item(0);\n };\n\n this.firstEnabled = function () {\n return _this.enabledItem(0);\n };\n\n this.last = function () {\n return _this.item(_this.descendants.size - 1);\n };\n\n this.lastEnabled = function () {\n var lastIndex = _this.enabledValues().length - 1;\n return _this.enabledItem(lastIndex);\n };\n\n this.indexOf = function (node) {\n var _this$descendants$get, _this$descendants$get2;\n\n if (!node) return -1;\n return (_this$descendants$get = (_this$descendants$get2 = _this.descendants.get(node)) == null ? void 0 : _this$descendants$get2.index) != null ? _this$descendants$get : -1;\n };\n\n this.enabledIndexOf = function (node) {\n if (node == null) return -1;\n return _this.enabledValues().findIndex(function (i) {\n return i.node.isSameNode(node);\n });\n };\n\n this.next = function (index, loop) {\n if (loop === void 0) {\n loop = true;\n }\n\n var next = getNextIndex(index, _this.count(), loop);\n return _this.item(next);\n };\n\n this.nextEnabled = function (index, loop) {\n if (loop === void 0) {\n loop = true;\n }\n\n var item = _this.item(index);\n\n if (!item) return;\n\n var enabledIndex = _this.enabledIndexOf(item.node);\n\n var nextEnabledIndex = getNextIndex(enabledIndex, _this.enabledCount(), loop);\n return _this.enabledItem(nextEnabledIndex);\n };\n\n this.prev = function (index, loop) {\n if (loop === void 0) {\n loop = true;\n }\n\n var prev = getPrevIndex(index, _this.count() - 1, loop);\n return _this.item(prev);\n };\n\n this.prevEnabled = function (index, loop) {\n if (loop === void 0) {\n loop = true;\n }\n\n var item = _this.item(index);\n\n if (!item) return;\n\n var enabledIndex = _this.enabledIndexOf(item.node);\n\n var prevEnabledIndex = getPrevIndex(enabledIndex, _this.enabledCount() - 1, loop);\n return _this.enabledItem(prevEnabledIndex);\n };\n\n this.registerNode = function (node, options) {\n if (!node || _this.descendants.has(node)) return;\n var keys = Array.from(_this.descendants.keys()).concat(node);\n var sorted = sortNodes(keys);\n\n if (options != null && options.disabled) {\n options.disabled = !!options.disabled;\n }\n\n var descendant = _extends({\n node: node,\n index: -1\n }, options);\n\n _this.descendants.set(node, descendant);\n\n _this.assignIndex(sorted);\n };\n};\n\n/**\n * @internal\n * React hook that initializes the DescendantsManager\n */\n\nfunction useDescendants() {\n var descendants = useRef(new DescendantsManager());\n useSafeLayoutEffect(function () {\n return function () {\n return descendants.current.destroy();\n };\n });\n return descendants.current;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Descendants context to be used in component-land.\n - Mount the `DescendantsContextProvider` at the root of the component\n - Call `useDescendantsContext` anywhere you need access to the descendants information\n\n NB: I recommend using `createDescendantContext` below\n * -----------------------------------------------------------------------------------------------*/\nvar _createContext = createContext({\n name: \"DescendantsProvider\",\n errorMessage: \"useDescendantsContext must be used within DescendantsProvider\"\n}),\n DescendantsContextProvider = _createContext[0],\n useDescendantsContext = _createContext[1];\n/**\n * @internal\n * This hook provides information a descendant such as:\n * - Its index compared to other descendants\n * - ref callback to register the descendant\n * - Its enabled index compared to other enabled descendants\n */\n\n\nfunction useDescendant(options) {\n var descendants = useDescendantsContext();\n\n var _useState = useState(-1),\n index = _useState[0],\n setIndex = _useState[1];\n\n var ref = useRef(null);\n useSafeLayoutEffect(function () {\n return function () {\n if (!ref.current) return;\n descendants.unregister(ref.current);\n };\n }, []);\n useSafeLayoutEffect(function () {\n if (!ref.current) return;\n var dataIndex = Number(ref.current.dataset[\"index\"]);\n\n if (index != dataIndex && !Number.isNaN(dataIndex)) {\n setIndex(dataIndex);\n }\n });\n var refCallback = options ? cast(descendants.register(options)) : cast(descendants.register);\n return {\n descendants: descendants,\n index: index,\n enabledIndex: descendants.enabledIndexOf(ref.current),\n register: mergeRefs(refCallback, ref)\n };\n}\n/* -------------------------------------------------------------------------------------------------\n * Function that provides strongly typed versions of the context provider and hooks above.\n To be used in component-land\n * -----------------------------------------------------------------------------------------------*/\n\n\nfunction createDescendantContext() {\n var ContextProvider = cast(DescendantsContextProvider);\n\n var _useDescendantsContext = function _useDescendantsContext() {\n return cast(useDescendantsContext());\n };\n\n var _useDescendant = function _useDescendant(options) {\n return useDescendant(options);\n };\n\n var _useDescendants = function _useDescendants() {\n return useDescendants();\n };\n\n return [// context provider\n ContextProvider, // call this when you need to read from context\n _useDescendantsContext, // descendants state information, to be called and passed to `ContextProvider`\n _useDescendants, // descendant index information\n _useDescendant];\n}\n\nexport { createDescendantContext, createDescendantContext as default };\n","import { useMergeRefs } from '@chakra-ui/hooks';\nimport { forwardRef, chakra, useStyleConfig, omitThemingProps } from '@chakra-ui/system';\nimport { cx, __DEV__, mergeWith, dataAttr } from '@chakra-ui/utils';\nimport * as React from 'react';\nimport { createContext } from '@chakra-ui/react-utils';\nimport { Spinner } from '@chakra-ui/spinner';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar _excluded$4 = [\"size\", \"colorScheme\", \"variant\", \"className\", \"spacing\", \"isAttached\", \"isDisabled\"];\n\nvar _createContext = createContext({\n strict: false,\n name: \"ButtonGroupContext\"\n}),\n ButtonGroupProvider = _createContext[0],\n useButtonGroup = _createContext[1];\nvar ButtonGroup = /*#__PURE__*/forwardRef(function (props, ref) {\n var size = props.size,\n colorScheme = props.colorScheme,\n variant = props.variant,\n className = props.className,\n _props$spacing = props.spacing,\n spacing = _props$spacing === void 0 ? \"0.5rem\" : _props$spacing,\n isAttached = props.isAttached,\n isDisabled = props.isDisabled,\n rest = _objectWithoutPropertiesLoose(props, _excluded$4);\n\n var _className = cx(\"chakra-button__group\", className);\n\n var context = React.useMemo(function () {\n return {\n size: size,\n colorScheme: colorScheme,\n variant: variant,\n isDisabled: isDisabled\n };\n }, [size, colorScheme, variant, isDisabled]);\n var groupStyles = {\n display: \"inline-flex\"\n };\n\n if (isAttached) {\n groupStyles = _extends({}, groupStyles, {\n \"> *:first-of-type:not(:last-of-type)\": {\n borderEndRadius: 0\n },\n \"> *:not(:first-of-type):not(:last-of-type)\": {\n borderRadius: 0\n },\n \"> *:not(:first-of-type):last-of-type\": {\n borderStartRadius: 0\n }\n });\n } else {\n groupStyles = _extends({}, groupStyles, {\n \"& > *:not(style) ~ *:not(style)\": {\n marginStart: spacing\n }\n });\n }\n\n return /*#__PURE__*/React.createElement(ButtonGroupProvider, {\n value: context\n }, /*#__PURE__*/React.createElement(chakra.div, _extends({\n ref: ref,\n role: \"group\",\n __css: groupStyles,\n className: _className,\n \"data-attached\": isAttached ? \"\" : undefined\n }, rest)));\n});\n\nif (__DEV__) {\n ButtonGroup.displayName = \"ButtonGroup\";\n}\n\nvar _excluded$3 = [\"label\", \"placement\", \"spacing\", \"children\", \"className\", \"__css\"];\nvar ButtonSpinner = function ButtonSpinner(props) {\n var label = props.label,\n placement = props.placement,\n _props$spacing = props.spacing,\n spacing = _props$spacing === void 0 ? \"0.5rem\" : _props$spacing,\n _props$children = props.children,\n children = _props$children === void 0 ? /*#__PURE__*/React.createElement(Spinner, {\n color: \"currentColor\",\n width: \"1em\",\n height: \"1em\"\n }) : _props$children,\n className = props.className,\n __css = props.__css,\n rest = _objectWithoutPropertiesLoose(props, _excluded$3);\n\n var _className = cx(\"chakra-button__spinner\", className);\n\n var marginProp = placement === \"start\" ? \"marginEnd\" : \"marginStart\";\n var spinnerStyles = React.useMemo(function () {\n var _extends2;\n\n return _extends((_extends2 = {\n display: \"flex\",\n alignItems: \"center\",\n position: label ? \"relative\" : \"absolute\"\n }, _extends2[marginProp] = label ? spacing : 0, _extends2.fontSize = \"1em\", _extends2.lineHeight = \"normal\", _extends2), __css);\n }, [__css, label, marginProp, spacing]);\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n className: _className\n }, rest, {\n __css: spinnerStyles\n }), children);\n};\n\nif (__DEV__) {\n ButtonSpinner.displayName = \"ButtonSpinner\";\n}\n\nvar _excluded$2 = [\"children\", \"className\"];\nvar ButtonIcon = function ButtonIcon(props) {\n var children = props.children,\n className = props.className,\n rest = _objectWithoutPropertiesLoose(props, _excluded$2);\n\n var _children = /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, {\n \"aria-hidden\": true,\n focusable: false\n }) : children;\n\n var _className = cx(\"chakra-button__icon\", className);\n\n return /*#__PURE__*/React.createElement(chakra.span, _extends({\n display: \"inline-flex\",\n alignSelf: \"center\",\n flexShrink: 0\n }, rest, {\n className: _className\n }), _children);\n};\n\nif (__DEV__) {\n ButtonIcon.displayName = \"ButtonIcon\";\n}\n\nfunction useButtonType(value) {\n var _React$useState = React.useState(!value),\n isButton = _React$useState[0],\n setIsButton = _React$useState[1];\n\n var refCallback = React.useCallback(function (node) {\n if (!node) return;\n setIsButton(node.tagName === \"BUTTON\");\n }, []);\n var type = isButton ? \"button\" : undefined;\n return {\n ref: refCallback,\n type: type\n };\n}\n\nvar _excluded$1 = [\"isDisabled\", \"isLoading\", \"isActive\", \"children\", \"leftIcon\", \"rightIcon\", \"loadingText\", \"iconSpacing\", \"type\", \"spinner\", \"spinnerPlacement\", \"className\", \"as\"];\nvar Button = /*#__PURE__*/forwardRef(function (props, ref) {\n var group = useButtonGroup();\n var styles = useStyleConfig(\"Button\", _extends({}, group, props));\n\n var _omitThemingProps = omitThemingProps(props),\n _omitThemingProps$isD = _omitThemingProps.isDisabled,\n isDisabled = _omitThemingProps$isD === void 0 ? group == null ? void 0 : group.isDisabled : _omitThemingProps$isD,\n isLoading = _omitThemingProps.isLoading,\n isActive = _omitThemingProps.isActive,\n children = _omitThemingProps.children,\n leftIcon = _omitThemingProps.leftIcon,\n rightIcon = _omitThemingProps.rightIcon,\n loadingText = _omitThemingProps.loadingText,\n _omitThemingProps$ico = _omitThemingProps.iconSpacing,\n iconSpacing = _omitThemingProps$ico === void 0 ? \"0.5rem\" : _omitThemingProps$ico,\n type = _omitThemingProps.type,\n spinner = _omitThemingProps.spinner,\n _omitThemingProps$spi = _omitThemingProps.spinnerPlacement,\n spinnerPlacement = _omitThemingProps$spi === void 0 ? \"start\" : _omitThemingProps$spi,\n className = _omitThemingProps.className,\n as = _omitThemingProps.as,\n rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded$1);\n /**\n * When button is used within ButtonGroup (i.e. flushed with sibling buttons),\n * it is important to add a `zIndex` on focus.\n *\n * So let's read the component styles and then add `zIndex` to it.\n */\n\n\n var buttonStyles = React.useMemo(function () {\n var _styles$_focus;\n\n var _focus = mergeWith({}, (_styles$_focus = styles == null ? void 0 : styles[\"_focus\"]) != null ? _styles$_focus : {}, {\n zIndex: 1\n });\n\n return _extends({\n display: \"inline-flex\",\n appearance: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n userSelect: \"none\",\n position: \"relative\",\n whiteSpace: \"nowrap\",\n verticalAlign: \"middle\",\n outline: \"none\"\n }, styles, !!group && {\n _focus: _focus\n });\n }, [styles, group]);\n\n var _useButtonType = useButtonType(as),\n _ref = _useButtonType.ref,\n defaultType = _useButtonType.type;\n\n var contentProps = {\n rightIcon: rightIcon,\n leftIcon: leftIcon,\n iconSpacing: iconSpacing,\n children: children\n };\n return /*#__PURE__*/React.createElement(chakra.button, _extends({\n disabled: isDisabled || isLoading,\n ref: useMergeRefs(ref, _ref),\n as: as,\n type: type != null ? type : defaultType,\n \"data-active\": dataAttr(isActive),\n \"data-loading\": dataAttr(isLoading),\n __css: buttonStyles,\n className: cx(\"chakra-button\", className)\n }, rest), isLoading && spinnerPlacement === \"start\" && /*#__PURE__*/React.createElement(ButtonSpinner, {\n className: \"chakra-button__spinner--start\",\n label: loadingText,\n placement: \"start\",\n spacing: iconSpacing\n }, spinner), isLoading ? loadingText || /*#__PURE__*/React.createElement(chakra.span, {\n opacity: 0\n }, /*#__PURE__*/React.createElement(ButtonContent, contentProps)) : /*#__PURE__*/React.createElement(ButtonContent, contentProps), isLoading && spinnerPlacement === \"end\" && /*#__PURE__*/React.createElement(ButtonSpinner, {\n className: \"chakra-button__spinner--end\",\n label: loadingText,\n placement: \"end\",\n spacing: iconSpacing\n }, spinner));\n});\n\nif (__DEV__) {\n Button.displayName = \"Button\";\n}\n\nfunction ButtonContent(props) {\n var leftIcon = props.leftIcon,\n rightIcon = props.rightIcon,\n children = props.children,\n iconSpacing = props.iconSpacing;\n return /*#__PURE__*/React.createElement(React.Fragment, null, leftIcon && /*#__PURE__*/React.createElement(ButtonIcon, {\n marginEnd: iconSpacing\n }, leftIcon), children, rightIcon && /*#__PURE__*/React.createElement(ButtonIcon, {\n marginStart: iconSpacing\n }, rightIcon));\n}\n\nvar _excluded = [\"icon\", \"children\", \"isRound\", \"aria-label\"];\nvar IconButton = /*#__PURE__*/forwardRef(function (props, ref) {\n var icon = props.icon,\n children = props.children,\n isRound = props.isRound,\n ariaLabel = props[\"aria-label\"],\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n /**\n * Passing the icon as prop or children should work\n */\n\n\n var element = icon || children;\n\n var _children = /*#__PURE__*/React.isValidElement(element) ? /*#__PURE__*/React.cloneElement(element, {\n \"aria-hidden\": true,\n focusable: false\n }) : null;\n\n return /*#__PURE__*/React.createElement(Button, _extends({\n padding: \"0\",\n borderRadius: isRound ? \"full\" : undefined,\n ref: ref,\n \"aria-label\": ariaLabel\n }, rest), _children);\n});\n\nif (__DEV__) {\n IconButton.displayName = \"IconButton\";\n}\n\nexport { Button, ButtonGroup, ButtonSpinner, IconButton, useButtonGroup };\n","import { useId, useBoolean } from '@chakra-ui/hooks';\nimport { createStylesContext, forwardRef, useMultiStyleConfig, omitThemingProps, chakra, useStyleConfig } from '@chakra-ui/system';\nimport { cx, __DEV__, dataAttr, callAllHandlers, ariaAttr } from '@chakra-ui/utils';\nimport { createContext, mergeRefs } from '@chakra-ui/react-utils';\nimport * as React from 'react';\nimport Icon from '@chakra-ui/icon';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded$2 = [\"id\", \"isRequired\", \"isInvalid\", \"isDisabled\", \"isReadOnly\"],\n _excluded2$1 = [\"getRootProps\", \"htmlProps\"];\n\nvar _createStylesContext$1 = createStylesContext(\"FormControl\"),\n StylesProvider$1 = _createStylesContext$1[0],\n useStyles$1 = _createStylesContext$1[1];\n\nvar useFormControlStyles = useStyles$1;\n\nvar _createContext = createContext({\n strict: false,\n name: \"FormControlContext\"\n}),\n FormControlProvider = _createContext[0],\n useFormControlContext = _createContext[1];\n\nfunction useFormControlProvider(props) {\n var idProp = props.id,\n isRequired = props.isRequired,\n isInvalid = props.isInvalid,\n isDisabled = props.isDisabled,\n isReadOnly = props.isReadOnly,\n htmlProps = _objectWithoutPropertiesLoose(props, _excluded$2); // Generate all the required ids\n\n\n var uuid = useId();\n var id = idProp || \"field-\" + uuid;\n var labelId = id + \"-label\";\n var feedbackId = id + \"-feedback\";\n var helpTextId = id + \"-helptext\";\n /**\n * Track whether the `FormErrorMessage` has been rendered.\n * We use this to append its id the `aria-describedby` of the `input`.\n */\n\n var _React$useState = React.useState(false),\n hasFeedbackText = _React$useState[0],\n setHasFeedbackText = _React$useState[1];\n /**\n * Track whether the `FormHelperText` has been rendered.\n * We use this to append its id the `aria-describedby` of the `input`.\n */\n\n\n var _React$useState2 = React.useState(false),\n hasHelpText = _React$useState2[0],\n setHasHelpText = _React$useState2[1]; // Track whether the form element (e.g, `input`) has focus.\n\n\n var _useBoolean = useBoolean(),\n isFocused = _useBoolean[0],\n setFocus = _useBoolean[1];\n\n var getHelpTextProps = React.useCallback(function (props, forwardedRef) {\n if (props === void 0) {\n props = {};\n }\n\n if (forwardedRef === void 0) {\n forwardedRef = null;\n }\n\n return _extends({\n id: helpTextId\n }, props, {\n /**\n * Notify the field context when the help text is rendered on screen,\n * so we can apply the correct `aria-describedby` to the field (e.g. input, textarea).\n */\n ref: mergeRefs(forwardedRef, function (node) {\n if (!node) return;\n setHasHelpText(true);\n })\n });\n }, [helpTextId]);\n var getLabelProps = React.useCallback(function (props, forwardedRef) {\n var _props$id, _props$htmlFor;\n\n if (props === void 0) {\n props = {};\n }\n\n if (forwardedRef === void 0) {\n forwardedRef = null;\n }\n\n return _extends({}, props, {\n ref: forwardedRef,\n \"data-focus\": dataAttr(isFocused),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-invalid\": dataAttr(isInvalid),\n \"data-readonly\": dataAttr(isReadOnly),\n id: (_props$id = props.id) != null ? _props$id : labelId,\n htmlFor: (_props$htmlFor = props.htmlFor) != null ? _props$htmlFor : id\n });\n }, [id, isDisabled, isFocused, isInvalid, isReadOnly, labelId]);\n var getErrorMessageProps = React.useCallback(function (props, forwardedRef) {\n if (props === void 0) {\n props = {};\n }\n\n if (forwardedRef === void 0) {\n forwardedRef = null;\n }\n\n return _extends({\n id: feedbackId\n }, props, {\n /**\n * Notify the field context when the error message is rendered on screen,\n * so we can apply the correct `aria-describedby` to the field (e.g. input, textarea).\n */\n ref: mergeRefs(forwardedRef, function (node) {\n if (!node) return;\n setHasFeedbackText(true);\n }),\n \"aria-live\": \"polite\"\n });\n }, [feedbackId]);\n var getRootProps = React.useCallback(function (props, forwardedRef) {\n if (props === void 0) {\n props = {};\n }\n\n if (forwardedRef === void 0) {\n forwardedRef = null;\n }\n\n return _extends({}, props, htmlProps, {\n ref: forwardedRef,\n role: \"group\"\n });\n }, [htmlProps]);\n var getRequiredIndicatorProps = React.useCallback(function (props, forwardedRef) {\n if (props === void 0) {\n props = {};\n }\n\n if (forwardedRef === void 0) {\n forwardedRef = null;\n }\n\n return _extends({}, props, {\n ref: forwardedRef,\n role: \"presentation\",\n \"aria-hidden\": true,\n children: props.children || \"*\"\n });\n }, []);\n return {\n isRequired: !!isRequired,\n isInvalid: !!isInvalid,\n isReadOnly: !!isReadOnly,\n isDisabled: !!isDisabled,\n isFocused: !!isFocused,\n onFocus: setFocus.on,\n onBlur: setFocus.off,\n hasFeedbackText: hasFeedbackText,\n setHasFeedbackText: setHasFeedbackText,\n hasHelpText: hasHelpText,\n setHasHelpText: setHasHelpText,\n id: id,\n labelId: labelId,\n feedbackId: feedbackId,\n helpTextId: helpTextId,\n htmlProps: htmlProps,\n getHelpTextProps: getHelpTextProps,\n getErrorMessageProps: getErrorMessageProps,\n getRootProps: getRootProps,\n getLabelProps: getLabelProps,\n getRequiredIndicatorProps: getRequiredIndicatorProps\n };\n}\n\n/**\n * FormControl provides context such as\n * `isInvalid`, `isDisabled`, and `isRequired` to form elements.\n *\n * This is commonly used in form elements such as `input`,\n * `select`, `textarea`, etc.\n */\nvar FormControl = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useMultiStyleConfig(\"Form\", props);\n var ownProps = omitThemingProps(props);\n\n var _useFormControlProvid = useFormControlProvider(ownProps),\n getRootProps = _useFormControlProvid.getRootProps;\n _useFormControlProvid.htmlProps;\n var context = _objectWithoutPropertiesLoose(_useFormControlProvid, _excluded2$1);\n\n var className = cx(\"chakra-form-control\", props.className);\n return /*#__PURE__*/React.createElement(FormControlProvider, {\n value: context\n }, /*#__PURE__*/React.createElement(StylesProvider$1, {\n value: styles\n }, /*#__PURE__*/React.createElement(chakra.div, _extends({}, getRootProps({}, ref), {\n className: className,\n __css: styles[\"container\"]\n }))));\n});\n\nif (__DEV__) {\n FormControl.displayName = \"FormControl\";\n}\n\n/**\n * FormHelperText\n *\n * Assistive component that conveys additional guidance\n * about the field, such as how it will be used and what\n * types in values should be provided.\n */\nvar FormHelperText = /*#__PURE__*/forwardRef(function (props, ref) {\n var field = useFormControlContext();\n var styles = useStyles$1();\n var className = cx(\"chakra-form__helper-text\", props.className);\n return /*#__PURE__*/React.createElement(chakra.div, _extends({}, field == null ? void 0 : field.getHelpTextProps(props, ref), {\n __css: styles.helperText,\n className: className\n }));\n});\n\nif (__DEV__) {\n FormHelperText.displayName = \"FormHelperText\";\n}\n\nvar _excluded$1 = [\"isDisabled\", \"isInvalid\", \"isReadOnly\", \"isRequired\"],\n _excluded2 = [\"id\", \"disabled\", \"readOnly\", \"required\", \"isRequired\", \"isInvalid\", \"isReadOnly\", \"isDisabled\", \"onFocus\", \"onBlur\"];\n\n/**\n * React hook that provides the props that should be spread on to\n * input fields (`input`, `select`, `textarea`, etc.).\n *\n * It provides a convenient way to control a form fields, validation\n * and helper text.\n *\n * @internal\n */\nfunction useFormControl(props) {\n var _useFormControlProps = useFormControlProps(props),\n isDisabled = _useFormControlProps.isDisabled,\n isInvalid = _useFormControlProps.isInvalid,\n isReadOnly = _useFormControlProps.isReadOnly,\n isRequired = _useFormControlProps.isRequired,\n rest = _objectWithoutPropertiesLoose(_useFormControlProps, _excluded$1);\n\n return _extends({}, rest, {\n disabled: isDisabled,\n readOnly: isReadOnly,\n required: isRequired,\n \"aria-invalid\": ariaAttr(isInvalid),\n \"aria-required\": ariaAttr(isRequired),\n \"aria-readonly\": ariaAttr(isReadOnly)\n });\n}\n/**\n * @internal\n */\n\nfunction useFormControlProps(props) {\n var _ref, _ref2, _ref3;\n\n var field = useFormControlContext();\n\n var id = props.id,\n disabled = props.disabled,\n readOnly = props.readOnly,\n required = props.required,\n isRequired = props.isRequired,\n isInvalid = props.isInvalid,\n isReadOnly = props.isReadOnly,\n isDisabled = props.isDisabled,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n rest = _objectWithoutPropertiesLoose(props, _excluded2);\n\n var labelIds = props[\"aria-describedby\"] ? [props[\"aria-describedby\"]] : []; // Error message must be described first in all scenarios.\n\n if (field != null && field.hasFeedbackText && field != null && field.isInvalid) {\n labelIds.push(field.feedbackId);\n }\n\n if (field != null && field.hasHelpText) {\n labelIds.push(field.helpTextId);\n }\n\n return _extends({}, rest, {\n \"aria-describedby\": labelIds.join(\" \") || undefined,\n id: id != null ? id : field == null ? void 0 : field.id,\n isDisabled: (_ref = disabled != null ? disabled : isDisabled) != null ? _ref : field == null ? void 0 : field.isDisabled,\n isReadOnly: (_ref2 = readOnly != null ? readOnly : isReadOnly) != null ? _ref2 : field == null ? void 0 : field.isReadOnly,\n isRequired: (_ref3 = required != null ? required : isRequired) != null ? _ref3 : field == null ? void 0 : field.isRequired,\n isInvalid: isInvalid != null ? isInvalid : field == null ? void 0 : field.isInvalid,\n onFocus: callAllHandlers(field == null ? void 0 : field.onFocus, onFocus),\n onBlur: callAllHandlers(field == null ? void 0 : field.onBlur, onBlur)\n });\n}\n\nvar _createStylesContext = createStylesContext(\"FormError\"),\n StylesProvider = _createStylesContext[0],\n useStyles = _createStylesContext[1];\n\n/**\n * Used to provide feedback about an invalid input,\n * and suggest clear instructions on how to fix it.\n */\nvar FormErrorMessage = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useMultiStyleConfig(\"FormError\", props);\n var ownProps = omitThemingProps(props);\n var field = useFormControlContext();\n if (!(field != null && field.isInvalid)) return null;\n return /*#__PURE__*/React.createElement(StylesProvider, {\n value: styles\n }, /*#__PURE__*/React.createElement(chakra.div, _extends({}, field == null ? void 0 : field.getErrorMessageProps(ownProps, ref), {\n className: cx(\"chakra-form__error-message\", props.className),\n __css: _extends({\n display: \"flex\",\n alignItems: \"center\"\n }, styles.text)\n })));\n});\n\nif (__DEV__) {\n FormErrorMessage.displayName = \"FormErrorMessage\";\n}\n/**\n * Used as the visual indicator that a field is invalid or\n * a field has incorrect values.\n */\n\n\nvar FormErrorIcon = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyles();\n var field = useFormControlContext();\n if (!(field != null && field.isInvalid)) return null;\n\n var _className = cx(\"chakra-form__error-icon\", props.className);\n\n return /*#__PURE__*/React.createElement(Icon, _extends({\n ref: ref,\n \"aria-hidden\": true\n }, props, {\n __css: styles.icon,\n className: _className\n }), /*#__PURE__*/React.createElement(\"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});\n\nif (__DEV__) {\n FormErrorIcon.displayName = \"FormErrorIcon\";\n}\n\nvar _excluded = [\"className\", \"children\", \"requiredIndicator\", \"optionalIndicator\"];\n\n/**\n * Used to enhance the usability of form controls.\n *\n * It is used to inform users as to what information\n * is requested for a form field.\n *\n * ♿️ Accessibility: Every form field should have a form label.\n */\nvar FormLabel = /*#__PURE__*/forwardRef(function (passedProps, ref) {\n var _field$getLabelProps;\n\n var styles = useStyleConfig(\"FormLabel\", passedProps);\n var props = omitThemingProps(passedProps);\n\n props.className;\n var children = props.children,\n _props$requiredIndica = props.requiredIndicator,\n requiredIndicator = _props$requiredIndica === void 0 ? /*#__PURE__*/React.createElement(RequiredIndicator, null) : _props$requiredIndica,\n _props$optionalIndica = props.optionalIndicator,\n optionalIndicator = _props$optionalIndica === void 0 ? null : _props$optionalIndica,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n\n var field = useFormControlContext();\n var ownProps = (_field$getLabelProps = field == null ? void 0 : field.getLabelProps(rest, ref)) != null ? _field$getLabelProps : _extends({\n ref: ref\n }, rest);\n return /*#__PURE__*/React.createElement(chakra.label, _extends({}, ownProps, {\n className: cx(\"chakra-form__label\", props.className),\n __css: _extends({\n display: \"block\",\n textAlign: \"start\"\n }, styles)\n }), children, field != null && field.isRequired ? requiredIndicator : optionalIndicator);\n});\n\nif (__DEV__) {\n FormLabel.displayName = \"FormLabel\";\n}\n\n/**\n * Used to show a \"required\" text or an asterisks (*) to indicate that\n * a field is required.\n */\nvar RequiredIndicator = /*#__PURE__*/forwardRef(function (props, ref) {\n var field = useFormControlContext();\n var styles = useFormControlStyles();\n if (!(field != null && field.isRequired)) return null;\n var className = cx(\"chakra-form__required-indicator\", props.className);\n return /*#__PURE__*/React.createElement(chakra.span, _extends({}, field == null ? void 0 : field.getRequiredIndicatorProps(props, ref), {\n __css: styles.requiredIndicator,\n className: className\n }));\n});\n\nif (__DEV__) {\n RequiredIndicator.displayName = \"RequiredIndicator\";\n}\n\nexport { FormControl, FormErrorIcon, FormErrorMessage, FormHelperText, FormLabel, RequiredIndicator, useFormControl, useFormControlContext, useFormControlProps, useFormControlStyles };\n","// src/index.ts\nvar hasSetup = false;\nvar modality = null;\nvar hasEventBeforeFocus = false;\nvar handlers = /* @__PURE__ */ new Set();\nvar isMac = typeof window !== \"undefined\" && window.navigator != null ? /^Mac/.test(window.navigator.platform) : false;\nfunction isValidKey(event) {\n return !(event.metaKey || !isMac && event.altKey || event.ctrlKey);\n}\nfunction trigger(modality2, event) {\n handlers.forEach((handler) => handler(modality2, event));\n}\nfunction onKeyboardEvent(event) {\n hasEventBeforeFocus = true;\n if (isValidKey(event)) {\n modality = \"keyboard\";\n trigger(\"keyboard\", event);\n }\n}\nfunction onPointerEvent(event) {\n modality = \"pointer\";\n if (event.type === \"mousedown\" || event.type === \"pointerdown\") {\n hasEventBeforeFocus = true;\n trigger(\"pointer\", event);\n }\n}\nfunction onWindowFocus(event) {\n if (event.target === window || event.target === document) {\n return;\n }\n if (!hasEventBeforeFocus) {\n modality = \"keyboard\";\n trigger(\"keyboard\", event);\n }\n hasEventBeforeFocus = false;\n}\nfunction onWindowBlur() {\n hasEventBeforeFocus = false;\n}\nfunction isFocusVisible() {\n return modality !== \"pointer\";\n}\nfunction setupGlobalFocusEvents() {\n if (typeof window === \"undefined\" || hasSetup) {\n return;\n }\n const { focus } = HTMLElement.prototype;\n HTMLElement.prototype.focus = function focusElement(...args) {\n hasEventBeforeFocus = true;\n focus.apply(this, args);\n };\n document.addEventListener(\"keydown\", onKeyboardEvent, true);\n document.addEventListener(\"keyup\", onKeyboardEvent, true);\n window.addEventListener(\"focus\", onWindowFocus, true);\n window.addEventListener(\"blur\", onWindowBlur, false);\n if (typeof PointerEvent !== \"undefined\") {\n document.addEventListener(\"pointerdown\", onPointerEvent, true);\n document.addEventListener(\"pointermove\", onPointerEvent, true);\n document.addEventListener(\"pointerup\", onPointerEvent, true);\n } else {\n document.addEventListener(\"mousedown\", onPointerEvent, true);\n document.addEventListener(\"mousemove\", onPointerEvent, true);\n document.addEventListener(\"mouseup\", onPointerEvent, true);\n }\n hasSetup = true;\n}\nfunction trackFocusVisible(fn) {\n setupGlobalFocusEvents();\n fn(isFocusVisible());\n const handler = () => fn(isFocusVisible());\n handlers.add(handler);\n return () => {\n handlers.delete(handler);\n };\n}\nexport {\n trackFocusVisible\n};\n//# sourceMappingURL=index.mjs.map\n","import { isInputEvent, addItem, __DEV__, omit, dataAttr, callAllHandlers, focus, callAll, cx } from '@chakra-ui/utils';\nimport { createContext, mergeRefs } from '@chakra-ui/react-utils';\nimport * as React from 'react';\nimport { useCallback, useState, useEffect, useRef } from 'react';\nimport { useCallbackRef, useControllableState, useBoolean, useControllableProp, useSafeLayoutEffect, useUpdateEffect } from '@chakra-ui/hooks';\nimport { chakra, forwardRef, useMultiStyleConfig, omitThemingProps } from '@chakra-ui/system';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport { useFormControlProps } from '@chakra-ui/form-control';\nimport { visuallyHiddenStyle } from '@chakra-ui/visually-hidden';\nimport { trackFocusVisible } from '@zag-js/focus-visible';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n/**\n * React hook that provides all the state management logic\n * for a group of checkboxes.\n *\n * It is consumed by the `CheckboxGroup` component\n */\nfunction useCheckboxGroup(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n defaultValue = _props.defaultValue,\n valueProp = _props.value,\n onChange = _props.onChange,\n isDisabled = _props.isDisabled,\n isNative = _props.isNative;\n var onChangeProp = useCallbackRef(onChange);\n\n var _useControllableState = useControllableState({\n value: valueProp,\n defaultValue: defaultValue || [],\n onChange: onChangeProp\n }),\n value = _useControllableState[0],\n setValue = _useControllableState[1];\n\n var handleChange = useCallback(function (eventOrValue) {\n if (!value) return;\n var isChecked = isInputEvent(eventOrValue) ? eventOrValue.target.checked : !value.includes(eventOrValue);\n var selectedValue = isInputEvent(eventOrValue) ? eventOrValue.target.value : eventOrValue;\n var nextValue = isChecked ? addItem(value, selectedValue) : value.filter(function (v) {\n return String(v) !== String(selectedValue);\n });\n setValue(nextValue);\n }, [setValue, value]);\n var getCheckboxProps = useCallback(function (props) {\n var _extends2;\n\n if (props === void 0) {\n props = {};\n }\n\n var checkedKey = isNative ? \"checked\" : \"isChecked\";\n return _extends({}, props, (_extends2 = {}, _extends2[checkedKey] = value.some(function (val) {\n return String(props.value) === String(val);\n }), _extends2.onChange = handleChange, _extends2));\n }, [handleChange, isNative, value]);\n return {\n value: value,\n isDisabled: isDisabled,\n onChange: handleChange,\n setValue: setValue,\n getCheckboxProps: getCheckboxProps\n };\n}\n\nvar _createContext = createContext({\n name: \"CheckboxGroupContext\",\n strict: false\n}),\n CheckboxGroupProvider = _createContext[0],\n useCheckboxGroupContext = _createContext[1];\n/**\n * Used for multiple checkboxes which are bound in one group,\n * and it indicates whether one or more options are selected.\n *\n * @see Docs https://chakra-ui.com/checkbox\n */\n\nvar CheckboxGroup = function CheckboxGroup(props) {\n var colorScheme = props.colorScheme,\n size = props.size,\n variant = props.variant,\n children = props.children,\n isDisabled = props.isDisabled;\n\n var _useCheckboxGroup = useCheckboxGroup(props),\n value = _useCheckboxGroup.value,\n onChange = _useCheckboxGroup.onChange;\n\n var group = React.useMemo(function () {\n return {\n size: size,\n onChange: onChange,\n colorScheme: colorScheme,\n value: value,\n variant: variant,\n isDisabled: isDisabled\n };\n }, [size, onChange, colorScheme, value, variant, isDisabled]);\n return /*#__PURE__*/React.createElement(CheckboxGroupProvider, {\n value: group\n }, children);\n};\n\nif (__DEV__) {\n CheckboxGroup.displayName = \"CheckboxGroup\";\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded$2 = [\"isIndeterminate\", \"isChecked\"];\n\nfunction __motion(el) {\n var m = motion;\n\n if (\"custom\" in m && typeof m.custom === \"function\") {\n return m.custom(el);\n }\n\n return m(el);\n} // @future: only call `motion(chakra.svg)` when we drop framer-motion v3 support\n\n\nvar MotionSvg = __motion(chakra.svg);\n\nvar CheckIcon = function CheckIcon(props) {\n return /*#__PURE__*/React.createElement(MotionSvg, _extends({\n width: \"1.2em\",\n viewBox: \"0 0 12 10\",\n variants: {\n unchecked: {\n opacity: 0,\n strokeDashoffset: 16\n },\n checked: {\n opacity: 1,\n strokeDashoffset: 0,\n transition: {\n duration: 0.2\n }\n }\n },\n style: {\n fill: \"none\",\n strokeWidth: 2,\n stroke: \"currentColor\",\n strokeDasharray: 16\n }\n }, props), /*#__PURE__*/React.createElement(\"polyline\", {\n points: \"1.5 6 4.5 9 10.5 1\"\n }));\n};\n\nvar IndeterminateIcon = function IndeterminateIcon(props) {\n return /*#__PURE__*/React.createElement(MotionSvg, _extends({\n width: \"1.2em\",\n viewBox: \"0 0 24 24\",\n variants: {\n unchecked: {\n scaleX: 0.65,\n opacity: 0\n },\n checked: {\n scaleX: 1,\n opacity: 1,\n transition: {\n scaleX: {\n duration: 0\n },\n opacity: {\n duration: 0.02\n }\n }\n }\n },\n style: {\n stroke: \"currentColor\",\n strokeWidth: 4\n }\n }, props), /*#__PURE__*/React.createElement(\"line\", {\n x1: \"21\",\n x2: \"3\",\n y1: \"12\",\n y2: \"12\"\n }));\n};\n\nvar CheckboxTransition = function CheckboxTransition(_ref) {\n var open = _ref.open,\n children = _ref.children;\n return /*#__PURE__*/React.createElement(AnimatePresence, {\n initial: false\n }, open && /*#__PURE__*/React.createElement(motion.div, {\n variants: {\n unchecked: {\n scale: 0.5\n },\n checked: {\n scale: 1\n }\n },\n initial: \"unchecked\",\n animate: \"checked\",\n exit: \"unchecked\",\n style: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: \"100%\"\n }\n }, children));\n};\n\n/**\n * CheckboxIcon is used to visually indicate the checked or indeterminate\n * state of a checkbox.\n *\n * @todo allow users pass their own icon svgs\n */\nvar CheckboxIcon = function CheckboxIcon(props) {\n var isIndeterminate = props.isIndeterminate,\n isChecked = props.isChecked,\n rest = _objectWithoutPropertiesLoose(props, _excluded$2);\n\n var IconEl = isIndeterminate ? IndeterminateIcon : CheckIcon;\n return /*#__PURE__*/React.createElement(CheckboxTransition, {\n open: isChecked || isIndeterminate\n }, /*#__PURE__*/React.createElement(IconEl, rest));\n};\n\nvar _excluded$1 = [\"defaultChecked\", \"isChecked\", \"isFocusable\", \"onChange\", \"isIndeterminate\", \"name\", \"value\", \"tabIndex\", \"aria-label\", \"aria-labelledby\", \"aria-invalid\"];\n\n/**\n * useCheckbox that provides all the state and focus management logic\n * for a checkbox. It is consumed by the `Checkbox` component\n *\n * @see Docs https://chakra-ui.com/checkbox#hooks\n */\nfunction useCheckbox(props) {\n if (props === void 0) {\n props = {};\n }\n\n var formControlProps = useFormControlProps(props);\n var isDisabled = formControlProps.isDisabled,\n isReadOnly = formControlProps.isReadOnly,\n isRequired = formControlProps.isRequired,\n isInvalid = formControlProps.isInvalid,\n id = formControlProps.id,\n onBlur = formControlProps.onBlur,\n onFocus = formControlProps.onFocus,\n ariaDescribedBy = formControlProps[\"aria-describedby\"];\n\n var _props = props,\n defaultChecked = _props.defaultChecked,\n checkedProp = _props.isChecked,\n isFocusable = _props.isFocusable,\n onChange = _props.onChange,\n isIndeterminate = _props.isIndeterminate,\n name = _props.name,\n value = _props.value,\n _props$tabIndex = _props.tabIndex,\n tabIndex = _props$tabIndex === void 0 ? undefined : _props$tabIndex,\n ariaLabel = _props[\"aria-label\"],\n ariaLabelledBy = _props[\"aria-labelledby\"],\n ariaInvalid = _props[\"aria-invalid\"],\n rest = _objectWithoutPropertiesLoose(_props, _excluded$1);\n\n var htmlProps = omit(rest, [\"isDisabled\", \"isReadOnly\", \"isRequired\", \"isInvalid\", \"id\", \"onBlur\", \"onFocus\", \"aria-describedby\"]);\n var onChangeProp = useCallbackRef(onChange);\n var onBlurProp = useCallbackRef(onBlur);\n var onFocusProp = useCallbackRef(onFocus);\n\n var _useState = useState(false),\n isFocusVisible = _useState[0],\n setIsFocusVisible = _useState[1];\n\n var _useBoolean = useBoolean(),\n isFocused = _useBoolean[0],\n setFocused = _useBoolean[1];\n\n var _useBoolean2 = useBoolean(),\n isHovered = _useBoolean2[0],\n setHovered = _useBoolean2[1];\n\n var _useBoolean3 = useBoolean(),\n isActive = _useBoolean3[0],\n setActive = _useBoolean3[1];\n\n useEffect(function () {\n return trackFocusVisible(setIsFocusVisible);\n }, []);\n var inputRef = useRef(null);\n\n var _useState2 = useState(true),\n rootIsLabelElement = _useState2[0],\n setRootIsLabelElement = _useState2[1];\n\n var _useState3 = useState(!!defaultChecked),\n checkedState = _useState3[0],\n setCheckedState = _useState3[1];\n\n var _useControllableProp = useControllableProp(checkedProp, checkedState),\n isControlled = _useControllableProp[0],\n isChecked = _useControllableProp[1];\n\n var handleChange = useCallback(function (event) {\n if (isReadOnly || isDisabled) {\n event.preventDefault();\n return;\n }\n\n if (!isControlled) {\n if (isChecked) {\n setCheckedState(event.target.checked);\n } else {\n setCheckedState(isIndeterminate ? true : event.target.checked);\n }\n }\n\n onChangeProp == null ? void 0 : onChangeProp(event);\n }, [isReadOnly, isDisabled, isChecked, isControlled, isIndeterminate, onChangeProp]);\n useSafeLayoutEffect(function () {\n if (inputRef.current) {\n inputRef.current.indeterminate = Boolean(isIndeterminate);\n }\n }, [isIndeterminate]);\n useUpdateEffect(function () {\n if (isDisabled) {\n setFocused.off();\n }\n }, [isDisabled, setFocused]);\n /**\n * HTMLFormElement.reset() should reset the checkbox state\n */\n\n useSafeLayoutEffect(function () {\n var el = inputRef.current;\n if (!(el != null && el.form)) return;\n\n el.form.onreset = function () {\n setCheckedState(!!defaultChecked);\n };\n }, []);\n var trulyDisabled = isDisabled && !isFocusable;\n var onKeyDown = useCallback(function (event) {\n if (event.key === \" \") {\n setActive.on();\n }\n }, [setActive]);\n var onKeyUp = useCallback(function (event) {\n if (event.key === \" \") {\n setActive.off();\n }\n }, [setActive]);\n /**\n * Sync state with uncontrolled form libraries like `react-hook-form`.\n *\n * These libraries set the checked value for input fields\n * using their refs. For the checkbox, it sets `ref.current.checked = true | false` directly.\n *\n * This means the `isChecked` state will get out of sync with `ref.current.checked`,\n * even though the input validation with work, the UI will not be up to date.\n *\n * Let's correct that by checking and syncing the state accordingly.\n */\n\n useSafeLayoutEffect(function () {\n if (!inputRef.current) return;\n var notInSync = inputRef.current.checked !== isChecked;\n\n if (notInSync) {\n setCheckedState(inputRef.current.checked);\n }\n }, [inputRef.current]);\n var getCheckboxProps = useCallback(function (props, forwardedRef) {\n if (props === void 0) {\n props = {};\n }\n\n if (forwardedRef === void 0) {\n forwardedRef = null;\n }\n\n var onPressDown = function onPressDown(event) {\n // On mousedown, the input blurs and returns focus to the `body`,\n // we need to prevent this. Native checkboxes keeps focus on `input`\n event.preventDefault();\n setActive.on();\n };\n\n return _extends({}, props, {\n ref: forwardedRef,\n \"data-active\": dataAttr(isActive),\n \"data-hover\": dataAttr(isHovered),\n \"data-checked\": dataAttr(isChecked),\n \"data-focus\": dataAttr(isFocused),\n \"data-focus-visible\": dataAttr(isFocused && isFocusVisible),\n \"data-indeterminate\": dataAttr(isIndeterminate),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-invalid\": dataAttr(isInvalid),\n \"data-readonly\": dataAttr(isReadOnly),\n \"aria-hidden\": true,\n onMouseDown: callAllHandlers(props.onMouseDown, onPressDown),\n onMouseUp: callAllHandlers(props.onMouseUp, setActive.off),\n onMouseEnter: callAllHandlers(props.onMouseEnter, setHovered.on),\n onMouseLeave: callAllHandlers(props.onMouseLeave, setHovered.off)\n });\n }, [isActive, isChecked, isDisabled, isFocused, isFocusVisible, isHovered, isIndeterminate, isInvalid, isReadOnly, setActive, setHovered.off, setHovered.on]);\n var getRootProps = useCallback(function (props, forwardedRef) {\n if (props === void 0) {\n props = {};\n }\n\n if (forwardedRef === void 0) {\n forwardedRef = null;\n }\n\n return _extends({}, htmlProps, props, {\n ref: mergeRefs(forwardedRef, function (node) {\n if (!node) return;\n setRootIsLabelElement(node.tagName === \"LABEL\");\n }),\n onClick: callAllHandlers(props.onClick, function () {\n /**\n * Accessibility:\n *\n * Ideally, `getRootProps` should be spread unto a `label` element.\n *\n * If the element was changed using the `as` prop or changing\n * the dom node `getRootProps` is spread unto (to a `div` or `span`), we'll trigger\n * click on the input when the element is clicked.\n * @see Issue https://github.com/chakra-ui/chakra-ui/issues/3480\n */\n if (!rootIsLabelElement) {\n var _inputRef$current;\n\n (_inputRef$current = inputRef.current) == null ? void 0 : _inputRef$current.click();\n focus(inputRef.current, {\n nextTick: true\n });\n }\n }),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-checked\": dataAttr(isChecked),\n \"data-invalid\": dataAttr(isInvalid)\n });\n }, [htmlProps, isDisabled, isChecked, isInvalid, rootIsLabelElement]);\n var getInputProps = useCallback(function (props, forwardedRef) {\n if (props === void 0) {\n props = {};\n }\n\n if (forwardedRef === void 0) {\n forwardedRef = null;\n }\n\n return _extends({}, props, {\n ref: mergeRefs(inputRef, forwardedRef),\n type: \"checkbox\",\n name: name,\n value: value,\n id: id,\n tabIndex: tabIndex,\n onChange: callAllHandlers(props.onChange, handleChange),\n onBlur: callAllHandlers(props.onBlur, onBlurProp, setFocused.off),\n onFocus: callAllHandlers(props.onFocus, onFocusProp, setFocused.on),\n onKeyDown: callAllHandlers(props.onKeyDown, onKeyDown),\n onKeyUp: callAllHandlers(props.onKeyUp, onKeyUp),\n required: isRequired,\n checked: isChecked,\n disabled: trulyDisabled,\n readOnly: isReadOnly,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-invalid\": ariaInvalid ? Boolean(ariaInvalid) : isInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-disabled\": isDisabled,\n style: visuallyHiddenStyle\n });\n }, [name, value, id, handleChange, setFocused.off, setFocused.on, onBlurProp, onFocusProp, onKeyDown, onKeyUp, isRequired, isChecked, trulyDisabled, isReadOnly, ariaLabel, ariaLabelledBy, ariaInvalid, isInvalid, ariaDescribedBy, isDisabled, tabIndex]);\n var getLabelProps = useCallback(function (props, forwardedRef) {\n if (props === void 0) {\n props = {};\n }\n\n if (forwardedRef === void 0) {\n forwardedRef = null;\n }\n\n return _extends({}, props, {\n ref: forwardedRef,\n onMouseDown: callAllHandlers(props.onMouseDown, stopEvent),\n onTouchStart: callAllHandlers(props.onTouchStart, stopEvent),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-checked\": dataAttr(isChecked),\n \"data-invalid\": dataAttr(isInvalid)\n });\n }, [isChecked, isDisabled, isInvalid]);\n var state = {\n isInvalid: isInvalid,\n isFocused: isFocused,\n isChecked: isChecked,\n isActive: isActive,\n isHovered: isHovered,\n isIndeterminate: isIndeterminate,\n isDisabled: isDisabled,\n isReadOnly: isReadOnly,\n isRequired: isRequired\n };\n return {\n state: state,\n getRootProps: getRootProps,\n getCheckboxProps: getCheckboxProps,\n getInputProps: getInputProps,\n getLabelProps: getLabelProps,\n htmlProps: htmlProps\n };\n}\n/**\n * Prevent `onBlur` being fired when the checkbox label is touched\n */\n\nfunction stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nvar _excluded = [\"spacing\", \"className\", \"children\", \"iconColor\", \"iconSize\", \"icon\", \"isChecked\", \"isDisabled\", \"onChange\", \"inputProps\"];\nvar CheckboxControl = chakra(\"span\", {\n baseStyle: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n verticalAlign: \"top\",\n userSelect: \"none\",\n flexShrink: 0\n }\n});\nvar Label = chakra(\"label\", {\n baseStyle: {\n cursor: \"pointer\",\n display: \"inline-flex\",\n alignItems: \"center\",\n verticalAlign: \"top\",\n position: \"relative\"\n }\n});\n\n/**\n * Checkbox\n *\n * React component used in forms when a user needs to select\n * multiple values from several options.\n *\n * @see Docs https://chakra-ui.com/checkbox\n */\nvar Checkbox = /*#__PURE__*/forwardRef(function (props, ref) {\n var group = useCheckboxGroupContext();\n\n var mergedProps = _extends({}, group, props);\n\n var styles = useMultiStyleConfig(\"Checkbox\", mergedProps);\n var ownProps = omitThemingProps(props);\n\n var _ownProps$spacing = ownProps.spacing,\n spacing = _ownProps$spacing === void 0 ? \"0.5rem\" : _ownProps$spacing,\n className = ownProps.className,\n children = ownProps.children,\n iconColor = ownProps.iconColor,\n iconSize = ownProps.iconSize,\n _ownProps$icon = ownProps.icon,\n icon = _ownProps$icon === void 0 ? /*#__PURE__*/React.createElement(CheckboxIcon, null) : _ownProps$icon,\n isCheckedProp = ownProps.isChecked,\n _ownProps$isDisabled = ownProps.isDisabled,\n isDisabled = _ownProps$isDisabled === void 0 ? group == null ? void 0 : group.isDisabled : _ownProps$isDisabled,\n onChangeProp = ownProps.onChange,\n inputProps = ownProps.inputProps,\n rest = _objectWithoutPropertiesLoose(ownProps, _excluded);\n\n var isChecked = isCheckedProp;\n\n if (group != null && group.value && ownProps.value) {\n isChecked = group.value.includes(ownProps.value);\n }\n\n var onChange = onChangeProp;\n\n if (group != null && group.onChange && ownProps.value) {\n onChange = callAll(group.onChange, onChangeProp);\n }\n\n var _useCheckbox = useCheckbox(_extends({}, rest, {\n isDisabled: isDisabled,\n isChecked: isChecked,\n onChange: onChange\n })),\n state = _useCheckbox.state,\n getInputProps = _useCheckbox.getInputProps,\n getCheckboxProps = _useCheckbox.getCheckboxProps,\n getLabelProps = _useCheckbox.getLabelProps,\n getRootProps = _useCheckbox.getRootProps;\n\n var iconStyles = React.useMemo(function () {\n return _extends({\n opacity: state.isChecked || state.isIndeterminate ? 1 : 0,\n transform: state.isChecked || state.isIndeterminate ? \"scale(1)\" : \"scale(0.95)\",\n fontSize: iconSize,\n color: iconColor\n }, styles.icon);\n }, [iconColor, iconSize, state.isChecked, state.isIndeterminate, styles.icon]);\n var clonedIcon = /*#__PURE__*/React.cloneElement(icon, {\n __css: iconStyles,\n isIndeterminate: state.isIndeterminate,\n isChecked: state.isChecked\n });\n return /*#__PURE__*/React.createElement(Label, _extends({\n __css: styles.container,\n className: cx(\"chakra-checkbox\", className)\n }, getRootProps()), /*#__PURE__*/React.createElement(\"input\", _extends({\n className: \"chakra-checkbox__input\"\n }, getInputProps(inputProps, ref))), /*#__PURE__*/React.createElement(CheckboxControl, _extends({\n __css: styles.control,\n className: \"chakra-checkbox__control\"\n }, getCheckboxProps()), clonedIcon), children && /*#__PURE__*/React.createElement(chakra.span, _extends({\n className: \"chakra-checkbox__label\"\n }, getLabelProps(), {\n __css: _extends({\n marginStart: spacing\n }, styles.label)\n }), children));\n});\n\nif (__DEV__) {\n Checkbox.displayName = \"Checkbox\";\n}\n\nexport { Checkbox, CheckboxGroup, useCheckbox, useCheckboxGroup, useCheckboxGroupContext };\n","import { useCallbackRef, useControllableProp } from '@chakra-ui/hooks';\nimport { countDecimalPlaces, clampValue, toPrecision, minSafeInteger, maxSafeInteger } from '@chakra-ui/utils';\nimport { useState, useCallback } from 'react';\n\nfunction useCounter(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n onChange = _props.onChange,\n precisionProp = _props.precision,\n defaultValue = _props.defaultValue,\n valueProp = _props.value,\n _props$step = _props.step,\n stepProp = _props$step === void 0 ? 1 : _props$step,\n _props$min = _props.min,\n min = _props$min === void 0 ? minSafeInteger : _props$min,\n _props$max = _props.max,\n max = _props$max === void 0 ? maxSafeInteger : _props$max,\n _props$keepWithinRang = _props.keepWithinRange,\n keepWithinRange = _props$keepWithinRang === void 0 ? true : _props$keepWithinRang;\n var onChangeProp = useCallbackRef(onChange);\n\n var _useState = useState(function () {\n var _cast;\n\n if (defaultValue == null) return \"\";\n return (_cast = cast(defaultValue, stepProp, precisionProp)) != null ? _cast : \"\";\n }),\n valueState = _useState[0],\n setValue = _useState[1];\n /**\n * Because the component that consumes this hook can be controlled or uncontrolled\n * we'll keep track of that\n */\n\n\n var _useControllableProp = useControllableProp(valueProp, valueState),\n isControlled = _useControllableProp[0],\n value = _useControllableProp[1];\n\n var decimalPlaces = getDecimalPlaces(parse(value), stepProp);\n var precision = precisionProp != null ? precisionProp : decimalPlaces;\n var update = useCallback(function (next) {\n if (next === value) return;\n\n if (!isControlled) {\n setValue(next.toString());\n }\n\n onChangeProp == null ? void 0 : onChangeProp(next.toString(), parse(next));\n }, [onChangeProp, isControlled, value]); // Function to clamp the value and round it to the precision\n\n var clamp = useCallback(function (value) {\n var nextValue = value;\n\n if (keepWithinRange) {\n nextValue = clampValue(nextValue, min, max);\n }\n\n return toPrecision(nextValue, precision);\n }, [precision, keepWithinRange, max, min]);\n var increment = useCallback(function (step) {\n if (step === void 0) {\n step = stepProp;\n }\n\n var next;\n /**\n * Let's follow the native browser behavior for\n * scenarios where the input starts empty (\"\")\n */\n\n if (value === \"\") {\n /**\n * If `min` is set, native input, starts at the `min`.\n * Else, it starts at `step`\n */\n next = parse(step);\n } else {\n next = parse(value) + step;\n }\n\n next = clamp(next);\n update(next);\n }, [clamp, stepProp, update, value]);\n var decrement = useCallback(function (step) {\n if (step === void 0) {\n step = stepProp;\n }\n\n var next; // Same thing here. We'll follow native implementation\n\n if (value === \"\") {\n next = parse(-step);\n } else {\n next = parse(value) - step;\n }\n\n next = clamp(next);\n update(next);\n }, [clamp, stepProp, update, value]);\n var reset = useCallback(function () {\n var next;\n\n if (defaultValue == null) {\n next = \"\";\n } else {\n var _cast2;\n\n next = (_cast2 = cast(defaultValue, stepProp, precisionProp)) != null ? _cast2 : min;\n }\n\n update(next);\n }, [defaultValue, precisionProp, stepProp, update, min]);\n var castValue = useCallback(function (value) {\n var _cast3;\n\n var nextValue = (_cast3 = cast(value, stepProp, precision)) != null ? _cast3 : min;\n update(nextValue);\n }, [precision, stepProp, update, min]);\n var valueAsNumber = parse(value);\n /**\n * Common range checks\n */\n\n var isOutOfRange = valueAsNumber > max || valueAsNumber < min;\n var isAtMax = valueAsNumber === max;\n var isAtMin = valueAsNumber === min;\n return {\n isOutOfRange: isOutOfRange,\n isAtMax: isAtMax,\n isAtMin: isAtMin,\n precision: precision,\n value: value,\n valueAsNumber: valueAsNumber,\n update: update,\n reset: reset,\n increment: increment,\n decrement: decrement,\n clamp: clamp,\n cast: castValue,\n setValue: setValue\n };\n}\n\nfunction parse(value) {\n return parseFloat(value.toString().replace(/[^\\w.-]+/g, \"\"));\n}\n\nfunction getDecimalPlaces(value, step) {\n return Math.max(countDecimalPlaces(step), countDecimalPlaces(value));\n}\n\nfunction cast(value, step, precision) {\n var parsedValue = parse(value);\n if (Number.isNaN(parsedValue)) return undefined;\n var decimalPlaces = getDecimalPlaces(parsedValue, step);\n return toPrecision(parsedValue, precision != null ? precision : decimalPlaces);\n}\n\nexport { useCounter };\n","import { useFormControl } from '@chakra-ui/form-control';\nimport { forwardRef, useMultiStyleConfig, omitThemingProps, chakra, createStylesContext } from '@chakra-ui/system';\nimport { cx, __DEV__, filterUndefined } from '@chakra-ui/utils';\nimport * as React from 'react';\nimport { getValidChildren } from '@chakra-ui/react-utils';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded$3 = [\"htmlSize\"];\n\n/**\n * Input\n *\n * Element that allows users enter single valued data.\n */\nvar Input = /*#__PURE__*/forwardRef(function (props, ref) {\n var htmlSize = props.htmlSize,\n rest = _objectWithoutPropertiesLoose(props, _excluded$3);\n\n var styles = useMultiStyleConfig(\"Input\", rest);\n var ownProps = omitThemingProps(rest);\n var input = useFormControl(ownProps);\n\n var _className = cx(\"chakra-input\", props.className);\n\n return /*#__PURE__*/React.createElement(chakra.input, _extends({\n size: htmlSize\n }, input, {\n __css: styles.field,\n ref: ref,\n className: _className\n }));\n});\n\nif (__DEV__) {\n Input.displayName = \"Input\";\n} // This is used in `input-group.tsx`\n\n\nInput.id = \"Input\";\n\nvar _excluded$2 = [\"children\", \"className\"];\n\nvar _createStylesContext = createStylesContext(\"InputGroup\"),\n StylesProvider = _createStylesContext[0],\n useStyles = _createStylesContext[1];\n\nvar useInputGroupStyles = useStyles;\nvar InputGroup = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useMultiStyleConfig(\"Input\", props);\n\n var _omitThemingProps = omitThemingProps(props),\n children = _omitThemingProps.children,\n className = _omitThemingProps.className,\n rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded$2);\n\n var _className = cx(\"chakra-input__group\", className);\n\n var groupStyles = {};\n var validChildren = getValidChildren(children);\n var input = styles.field;\n validChildren.forEach(function (child) {\n if (!styles) return;\n\n if (input && child.type.id === \"InputLeftElement\") {\n var _input$height;\n\n groupStyles.paddingStart = (_input$height = input.height) != null ? _input$height : input.h;\n }\n\n if (input && child.type.id === \"InputRightElement\") {\n var _input$height2;\n\n groupStyles.paddingEnd = (_input$height2 = input.height) != null ? _input$height2 : input.h;\n }\n\n if (child.type.id === \"InputRightAddon\") {\n groupStyles.borderEndRadius = 0;\n }\n\n if (child.type.id === \"InputLeftAddon\") {\n groupStyles.borderStartRadius = 0;\n }\n });\n var clones = validChildren.map(function (child) {\n var _child$props, _child$props2;\n\n /**\n * Make it possible to override the size and variant from `Input`\n */\n var theming = filterUndefined({\n size: ((_child$props = child.props) == null ? void 0 : _child$props.size) || props.size,\n variant: ((_child$props2 = child.props) == null ? void 0 : _child$props2.variant) || props.variant\n });\n return child.type.id !== \"Input\" ? /*#__PURE__*/React.cloneElement(child, theming) : /*#__PURE__*/React.cloneElement(child, Object.assign(theming, groupStyles, child.props));\n });\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n className: _className,\n ref: ref,\n __css: {\n width: \"100%\",\n display: \"flex\",\n position: \"relative\"\n }\n }, rest), /*#__PURE__*/React.createElement(StylesProvider, {\n value: styles\n }, clones));\n});\n\nif (__DEV__) {\n InputGroup.displayName = \"InputGroup\";\n}\n\nvar _excluded$1 = [\"placement\"];\nvar placements = {\n left: {\n marginEnd: \"-1px\",\n borderEndRadius: 0,\n borderEndColor: \"transparent\"\n },\n right: {\n marginStart: \"-1px\",\n borderStartRadius: 0,\n borderStartColor: \"transparent\"\n }\n};\nvar StyledAddon = chakra(\"div\", {\n baseStyle: {\n flex: \"0 0 auto\",\n width: \"auto\",\n display: \"flex\",\n alignItems: \"center\",\n whiteSpace: \"nowrap\"\n }\n});\n\n/**\n * InputAddon\n *\n * Element to append or prepend to an input\n */\nvar InputAddon = /*#__PURE__*/forwardRef(function (props, ref) {\n var _placements$placement;\n\n var _props$placement = props.placement,\n placement = _props$placement === void 0 ? \"left\" : _props$placement,\n rest = _objectWithoutPropertiesLoose(props, _excluded$1);\n\n var placementStyles = (_placements$placement = placements[placement]) != null ? _placements$placement : {};\n var styles = useInputGroupStyles();\n return /*#__PURE__*/React.createElement(StyledAddon, _extends({\n ref: ref\n }, rest, {\n __css: _extends({}, styles.addon, placementStyles)\n }));\n});\n\nif (__DEV__) {\n InputAddon.displayName = \"InputAddon\";\n}\n/**\n * InputLeftAddon\n *\n * Element to append to the left of an input\n */\n\n\nvar InputLeftAddon = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(InputAddon, _extends({\n ref: ref,\n placement: \"left\"\n }, props, {\n className: cx(\"chakra-input__left-addon\", props.className)\n }));\n});\n\nif (__DEV__) {\n InputLeftAddon.displayName = \"InputLeftAddon\";\n} // This is used in `input-group.tsx`\n\n\nInputLeftAddon.id = \"InputLeftAddon\";\n/**\n * InputRightAddon\n *\n * Element to append to the right of an input\n */\n\nvar InputRightAddon = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(InputAddon, _extends({\n ref: ref,\n placement: \"right\"\n }, props, {\n className: cx(\"chakra-input__right-addon\", props.className)\n }));\n});\n\nif (__DEV__) {\n InputRightAddon.displayName = \"InputRightAddon\";\n} // This is used in `input-group.tsx`\n\n\nInputRightAddon.id = \"InputRightAddon\";\n\nvar _excluded = [\"placement\"],\n _excluded2 = [\"className\"],\n _excluded3 = [\"className\"];\nvar StyledElement = chakra(\"div\", {\n baseStyle: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute\",\n top: \"0\",\n zIndex: 2\n }\n});\nvar InputElement = /*#__PURE__*/forwardRef(function (props, ref) {\n var _input$height, _input$height2, _extends2;\n\n var _props$placement = props.placement,\n placement = _props$placement === void 0 ? \"left\" : _props$placement,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n\n var styles = useInputGroupStyles();\n var input = styles.field;\n var attr = placement === \"left\" ? \"insetStart\" : \"insetEnd\";\n\n var elementStyles = _extends((_extends2 = {}, _extends2[attr] = \"0\", _extends2.width = (_input$height = input == null ? void 0 : input.height) != null ? _input$height : input == null ? void 0 : input.h, _extends2.height = (_input$height2 = input == null ? void 0 : input.height) != null ? _input$height2 : input == null ? void 0 : input.h, _extends2.fontSize = input == null ? void 0 : input.fontSize, _extends2), styles.element);\n\n return /*#__PURE__*/React.createElement(StyledElement, _extends({\n ref: ref,\n __css: elementStyles\n }, rest));\n}); // This is used in `input-group.tsx`\n\nInputElement.id = \"InputElement\";\n\nif (__DEV__) {\n InputElement.displayName = \"InputElement\";\n}\n\nvar InputLeftElement = /*#__PURE__*/forwardRef(function (props, ref) {\n var className = props.className,\n rest = _objectWithoutPropertiesLoose(props, _excluded2);\n\n var _className = cx(\"chakra-input__left-element\", className);\n\n return /*#__PURE__*/React.createElement(InputElement, _extends({\n ref: ref,\n placement: \"left\",\n className: _className\n }, rest));\n}); // This is used in `input-group.tsx`\n\nInputLeftElement.id = \"InputLeftElement\";\n\nif (__DEV__) {\n InputLeftElement.displayName = \"InputLeftElement\";\n}\n\nvar InputRightElement = /*#__PURE__*/forwardRef(function (props, ref) {\n var className = props.className,\n rest = _objectWithoutPropertiesLoose(props, _excluded3);\n\n var _className = cx(\"chakra-input__right-element\", className);\n\n return /*#__PURE__*/React.createElement(InputElement, _extends({\n ref: ref,\n placement: \"right\",\n className: _className\n }, rest));\n}); // This is used in `input-group.tsx`\n\nInputRightElement.id = \"InputRightElement\";\n\nif (__DEV__) {\n InputRightElement.displayName = \"InputRightElement\";\n}\n\nexport { Input, InputAddon, InputGroup, InputLeftAddon, InputLeftElement, InputRightAddon, InputRightElement, useInputGroupStyles };\n","import { forwardRef, chakra, useStyleConfig, omitThemingProps, createStylesContext, useMultiStyleConfig, tokenToCSSVar } from '@chakra-ui/system';\nimport { cx, mapResponsive, __DEV__, filterUndefined, isNull, isNumber } from '@chakra-ui/utils';\nimport * as React from 'react';\nimport { Icon } from '@chakra-ui/icon';\nimport { getValidChildren } from '@chakra-ui/react-utils';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded$h = [\"ratio\", \"children\", \"className\"];\n\n/**\n * React component used to cropping media (videos, images and maps)\n * to a desired aspect ratio.\n *\n * @see Docs https://chakra-ui.com/aspectratiobox\n */\nvar AspectRatio = /*#__PURE__*/forwardRef(function (props, ref) {\n var _props$ratio = props.ratio,\n ratio = _props$ratio === void 0 ? 4 / 3 : _props$ratio,\n children = props.children,\n className = props.className,\n rest = _objectWithoutPropertiesLoose(props, _excluded$h); // enforce single child\n\n\n var child = React.Children.only(children);\n\n var _className = cx(\"chakra-aspect-ratio\", className);\n\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n ref: ref,\n position: \"relative\",\n className: _className,\n _before: {\n height: 0,\n content: \"\\\"\\\"\",\n display: \"block\",\n paddingBottom: mapResponsive(ratio, function (r) {\n return 1 / r * 100 + \"%\";\n })\n },\n __css: {\n \"& > *:not(style)\": {\n overflow: \"hidden\",\n position: \"absolute\",\n top: \"0\",\n right: \"0\",\n bottom: \"0\",\n left: \"0\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n width: \"100%\",\n height: \"100%\"\n },\n \"& > img, & > video\": {\n objectFit: \"cover\"\n }\n }\n }, rest), child);\n});\n\nif (__DEV__) {\n AspectRatio.displayName = \"AspectRatio\";\n}\n\nvar _excluded$g = [\"className\"];\n\n/**\n * React component used to display notifications, messages, or\n * statuses in different shapes and sizes.\n *\n * @see Docs https://chakra-ui.com/badge\n */\nvar Badge = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyleConfig(\"Badge\", props);\n\n var _omitThemingProps = omitThemingProps(props);\n _omitThemingProps.className;\n var rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded$g);\n\n return /*#__PURE__*/React.createElement(chakra.span, _extends({\n ref: ref,\n className: cx(\"chakra-badge\", props.className)\n }, rest, {\n __css: _extends({\n display: \"inline-block\",\n whiteSpace: \"nowrap\",\n verticalAlign: \"middle\"\n }, styles)\n }));\n});\n\nif (__DEV__) {\n Badge.displayName = \"Badge\";\n}\n\nvar _excluded$f = [\"size\", \"centerContent\"],\n _excluded2$5 = [\"size\"];\n\n/**\n * Box is the most abstract component on top of which other chakra\n * components are built. It renders a `div` element by default.\n *\n * @see Docs https://chakra-ui.com/box\n */\nvar Box = chakra(\"div\");\n\nif (__DEV__) {\n Box.displayName = \"Box\";\n}\n/**\n * As a constraint, you can't pass size related props\n * Only `size` would be allowed\n */\n\n\nvar Square = /*#__PURE__*/forwardRef(function (props, ref) {\n var size = props.size,\n _props$centerContent = props.centerContent,\n centerContent = _props$centerContent === void 0 ? true : _props$centerContent,\n rest = _objectWithoutPropertiesLoose(props, _excluded$f);\n\n var styles = centerContent ? {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n } : {};\n return /*#__PURE__*/React.createElement(Box, _extends({\n ref: ref,\n boxSize: size,\n __css: _extends({}, styles, {\n flexShrink: 0,\n flexGrow: 0\n })\n }, rest));\n});\n\nif (__DEV__) {\n Square.displayName = \"Square\";\n}\n\nvar Circle = /*#__PURE__*/forwardRef(function (props, ref) {\n var size = props.size,\n rest = _objectWithoutPropertiesLoose(props, _excluded2$5);\n\n return /*#__PURE__*/React.createElement(Square, _extends({\n size: size,\n ref: ref,\n borderRadius: \"9999px\"\n }, rest));\n});\n\nif (__DEV__) {\n Circle.displayName = \"Circle\";\n}\n\nvar _excluded$e = [\"axis\"];\n\n/**\n * React component used to horizontally and vertically center its child.\n * It uses the popular `display: flex` centering technique.\n *\n * @see Docs https://chakra-ui.com/center\n */\nvar Center = chakra(\"div\", {\n baseStyle: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n }\n});\n\nif (__DEV__) {\n Center.displayName = \"Center\";\n}\n\nvar centerStyles = {\n horizontal: {\n insetStart: \"50%\",\n transform: \"translateX(-50%)\"\n },\n vertical: {\n top: \"50%\",\n transform: \"translateY(-50%)\"\n },\n both: {\n insetStart: \"50%\",\n top: \"50%\",\n transform: \"translate(-50%, -50%)\"\n }\n};\n/**\n * React component used to horizontally and vertically center an element\n * relative to its parent dimensions.\n *\n * It uses the `position: absolute` strategy.\n *\n * @see Docs https://chakra-ui.com/center\n * @see WebDev https://web.dev/centering-in-css/#5.-pop-and-plop\n */\n\nvar AbsoluteCenter = /*#__PURE__*/forwardRef(function (props, ref) {\n var _props$axis = props.axis,\n axis = _props$axis === void 0 ? \"both\" : _props$axis,\n rest = _objectWithoutPropertiesLoose(props, _excluded$e);\n\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n ref: ref,\n __css: centerStyles[axis]\n }, rest, {\n position: \"absolute\"\n }));\n});\n\nvar _excluded$d = [\"className\"];\n\n/**\n * React component to render inline code snippets.\n *\n * @see Docs https://chakra-ui.com/code\n */\nvar Code = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyleConfig(\"Code\", props);\n\n var _omitThemingProps = omitThemingProps(props);\n _omitThemingProps.className;\n var rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded$d);\n\n return /*#__PURE__*/React.createElement(chakra.code, _extends({\n ref: ref,\n className: cx(\"chakra-code\", props.className)\n }, rest, {\n __css: _extends({\n display: \"inline-block\"\n }, styles)\n }));\n});\n\nif (__DEV__) {\n Code.displayName = \"Code\";\n}\n\nvar _excluded$c = [\"className\", \"centerContent\"];\n\n/**\n * Layout component used to wrap app or website content\n *\n * It sets `margin-left` and `margin-right` to `auto`,\n * to keep its content centered.\n *\n * It also sets a default max-width of `60ch` (60 characters).\n */\nvar Container = /*#__PURE__*/forwardRef(function (props, ref) {\n var _omitThemingProps = omitThemingProps(props),\n className = _omitThemingProps.className,\n centerContent = _omitThemingProps.centerContent,\n rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded$c);\n\n var styles = useStyleConfig(\"Container\", props);\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n ref: ref,\n className: cx(\"chakra-container\", className)\n }, rest, {\n __css: _extends({}, styles, centerContent && {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\"\n })\n }));\n});\n\nif (__DEV__) {\n Container.displayName = \"Container\";\n}\n\nvar _excluded$b = [\"borderLeftWidth\", \"borderBottomWidth\", \"borderTopWidth\", \"borderRightWidth\", \"borderWidth\", \"borderStyle\", \"borderColor\"],\n _excluded2$4 = [\"className\", \"orientation\", \"__css\"];\n/**\n * Layout component used to visually separate content in a list or group.\n * It displays a thin horizontal or vertical line, and renders a `hr` tag.\n *\n * @see Docs https://chakra-ui.com/divider\n */\n\nvar Divider = /*#__PURE__*/forwardRef(function (props, ref) {\n var _useStyleConfig = useStyleConfig(\"Divider\", props),\n borderLeftWidth = _useStyleConfig.borderLeftWidth,\n borderBottomWidth = _useStyleConfig.borderBottomWidth,\n borderTopWidth = _useStyleConfig.borderTopWidth,\n borderRightWidth = _useStyleConfig.borderRightWidth,\n borderWidth = _useStyleConfig.borderWidth,\n borderStyle = _useStyleConfig.borderStyle,\n borderColor = _useStyleConfig.borderColor,\n styles = _objectWithoutPropertiesLoose(_useStyleConfig, _excluded$b);\n\n var _omitThemingProps = omitThemingProps(props),\n className = _omitThemingProps.className,\n _omitThemingProps$ori = _omitThemingProps.orientation,\n orientation = _omitThemingProps$ori === void 0 ? \"horizontal\" : _omitThemingProps$ori,\n __css = _omitThemingProps.__css,\n rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded2$4);\n\n var dividerStyles = {\n vertical: {\n borderLeftWidth: borderLeftWidth || borderRightWidth || borderWidth || \"1px\",\n height: \"100%\"\n },\n horizontal: {\n borderBottomWidth: borderBottomWidth || borderTopWidth || borderWidth || \"1px\",\n width: \"100%\"\n }\n };\n return /*#__PURE__*/React.createElement(chakra.hr, _extends({\n ref: ref,\n \"aria-orientation\": orientation\n }, rest, {\n __css: _extends({}, styles, {\n border: \"0\",\n borderColor: borderColor,\n borderStyle: borderStyle\n }, dividerStyles[orientation], __css),\n className: cx(\"chakra-divider\", className)\n }));\n});\n\nif (__DEV__) {\n Divider.displayName = \"Divider\";\n}\n\nvar _excluded$a = [\"direction\", \"align\", \"justify\", \"wrap\", \"basis\", \"grow\", \"shrink\"];\n\n/**\n * React component used to create flexbox layouts.\n *\n * It renders a `div` with `display: flex` and\n * comes with helpful style shorthand.\n *\n * @see Docs https://chakra-ui.com/flex\n */\nvar Flex = /*#__PURE__*/forwardRef(function (props, ref) {\n var direction = props.direction,\n align = props.align,\n justify = props.justify,\n wrap = props.wrap,\n basis = props.basis,\n grow = props.grow,\n shrink = props.shrink,\n rest = _objectWithoutPropertiesLoose(props, _excluded$a);\n\n var styles = {\n display: \"flex\",\n flexDirection: direction,\n alignItems: align,\n justifyContent: justify,\n flexWrap: wrap,\n flexBasis: basis,\n flexGrow: grow,\n flexShrink: shrink\n };\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n ref: ref,\n __css: styles\n }, rest));\n});\n\nif (__DEV__) {\n Flex.displayName = \"Flex\";\n}\n\nvar _excluded$9 = [\"templateAreas\", \"gap\", \"rowGap\", \"columnGap\", \"column\", \"row\", \"autoFlow\", \"autoRows\", \"templateRows\", \"autoColumns\", \"templateColumns\"],\n _excluded2$3 = [\"area\", \"colSpan\", \"colStart\", \"colEnd\", \"rowEnd\", \"rowSpan\", \"rowStart\"];\n\n/**\n * React component used to create grid layouts.\n *\n * It renders a `div` with `display: grid` and\n * comes with helpful style shorthand.\n *\n * @see Docs https://chakra-ui.com/grid\n */\nvar Grid = /*#__PURE__*/forwardRef(function (props, ref) {\n var templateAreas = props.templateAreas,\n gap = props.gap,\n rowGap = props.rowGap,\n columnGap = props.columnGap,\n column = props.column,\n row = props.row,\n autoFlow = props.autoFlow,\n autoRows = props.autoRows,\n templateRows = props.templateRows,\n autoColumns = props.autoColumns,\n templateColumns = props.templateColumns,\n rest = _objectWithoutPropertiesLoose(props, _excluded$9);\n\n var styles = {\n display: \"grid\",\n gridTemplateAreas: templateAreas,\n gridGap: gap,\n gridRowGap: rowGap,\n gridColumnGap: columnGap,\n gridAutoColumns: autoColumns,\n gridColumn: column,\n gridRow: row,\n gridAutoFlow: autoFlow,\n gridAutoRows: autoRows,\n gridTemplateRows: templateRows,\n gridTemplateColumns: templateColumns\n };\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n ref: ref,\n __css: styles\n }, rest));\n});\n\nif (__DEV__) {\n Grid.displayName = \"Grid\";\n}\n\nfunction spanFn(span) {\n return mapResponsive(span, function (value) {\n return value === \"auto\" ? \"auto\" : \"span \" + value + \"/span \" + value;\n });\n}\n\nvar GridItem = /*#__PURE__*/forwardRef(function (props, ref) {\n var area = props.area,\n colSpan = props.colSpan,\n colStart = props.colStart,\n colEnd = props.colEnd,\n rowEnd = props.rowEnd,\n rowSpan = props.rowSpan,\n rowStart = props.rowStart,\n rest = _objectWithoutPropertiesLoose(props, _excluded2$3);\n\n var styles = filterUndefined({\n gridArea: area,\n gridColumn: spanFn(colSpan),\n gridRow: spanFn(rowSpan),\n gridColumnStart: colStart,\n gridColumnEnd: colEnd,\n gridRowStart: rowStart,\n gridRowEnd: rowEnd\n });\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n ref: ref,\n __css: styles\n }, rest));\n});\n\nvar _excluded$8 = [\"className\"];\nvar Heading = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyleConfig(\"Heading\", props);\n\n var _omitThemingProps = omitThemingProps(props);\n _omitThemingProps.className;\n var rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded$8);\n\n return /*#__PURE__*/React.createElement(chakra.h2, _extends({\n ref: ref,\n className: cx(\"chakra-heading\", props.className)\n }, rest, {\n __css: styles\n }));\n});\n\nif (__DEV__) {\n Heading.displayName = \"Heading\";\n}\n\nvar _excluded$7 = [\"className\"];\n\n/**\n * Semantic component to render a keyboard shortcut\n * within an application.\n *\n * @example\n *\n * ```jsx\n * <Kbd>⌘ + T</Kbd>\n * ```\n *\n * @see Docs https://chakra-ui.com/kbd\n */\nvar Kbd = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyleConfig(\"Kbd\", props);\n\n var _omitThemingProps = omitThemingProps(props),\n className = _omitThemingProps.className,\n rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded$7);\n\n return /*#__PURE__*/React.createElement(chakra.kbd, _extends({\n ref: ref,\n className: cx(\"chakra-kbd\", className)\n }, rest, {\n __css: _extends({\n fontFamily: \"mono\"\n }, styles)\n }));\n});\n\nif (__DEV__) {\n Kbd.displayName = \"Kbd\";\n}\n\nvar _excluded$6 = [\"className\", \"isExternal\"];\n\n/**\n * Links are accessible elements used primarily for navigation.\n *\n * It integrates well with other routing libraries like\n * React Router, Reach Router and Next.js Link.\n *\n * @example\n *\n * ```jsx\n * <Link as={ReactRouterLink} to=\"/home\">Home</Link>\n * ```\n *\n * @see Docs https://chakra-ui.com/link\n */\nvar Link = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyleConfig(\"Link\", props);\n\n var _omitThemingProps = omitThemingProps(props),\n className = _omitThemingProps.className,\n isExternal = _omitThemingProps.isExternal,\n rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded$6);\n\n return /*#__PURE__*/React.createElement(chakra.a, _extends({\n target: isExternal ? \"_blank\" : undefined,\n rel: isExternal ? \"noopener\" : undefined,\n ref: ref,\n className: cx(\"chakra-link\", className)\n }, rest, {\n __css: styles\n }));\n});\n\nif (__DEV__) {\n Link.displayName = \"Link\";\n}\n\nvar _excluded$5 = [\"children\", \"styleType\", \"stylePosition\", \"spacing\"],\n _excluded2$2 = [\"as\"],\n _excluded3 = [\"as\"];\n\nvar _createStylesContext = createStylesContext(\"List\"),\n StylesProvider = _createStylesContext[0],\n useStyles = _createStylesContext[1];\n\n/**\n * List is used to display list items, it renders a `<ul>` by default.\n *\n * @see Docs https://chakra-ui.com/list\n */\nvar List = /*#__PURE__*/forwardRef(function (props, ref) {\n var _ref;\n\n var styles = useMultiStyleConfig(\"List\", props);\n\n var _omitThemingProps = omitThemingProps(props),\n children = _omitThemingProps.children,\n _omitThemingProps$sty = _omitThemingProps.styleType,\n styleType = _omitThemingProps$sty === void 0 ? \"none\" : _omitThemingProps$sty,\n stylePosition = _omitThemingProps.stylePosition,\n spacing = _omitThemingProps.spacing,\n rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded$5);\n\n var validChildren = getValidChildren(children);\n var selector = \"& > *:not(style) ~ *:not(style)\";\n var spacingStyle = spacing ? (_ref = {}, _ref[selector] = {\n mt: spacing\n }, _ref) : {};\n return /*#__PURE__*/React.createElement(StylesProvider, {\n value: styles\n }, /*#__PURE__*/React.createElement(chakra.ul, _extends({\n ref: ref,\n listStyleType: styleType,\n listStylePosition: stylePosition\n /**\n * We added this role to fix the Safari accessibility issue with list-style-type: none\n * @see https://www.scottohara.me/blog/2019/01/12/lists-and-safari.html\n */\n ,\n role: \"list\",\n __css: _extends({}, styles.container, spacingStyle)\n }, rest), validChildren));\n});\n\nif (__DEV__) {\n List.displayName = \"List\";\n}\n\nvar OrderedList = /*#__PURE__*/forwardRef(function (props, ref) {\n props.as;\n var rest = _objectWithoutPropertiesLoose(props, _excluded2$2);\n\n return /*#__PURE__*/React.createElement(List, _extends({\n ref: ref,\n as: \"ol\",\n styleType: \"decimal\",\n marginStart: \"1em\"\n }, rest));\n});\n\nif (__DEV__) {\n OrderedList.displayName = \"OrderedList\";\n}\n\nvar UnorderedList = /*#__PURE__*/forwardRef(function (props, ref) {\n props.as;\n var rest = _objectWithoutPropertiesLoose(props, _excluded3);\n\n return /*#__PURE__*/React.createElement(List, _extends({\n ref: ref,\n as: \"ul\",\n styleType: \"initial\",\n marginStart: \"1em\"\n }, rest));\n});\n\nif (__DEV__) {\n UnorderedList.displayName = \"UnorderedList\";\n}\n\n/**\n * ListItem\n *\n * Used to render a list item\n */\nvar ListItem = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyles();\n return /*#__PURE__*/React.createElement(chakra.li, _extends({\n ref: ref\n }, props, {\n __css: styles.item\n }));\n});\n\nif (__DEV__) {\n ListItem.displayName = \"ListItem\";\n}\n/**\n * ListIcon\n *\n * Used to render an icon beside the list item text\n */\n\n\nvar ListIcon = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyles();\n return /*#__PURE__*/React.createElement(Icon, _extends({\n ref: ref,\n role: \"presentation\"\n }, props, {\n __css: styles.icon\n }));\n});\n\nif (__DEV__) {\n ListIcon.displayName = \"ListIcon\";\n}\n\nvar _excluded$4 = [\"columns\", \"spacingX\", \"spacingY\", \"spacing\", \"minChildWidth\"];\n\n/**\n * SimpleGrid\n *\n * React component that uses the `Grid` component and provides\n * a simpler interface to create responsive grid layouts.\n * \n * Provides props that easily define columns and spacing.\n *\n * @see Docs https://chakra-ui.com/simplegrid\n */\nvar SimpleGrid = /*#__PURE__*/forwardRef(function (props, ref) {\n var columns = props.columns,\n spacingX = props.spacingX,\n spacingY = props.spacingY,\n spacing = props.spacing,\n minChildWidth = props.minChildWidth,\n rest = _objectWithoutPropertiesLoose(props, _excluded$4);\n\n var templateColumns = minChildWidth ? widthToColumns(minChildWidth) : countToColumns(columns);\n return /*#__PURE__*/React.createElement(Grid, _extends({\n ref: ref,\n gap: spacing,\n columnGap: spacingX,\n rowGap: spacingY,\n templateColumns: templateColumns\n }, rest));\n});\n\nif (__DEV__) {\n SimpleGrid.displayName = \"SimpleGrid\";\n}\n\nfunction toPx(n) {\n return isNumber(n) ? n + \"px\" : n;\n}\n\nfunction widthToColumns(width) {\n return mapResponsive(width, function (value) {\n return isNull(value) ? null : \"repeat(auto-fit, minmax(\" + toPx(value) + \", 1fr))\";\n });\n}\n\nfunction countToColumns(count) {\n return mapResponsive(count, function (value) {\n return isNull(value) ? null : \"repeat(\" + value + \", minmax(0, 1fr))\";\n });\n}\n\n/**\n * A flexible flex spacer that expands along the major axis of its containing flex layout.\n * It renders a `div` by default, and takes up any available space.\n *\n * @see Docs https://chakra-ui.com/flex#using-the-spacer\n */\nvar Spacer = chakra(\"div\", {\n baseStyle: {\n flex: 1,\n justifySelf: \"stretch\",\n alignSelf: \"stretch\"\n }\n});\n\nif (__DEV__) {\n Spacer.displayName = \"Spacer\";\n}\n\n/**\n * If we ever run into SSR issues with this, check this post to find a fix for it:\n * @see https://medium.com/@emmenko/patching-lobotomized-owl-selector-for-emotion-ssr-5a582a3c424c\n */\nvar selector = \"& > *:not(style) ~ *:not(style)\";\nfunction getStackStyles(options) {\n var _ref;\n\n var spacing = options.spacing,\n direction = options.direction;\n var directionStyles = {\n column: {\n marginTop: spacing,\n marginEnd: 0,\n marginBottom: 0,\n marginStart: 0\n },\n row: {\n marginTop: 0,\n marginEnd: 0,\n marginBottom: 0,\n marginStart: spacing\n },\n \"column-reverse\": {\n marginTop: 0,\n marginEnd: 0,\n marginBottom: spacing,\n marginStart: 0\n },\n \"row-reverse\": {\n marginTop: 0,\n marginEnd: spacing,\n marginBottom: 0,\n marginStart: 0\n }\n };\n return _ref = {\n flexDirection: direction\n }, _ref[selector] = mapResponsive(direction, function (value) {\n return directionStyles[value];\n }), _ref;\n}\nfunction getDividerStyles(options) {\n var spacing = options.spacing,\n direction = options.direction;\n var dividerStyles = {\n column: {\n my: spacing,\n mx: 0,\n borderLeftWidth: 0,\n borderBottomWidth: \"1px\"\n },\n \"column-reverse\": {\n my: spacing,\n mx: 0,\n borderLeftWidth: 0,\n borderBottomWidth: \"1px\"\n },\n row: {\n mx: spacing,\n my: 0,\n borderLeftWidth: \"1px\",\n borderBottomWidth: 0\n },\n \"row-reverse\": {\n mx: spacing,\n my: 0,\n borderLeftWidth: \"1px\",\n borderBottomWidth: 0\n }\n };\n return {\n \"&\": mapResponsive(direction, function (value) {\n return dividerStyles[value];\n })\n };\n}\n\nvar _excluded$3 = [\"isInline\", \"direction\", \"align\", \"justify\", \"spacing\", \"wrap\", \"children\", \"divider\", \"className\", \"shouldWrapChildren\"];\nvar StackDivider = function StackDivider(props) {\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n className: \"chakra-stack__divider\"\n }, props, {\n __css: _extends({}, props[\"__css\"], {\n borderWidth: 0,\n alignSelf: \"stretch\",\n borderColor: \"inherit\",\n width: \"auto\",\n height: \"auto\"\n })\n }));\n};\nvar StackItem = function StackItem(props) {\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n className: \"chakra-stack__item\"\n }, props, {\n __css: _extends({\n display: \"inline-block\",\n flex: \"0 0 auto\",\n minWidth: 0\n }, props[\"__css\"])\n }));\n};\n\n/**\n * Stacks help you easily create flexible and automatically distributed layouts\n *\n * You can stack elements in the horizontal or vertical direction,\n * and apply a space or/and divider between each element.\n *\n * It uses `display: flex` internally and renders a `div`.\n *\n * @see Docs https://chakra-ui.com/stack\n *\n */\nvar Stack = /*#__PURE__*/forwardRef(function (props, ref) {\n var _ref;\n\n var isInline = props.isInline,\n directionProp = props.direction,\n align = props.align,\n justify = props.justify,\n _props$spacing = props.spacing,\n spacing = _props$spacing === void 0 ? \"0.5rem\" : _props$spacing,\n wrap = props.wrap,\n children = props.children,\n divider = props.divider,\n className = props.className,\n shouldWrapChildren = props.shouldWrapChildren,\n rest = _objectWithoutPropertiesLoose(props, _excluded$3);\n\n var direction = isInline ? \"row\" : directionProp != null ? directionProp : \"column\";\n var styles = React.useMemo(function () {\n return getStackStyles({\n direction: direction,\n spacing: spacing\n });\n }, [direction, spacing]);\n var dividerStyle = React.useMemo(function () {\n return getDividerStyles({\n spacing: spacing,\n direction: direction\n });\n }, [spacing, direction]);\n var hasDivider = !!divider;\n var shouldUseChildren = !shouldWrapChildren && !hasDivider;\n var validChildren = getValidChildren(children);\n var clones = shouldUseChildren ? validChildren : validChildren.map(function (child, index) {\n // Prefer provided child key, fallback to index\n var key = typeof child.key !== \"undefined\" ? child.key : index;\n var isLast = index + 1 === validChildren.length;\n var wrappedChild = /*#__PURE__*/React.createElement(StackItem, {\n key: key\n }, child);\n\n var _child = shouldWrapChildren ? wrappedChild : child;\n\n if (!hasDivider) return _child;\n var clonedDivider = /*#__PURE__*/React.cloneElement(divider, {\n __css: dividerStyle\n });\n\n var _divider = isLast ? null : clonedDivider;\n\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: key\n }, _child, _divider);\n });\n\n var _className = cx(\"chakra-stack\", className);\n\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n ref: ref,\n display: \"flex\",\n alignItems: align,\n justifyContent: justify,\n flexDirection: styles.flexDirection,\n flexWrap: wrap,\n className: _className,\n __css: hasDivider ? {} : (_ref = {}, _ref[selector] = styles[selector], _ref)\n }, rest), clones);\n});\n\nif (__DEV__) {\n Stack.displayName = \"Stack\";\n}\n/**\n * A view that arranges its children in a horizontal line.\n */\n\n\nvar HStack = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(Stack, _extends({\n align: \"center\"\n }, props, {\n direction: \"row\",\n ref: ref\n }));\n});\n\nif (__DEV__) {\n HStack.displayName = \"HStack\";\n}\n/**\n * A view that arranges its children in a vertical line.\n */\n\n\nvar VStack = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(Stack, _extends({\n align: \"center\"\n }, props, {\n direction: \"column\",\n ref: ref\n }));\n});\n\nif (__DEV__) {\n VStack.displayName = \"VStack\";\n}\n\nvar _excluded$2 = [\"className\", \"align\", \"decoration\", \"casing\"];\n\n/**\n * Used to render texts or paragraphs.\n *\n * @see Docs https://chakra-ui.com/text\n */\nvar Text = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyleConfig(\"Text\", props);\n\n var _omitThemingProps = omitThemingProps(props);\n _omitThemingProps.className;\n _omitThemingProps.align;\n _omitThemingProps.decoration;\n _omitThemingProps.casing;\n var rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded$2);\n\n var aliasedProps = filterUndefined({\n textAlign: props.align,\n textDecoration: props.decoration,\n textTransform: props.casing\n });\n return /*#__PURE__*/React.createElement(chakra.p, _extends({\n ref: ref,\n className: cx(\"chakra-text\", props.className)\n }, aliasedProps, rest, {\n __css: styles\n }));\n});\n\nif (__DEV__) {\n Text.displayName = \"Text\";\n}\n\nvar _excluded$1 = [\"spacing\", \"spacingX\", \"spacingY\", \"children\", \"justify\", \"direction\", \"align\", \"className\", \"shouldWrapChildren\"],\n _excluded2$1 = [\"className\"];\n\nfunction px(value) {\n return typeof value === \"number\" ? value + \"px\" : value;\n}\n/**\n * Layout component used to stack elements that differ in length\n * and are liable to wrap.\n *\n * Common use cases:\n * - Buttons that appear together at the end of forms\n * - Lists of tags and chips\n *\n * @see Docs https://chakra-ui.com/wrap\n */\n\n\nvar Wrap = /*#__PURE__*/forwardRef(function (props, ref) {\n var _props$spacing = props.spacing,\n spacing = _props$spacing === void 0 ? \"0.5rem\" : _props$spacing,\n spacingX = props.spacingX,\n spacingY = props.spacingY,\n children = props.children,\n justify = props.justify,\n direction = props.direction,\n align = props.align,\n className = props.className,\n shouldWrapChildren = props.shouldWrapChildren,\n rest = _objectWithoutPropertiesLoose(props, _excluded$1);\n\n var styles = React.useMemo(function () {\n var _spacingX$spacingY = {\n spacingX: spacingX,\n spacingY: spacingY\n },\n _spacingX$spacingY$sp = _spacingX$spacingY.spacingX,\n x = _spacingX$spacingY$sp === void 0 ? spacing : _spacingX$spacingY$sp,\n _spacingX$spacingY$sp2 = _spacingX$spacingY.spacingY,\n y = _spacingX$spacingY$sp2 === void 0 ? spacing : _spacingX$spacingY$sp2;\n return {\n \"--chakra-wrap-x-spacing\": function chakraWrapXSpacing(theme) {\n return mapResponsive(x, function (value) {\n return px(tokenToCSSVar(\"space\", value)(theme));\n });\n },\n \"--chakra-wrap-y-spacing\": function chakraWrapYSpacing(theme) {\n return mapResponsive(y, function (value) {\n return px(tokenToCSSVar(\"space\", value)(theme));\n });\n },\n \"--wrap-x-spacing\": \"calc(var(--chakra-wrap-x-spacing) / 2)\",\n \"--wrap-y-spacing\": \"calc(var(--chakra-wrap-y-spacing) / 2)\",\n display: \"flex\",\n flexWrap: \"wrap\",\n justifyContent: justify,\n alignItems: align,\n flexDirection: direction,\n listStyleType: \"none\",\n padding: \"0\",\n margin: \"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)\",\n \"& > *:not(style)\": {\n margin: \"var(--wrap-y-spacing) var(--wrap-x-spacing)\"\n }\n };\n }, [spacing, spacingX, spacingY, justify, align, direction]);\n var childrenToRender = shouldWrapChildren ? React.Children.map(children, function (child, index) {\n return /*#__PURE__*/React.createElement(WrapItem, {\n key: index\n }, child);\n }) : children;\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n ref: ref,\n className: cx(\"chakra-wrap\", className),\n overflow: \"hidden\"\n }, rest), /*#__PURE__*/React.createElement(chakra.ul, {\n className: \"chakra-wrap__list\",\n __css: styles\n }, childrenToRender));\n});\n\nif (__DEV__) {\n Wrap.displayName = \"Wrap\";\n}\n\nvar WrapItem = /*#__PURE__*/forwardRef(function (props, ref) {\n var className = props.className,\n rest = _objectWithoutPropertiesLoose(props, _excluded2$1);\n\n return /*#__PURE__*/React.createElement(chakra.li, _extends({\n ref: ref,\n __css: {\n display: \"flex\",\n alignItems: \"flex-start\"\n },\n className: cx(\"chakra-wrap__listitem\", className)\n }, rest));\n});\n\nif (__DEV__) {\n WrapItem.displayName = \"WrapItem\";\n}\n\nvar _excluded = [\"isExternal\", \"target\", \"rel\", \"className\"],\n _excluded2 = [\"className\"];\nvar LinkOverlay = /*#__PURE__*/forwardRef(function (props, ref) {\n var isExternal = props.isExternal,\n target = props.target,\n rel = props.rel,\n className = props.className,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n\n return /*#__PURE__*/React.createElement(chakra.a, _extends({}, rest, {\n ref: ref,\n className: cx(\"chakra-linkbox__overlay\", className),\n rel: isExternal ? \"noopener noreferrer\" : rel,\n target: isExternal ? \"_blank\" : target,\n __css: {\n position: \"static\",\n \"&::before\": {\n content: \"''\",\n cursor: \"inherit\",\n display: \"block\",\n position: \"absolute\",\n top: 0,\n left: 0,\n zIndex: 0,\n width: \"100%\",\n height: \"100%\"\n }\n }\n }));\n});\n\n/**\n * `LinkBox` is used to wrap content areas within a link while ensuring semantic html\n *\n * @see Docs https://chakra-ui.com/docs/navigation/link-overlay\n * @see Resources https://www.sarasoueidan.com/blog/nested-links\n */\nvar LinkBox = /*#__PURE__*/forwardRef(function (props, ref) {\n var className = props.className,\n rest = _objectWithoutPropertiesLoose(props, _excluded2);\n\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n ref: ref,\n position: \"relative\"\n }, rest, {\n className: cx(\"chakra-linkbox\", className),\n __css: {\n /* Elevate the links and abbreviations up */\n \"a[href]:not(.chakra-linkbox__overlay), abbr[title]\": {\n position: \"relative\",\n zIndex: 1\n }\n }\n }));\n});\n\nexport { AbsoluteCenter, AspectRatio, Badge, Box, Center, Circle, Code, Container, Divider, Flex, Grid, GridItem, HStack, Heading, Kbd, Link, LinkBox, LinkOverlay, List, ListIcon, ListItem, OrderedList, SimpleGrid, Spacer, Square, Stack, StackDivider, StackItem, Text, UnorderedList, VStack, Wrap, WrapItem };\n","import { isRightClick, dataAttr } from '@chakra-ui/utils';\nimport { mergeRefs } from '@chakra-ui/react-utils';\nimport * as React from 'react';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction useEventListeners() {\n var listeners = React.useRef(new Map());\n var currentListeners = listeners.current;\n var add = React.useCallback(function (el, type, listener, options) {\n listeners.current.set(listener, {\n type: type,\n el: el,\n options: options\n });\n el.addEventListener(type, listener, options);\n }, []);\n var remove = React.useCallback(function (el, type, listener, options) {\n el.removeEventListener(type, listener, options);\n listeners.current[\"delete\"](listener);\n }, []);\n React.useEffect(function () {\n return function () {\n currentListeners.forEach(function (value, key) {\n remove(value.el, value.type, key, value.options);\n });\n };\n }, [remove, currentListeners]);\n return {\n add: add,\n remove: remove\n };\n}\n\nvar _excluded = [\"ref\", \"isDisabled\", \"isFocusable\", \"clickOnEnter\", \"clickOnSpace\", \"onMouseDown\", \"onMouseUp\", \"onClick\", \"onKeyDown\", \"onKeyUp\", \"tabIndex\", \"onMouseOver\", \"onMouseLeave\"];\n\nfunction isValidElement(event) {\n var element = event.target;\n var tagName = element.tagName,\n isContentEditable = element.isContentEditable;\n return tagName !== \"INPUT\" && tagName !== \"TEXTAREA\" && isContentEditable !== true;\n}\n/**\n * useClickable implements all the interactions of a native `button`\n * component with support for making it focusable even if it is disabled.\n *\n * It can be used with both native button elements or other elements (like `div`).\n */\n\n\nfunction useClickable(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n htmlRef = _props.ref,\n isDisabled = _props.isDisabled,\n isFocusable = _props.isFocusable,\n _props$clickOnEnter = _props.clickOnEnter,\n clickOnEnter = _props$clickOnEnter === void 0 ? true : _props$clickOnEnter,\n _props$clickOnSpace = _props.clickOnSpace,\n clickOnSpace = _props$clickOnSpace === void 0 ? true : _props$clickOnSpace,\n onMouseDown = _props.onMouseDown,\n onMouseUp = _props.onMouseUp,\n onClick = _props.onClick,\n onKeyDown = _props.onKeyDown,\n onKeyUp = _props.onKeyUp,\n tabIndexProp = _props.tabIndex,\n onMouseOver = _props.onMouseOver,\n onMouseLeave = _props.onMouseLeave,\n htmlProps = _objectWithoutPropertiesLoose(_props, _excluded);\n /**\n * We'll use this to track if the element is a button element\n */\n\n\n var _React$useState = React.useState(true),\n isButton = _React$useState[0],\n setIsButton = _React$useState[1];\n /**\n * For custom button implementation, we'll use this to track when\n * we mouse down on the button, to enable use style its \":active\" style\n */\n\n\n var _React$useState2 = React.useState(false),\n isPressed = _React$useState2[0],\n setIsPressed = _React$useState2[1];\n\n var listeners = useEventListeners();\n /**\n * The ref callback that fires as soon as the dom node is ready\n */\n\n var refCallback = function refCallback(node) {\n if (!node) return;\n\n if (node.tagName !== \"BUTTON\") {\n setIsButton(false);\n }\n };\n\n var tabIndex = isButton ? tabIndexProp : tabIndexProp || 0;\n var trulyDisabled = isDisabled && !isFocusable;\n var handleClick = React.useCallback(function (event) {\n if (isDisabled) {\n event.stopPropagation();\n event.preventDefault();\n return;\n }\n\n var self = event.currentTarget;\n self.focus();\n onClick == null ? void 0 : onClick(event);\n }, [isDisabled, onClick]);\n var onDocumentKeyUp = React.useCallback(function (e) {\n if (isPressed && isValidElement(e)) {\n e.preventDefault();\n e.stopPropagation();\n setIsPressed(false); // eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n listeners.remove(document, \"keyup\", onDocumentKeyUp, false);\n }\n }, [isPressed, listeners]);\n var handleKeyDown = React.useCallback(function (event) {\n onKeyDown == null ? void 0 : onKeyDown(event);\n\n if (isDisabled || event.defaultPrevented || event.metaKey) {\n return;\n }\n\n if (!isValidElement(event.nativeEvent) || isButton) return;\n var shouldClickOnEnter = clickOnEnter && event.key === \"Enter\";\n var shouldClickOnSpace = clickOnSpace && event.key === \" \";\n\n if (shouldClickOnSpace) {\n event.preventDefault();\n setIsPressed(true);\n }\n\n if (shouldClickOnEnter) {\n event.preventDefault();\n var self = event.currentTarget;\n self.click();\n }\n\n listeners.add(document, \"keyup\", onDocumentKeyUp, false);\n }, [isDisabled, isButton, onKeyDown, clickOnEnter, clickOnSpace, listeners, onDocumentKeyUp]);\n var handleKeyUp = React.useCallback(function (event) {\n onKeyUp == null ? void 0 : onKeyUp(event);\n if (isDisabled || event.defaultPrevented || event.metaKey) return;\n if (!isValidElement(event.nativeEvent) || isButton) return;\n var shouldClickOnSpace = clickOnSpace && event.key === \" \";\n\n if (shouldClickOnSpace) {\n event.preventDefault();\n setIsPressed(false);\n var self = event.currentTarget;\n self.click();\n }\n }, [clickOnSpace, isButton, isDisabled, onKeyUp]);\n var onDocumentMouseUp = React.useCallback(function (event) {\n if (event.button !== 0) return;\n setIsPressed(false);\n listeners.remove(document, \"mouseup\", onDocumentMouseUp, false);\n }, [listeners]);\n var handleMouseDown = React.useCallback(function (event) {\n if (isRightClick(event)) return;\n\n if (isDisabled) {\n event.stopPropagation();\n event.preventDefault();\n return;\n }\n\n if (!isButton) {\n setIsPressed(true);\n }\n\n var target = event.currentTarget;\n target.focus({\n preventScroll: true\n });\n listeners.add(document, \"mouseup\", onDocumentMouseUp, false);\n onMouseDown == null ? void 0 : onMouseDown(event);\n }, [isDisabled, isButton, onMouseDown, listeners, onDocumentMouseUp]);\n var handleMouseUp = React.useCallback(function (event) {\n if (isRightClick(event)) return;\n\n if (!isButton) {\n setIsPressed(false);\n }\n\n onMouseUp == null ? void 0 : onMouseUp(event);\n }, [onMouseUp, isButton]);\n var handleMouseOver = React.useCallback(function (event) {\n if (isDisabled) {\n event.preventDefault();\n return;\n }\n\n onMouseOver == null ? void 0 : onMouseOver(event);\n }, [isDisabled, onMouseOver]);\n var handleMouseLeave = React.useCallback(function (event) {\n if (isPressed) {\n event.preventDefault();\n setIsPressed(false);\n }\n\n onMouseLeave == null ? void 0 : onMouseLeave(event);\n }, [isPressed, onMouseLeave]);\n var ref = mergeRefs(htmlRef, refCallback);\n\n if (isButton) {\n return _extends({}, htmlProps, {\n ref: ref,\n type: \"button\",\n \"aria-disabled\": trulyDisabled ? undefined : isDisabled,\n disabled: trulyDisabled,\n onClick: handleClick,\n onMouseDown: onMouseDown,\n onMouseUp: onMouseUp,\n onKeyUp: onKeyUp,\n onKeyDown: onKeyDown,\n onMouseOver: onMouseOver,\n onMouseLeave: onMouseLeave\n });\n }\n\n return _extends({}, htmlProps, {\n ref: ref,\n role: \"button\",\n \"data-active\": dataAttr(isPressed),\n \"aria-disabled\": isDisabled ? \"true\" : undefined,\n tabIndex: trulyDisabled ? undefined : tabIndex,\n onClick: handleClick,\n onMouseDown: handleMouseDown,\n onMouseUp: handleMouseUp,\n onKeyUp: handleKeyUp,\n onKeyDown: handleKeyDown,\n onMouseOver: handleMouseOver,\n onMouseLeave: handleMouseLeave\n });\n}\n\nexport { useClickable };\n","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","import { isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nexport default function getBoundingClientRect(element, includeScale) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n var rect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (isHTMLElement(element) && includeScale) {\n var offsetHeight = element.offsetHeight;\n var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale\n // Fallback to 1 in case both values are `0`\n\n if (offsetWidth > 0) {\n scaleX = round(rect.width) / offsetWidth || 1;\n }\n\n if (offsetHeight > 0) {\n scaleY = round(rect.height) / offsetHeight || 1;\n }\n }\n\n return {\n width: rect.width / scaleX,\n height: rect.height / scaleY,\n top: rect.top / scaleY,\n right: rect.right / scaleX,\n bottom: rect.bottom / scaleY,\n left: rect.left / scaleX,\n x: rect.left / scaleX,\n y: rect.top / scaleY\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element) {\n var rect = getBoundingClientRect(element);\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nexport default function getViewportRect(element) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function format(str) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return [].concat(args).reduce(function (p, c) {\n return p.replace(/%s/, c);\n }, str);\n}","import format from \"./format.js\";\nimport { modifierPhases } from \"../enums.js\";\nvar INVALID_MODIFIER_ERROR = 'Popper: modifier \"%s\" provided an invalid %s property, expected %s but got %s';\nvar MISSING_DEPENDENCY_ERROR = 'Popper: modifier \"%s\" requires \"%s\", but \"%s\" modifier is not available';\nvar VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];\nexport default function validateModifiers(modifiers) {\n modifiers.forEach(function (modifier) {\n [].concat(Object.keys(modifier), VALID_PROPERTIES) // IE11-compatible replacement for `new Set(iterable)`\n .filter(function (value, index, self) {\n return self.indexOf(value) === index;\n }).forEach(function (key) {\n switch (key) {\n case 'name':\n if (typeof modifier.name !== 'string') {\n console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '\"name\"', '\"string\"', \"\\\"\" + String(modifier.name) + \"\\\"\"));\n }\n\n break;\n\n case 'enabled':\n if (typeof modifier.enabled !== 'boolean') {\n console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '\"enabled\"', '\"boolean\"', \"\\\"\" + String(modifier.enabled) + \"\\\"\"));\n }\n\n break;\n\n case 'phase':\n if (modifierPhases.indexOf(modifier.phase) < 0) {\n console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '\"phase\"', \"either \" + modifierPhases.join(', '), \"\\\"\" + String(modifier.phase) + \"\\\"\"));\n }\n\n break;\n\n case 'fn':\n if (typeof modifier.fn !== 'function') {\n console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '\"fn\"', '\"function\"', \"\\\"\" + String(modifier.fn) + \"\\\"\"));\n }\n\n break;\n\n case 'effect':\n if (modifier.effect != null && typeof modifier.effect !== 'function') {\n console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '\"effect\"', '\"function\"', \"\\\"\" + String(modifier.fn) + \"\\\"\"));\n }\n\n break;\n\n case 'requires':\n if (modifier.requires != null && !Array.isArray(modifier.requires)) {\n console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '\"requires\"', '\"array\"', \"\\\"\" + String(modifier.requires) + \"\\\"\"));\n }\n\n break;\n\n case 'requiresIfExists':\n if (!Array.isArray(modifier.requiresIfExists)) {\n console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '\"requiresIfExists\"', '\"array\"', \"\\\"\" + String(modifier.requiresIfExists) + \"\\\"\"));\n }\n\n break;\n\n case 'options':\n case 'data':\n break;\n\n default:\n console.error(\"PopperJS: an invalid property has been provided to the \\\"\" + modifier.name + \"\\\" modifier, valid properties are \" + VALID_PROPERTIES.map(function (s) {\n return \"\\\"\" + s + \"\\\"\";\n }).join(', ') + \"; but \\\"\" + key + \"\\\" was provided.\");\n }\n\n modifier.requires && modifier.requires.forEach(function (requirement) {\n if (modifiers.find(function (mod) {\n return mod.name === requirement;\n }) == null) {\n console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));\n }\n });\n });\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function uniqueBy(arr, fn) {\n var identifiers = new Set();\n return arr.filter(function (item) {\n var identifier = fn(item);\n\n if (!identifiers.has(identifier)) {\n identifiers.add(identifier);\n return true;\n }\n });\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","import { mergeRefs } from '@chakra-ui/react-utils';\nimport { createPopper } from '@popperjs/core';\nimport { useRef, useCallback, useEffect } from 'react';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar toVar = function toVar(value, fallback) {\n return {\n \"var\": value,\n varRef: fallback ? \"var(\" + value + \", \" + fallback + \")\" : \"var(\" + value + \")\"\n };\n};\n\nvar cssVars = {\n arrowShadowColor: toVar(\"--popper-arrow-shadow-color\"),\n arrowSize: toVar(\"--popper-arrow-size\", \"8px\"),\n arrowSizeHalf: toVar(\"--popper-arrow-size-half\"),\n arrowBg: toVar(\"--popper-arrow-bg\"),\n transformOrigin: toVar(\"--popper-transform-origin\"),\n arrowOffset: toVar(\"--popper-arrow-offset\")\n};\nfunction getBoxShadow(placement) {\n if (placement.includes(\"top\")) return \"1px 1px 1px 0 var(--popper-arrow-shadow-color)\";\n if (placement.includes(\"bottom\")) return \"-1px -1px 1px 0 var(--popper-arrow-shadow-color)\";\n if (placement.includes(\"right\")) return \"-1px 1px 1px 0 var(--popper-arrow-shadow-color)\";\n if (placement.includes(\"left\")) return \"1px -1px 1px 0 var(--popper-arrow-shadow-color)\";\n}\nvar transforms = {\n top: \"bottom center\",\n \"top-start\": \"bottom left\",\n \"top-end\": \"bottom right\",\n bottom: \"top center\",\n \"bottom-start\": \"top left\",\n \"bottom-end\": \"top right\",\n left: \"right center\",\n \"left-start\": \"right top\",\n \"left-end\": \"right bottom\",\n right: \"left center\",\n \"right-start\": \"left top\",\n \"right-end\": \"left bottom\"\n};\nvar toTransformOrigin = function toTransformOrigin(placement) {\n return transforms[placement];\n};\nvar defaultEventListeners = {\n scroll: true,\n resize: true\n};\nfunction getEventListenerOptions(value) {\n var eventListeners;\n\n if (typeof value === \"object\") {\n eventListeners = {\n enabled: true,\n options: _extends({}, defaultEventListeners, value)\n };\n } else {\n eventListeners = {\n enabled: value,\n options: defaultEventListeners\n };\n }\n\n return eventListeners;\n}\n\n/* -------------------------------------------------------------------------------------------------\n The match width modifier sets the popper width to match the reference.\n It is useful for custom selects, autocomplete, etc.\n* -----------------------------------------------------------------------------------------------*/\n\nvar matchWidth = {\n name: \"matchWidth\",\n enabled: true,\n phase: \"beforeWrite\",\n requires: [\"computeStyles\"],\n fn: function fn(_ref) {\n var state = _ref.state;\n state.styles.popper.width = state.rects.reference.width + \"px\";\n },\n effect: function effect(_ref2) {\n var state = _ref2.state;\n return function () {\n var reference = state.elements.reference;\n state.elements.popper.style.width = reference.offsetWidth + \"px\";\n };\n }\n};\n/* -------------------------------------------------------------------------------------------------\n The transform origin modifier sets the css `transformOrigin` value of the popper\n based on the dynamic placement state of the popper.\n \n Useful when we need to animate/transition the popper.\n* -----------------------------------------------------------------------------------------------*/\n\nvar transformOrigin = {\n name: \"transformOrigin\",\n enabled: true,\n phase: \"write\",\n fn: function fn(_ref3) {\n var state = _ref3.state;\n setTransformOrigin(state);\n },\n effect: function effect(_ref4) {\n var state = _ref4.state;\n return function () {\n setTransformOrigin(state);\n };\n }\n};\n\nvar setTransformOrigin = function setTransformOrigin(state) {\n state.elements.popper.style.setProperty(cssVars.transformOrigin[\"var\"], toTransformOrigin(state.placement));\n};\n/* -------------------------------------------------------------------------------------------------\n The position arrow modifier adds width, height and overrides the `top/left/right/bottom`\n styles generated by popper.js to properly position the arrow\n* -----------------------------------------------------------------------------------------------*/\n\n\nvar positionArrow = {\n name: \"positionArrow\",\n enabled: true,\n phase: \"afterWrite\",\n fn: function fn(_ref5) {\n var state = _ref5.state;\n setArrowStyles(state);\n }\n};\n\nvar setArrowStyles = function setArrowStyles(state) {\n var _state$elements;\n\n if (!state.placement) return;\n var overrides = getArrowStyle$1(state.placement);\n\n if ((_state$elements = state.elements) != null && _state$elements.arrow && overrides) {\n var _Object$assign, _vars;\n\n Object.assign(state.elements.arrow.style, (_Object$assign = {}, _Object$assign[overrides.property] = overrides.value, _Object$assign.width = cssVars.arrowSize.varRef, _Object$assign.height = cssVars.arrowSize.varRef, _Object$assign.zIndex = -1, _Object$assign));\n var vars = (_vars = {}, _vars[cssVars.arrowSizeHalf[\"var\"]] = \"calc(\" + cssVars.arrowSize.varRef + \" / 2)\", _vars[cssVars.arrowOffset[\"var\"]] = \"calc(\" + cssVars.arrowSizeHalf.varRef + \" * -1)\", _vars);\n\n for (var property in vars) {\n state.elements.arrow.style.setProperty(property, vars[property]);\n }\n }\n};\n\nvar getArrowStyle$1 = function getArrowStyle(placement) {\n if (placement.startsWith(\"top\")) {\n return {\n property: \"bottom\",\n value: cssVars.arrowOffset.varRef\n };\n }\n\n if (placement.startsWith(\"bottom\")) {\n return {\n property: \"top\",\n value: cssVars.arrowOffset.varRef\n };\n }\n\n if (placement.startsWith(\"left\")) {\n return {\n property: \"right\",\n value: cssVars.arrowOffset.varRef\n };\n }\n\n if (placement.startsWith(\"right\")) {\n return {\n property: \"left\",\n value: cssVars.arrowOffset.varRef\n };\n }\n};\n/* -------------------------------------------------------------------------------------------------\n The inner arrow modifier, sets the placement styles for the inner arrow that forms\n the popper arrow tip.\n* -----------------------------------------------------------------------------------------------*/\n\n\nvar innerArrow = {\n name: \"innerArrow\",\n enabled: true,\n phase: \"main\",\n requires: [\"arrow\"],\n fn: function fn(_ref6) {\n var state = _ref6.state;\n setInnerArrowStyles(state);\n },\n effect: function effect(_ref7) {\n var state = _ref7.state;\n return function () {\n setInnerArrowStyles(state);\n };\n }\n};\n\nvar setInnerArrowStyles = function setInnerArrowStyles(state) {\n if (!state.elements.arrow) return;\n var inner = state.elements.arrow.querySelector(\"[data-popper-arrow-inner]\");\n if (!inner) return;\n Object.assign(inner.style, {\n transform: \"rotate(45deg)\",\n background: cssVars.arrowBg.varRef,\n top: 0,\n left: 0,\n width: \"100%\",\n height: \"100%\",\n position: \"absolute\",\n zIndex: \"inherit\",\n boxShadow: getBoxShadow(state.placement)\n });\n};\n\nvar logicals = {\n \"start-start\": {\n ltr: \"left-start\",\n rtl: \"right-start\"\n },\n \"start-end\": {\n ltr: \"left-end\",\n rtl: \"right-end\"\n },\n \"end-start\": {\n ltr: \"right-start\",\n rtl: \"left-start\"\n },\n \"end-end\": {\n ltr: \"right-end\",\n rtl: \"left-end\"\n },\n start: {\n ltr: \"left\",\n rtl: \"right\"\n },\n end: {\n ltr: \"right\",\n rtl: \"left\"\n }\n};\nvar opposites = {\n \"auto-start\": \"auto-end\",\n \"auto-end\": \"auto-start\",\n \"top-start\": \"top-end\",\n \"top-end\": \"top-start\",\n \"bottom-start\": \"bottom-end\",\n \"bottom-end\": \"bottom-start\"\n};\nfunction getPopperPlacement(placement, dir) {\n var _placement, _placement2;\n\n if (dir === void 0) {\n dir = \"ltr\";\n }\n\n var value = ((_placement = logicals[placement]) == null ? void 0 : _placement[dir]) || placement;\n if (dir === \"ltr\") return value;\n return (_placement2 = opposites[placement]) != null ? _placement2 : value;\n}\n\nvar _excluded = [\"size\", \"shadowColor\", \"bg\", \"style\"];\nfunction usePopper(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n _props$enabled = _props.enabled,\n enabled = _props$enabled === void 0 ? true : _props$enabled,\n modifiers = _props.modifiers,\n _props$placement = _props.placement,\n placementProp = _props$placement === void 0 ? \"bottom\" : _props$placement,\n _props$strategy = _props.strategy,\n strategy = _props$strategy === void 0 ? \"absolute\" : _props$strategy,\n _props$arrowPadding = _props.arrowPadding,\n arrowPadding = _props$arrowPadding === void 0 ? 8 : _props$arrowPadding,\n _props$eventListeners = _props.eventListeners,\n eventListeners = _props$eventListeners === void 0 ? true : _props$eventListeners,\n offset = _props.offset,\n _props$gutter = _props.gutter,\n gutter = _props$gutter === void 0 ? 8 : _props$gutter,\n _props$flip = _props.flip,\n flip = _props$flip === void 0 ? true : _props$flip,\n _props$boundary = _props.boundary,\n boundary = _props$boundary === void 0 ? \"clippingParents\" : _props$boundary,\n _props$preventOverflo = _props.preventOverflow,\n preventOverflow = _props$preventOverflo === void 0 ? true : _props$preventOverflo,\n matchWidth$1 = _props.matchWidth,\n _props$direction = _props.direction,\n direction = _props$direction === void 0 ? \"ltr\" : _props$direction;\n var reference = useRef(null);\n var popper = useRef(null);\n var instance = useRef(null);\n var placement = getPopperPlacement(placementProp, direction);\n var cleanup = useRef(function () {});\n var setupPopper = useCallback(function () {\n if (!enabled || !reference.current || !popper.current) return; // If popper instance exists, destroy it, so we can create a new one\n\n cleanup.current == null ? void 0 : cleanup.current();\n instance.current = createPopper(reference.current, popper.current, {\n placement: placement,\n modifiers: [innerArrow, positionArrow, transformOrigin, _extends({}, matchWidth, {\n enabled: !!matchWidth$1\n }), _extends({\n name: \"eventListeners\"\n }, getEventListenerOptions(eventListeners)), {\n name: \"arrow\",\n options: {\n padding: arrowPadding\n }\n }, {\n name: \"offset\",\n options: {\n offset: offset != null ? offset : [0, gutter]\n }\n }, {\n name: \"flip\",\n enabled: !!flip,\n options: {\n padding: 8\n }\n }, {\n name: \"preventOverflow\",\n enabled: !!preventOverflow,\n options: {\n boundary: boundary\n }\n }].concat(modifiers != null ? modifiers : []),\n strategy: strategy\n }); // force update one-time to fix any positioning issues\n\n instance.current.forceUpdate();\n cleanup.current = instance.current.destroy;\n }, [placement, enabled, modifiers, matchWidth$1, eventListeners, arrowPadding, offset, gutter, flip, preventOverflow, boundary, strategy]);\n useEffect(function () {\n return function () {\n /**\n * Fast refresh might call this function and tear down the popper\n * even if the reference still exists. This checks against that\n */\n if (!reference.current && !popper.current) {\n var _instance$current;\n\n (_instance$current = instance.current) == null ? void 0 : _instance$current.destroy();\n instance.current = null;\n }\n };\n }, []);\n var referenceRef = useCallback(function (node) {\n reference.current = node;\n setupPopper();\n }, [setupPopper]);\n var getReferenceProps = useCallback(function (props, ref) {\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n return _extends({}, props, {\n ref: mergeRefs(referenceRef, ref)\n });\n }, [referenceRef]);\n var popperRef = useCallback(function (node) {\n popper.current = node;\n setupPopper();\n }, [setupPopper]);\n var getPopperProps = useCallback(function (props, ref) {\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n return _extends({}, props, {\n ref: mergeRefs(popperRef, ref),\n style: _extends({}, props.style, {\n position: strategy,\n minWidth: matchWidth$1 ? undefined : \"max-content\",\n inset: \"0 auto auto 0\"\n })\n });\n }, [strategy, popperRef, matchWidth$1]);\n var getArrowProps = useCallback(function (props, ref) {\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n var _props2 = props;\n _props2.size;\n _props2.shadowColor;\n _props2.bg;\n _props2.style;\n var rest = _objectWithoutPropertiesLoose(_props2, _excluded);\n\n return _extends({}, rest, {\n ref: ref,\n \"data-popper-arrow\": \"\",\n style: getArrowStyle(props)\n });\n }, []);\n var getArrowInnerProps = useCallback(function (props, ref) {\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n return _extends({}, props, {\n ref: ref,\n \"data-popper-arrow-inner\": \"\"\n });\n }, []);\n return {\n update: function update() {\n var _instance$current2;\n\n (_instance$current2 = instance.current) == null ? void 0 : _instance$current2.update();\n },\n forceUpdate: function forceUpdate() {\n var _instance$current3;\n\n (_instance$current3 = instance.current) == null ? void 0 : _instance$current3.forceUpdate();\n },\n transformOrigin: cssVars.transformOrigin.varRef,\n referenceRef: referenceRef,\n popperRef: popperRef,\n getPopperProps: getPopperProps,\n getArrowProps: getArrowProps,\n getArrowInnerProps: getArrowInnerProps,\n getReferenceProps: getReferenceProps\n };\n}\n\nfunction getArrowStyle(props) {\n var size = props.size,\n shadowColor = props.shadowColor,\n bg = props.bg,\n style = props.style;\n\n var computedStyle = _extends({}, style, {\n position: \"absolute\"\n });\n\n if (size) {\n computedStyle[\"--popper-arrow-size\"] = size;\n }\n\n if (shadowColor) {\n computedStyle[\"--popper-arrow-shadow-color\"] = shadowColor;\n }\n\n if (bg) {\n computedStyle[\"--popper-arrow-bg\"] = bg;\n }\n\n return computedStyle;\n}\n\nexport { cssVars as popperCSSVars, usePopper };\n","import { createStylesContext, useMultiStyleConfig, omitThemingProps, useTheme, forwardRef, chakra } from '@chakra-ui/system';\nimport { focus, getOwnerDocument, normalizeEventKey, dataAttr, callAllHandlers, isHTMLElement, getNextItemFromSearch, determineLazyBehavior, isActiveElement, isString, isArray, removeItem, addItem, runIfFn, __DEV__, cx, callAll } from '@chakra-ui/utils';\nimport { motion } from 'framer-motion';\nimport * as React from 'react';\nimport { useClickable } from '@chakra-ui/clickable';\nimport { createDescendantContext } from '@chakra-ui/descendant';\nimport { useDisclosure, useOutsideClick, useUpdateEffect, useFocusOnHide, useIds, useUnmountEffect, useShortcut, useId, useControllableState } from '@chakra-ui/hooks';\nimport { useAnimationState } from '@chakra-ui/hooks/use-animation-state';\nimport { usePopper } from '@chakra-ui/popper';\nimport { createContext, mergeRefs, getValidChildren } from '@chakra-ui/react-utils';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded$1 = [\"id\", \"closeOnSelect\", \"closeOnBlur\", \"autoSelect\", \"isLazy\", \"isOpen\", \"defaultIsOpen\", \"onClose\", \"onOpen\", \"placement\", \"lazyBehavior\", \"direction\", \"computePositionOnMount\"],\n _excluded2$1 = [\"onMouseEnter\", \"onMouseMove\", \"onMouseLeave\", \"onClick\", \"isDisabled\", \"isFocusable\", \"closeOnSelect\", \"type\"],\n _excluded3$1 = [\"type\", \"isChecked\"],\n _excluded4$1 = [\"children\", \"type\", \"value\", \"defaultValue\", \"onChange\"];\n/* -------------------------------------------------------------------------------------------------\n * Create context to track descendants and their indices\n * -----------------------------------------------------------------------------------------------*/\n\nvar _createDescendantCont = createDescendantContext(),\n MenuDescendantsProvider = _createDescendantCont[0],\n useMenuDescendantsContext = _createDescendantCont[1],\n useMenuDescendants = _createDescendantCont[2],\n useMenuDescendant = _createDescendantCont[3];\n\nvar _createContext = createContext({\n strict: false,\n name: \"MenuContext\"\n}),\n MenuProvider = _createContext[0],\n useMenuContext = _createContext[1];\n\n/**\n * React Hook to manage a menu\n *\n * It provides the logic and will be used with react context\n * to propagate its return value to all children\n */\nfunction useMenu(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n id = _props.id,\n _props$closeOnSelect = _props.closeOnSelect,\n closeOnSelect = _props$closeOnSelect === void 0 ? true : _props$closeOnSelect,\n _props$closeOnBlur = _props.closeOnBlur,\n closeOnBlur = _props$closeOnBlur === void 0 ? true : _props$closeOnBlur,\n _props$autoSelect = _props.autoSelect,\n autoSelect = _props$autoSelect === void 0 ? true : _props$autoSelect,\n isLazy = _props.isLazy,\n isOpenProp = _props.isOpen,\n defaultIsOpen = _props.defaultIsOpen,\n onCloseProp = _props.onClose,\n onOpenProp = _props.onOpen,\n _props$placement = _props.placement,\n placement = _props$placement === void 0 ? \"bottom-start\" : _props$placement,\n _props$lazyBehavior = _props.lazyBehavior,\n lazyBehavior = _props$lazyBehavior === void 0 ? \"unmount\" : _props$lazyBehavior,\n direction = _props.direction,\n _props$computePositio = _props.computePositionOnMount,\n computePositionOnMount = _props$computePositio === void 0 ? false : _props$computePositio,\n popperProps = _objectWithoutPropertiesLoose(_props, _excluded$1);\n /**\n * Prepare the reference to the menu and disclosure\n */\n\n\n var menuRef = React.useRef(null);\n var buttonRef = React.useRef(null);\n /**\n * Context to register all menu item nodes\n */\n\n var descendants = useMenuDescendants();\n var focusMenu = React.useCallback(function () {\n focus(menuRef.current, {\n nextTick: true,\n selectTextIfInput: false\n });\n }, []);\n var focusFirstItem = React.useCallback(function () {\n var id = setTimeout(function () {\n var first = descendants.firstEnabled();\n if (first) setFocusedIndex(first.index);\n });\n timeoutIds.current.add(id);\n }, [descendants]);\n var focusLastItem = React.useCallback(function () {\n var id = setTimeout(function () {\n var last = descendants.lastEnabled();\n if (last) setFocusedIndex(last.index);\n });\n timeoutIds.current.add(id);\n }, [descendants]);\n var onOpenInternal = React.useCallback(function () {\n onOpenProp == null ? void 0 : onOpenProp();\n\n if (autoSelect) {\n focusFirstItem();\n } else {\n focusMenu();\n }\n }, [autoSelect, focusFirstItem, focusMenu, onOpenProp]);\n\n var _useDisclosure = useDisclosure({\n isOpen: isOpenProp,\n defaultIsOpen: defaultIsOpen,\n onClose: onCloseProp,\n onOpen: onOpenInternal\n }),\n isOpen = _useDisclosure.isOpen,\n onOpen = _useDisclosure.onOpen,\n onClose = _useDisclosure.onClose,\n onToggle = _useDisclosure.onToggle;\n\n useOutsideClick({\n enabled: isOpen && closeOnBlur,\n ref: menuRef,\n handler: function handler(event) {\n var _buttonRef$current;\n\n if (!((_buttonRef$current = buttonRef.current) != null && _buttonRef$current.contains(event.target))) {\n onClose();\n }\n }\n });\n /**\n * Add some popper.js for dynamic positioning\n */\n\n var popper = usePopper(_extends({}, popperProps, {\n enabled: isOpen || computePositionOnMount,\n placement: placement,\n direction: direction\n }));\n\n var _React$useState = React.useState(-1),\n focusedIndex = _React$useState[0],\n setFocusedIndex = _React$useState[1];\n /**\n * Focus the button when we close the menu\n */\n\n\n useUpdateEffect(function () {\n if (!isOpen) {\n setFocusedIndex(-1);\n }\n }, [isOpen]);\n useFocusOnHide(menuRef, {\n focusRef: buttonRef,\n visible: isOpen,\n shouldFocus: true\n });\n var animationState = useAnimationState({\n isOpen: isOpen,\n ref: menuRef\n });\n /**\n * Generate unique ids for menu's list and button\n */\n\n var _useIds = useIds(id, \"menu-button\", \"menu-list\"),\n buttonId = _useIds[0],\n menuId = _useIds[1];\n\n var openAndFocusMenu = React.useCallback(function () {\n onOpen();\n focusMenu();\n }, [onOpen, focusMenu]);\n var timeoutIds = React.useRef(new Set([]));\n useUnmountEffect(function () {\n timeoutIds.current.forEach(function (id) {\n return clearTimeout(id);\n });\n timeoutIds.current.clear();\n });\n var openAndFocusFirstItem = React.useCallback(function () {\n onOpen();\n focusFirstItem();\n }, [focusFirstItem, onOpen]);\n var openAndFocusLastItem = React.useCallback(function () {\n onOpen();\n focusLastItem();\n }, [onOpen, focusLastItem]);\n var refocus = React.useCallback(function () {\n var _menuRef$current, _descendants$item;\n\n var doc = getOwnerDocument(menuRef.current);\n var hasFocusWithin = (_menuRef$current = menuRef.current) == null ? void 0 : _menuRef$current.contains(doc.activeElement);\n var shouldRefocus = isOpen && !hasFocusWithin;\n if (!shouldRefocus) return;\n var node = (_descendants$item = descendants.item(focusedIndex)) == null ? void 0 : _descendants$item.node;\n\n if (node) {\n focus(node, {\n selectTextIfInput: false,\n preventScroll: false\n });\n }\n }, [isOpen, focusedIndex, descendants]);\n return {\n openAndFocusMenu: openAndFocusMenu,\n openAndFocusFirstItem: openAndFocusFirstItem,\n openAndFocusLastItem: openAndFocusLastItem,\n onTransitionEnd: refocus,\n unstable__animationState: animationState,\n descendants: descendants,\n popper: popper,\n buttonId: buttonId,\n menuId: menuId,\n forceUpdate: popper.forceUpdate,\n orientation: \"vertical\",\n isOpen: isOpen,\n onToggle: onToggle,\n onOpen: onOpen,\n onClose: onClose,\n menuRef: menuRef,\n buttonRef: buttonRef,\n focusedIndex: focusedIndex,\n closeOnSelect: closeOnSelect,\n closeOnBlur: closeOnBlur,\n autoSelect: autoSelect,\n setFocusedIndex: setFocusedIndex,\n isLazy: isLazy,\n lazyBehavior: lazyBehavior\n };\n}\n\n/**\n * React Hook to manage a menu button.\n *\n * The assumption here is that the `useMenu` hook is used\n * in a component higher up the tree, and its return value\n * is passed as `context` to this hook.\n */\nfunction useMenuButton(props, externalRef) {\n if (props === void 0) {\n props = {};\n }\n\n if (externalRef === void 0) {\n externalRef = null;\n }\n\n var menu = useMenuContext();\n var onToggle = menu.onToggle,\n popper = menu.popper,\n openAndFocusFirstItem = menu.openAndFocusFirstItem,\n openAndFocusLastItem = menu.openAndFocusLastItem;\n var onKeyDown = React.useCallback(function (event) {\n var eventKey = normalizeEventKey(event);\n var keyMap = {\n Enter: openAndFocusFirstItem,\n ArrowDown: openAndFocusFirstItem,\n ArrowUp: openAndFocusLastItem\n };\n var action = keyMap[eventKey];\n\n if (action) {\n event.preventDefault();\n event.stopPropagation();\n action(event);\n }\n }, [openAndFocusFirstItem, openAndFocusLastItem]);\n return _extends({}, props, {\n ref: mergeRefs(menu.buttonRef, externalRef, popper.referenceRef),\n id: menu.buttonId,\n \"data-active\": dataAttr(menu.isOpen),\n \"aria-expanded\": menu.isOpen,\n \"aria-haspopup\": \"menu\",\n \"aria-controls\": menu.menuId,\n onClick: callAllHandlers(props.onClick, onToggle),\n onKeyDown: callAllHandlers(props.onKeyDown, onKeyDown)\n });\n}\n\nfunction isTargetMenuItem(target) {\n var _target$getAttribute;\n\n // this will catch `menuitem`, `menuitemradio`, `menuitemcheckbox`\n return isHTMLElement(target) && !!((_target$getAttribute = target.getAttribute(\"role\")) != null && _target$getAttribute.startsWith(\"menuitem\"));\n}\n/* -------------------------------------------------------------------------------------------------\n * useMenuList\n * -----------------------------------------------------------------------------------------------*/\n\n\n/**\n * React Hook to manage a menu list.\n *\n * The assumption here is that the `useMenu` hook is used\n * in a component higher up the tree, and its return value\n * is passed as `context` to this hook.\n */\nfunction useMenuList(props, ref) {\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n var menu = useMenuContext();\n\n if (!menu) {\n throw new Error(\"useMenuContext: context is undefined. Seems you forgot to wrap component within <Menu>\");\n }\n\n var focusedIndex = menu.focusedIndex,\n setFocusedIndex = menu.setFocusedIndex,\n menuRef = menu.menuRef,\n isOpen = menu.isOpen,\n onClose = menu.onClose,\n menuId = menu.menuId,\n isLazy = menu.isLazy,\n lazyBehavior = menu.lazyBehavior,\n animated = menu.unstable__animationState;\n var descendants = useMenuDescendantsContext();\n /**\n * Hook that creates a keydown event handler that listens\n * to printable keyboard character press\n */\n\n var createTypeaheadHandler = useShortcut({\n preventDefault: function preventDefault(event) {\n return event.key !== \" \" && isTargetMenuItem(event.target);\n }\n });\n var onKeyDown = React.useCallback(function (event) {\n var eventKey = normalizeEventKey(event);\n var keyMap = {\n Tab: function Tab(event) {\n return event.preventDefault();\n },\n Escape: onClose,\n ArrowDown: function ArrowDown() {\n var next = descendants.nextEnabled(focusedIndex);\n if (next) setFocusedIndex(next.index);\n },\n ArrowUp: function ArrowUp() {\n var prev = descendants.prevEnabled(focusedIndex);\n if (prev) setFocusedIndex(prev.index);\n }\n };\n var fn = keyMap[eventKey];\n\n if (fn) {\n event.preventDefault();\n fn(event);\n return;\n }\n /**\n * Typeahead: Based on current character pressed,\n * find the next item to be selected\n */\n\n\n var onTypeahead = createTypeaheadHandler(function (character) {\n var nextItem = getNextItemFromSearch(descendants.values(), character, function (item) {\n var _item$node$textConten, _item$node;\n\n return (_item$node$textConten = item == null ? void 0 : (_item$node = item.node) == null ? void 0 : _item$node.textContent) != null ? _item$node$textConten : \"\";\n }, descendants.item(focusedIndex));\n\n if (nextItem) {\n var index = descendants.indexOf(nextItem.node);\n setFocusedIndex(index);\n }\n });\n\n if (isTargetMenuItem(event.target)) {\n onTypeahead(event);\n }\n }, [descendants, focusedIndex, createTypeaheadHandler, onClose, setFocusedIndex]);\n var hasBeenOpened = React.useRef(false);\n\n if (isOpen) {\n hasBeenOpened.current = true;\n }\n\n var shouldRenderChildren = determineLazyBehavior({\n hasBeenSelected: hasBeenOpened.current,\n isLazy: isLazy,\n lazyBehavior: lazyBehavior,\n isSelected: animated.present\n });\n return _extends({}, props, {\n ref: mergeRefs(menuRef, ref),\n children: shouldRenderChildren ? props.children : null,\n tabIndex: -1,\n role: \"menu\",\n id: menuId,\n style: _extends({}, props.style, {\n transformOrigin: \"var(--popper-transform-origin)\"\n }),\n \"aria-orientation\": \"vertical\",\n onKeyDown: callAllHandlers(props.onKeyDown, onKeyDown)\n });\n}\n/* -------------------------------------------------------------------------------------------------\n * useMenuPosition: Composes usePopper to position the menu\n * -----------------------------------------------------------------------------------------------*/\n\nfunction useMenuPositioner(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _useMenuContext = useMenuContext(),\n popper = _useMenuContext.popper,\n isOpen = _useMenuContext.isOpen;\n\n return popper.getPopperProps(_extends({}, props, {\n style: _extends({\n visibility: isOpen ? \"visible\" : \"hidden\"\n }, props.style)\n }));\n}\n/* -------------------------------------------------------------------------------------------------\n * useMenuItem: Hook for each menu item within the menu list.\n We also use it in `useMenuItemOption`\n * -----------------------------------------------------------------------------------------------*/\n\nfunction useMenuItem(props, externalRef) {\n if (props === void 0) {\n props = {};\n }\n\n if (externalRef === void 0) {\n externalRef = null;\n }\n\n var _props2 = props,\n onMouseEnterProp = _props2.onMouseEnter,\n onMouseMoveProp = _props2.onMouseMove,\n onMouseLeaveProp = _props2.onMouseLeave,\n onClickProp = _props2.onClick,\n isDisabled = _props2.isDisabled,\n isFocusable = _props2.isFocusable,\n closeOnSelect = _props2.closeOnSelect,\n typeProp = _props2.type,\n htmlProps = _objectWithoutPropertiesLoose(_props2, _excluded2$1);\n\n var menu = useMenuContext();\n var setFocusedIndex = menu.setFocusedIndex,\n focusedIndex = menu.focusedIndex,\n menuCloseOnSelect = menu.closeOnSelect,\n onClose = menu.onClose,\n menuRef = menu.menuRef,\n isOpen = menu.isOpen,\n menuId = menu.menuId;\n var ref = React.useRef(null);\n var id = menuId + \"-menuitem-\" + useId();\n /**\n * Register the menuitem's node into the domContext\n */\n\n var _useMenuDescendant = useMenuDescendant({\n disabled: isDisabled && !isFocusable\n }),\n index = _useMenuDescendant.index,\n register = _useMenuDescendant.register;\n\n var onMouseEnter = React.useCallback(function (event) {\n onMouseEnterProp == null ? void 0 : onMouseEnterProp(event);\n if (isDisabled) return;\n setFocusedIndex(index);\n }, [setFocusedIndex, index, isDisabled, onMouseEnterProp]);\n var onMouseMove = React.useCallback(function (event) {\n onMouseMoveProp == null ? void 0 : onMouseMoveProp(event);\n\n if (ref.current && !isActiveElement(ref.current)) {\n onMouseEnter(event);\n }\n }, [onMouseEnter, onMouseMoveProp]);\n var onMouseLeave = React.useCallback(function (event) {\n onMouseLeaveProp == null ? void 0 : onMouseLeaveProp(event);\n if (isDisabled) return;\n setFocusedIndex(-1);\n }, [setFocusedIndex, isDisabled, onMouseLeaveProp]);\n var onClick = React.useCallback(function (event) {\n onClickProp == null ? void 0 : onClickProp(event);\n if (!isTargetMenuItem(event.currentTarget)) return;\n /**\n * Close menu and parent menus, allowing the MenuItem\n * to override its parent menu's `closeOnSelect` prop.\n */\n\n if (closeOnSelect != null ? closeOnSelect : menuCloseOnSelect) {\n onClose();\n }\n }, [onClose, onClickProp, menuCloseOnSelect, closeOnSelect]);\n var isFocused = index === focusedIndex;\n var trulyDisabled = isDisabled && !isFocusable;\n useUpdateEffect(function () {\n if (!isOpen) return;\n\n if (isFocused && !trulyDisabled && ref.current) {\n focus(ref.current, {\n nextTick: true,\n selectTextIfInput: false,\n preventScroll: false\n });\n } else if (menuRef.current && !isActiveElement(menuRef.current)) {\n focus(menuRef.current, {\n preventScroll: false\n });\n }\n }, [isFocused, trulyDisabled, menuRef, isOpen]);\n var clickableProps = useClickable({\n onClick: onClick,\n onMouseEnter: onMouseEnter,\n onMouseMove: onMouseMove,\n onMouseLeave: onMouseLeave,\n ref: mergeRefs(register, ref, externalRef),\n isDisabled: isDisabled,\n isFocusable: isFocusable\n });\n return _extends({}, htmlProps, clickableProps, {\n type: typeProp != null ? typeProp : clickableProps.type,\n id: id,\n role: \"menuitem\",\n tabIndex: isFocused ? 0 : -1\n });\n}\n/* -------------------------------------------------------------------------------------------------\n * useMenuOption: Composes useMenuItem to provide a selectable/checkable menu item\n * -----------------------------------------------------------------------------------------------*/\n\nfunction useMenuOption(props, ref) {\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n var _props3 = props,\n _props3$type = _props3.type,\n type = _props3$type === void 0 ? \"radio\" : _props3$type,\n isChecked = _props3.isChecked,\n rest = _objectWithoutPropertiesLoose(_props3, _excluded3$1);\n\n var ownProps = useMenuItem(rest, ref);\n return _extends({}, ownProps, {\n role: \"menuitem\" + type,\n \"aria-checked\": isChecked\n });\n}\n/* -------------------------------------------------------------------------------------------------\n * useMenuOptionGroup: Manages the state of multiple selectable menuitem or menu option\n * -----------------------------------------------------------------------------------------------*/\n\nfunction useMenuOptionGroup(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props4 = props,\n children = _props4.children,\n _props4$type = _props4.type,\n type = _props4$type === void 0 ? \"radio\" : _props4$type,\n valueProp = _props4.value,\n defaultValue = _props4.defaultValue,\n onChangeProp = _props4.onChange,\n htmlProps = _objectWithoutPropertiesLoose(_props4, _excluded4$1);\n\n var isRadio = type === \"radio\";\n var fallback = isRadio ? \"\" : [];\n\n var _useControllableState = useControllableState({\n defaultValue: defaultValue != null ? defaultValue : fallback,\n value: valueProp,\n onChange: onChangeProp\n }),\n value = _useControllableState[0],\n setValue = _useControllableState[1];\n\n var onChange = React.useCallback(function (selectedValue) {\n if (type === \"radio\" && isString(value)) {\n setValue(selectedValue);\n }\n\n if (type === \"checkbox\" && isArray(value)) {\n var nextValue = value.includes(selectedValue) ? removeItem(value, selectedValue) : addItem(value, selectedValue);\n setValue(nextValue);\n }\n }, [value, setValue, type]);\n var validChildren = getValidChildren(children);\n var clones = validChildren.map(function (child) {\n /**\n * We've added an internal `id` to each `MenuItemOption`,\n * let's use that for type-checking.\n *\n * We can't rely on displayName or the element's type since\n * they can be changed by the user.\n */\n if (child.type.id !== \"MenuItemOption\") return child;\n\n var onClick = function onClick(event) {\n onChange(child.props.value);\n child.props.onClick == null ? void 0 : child.props.onClick(event);\n };\n\n var isChecked = type === \"radio\" ? child.props.value === value : value.includes(child.props.value);\n return /*#__PURE__*/React.cloneElement(child, {\n type: type,\n onClick: onClick,\n isChecked: isChecked\n });\n });\n return _extends({}, htmlProps, {\n children: clones\n });\n}\nfunction useMenuState() {\n var _useMenuContext2 = useMenuContext(),\n isOpen = _useMenuContext2.isOpen,\n onClose = _useMenuContext2.onClose;\n\n return {\n isOpen: isOpen,\n onClose: onClose\n };\n}\n\nvar _excluded = [\"descendants\"],\n _excluded2 = [\"children\", \"as\"],\n _excluded3 = [\"rootProps\"],\n _excluded4 = [\"type\"],\n _excluded5 = [\"icon\", \"iconSpacing\", \"command\", \"commandSpacing\", \"children\"],\n _excluded6 = [\"icon\", \"iconSpacing\"],\n _excluded7 = [\"className\", \"title\"],\n _excluded8 = [\"title\", \"children\", \"className\"],\n _excluded9 = [\"className\", \"children\"],\n _excluded10 = [\"className\"];\n\nvar _createStylesContext = createStylesContext(\"Menu\"),\n StylesProvider = _createStylesContext[0],\n useStyles = _createStylesContext[1];\n\n/**\n * Menu provides context, state, and focus management\n * to its sub-components. It doesn't render any DOM node.\n */\nvar Menu = function Menu(props) {\n var children = props.children;\n var styles = useMultiStyleConfig(\"Menu\", props);\n var ownProps = omitThemingProps(props);\n\n var _useTheme = useTheme(),\n direction = _useTheme.direction;\n\n var _useMenu = useMenu(_extends({}, ownProps, {\n direction: direction\n })),\n descendants = _useMenu.descendants,\n ctx = _objectWithoutPropertiesLoose(_useMenu, _excluded);\n\n var context = React.useMemo(function () {\n return ctx;\n }, [ctx]);\n var isOpen = context.isOpen,\n onClose = context.onClose,\n forceUpdate = context.forceUpdate;\n return /*#__PURE__*/React.createElement(MenuDescendantsProvider, {\n value: descendants\n }, /*#__PURE__*/React.createElement(MenuProvider, {\n value: context\n }, /*#__PURE__*/React.createElement(StylesProvider, {\n value: styles\n }, runIfFn(children, {\n isOpen: isOpen,\n onClose: onClose,\n forceUpdate: forceUpdate\n }))));\n};\n\nif (__DEV__) {\n Menu.displayName = \"Menu\";\n}\n\nvar StyledMenuButton = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyles();\n return /*#__PURE__*/React.createElement(chakra.button, _extends({\n ref: ref\n }, props, {\n __css: _extends({\n display: \"inline-flex\",\n appearance: \"none\",\n alignItems: \"center\",\n outline: 0\n }, styles.button)\n }));\n});\n/**\n * The trigger for the menu list. Must be a direct child of `Menu`.\n */\n\nvar MenuButton = /*#__PURE__*/forwardRef(function (props, ref) {\n props.children;\n var As = props.as,\n rest = _objectWithoutPropertiesLoose(props, _excluded2);\n\n var buttonProps = useMenuButton(rest, ref);\n var Element = As || StyledMenuButton;\n return /*#__PURE__*/React.createElement(Element, _extends({}, buttonProps, {\n className: cx(\"chakra-menu__menu-button\", props.className)\n }), /*#__PURE__*/React.createElement(chakra.span, {\n __css: {\n pointerEvents: \"none\",\n flex: \"1 1 auto\",\n minW: 0\n }\n }, props.children));\n});\n\nif (__DEV__) {\n MenuButton.displayName = \"MenuButton\";\n}\n\nvar motionVariants = {\n enter: {\n visibility: \"visible\",\n opacity: 1,\n scale: 1,\n transition: {\n duration: 0.2,\n ease: [0.4, 0, 0.2, 1]\n }\n },\n exit: {\n transitionEnd: {\n visibility: \"hidden\"\n },\n opacity: 0,\n scale: 0.8,\n transition: {\n duration: 0.1,\n easings: \"easeOut\"\n }\n }\n};\n\nfunction __motion(el) {\n var m = motion;\n\n if (\"custom\" in m && typeof m.custom === \"function\") {\n return m.custom(el);\n }\n\n return m(el);\n} // @future: only call `motion(chakra.div)` when we drop framer-motion v3 support\n\n\nvar MenuTransition = __motion(chakra.div);\n\nvar MenuList = /*#__PURE__*/forwardRef(function (props, ref) {\n var _props$zIndex, _styles$list;\n\n var rootProps = props.rootProps,\n rest = _objectWithoutPropertiesLoose(props, _excluded3);\n\n var _useMenuContext = useMenuContext(),\n isOpen = _useMenuContext.isOpen,\n onTransitionEnd = _useMenuContext.onTransitionEnd,\n animated = _useMenuContext.unstable__animationState;\n\n var ownProps = useMenuList(rest, ref);\n var positionerProps = useMenuPositioner(rootProps);\n var styles = useStyles();\n return /*#__PURE__*/React.createElement(chakra.div, _extends({}, positionerProps, {\n __css: {\n zIndex: (_props$zIndex = props.zIndex) != null ? _props$zIndex : (_styles$list = styles.list) == null ? void 0 : _styles$list.zIndex\n }\n }), /*#__PURE__*/React.createElement(MenuTransition, _extends({}, ownProps, {\n /**\n * We could call this on either `onAnimationComplete` or `onUpdate`.\n * It seems the re-focusing works better with the `onUpdate`\n */\n onUpdate: onTransitionEnd,\n onAnimationComplete: callAll(animated.onComplete, ownProps.onAnimationComplete),\n className: cx(\"chakra-menu__menu-list\", ownProps.className),\n variants: motionVariants,\n initial: false,\n animate: isOpen ? \"enter\" : \"exit\",\n __css: _extends({\n outline: 0\n }, styles.list)\n })));\n});\n\nif (__DEV__) {\n MenuList.displayName = \"MenuList\";\n}\n\nvar StyledMenuItem = /*#__PURE__*/forwardRef(function (props, ref) {\n var type = props.type,\n rest = _objectWithoutPropertiesLoose(props, _excluded4);\n\n var styles = useStyles();\n /**\n * Given another component, use its type if present\n * Else, use no type to avoid invalid html, e.g. <a type=\"button\" />\n * Else, fall back to \"button\"\n */\n\n var btnType = rest.as || type ? type != null ? type : undefined : \"button\";\n var buttonStyles = React.useMemo(function () {\n return _extends({\n textDecoration: \"none\",\n color: \"inherit\",\n userSelect: \"none\",\n display: \"flex\",\n width: \"100%\",\n alignItems: \"center\",\n textAlign: \"start\",\n flex: \"0 0 auto\",\n outline: 0\n }, styles.item);\n }, [styles.item]);\n return /*#__PURE__*/React.createElement(chakra.button, _extends({\n ref: ref,\n type: btnType\n }, rest, {\n __css: buttonStyles\n }));\n});\nvar MenuItem = /*#__PURE__*/forwardRef(function (props, ref) {\n var icon = props.icon,\n _props$iconSpacing = props.iconSpacing,\n iconSpacing = _props$iconSpacing === void 0 ? \"0.75rem\" : _props$iconSpacing,\n command = props.command,\n _props$commandSpacing = props.commandSpacing,\n commandSpacing = _props$commandSpacing === void 0 ? \"0.75rem\" : _props$commandSpacing,\n children = props.children,\n rest = _objectWithoutPropertiesLoose(props, _excluded5);\n\n var menuitemProps = useMenuItem(rest, ref);\n var shouldWrap = icon || command;\n\n var _children = shouldWrap ? /*#__PURE__*/React.createElement(\"span\", {\n style: {\n pointerEvents: \"none\",\n flex: 1\n }\n }, children) : children;\n\n return /*#__PURE__*/React.createElement(StyledMenuItem, _extends({}, menuitemProps, {\n className: cx(\"chakra-menu__menuitem\", menuitemProps.className)\n }), icon && /*#__PURE__*/React.createElement(MenuIcon, {\n fontSize: \"0.8em\",\n marginEnd: iconSpacing\n }, icon), _children, command && /*#__PURE__*/React.createElement(MenuCommand, {\n marginStart: commandSpacing\n }, command));\n});\n\nif (__DEV__) {\n MenuItem.displayName = \"MenuItem\";\n}\n\nvar CheckIcon = function CheckIcon(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 14 14\",\n width: \"1em\",\n height: \"1em\"\n }, props), /*#__PURE__*/React.createElement(\"polygon\", {\n fill: \"currentColor\",\n points: \"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039\"\n }));\n};\n\nvar MenuItemOption = /*#__PURE__*/forwardRef(function (props, ref) {\n // menu option item should always be `type=button`, so we omit `type`\n var icon = props.icon,\n _props$iconSpacing2 = props.iconSpacing,\n iconSpacing = _props$iconSpacing2 === void 0 ? \"0.75rem\" : _props$iconSpacing2,\n rest = _objectWithoutPropertiesLoose(props, _excluded6);\n\n var optionProps = useMenuOption(rest, ref);\n return /*#__PURE__*/React.createElement(StyledMenuItem, _extends({}, optionProps, {\n className: cx(\"chakra-menu__menuitem-option\", rest.className)\n }), icon !== null && /*#__PURE__*/React.createElement(MenuIcon, {\n fontSize: \"0.8em\",\n marginEnd: iconSpacing,\n opacity: props.isChecked ? 1 : 0\n }, icon || /*#__PURE__*/React.createElement(CheckIcon, null)), /*#__PURE__*/React.createElement(\"span\", {\n style: {\n flex: 1\n }\n }, optionProps.children));\n});\nMenuItemOption.id = \"MenuItemOption\";\n\nif (__DEV__) {\n MenuItemOption.displayName = \"MenuItemOption\";\n}\n\nvar MenuOptionGroup = function MenuOptionGroup(props) {\n var className = props.className,\n title = props.title,\n rest = _objectWithoutPropertiesLoose(props, _excluded7);\n\n var ownProps = useMenuOptionGroup(rest);\n return /*#__PURE__*/React.createElement(MenuGroup, _extends({\n title: title,\n className: cx(\"chakra-menu__option-group\", className)\n }, ownProps));\n};\n\nif (__DEV__) {\n MenuOptionGroup.displayName = \"MenuOptionGroup\";\n}\n\nvar MenuGroup = /*#__PURE__*/forwardRef(function (props, ref) {\n var title = props.title,\n children = props.children,\n className = props.className,\n rest = _objectWithoutPropertiesLoose(props, _excluded8);\n\n var _className = cx(\"chakra-menu__group__title\", className);\n\n var styles = useStyles();\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: ref,\n className: \"chakra-menu__group\",\n role: \"group\"\n }, title && /*#__PURE__*/React.createElement(chakra.p, _extends({\n className: _className\n }, rest, {\n __css: styles.groupTitle\n }), title), children);\n});\n\nif (__DEV__) {\n MenuGroup.displayName = \"MenuGroup\";\n}\n\nvar MenuCommand = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyles();\n return /*#__PURE__*/React.createElement(chakra.span, _extends({\n ref: ref\n }, props, {\n __css: styles.command,\n className: \"chakra-menu__command\"\n }));\n});\n\nif (__DEV__) {\n MenuCommand.displayName = \"MenuCommand\";\n}\n\nvar MenuIcon = function MenuIcon(props) {\n var className = props.className,\n children = props.children,\n rest = _objectWithoutPropertiesLoose(props, _excluded9);\n\n var child = React.Children.only(children);\n var clone = /*#__PURE__*/React.isValidElement(child) ? /*#__PURE__*/React.cloneElement(child, {\n focusable: \"false\",\n \"aria-hidden\": true,\n className: cx(\"chakra-menu__icon\", child.props.className)\n }) : null;\n\n var _className = cx(\"chakra-menu__icon-wrapper\", className);\n\n return /*#__PURE__*/React.createElement(chakra.span, _extends({\n className: _className\n }, rest, {\n __css: {\n flexShrink: 0\n }\n }), clone);\n};\n\nif (__DEV__) {\n MenuIcon.displayName = \"MenuIcon\";\n}\n\nvar MenuDivider = function MenuDivider(props) {\n var className = props.className,\n rest = _objectWithoutPropertiesLoose(props, _excluded10);\n\n var styles = useStyles();\n return /*#__PURE__*/React.createElement(chakra.hr, _extends({\n role: \"separator\",\n \"aria-orientation\": \"horizontal\",\n className: cx(\"chakra-menu__divider\", className)\n }, rest, {\n __css: styles.divider\n }));\n};\n\nif (__DEV__) {\n MenuDivider.displayName = \"MenuDivider\";\n}\n\nexport { Menu, MenuButton, MenuCommand, MenuDescendantsProvider, MenuDivider, MenuGroup, MenuIcon, MenuItem, MenuItemOption, MenuList, MenuOptionGroup, MenuProvider, useMenu, useMenuButton, useMenuContext, useMenuDescendant, useMenuDescendants, useMenuDescendantsContext, useMenuItem, useMenuList, useMenuOption, useMenuOptionGroup, useMenuPositioner, useMenuState };\n","import { useFormControlProps } from '@chakra-ui/form-control';\nimport { createStylesContext, forwardRef, useMultiStyleConfig, omitThemingProps, chakra } from '@chakra-ui/system';\nimport { getOwnerWindow, normalizeEventKey, isNull, focus, getOwnerDocument, callAllHandlers, ariaAttr, minSafeInteger, maxSafeInteger, cx, __DEV__ } from '@chakra-ui/utils';\nimport { mergeRefs, createContext } from '@chakra-ui/react-utils';\nimport * as React from 'react';\nimport { useState, useRef, useCallback } from 'react';\nimport { Icon } from '@chakra-ui/icon';\nimport { useCounter } from '@chakra-ui/counter';\nimport { useInterval, useUnmountEffect, useCallbackRef, useBoolean, useUpdateEffect, useSafeLayoutEffect, useEventListener } from '@chakra-ui/hooks';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar TriangleDownIcon = function TriangleDownIcon(props) {\n return /*#__PURE__*/React.createElement(Icon, _extends({\n viewBox: \"0 0 24 24\"\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z\"\n }));\n};\nvar TriangleUpIcon = function TriangleUpIcon(props) {\n return /*#__PURE__*/React.createElement(Icon, _extends({\n viewBox: \"0 0 24 24\"\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z\"\n }));\n};\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (it) return (it = it.call(o)).next.bind(it);\n\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction useAttributeObserver(ref, attributes, fn, enabled) {\n React.useEffect(function () {\n if (!ref.current || !enabled) return;\n var win = getOwnerWindow(ref.current);\n var attrs = Array.isArray(attributes) ? attributes : [attributes];\n var obs = new win.MutationObserver(function (changes) {\n for (var _iterator = _createForOfIteratorHelperLoose(changes), _step; !(_step = _iterator()).done;) {\n var change = _step.value;\n\n if (change.type === \"attributes\" && change.attributeName && attrs.includes(change.attributeName)) {\n fn(change);\n }\n }\n });\n obs.observe(ref.current, {\n attributes: true,\n attributeFilter: attrs\n });\n return function () {\n return obs.disconnect();\n };\n });\n}\n\n/**\n * When click and hold on a button - the speed of auto changing the value.\n */\n\nvar CONTINUOUS_CHANGE_INTERVAL = 50;\n/**\n * When click and hold on a button - the delay before auto changing the value.\n */\n\nvar CONTINUOUS_CHANGE_DELAY = 300;\n\n/**\n * React hook used in the number input to spin its\n * value on long press of the spin buttons\n *\n * @param increment the function to increment\n * @param decrement the function to decrement\n */\nfunction useSpinner(increment, decrement) {\n /**\n * To keep incrementing/decrementing on press, we call that `spinning`\n */\n var _useState = useState(false),\n isSpinning = _useState[0],\n setIsSpinning = _useState[1]; // This state keeps track of the action (\"increment\" or \"decrement\")\n\n\n var _useState2 = useState(null),\n action = _useState2[0],\n setAction = _useState2[1]; // To increment the value the first time you mousedown, we call that `runOnce`\n\n\n var _useState3 = useState(true),\n runOnce = _useState3[0],\n setRunOnce = _useState3[1]; // Store the timeout instance id in a ref, so we can clear the timeout later\n\n\n var timeoutRef = useRef(null); // Clears the timeout from memory\n\n var removeTimeout = function removeTimeout() {\n return clearTimeout(timeoutRef.current);\n };\n /**\n * useInterval hook provides a performant way to\n * update the state value at specific interval\n */\n\n\n useInterval(function () {\n if (action === \"increment\") {\n increment();\n }\n\n if (action === \"decrement\") {\n decrement();\n }\n }, isSpinning ? CONTINUOUS_CHANGE_INTERVAL : null); // Function to activate the spinning and increment the value\n\n var up = useCallback(function () {\n // increment the first time\n if (runOnce) {\n increment();\n } // after a delay, keep incrementing at interval (\"spinning up\")\n\n\n timeoutRef.current = setTimeout(function () {\n setRunOnce(false);\n setIsSpinning(true);\n setAction(\"increment\");\n }, CONTINUOUS_CHANGE_DELAY);\n }, [increment, runOnce]); // Function to activate the spinning and increment the value\n\n var down = useCallback(function () {\n // decrement the first time\n if (runOnce) {\n decrement();\n } // after a delay, keep decrementing at interval (\"spinning down\")\n\n\n timeoutRef.current = setTimeout(function () {\n setRunOnce(false);\n setIsSpinning(true);\n setAction(\"decrement\");\n }, CONTINUOUS_CHANGE_DELAY);\n }, [decrement, runOnce]); // Function to stop spinning (useful for mouseup, keyup handlers)\n\n var stop = useCallback(function () {\n setRunOnce(true);\n setIsSpinning(false);\n removeTimeout();\n }, []);\n /**\n * If the component unmounts while spinning,\n * let's clear the timeout as well\n */\n\n useUnmountEffect(removeTimeout);\n return {\n up: up,\n down: down,\n stop: stop,\n isSpinning: isSpinning\n };\n}\n\nvar _excluded$1 = [\"focusInputOnChange\", \"clampValueOnBlur\", \"keepWithinRange\", \"min\", \"max\", \"step\", \"isReadOnly\", \"isDisabled\", \"isRequired\", \"isInvalid\", \"pattern\", \"inputMode\", \"allowMouseWheel\", \"id\", \"onChange\", \"precision\", \"name\", \"aria-describedby\", \"aria-label\", \"aria-labelledby\", \"onFocus\", \"onBlur\", \"onInvalid\", \"getAriaValueText\", \"isValidCharacter\", \"format\", \"parse\"];\nvar FLOATING_POINT_REGEX = /^[Ee0-9+\\-.]$/;\n/**\n * Determine if a character is a DOM floating point character\n * @see https://www.w3.org/TR/2012/WD-html-markup-20120329/datatypes.html#common.data.float\n */\n\nfunction isFloatingPointNumericCharacter(character) {\n return FLOATING_POINT_REGEX.test(character);\n}\n\nfunction isValidNumericKeyboardEvent(event, isValid) {\n if (event.key == null) return true;\n var isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n var isSingleCharacterKey = event.key.length === 1;\n if (!isSingleCharacterKey || isModifierKey) return true;\n return isValid(event.key);\n}\n\n/**\n * React hook that implements the WAI-ARIA Spin Button widget\n * and used to create numeric input fields.\n *\n * It returns prop getters you can use to build your own\n * custom number inputs.\n *\n * @see WAI-ARIA https://www.w3.org/TR/wai-aria-practices-1.1/#spinbutton\n * @see Docs https://www.chakra-ui.com/useNumberInput\n * @see WHATWG https://html.spec.whatwg.org/multipage/input.html#number-state-(type=number)\n */\nfunction useNumberInput(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n _props$focusInputOnCh = _props.focusInputOnChange,\n focusInputOnChange = _props$focusInputOnCh === void 0 ? true : _props$focusInputOnCh,\n _props$clampValueOnBl = _props.clampValueOnBlur,\n clampValueOnBlur = _props$clampValueOnBl === void 0 ? true : _props$clampValueOnBl,\n _props$keepWithinRang = _props.keepWithinRange,\n keepWithinRange = _props$keepWithinRang === void 0 ? true : _props$keepWithinRang,\n _props$min = _props.min,\n min = _props$min === void 0 ? minSafeInteger : _props$min,\n _props$max = _props.max,\n max = _props$max === void 0 ? maxSafeInteger : _props$max,\n _props$step = _props.step,\n stepProp = _props$step === void 0 ? 1 : _props$step,\n isReadOnly = _props.isReadOnly,\n isDisabled = _props.isDisabled,\n isRequired = _props.isRequired,\n isInvalid = _props.isInvalid,\n _props$pattern = _props.pattern,\n pattern = _props$pattern === void 0 ? \"[0-9]*(.[0-9]+)?\" : _props$pattern,\n _props$inputMode = _props.inputMode,\n inputMode = _props$inputMode === void 0 ? \"decimal\" : _props$inputMode,\n allowMouseWheel = _props.allowMouseWheel,\n id = _props.id;\n _props.onChange;\n _props.precision;\n var name = _props.name,\n ariaDescBy = _props[\"aria-describedby\"],\n ariaLabel = _props[\"aria-label\"],\n ariaLabelledBy = _props[\"aria-labelledby\"],\n onFocusProp = _props.onFocus,\n onBlurProp = _props.onBlur,\n onInvalidProp = _props.onInvalid,\n getAriaValueTextProp = _props.getAriaValueText,\n isValidCharacterProp = _props.isValidCharacter,\n formatValue = _props.format,\n parseValue = _props.parse,\n htmlProps = _objectWithoutPropertiesLoose(_props, _excluded$1);\n\n var onFocus = useCallbackRef(onFocusProp);\n var onBlur = useCallbackRef(onBlurProp);\n var onInvalid = useCallbackRef(onInvalidProp);\n var isValidCharacter = useCallbackRef(isValidCharacterProp != null ? isValidCharacterProp : isFloatingPointNumericCharacter);\n var getAriaValueText = useCallbackRef(getAriaValueTextProp);\n /**\n * Leverage the `useCounter` hook since it provides\n * the functionality to `increment`, `decrement` and `update`\n * counter values\n */\n\n var counter = useCounter(props);\n var updateFn = counter.update,\n incrementFn = counter.increment,\n decrementFn = counter.decrement;\n /**\n * Keep track of the focused state of the input,\n * so user can this to change the styles of the\n * `spinners`, maybe :)\n */\n\n var _useBoolean = useBoolean(),\n isFocused = _useBoolean[0],\n setFocused = _useBoolean[1];\n\n var isInteractive = !(isReadOnly || isDisabled);\n var inputRef = React.useRef(null);\n var inputSelectionRef = React.useRef(null);\n var incrementButtonRef = React.useRef(null);\n var decrementButtonRef = React.useRef(null);\n var sanitize = React.useCallback(function (value) {\n return value.split(\"\").filter(isValidCharacter).join(\"\");\n }, [isValidCharacter]);\n var parse = React.useCallback(function (value) {\n var _parseValue;\n\n return (_parseValue = parseValue == null ? void 0 : parseValue(value)) != null ? _parseValue : value;\n }, [parseValue]);\n var format = React.useCallback(function (value) {\n var _formatValue;\n\n return ((_formatValue = formatValue == null ? void 0 : formatValue(value)) != null ? _formatValue : value).toString();\n }, [formatValue]);\n useUpdateEffect(function () {\n if (counter.valueAsNumber > max) {\n onInvalid == null ? void 0 : onInvalid(\"rangeOverflow\", format(counter.value), counter.valueAsNumber);\n } else if (counter.valueAsNumber < min) {\n onInvalid == null ? void 0 : onInvalid(\"rangeOverflow\", format(counter.value), counter.valueAsNumber);\n }\n }, [counter.valueAsNumber, counter.value, format, onInvalid]);\n /**\n * Sync state with uncontrolled form libraries like `react-hook-form`.\n */\n\n useSafeLayoutEffect(function () {\n if (!inputRef.current) return;\n var notInSync = inputRef.current.value != counter.value;\n\n if (notInSync) {\n var parsedInput = parse(inputRef.current.value);\n counter.setValue(sanitize(parsedInput));\n }\n }, [parse, sanitize]);\n var increment = React.useCallback(function (step) {\n if (step === void 0) {\n step = stepProp;\n }\n\n if (isInteractive) {\n incrementFn(step);\n }\n }, [incrementFn, isInteractive, stepProp]);\n var decrement = React.useCallback(function (step) {\n if (step === void 0) {\n step = stepProp;\n }\n\n if (isInteractive) {\n decrementFn(step);\n }\n }, [decrementFn, isInteractive, stepProp]);\n /**\n * Leverage the `useSpinner` hook to spin the input's value\n * when long press on the up and down buttons.\n *\n * This leverages `setInterval` internally\n */\n\n var spinner = useSpinner(increment, decrement);\n useAttributeObserver(incrementButtonRef, \"disabled\", spinner.stop, spinner.isSpinning);\n useAttributeObserver(decrementButtonRef, \"disabled\", spinner.stop, spinner.isSpinning);\n /**\n * The `onChange` handler filters out any character typed\n * that isn't floating point compatible.\n */\n\n var onChange = React.useCallback(function (event) {\n var evt = event.nativeEvent;\n if (evt.isComposing) return;\n var parsedInput = parse(event.currentTarget.value);\n updateFn(sanitize(parsedInput));\n inputSelectionRef.current = {\n start: event.currentTarget.selectionStart,\n end: event.currentTarget.selectionEnd\n };\n }, [updateFn, sanitize, parse]);\n\n var _onFocus = React.useCallback(function (event) {\n var _inputSelectionRef$cu, _event$currentTarget$, _inputSelectionRef$cu2;\n\n onFocus == null ? void 0 : onFocus(event);\n if (!inputSelectionRef.current) return;\n /**\n * restore selection if custom format string replacement moved it to the end\n */\n\n event.target.selectionStart = (_inputSelectionRef$cu = inputSelectionRef.current.start) != null ? _inputSelectionRef$cu : (_event$currentTarget$ = event.currentTarget.value) == null ? void 0 : _event$currentTarget$.length;\n event.currentTarget.selectionEnd = (_inputSelectionRef$cu2 = inputSelectionRef.current.end) != null ? _inputSelectionRef$cu2 : event.currentTarget.selectionStart;\n }, [onFocus]);\n\n var onKeyDown = React.useCallback(function (event) {\n if (event.nativeEvent.isComposing) return;\n\n if (!isValidNumericKeyboardEvent(event, isValidCharacter)) {\n event.preventDefault();\n }\n /**\n * Keyboard Accessibility\n *\n * We want to increase or decrease the input's value\n * based on if the user the arrow keys.\n *\n * @see https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard-interaction-17\n */\n\n\n var stepFactor = getStepFactor(event) * stepProp;\n var eventKey = normalizeEventKey(event);\n var keyMap = {\n ArrowUp: function ArrowUp() {\n return increment(stepFactor);\n },\n ArrowDown: function ArrowDown() {\n return decrement(stepFactor);\n },\n Home: function Home() {\n return updateFn(min);\n },\n End: function End() {\n return updateFn(max);\n }\n };\n var action = keyMap[eventKey];\n\n if (action) {\n event.preventDefault();\n action(event);\n }\n }, [isValidCharacter, stepProp, increment, decrement, updateFn, min, max]);\n\n var getStepFactor = function getStepFactor(event) {\n var ratio = 1;\n\n if (event.metaKey || event.ctrlKey) {\n ratio = 0.1;\n }\n\n if (event.shiftKey) {\n ratio = 10;\n }\n\n return ratio;\n };\n /**\n * If user would like to use a human-readable representation\n * of the value, rather than the value itself they can pass `getAriaValueText`\n *\n * @see https://www.w3.org/TR/wai-aria-practices-1.1/#wai-aria-roles-states-and-properties-18\n * @see https://www.w3.org/TR/wai-aria-1.1/#aria-valuetext\n */\n\n\n var ariaValueText = React.useMemo(function () {\n var text = getAriaValueText == null ? void 0 : getAriaValueText(counter.value);\n if (!isNull(text)) return text;\n var defaultText = counter.value.toString(); // empty string is an invalid ARIA attribute value\n\n return !defaultText ? undefined : defaultText;\n }, [counter.value, getAriaValueText]);\n /**\n * Function that clamps the input's value on blur\n */\n\n var validateAndClamp = React.useCallback(function () {\n var next = counter.value;\n if (next === \"\") return;\n\n if (counter.valueAsNumber < min) {\n next = min;\n }\n\n if (counter.valueAsNumber > max) {\n next = max;\n }\n /**\n * `counter.cast` does 2 things:\n *\n * - sanitize the value by using parseFloat and some Regex\n * - used to round value to computed precision or decimal points\n */\n\n\n counter.cast(next);\n }, [counter, max, min]);\n var onInputBlur = React.useCallback(function () {\n setFocused.off();\n\n if (clampValueOnBlur) {\n validateAndClamp();\n }\n }, [clampValueOnBlur, setFocused, validateAndClamp]);\n var focusInput = React.useCallback(function () {\n if (focusInputOnChange) {\n focus(inputRef.current, {\n nextTick: true\n });\n }\n }, [focusInputOnChange]);\n var spinUp = React.useCallback(function (event) {\n event.preventDefault();\n spinner.up();\n focusInput();\n }, [focusInput, spinner]);\n var spinDown = React.useCallback(function (event) {\n event.preventDefault();\n spinner.down();\n focusInput();\n }, [focusInput, spinner]);\n useEventListener(\"wheel\", function (event) {\n var doc = getOwnerDocument(inputRef.current);\n var isInputFocused = doc.activeElement === inputRef.current;\n if (!allowMouseWheel || !isInputFocused) return;\n event.preventDefault();\n var stepFactor = getStepFactor(event) * stepProp;\n var direction = Math.sign(event.deltaY);\n\n if (direction === -1) {\n increment(stepFactor);\n } else if (direction === 1) {\n decrement(stepFactor);\n }\n }, inputRef.current, {\n passive: false\n });\n var getIncrementButtonProps = React.useCallback(function (props, ref) {\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n var disabled = isDisabled || keepWithinRange && counter.isAtMax;\n return _extends({}, props, {\n ref: mergeRefs(ref, incrementButtonRef),\n role: \"button\",\n tabIndex: -1,\n onPointerDown: callAllHandlers(props.onPointerDown, function (event) {\n if (!disabled) spinUp(event);\n }),\n onPointerLeave: callAllHandlers(props.onPointerLeave, spinner.stop),\n onPointerUp: callAllHandlers(props.onPointerUp, spinner.stop),\n disabled: disabled,\n \"aria-disabled\": ariaAttr(disabled)\n });\n }, [counter.isAtMax, keepWithinRange, spinUp, spinner.stop, isDisabled]);\n var getDecrementButtonProps = React.useCallback(function (props, ref) {\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n var disabled = isDisabled || keepWithinRange && counter.isAtMin;\n return _extends({}, props, {\n ref: mergeRefs(ref, decrementButtonRef),\n role: \"button\",\n tabIndex: -1,\n onPointerDown: callAllHandlers(props.onPointerDown, function (event) {\n if (!disabled) spinDown(event);\n }),\n onPointerLeave: callAllHandlers(props.onPointerLeave, spinner.stop),\n onPointerUp: callAllHandlers(props.onPointerUp, spinner.stop),\n disabled: disabled,\n \"aria-disabled\": ariaAttr(disabled)\n });\n }, [counter.isAtMin, keepWithinRange, spinDown, spinner.stop, isDisabled]);\n var getInputProps = React.useCallback(function (props, ref) {\n var _props$readOnly, _props$readOnly2, _props$required, _props$required2;\n\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n return _extends({\n name: name,\n inputMode: inputMode,\n type: \"text\",\n pattern: pattern,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescBy,\n id: id,\n disabled: isDisabled\n }, props, {\n readOnly: (_props$readOnly = props.readOnly) != null ? _props$readOnly : isReadOnly,\n \"aria-readonly\": (_props$readOnly2 = props.readOnly) != null ? _props$readOnly2 : isReadOnly,\n \"aria-required\": (_props$required = props.required) != null ? _props$required : isRequired,\n required: (_props$required2 = props.required) != null ? _props$required2 : isRequired,\n ref: mergeRefs(inputRef, ref),\n value: format(counter.value),\n role: \"spinbutton\",\n \"aria-valuemin\": min,\n \"aria-valuemax\": max,\n \"aria-valuenow\": Number.isNaN(counter.valueAsNumber) ? undefined : counter.valueAsNumber,\n \"aria-invalid\": ariaAttr(isInvalid != null ? isInvalid : counter.isOutOfRange),\n \"aria-valuetext\": ariaValueText,\n autoComplete: \"off\",\n autoCorrect: \"off\",\n onChange: callAllHandlers(props.onChange, onChange),\n onKeyDown: callAllHandlers(props.onKeyDown, onKeyDown),\n onFocus: callAllHandlers(props.onFocus, _onFocus, setFocused.on),\n onBlur: callAllHandlers(props.onBlur, onBlur, onInputBlur)\n });\n }, [name, inputMode, pattern, ariaLabelledBy, ariaLabel, format, ariaDescBy, id, isDisabled, isRequired, isReadOnly, isInvalid, counter.value, counter.valueAsNumber, counter.isOutOfRange, min, max, ariaValueText, onChange, onKeyDown, _onFocus, setFocused.on, onBlur, onInputBlur]);\n return {\n value: format(counter.value),\n valueAsNumber: counter.valueAsNumber,\n isFocused: isFocused,\n isDisabled: isDisabled,\n isReadOnly: isReadOnly,\n getIncrementButtonProps: getIncrementButtonProps,\n getDecrementButtonProps: getDecrementButtonProps,\n getInputProps: getInputProps,\n htmlProps: htmlProps\n };\n}\n\nvar _excluded = [\"htmlProps\"];\n\nvar _createStylesContext = createStylesContext(\"NumberInput\"),\n StylesProvider = _createStylesContext[0],\n useStyles = _createStylesContext[1];\n\n/**\n * React context used to communicate between components\n */\nvar _createContext = createContext({\n name: \"NumberInputContext\",\n errorMessage: \"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />\"\n}),\n NumberInputProvider = _createContext[0],\n useNumberInputContext = _createContext[1];\n\n/**\n * NumberInput\n *\n * React component that provides context and logic to all\n * number input sub-components.\n *\n * It renders a `div` by default.\n *\n * @see Docs http://chakra-ui.com/numberinput\n */\nvar NumberInput = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useMultiStyleConfig(\"NumberInput\", props);\n var ownProps = omitThemingProps(props);\n var controlProps = useFormControlProps(ownProps);\n\n var _useNumberInput = useNumberInput(controlProps),\n htmlProps = _useNumberInput.htmlProps,\n context = _objectWithoutPropertiesLoose(_useNumberInput, _excluded);\n\n var ctx = React.useMemo(function () {\n return context;\n }, [context]);\n return /*#__PURE__*/React.createElement(NumberInputProvider, {\n value: ctx\n }, /*#__PURE__*/React.createElement(StylesProvider, {\n value: styles\n }, /*#__PURE__*/React.createElement(chakra.div, _extends({}, htmlProps, {\n ref: ref,\n className: cx(\"chakra-numberinput\", props.className),\n __css: _extends({\n position: \"relative\",\n zIndex: 0\n }, styles.root)\n }))));\n});\n\nif (__DEV__) {\n NumberInput.displayName = \"NumberInput\";\n}\n\n/**\n * NumberInputStepper\n *\n * React component used to group the increment and decrement\n * button spinners.\n *\n * It renders a `div` by default.\n *\n * @see Docs http://chakra-ui.com/components/number-input\n */\nvar NumberInputStepper = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyles();\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n \"aria-hidden\": true,\n ref: ref\n }, props, {\n __css: _extends({\n display: \"flex\",\n flexDirection: \"column\",\n position: \"absolute\",\n top: \"0\",\n insetEnd: \"0px\",\n margin: \"1px\",\n height: \"calc(100% - 2px)\",\n zIndex: 1\n }, styles.stepperGroup)\n }));\n});\n\nif (__DEV__) {\n NumberInputStepper.displayName = \"NumberInputStepper\";\n}\n\n/**\n * NumberInputField\n *\n * React component that represents the actual `input` field\n * where users can type to edit numeric values.\n *\n * It renders an `input` by default and ensures only numeric\n * values can be typed.\n *\n * @see Docs http://chakra-ui.com/numberinput\n */\nvar NumberInputField = /*#__PURE__*/forwardRef(function (props, ref) {\n var _useNumberInputContex = useNumberInputContext(),\n getInputProps = _useNumberInputContex.getInputProps;\n\n var input = getInputProps(props, ref);\n var styles = useStyles();\n return /*#__PURE__*/React.createElement(chakra.input, _extends({}, input, {\n className: cx(\"chakra-numberinput__field\", props.className),\n __css: _extends({\n width: \"100%\"\n }, styles.field)\n }));\n});\n\nif (__DEV__) {\n NumberInputField.displayName = \"NumberInputField\";\n}\n\nvar StyledStepper = chakra(\"div\", {\n baseStyle: {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n flex: 1,\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n userSelect: \"none\",\n cursor: \"pointer\",\n lineHeight: \"normal\"\n }\n});\n\n/**\n * NumberDecrementStepper\n *\n * React component used to decrement the number input's value\n *\n * It renders a `div` with `role=button` by default\n */\nvar NumberDecrementStepper = /*#__PURE__*/forwardRef(function (props, ref) {\n var _props$children;\n\n var styles = useStyles();\n\n var _useNumberInputContex2 = useNumberInputContext(),\n getDecrementButtonProps = _useNumberInputContex2.getDecrementButtonProps;\n\n var decrement = getDecrementButtonProps(props, ref);\n return /*#__PURE__*/React.createElement(StyledStepper, _extends({}, decrement, {\n __css: styles.stepper\n }), (_props$children = props.children) != null ? _props$children : /*#__PURE__*/React.createElement(TriangleDownIcon, null));\n});\n\nif (__DEV__) {\n NumberDecrementStepper.displayName = \"NumberDecrementStepper\";\n}\n\n/**\n * NumberIncrementStepper\n *\n * React component used to increment the number input's value\n *\n * It renders a `div` with `role=button` by default\n */\nvar NumberIncrementStepper = /*#__PURE__*/forwardRef(function (props, ref) {\n var _props$children2;\n\n var _useNumberInputContex3 = useNumberInputContext(),\n getIncrementButtonProps = _useNumberInputContex3.getIncrementButtonProps;\n\n var increment = getIncrementButtonProps(props, ref);\n var styles = useStyles();\n return /*#__PURE__*/React.createElement(StyledStepper, _extends({}, increment, {\n __css: styles.stepper\n }), (_props$children2 = props.children) != null ? _props$children2 : /*#__PURE__*/React.createElement(TriangleUpIcon, null));\n});\n\nif (__DEV__) {\n NumberIncrementStepper.displayName = \"NumberIncrementStepper\";\n}\n\nexport { NumberDecrementStepper, NumberIncrementStepper, NumberInput, NumberInputField, NumberInputStepper, StyledStepper, useNumberInput };\n","import { useStyleConfig, omitThemingProps, forwardRef, chakra } from '@chakra-ui/system';\nimport { focus, ariaAttr, callAllHandlers, __DEV__, cx } from '@chakra-ui/utils';\nimport { createContext, mergeRefs, getValidChildren } from '@chakra-ui/react-utils';\nimport * as React from 'react';\nimport { createDescendantContext } from '@chakra-ui/descendant';\nimport { useId, useControllableState } from '@chakra-ui/hooks';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded$1 = [\"index\"];\n/* -------------------------------------------------------------------------------------------------\n * Create context to track descendants and their indices\n * -----------------------------------------------------------------------------------------------*/\n\nvar _createDescendantCont = createDescendantContext(),\n PinInputDescendantsProvider = _createDescendantCont[0],\n usePinInputDescendantsContext = _createDescendantCont[1],\n usePinInputDescendants = _createDescendantCont[2],\n usePinInputDescendant = _createDescendantCont[3];\n\nvar _createContext = createContext({\n name: \"PinInputContext\",\n errorMessage: \"usePinInputContext: `context` is undefined. Seems you forgot to all pin input fields within `<PinInput />`\"\n}),\n PinInputProvider = _createContext[0],\n usePinInputContext = _createContext[1];\n\nvar toArray = function toArray(value) {\n return value == null ? void 0 : value.split(\"\");\n};\n\nfunction validate(value, type) {\n var NUMERIC_REGEX = /^[0-9]+$/;\n var ALPHA_NUMERIC_REGEX = /^[a-zA-Z0-9]+$/i;\n var regex = type === \"alphanumeric\" ? ALPHA_NUMERIC_REGEX : NUMERIC_REGEX;\n return regex.test(value);\n}\n/* -------------------------------------------------------------------------------------------------\n * usePinInput - handles the general pin input logic\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @internal\n */\n\n\nfunction usePinInput(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n autoFocus = _props.autoFocus,\n value = _props.value,\n defaultValue = _props.defaultValue,\n _onChange = _props.onChange,\n onComplete = _props.onComplete,\n _props$placeholder = _props.placeholder,\n placeholder = _props$placeholder === void 0 ? \"○\" : _props$placeholder,\n _props$manageFocus = _props.manageFocus,\n manageFocus = _props$manageFocus === void 0 ? true : _props$manageFocus,\n _props$otp = _props.otp,\n otp = _props$otp === void 0 ? false : _props$otp,\n idProp = _props.id,\n isDisabled = _props.isDisabled,\n isInvalid = _props.isInvalid,\n _props$type = _props.type,\n type = _props$type === void 0 ? \"number\" : _props$type,\n mask = _props.mask;\n var uuid = useId();\n var id = idProp != null ? idProp : \"pin-input-\" + uuid;\n var descendants = usePinInputDescendants();\n\n var _React$useState = React.useState(true),\n moveFocus = _React$useState[0],\n setMoveFocus = _React$useState[1];\n\n var _React$useState2 = React.useState(-1),\n focusedIndex = _React$useState2[0],\n setFocusedIndex = _React$useState2[1];\n\n var _useControllableState = useControllableState({\n defaultValue: toArray(defaultValue) || [],\n value: toArray(value),\n onChange: function onChange(values) {\n return _onChange == null ? void 0 : _onChange(values.join(\"\"));\n }\n }),\n values = _useControllableState[0],\n setValues = _useControllableState[1];\n\n React.useEffect(function () {\n if (autoFocus) {\n var first = descendants.first();\n if (first) focus(first.node, {\n nextTick: true\n });\n } // We don't want to listen for updates to `autoFocus` since it only runs initially\n // eslint-disable-next-line\n\n }, [descendants]);\n var focusNext = React.useCallback(function (index) {\n if (!moveFocus || !manageFocus) return;\n var next = descendants.next(index, false);\n if (next) focus(next.node, {\n nextTick: true\n });\n }, [descendants, moveFocus, manageFocus]);\n var setValue = React.useCallback(function (value, index) {\n var nextValues = [].concat(values);\n nextValues[index] = value;\n setValues(nextValues);\n var isComplete = value !== \"\" && nextValues.length === descendants.count() && nextValues.every(function (inputValue) {\n return inputValue != null && inputValue !== \"\";\n });\n\n if (isComplete) {\n onComplete == null ? void 0 : onComplete(nextValues.join(\"\"));\n } else {\n focusNext(index);\n }\n }, [values, setValues, focusNext, onComplete, descendants]);\n var clear = React.useCallback(function () {\n var values = Array(descendants.count()).fill(\"\");\n setValues(values);\n var first = descendants.first();\n if (first) focus(first.node);\n }, [descendants, setValues]);\n var getNextValue = React.useCallback(function (value, eventValue) {\n var nextValue = eventValue;\n\n if ((value == null ? void 0 : value.length) > 0) {\n if (value[0] === eventValue.charAt(0)) {\n nextValue = eventValue.charAt(1);\n } else if (value[0] === eventValue.charAt(1)) {\n nextValue = eventValue.charAt(0);\n }\n }\n\n return nextValue;\n }, []);\n var getInputProps = React.useCallback(function (props) {\n var index = props.index,\n rest = _objectWithoutPropertiesLoose(props, _excluded$1);\n /**\n * Improved from: https://github.com/uber/baseweb/blob/master/src/pin-code/pin-code.js\n */\n\n\n var onChange = function onChange(event) {\n var eventValue = event.target.value;\n var currentValue = values[index];\n var nextValue = getNextValue(currentValue, eventValue); // if the value was removed using backspace\n\n if (nextValue === \"\") {\n setValue(\"\", index);\n return;\n } // in the case of an autocomplete or copy and paste\n\n\n if (eventValue.length > 2) {\n // see if we can use the string to fill out our values\n if (validate(eventValue, type)) {\n // Ensure the value matches the number of inputs\n var _nextValue = eventValue.split(\"\").filter(function (_, index) {\n return index < descendants.count();\n });\n\n setValues(_nextValue); // if pasting fills the entire input fields, trigger `onComplete`\n\n if (_nextValue.length === descendants.count()) {\n onComplete == null ? void 0 : onComplete(_nextValue.join(\"\"));\n }\n }\n } else {\n // only set if the new value is a number\n if (validate(nextValue, type)) {\n setValue(nextValue, index);\n }\n\n setMoveFocus(true);\n }\n };\n\n var onKeyDown = function onKeyDown(event) {\n if (event.key === \"Backspace\" && manageFocus) {\n if (event.target.value === \"\") {\n var prevInput = descendants.prev(index, false);\n\n if (prevInput) {\n setValue(\"\", index - 1);\n focus(prevInput.node);\n setMoveFocus(true);\n }\n } else {\n setMoveFocus(false);\n }\n }\n };\n\n var onFocus = function onFocus() {\n setFocusedIndex(index);\n };\n\n var onBlur = function onBlur() {\n setFocusedIndex(-1);\n };\n\n var hasFocus = focusedIndex === index;\n var inputType = type === \"number\" ? \"tel\" : \"text\";\n return _extends({\n \"aria-label\": \"Please enter your pin code\",\n inputMode: type === \"number\" ? \"numeric\" : \"text\",\n type: mask ? \"password\" : inputType\n }, rest, {\n id: id + \"-\" + index,\n disabled: isDisabled,\n \"aria-invalid\": ariaAttr(isInvalid),\n onChange: callAllHandlers(rest.onChange, onChange),\n onKeyDown: callAllHandlers(rest.onKeyDown, onKeyDown),\n onFocus: callAllHandlers(rest.onFocus, onFocus),\n onBlur: callAllHandlers(rest.onBlur, onBlur),\n value: values[index] || \"\",\n autoComplete: otp ? \"one-time-code\" : \"off\",\n placeholder: hasFocus ? \"\" : placeholder\n });\n }, [descendants, focusedIndex, getNextValue, id, isDisabled, mask, isInvalid, manageFocus, onComplete, otp, placeholder, setValue, setValues, type, values]);\n return {\n // prop getter\n getInputProps: getInputProps,\n // state\n id: id,\n descendants: descendants,\n values: values,\n // actions\n setValue: setValue,\n setValues: setValues,\n clear: clear\n };\n}\n\n/**\n * @internal\n */\nfunction usePinInputField(props, ref) {\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n var _usePinInputContext = usePinInputContext(),\n getInputProps = _usePinInputContext.getInputProps;\n\n var _usePinInputDescendan = usePinInputDescendant(),\n index = _usePinInputDescendan.index,\n register = _usePinInputDescendan.register;\n\n return getInputProps(_extends({}, props, {\n ref: mergeRefs(register, ref),\n index: index\n }));\n}\n\nvar _excluded = [\"children\"],\n _excluded2 = [\"descendants\"];\nvar PinInput = function PinInput(props) {\n var styles = useStyleConfig(\"PinInput\", props);\n\n var _omitThemingProps = omitThemingProps(props),\n children = _omitThemingProps.children,\n rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded);\n\n var _usePinInput = usePinInput(rest),\n descendants = _usePinInput.descendants,\n context = _objectWithoutPropertiesLoose(_usePinInput, _excluded2);\n\n var clones = getValidChildren(children).map(function (child) {\n return /*#__PURE__*/React.cloneElement(child, {\n __css: styles\n });\n });\n return /*#__PURE__*/React.createElement(PinInputDescendantsProvider, {\n value: descendants\n }, /*#__PURE__*/React.createElement(PinInputProvider, {\n value: context\n }, clones));\n};\n\nif (__DEV__) {\n PinInput.displayName = \"PinInput\";\n}\n\nvar PinInputField = /*#__PURE__*/forwardRef(function (props, ref) {\n var inputProps = usePinInputField(props, ref);\n return /*#__PURE__*/React.createElement(chakra.input, _extends({}, inputProps, {\n className: cx(\"chakra-pin-input\", props.className)\n }));\n});\n\nif (__DEV__) {\n PinInputField.displayName = \"PinInputField\";\n}\n\nexport { PinInput, PinInputDescendantsProvider, PinInputField, PinInputProvider, usePinInput, usePinInputContext, usePinInputDescendant, usePinInputDescendants, usePinInputDescendantsContext, usePinInputField };\n","import { forwardRef, chakra, useMultiStyleConfig, omitThemingProps, layoutPropNames } from '@chakra-ui/system';\nimport { isInputEvent, cx, __DEV__, dataAttr, callAllHandlers, ariaAttr, callAll, split } from '@chakra-ui/utils';\nimport * as React from 'react';\nimport { useState, useCallback } from 'react';\nimport { mergeRefs, createContext } from '@chakra-ui/react-utils';\nimport { useControllableProp, useId, useBoolean } from '@chakra-ui/hooks';\nimport { useFormControlContext } from '@chakra-ui/form-control';\nimport { visuallyHiddenStyle } from '@chakra-ui/visually-hidden';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar _excluded$3 = [\"onChange\", \"value\", \"defaultValue\", \"name\", \"isDisabled\", \"isFocusable\", \"isNative\"];\n\n/**\n * React hook to manage a group of radio inputs\n */\nfunction useRadioGroup(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n onChangeProp = _props.onChange,\n valueProp = _props.value,\n defaultValue = _props.defaultValue,\n nameProp = _props.name,\n isDisabled = _props.isDisabled,\n isFocusable = _props.isFocusable,\n isNative = _props.isNative,\n htmlProps = _objectWithoutPropertiesLoose(_props, _excluded$3);\n\n var _React$useState = React.useState(defaultValue || \"\"),\n valueState = _React$useState[0],\n setValue = _React$useState[1];\n\n var _useControllableProp = useControllableProp(valueProp, valueState),\n isControlled = _useControllableProp[0],\n value = _useControllableProp[1];\n\n var ref = React.useRef(null);\n var focus = React.useCallback(function () {\n var rootNode = ref.current;\n if (!rootNode) return;\n var query = \"input:not(:disabled):checked\";\n var firstEnabledAndCheckedInput = rootNode.querySelector(query);\n\n if (firstEnabledAndCheckedInput) {\n firstEnabledAndCheckedInput.focus();\n return;\n }\n\n query = \"input:not(:disabled)\";\n var firstEnabledInput = rootNode.querySelector(query);\n firstEnabledInput == null ? void 0 : firstEnabledInput.focus();\n }, []);\n /**\n * All radio options must use the same name\n */\n\n var fallbackName = useId(undefined, \"radio\");\n var name = nameProp || fallbackName;\n var onChange = React.useCallback(function (eventOrValue) {\n var nextValue = isInputEvent(eventOrValue) ? eventOrValue.target.value : eventOrValue;\n\n if (!isControlled) {\n setValue(nextValue);\n }\n\n onChangeProp == null ? void 0 : onChangeProp(String(nextValue));\n }, [onChangeProp, isControlled]);\n var getRootProps = React.useCallback(function (props, forwardedRef) {\n if (props === void 0) {\n props = {};\n }\n\n if (forwardedRef === void 0) {\n forwardedRef = null;\n }\n\n return _extends({}, props, {\n ref: mergeRefs(forwardedRef, ref),\n role: \"radiogroup\"\n });\n }, []);\n var getRadioProps = React.useCallback(function (props, ref) {\n var _extends2;\n\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n var checkedKey = isNative ? \"checked\" : \"isChecked\";\n return _extends({}, props, (_extends2 = {\n ref: ref,\n name: name\n }, _extends2[checkedKey] = value != null ? props.value === value : undefined, _extends2.onChange = onChange, _extends2[\"data-radiogroup\"] = true, _extends2));\n }, [isNative, name, onChange, value]);\n return {\n getRootProps: getRootProps,\n getRadioProps: getRadioProps,\n name: name,\n ref: ref,\n focus: focus,\n setValue: setValue,\n value: value,\n onChange: onChange,\n isDisabled: isDisabled,\n isFocusable: isFocusable,\n htmlProps: htmlProps\n };\n}\n\nvar _excluded$2 = [\"colorScheme\", \"size\", \"variant\", \"children\", \"className\", \"isDisabled\", \"isFocusable\"];\n\nvar _createContext = createContext({\n name: \"RadioGroupContext\",\n strict: false\n}),\n RadioGroupProvider = _createContext[0],\n useRadioGroupContext = _createContext[1];\n\n/**\n * Used for multiple radios which are bound in one group,\n * and it indicates which option is selected.\n *\n * @see Docs https://chakra-ui.com/radio\n */\nvar RadioGroup = /*#__PURE__*/forwardRef(function (props, ref) {\n var colorScheme = props.colorScheme,\n size = props.size,\n variant = props.variant,\n children = props.children,\n className = props.className,\n isDisabled = props.isDisabled,\n isFocusable = props.isFocusable,\n rest = _objectWithoutPropertiesLoose(props, _excluded$2);\n\n var _useRadioGroup = useRadioGroup(rest),\n value = _useRadioGroup.value,\n onChange = _useRadioGroup.onChange,\n getRootProps = _useRadioGroup.getRootProps,\n name = _useRadioGroup.name,\n htmlProps = _useRadioGroup.htmlProps;\n\n var group = React.useMemo(function () {\n return {\n name: name,\n size: size,\n onChange: onChange,\n colorScheme: colorScheme,\n value: value,\n variant: variant,\n isDisabled: isDisabled,\n isFocusable: isFocusable\n };\n }, [name, size, onChange, colorScheme, value, variant, isDisabled, isFocusable]);\n var groupProps = getRootProps(htmlProps, ref);\n\n var _className = cx(\"chakra-radio-group\", className);\n\n return /*#__PURE__*/React.createElement(RadioGroupProvider, {\n value: group\n }, /*#__PURE__*/React.createElement(chakra.div, _extends({}, groupProps, {\n className: _className\n }), children));\n});\n\nif (__DEV__) {\n RadioGroup.displayName = \"RadioGroup\";\n}\n\nvar _excluded$1 = [\"defaultChecked\", \"isChecked\", \"isFocusable\", \"isDisabled\", \"isReadOnly\", \"isRequired\", \"onChange\", \"isInvalid\", \"name\", \"value\", \"id\", \"data-radiogroup\", \"aria-describedby\"];\n/**\n * @todo use the `useClickable` hook here\n * to manage the isFocusable & isDisabled props\n */\n\nfunction useRadio(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n defaultChecked = _props.defaultChecked,\n isCheckedProp = _props.isChecked,\n isFocusable = _props.isFocusable,\n isDisabledProp = _props.isDisabled,\n isReadOnlyProp = _props.isReadOnly,\n isRequiredProp = _props.isRequired,\n onChange = _props.onChange,\n isInvalidProp = _props.isInvalid,\n name = _props.name,\n value = _props.value,\n idProp = _props.id,\n dataRadioGroup = _props[\"data-radiogroup\"],\n ariaDescribedBy = _props[\"aria-describedby\"],\n htmlProps = _objectWithoutPropertiesLoose(_props, _excluded$1);\n\n var uuid = useId(undefined, \"radio\");\n var formControl = useFormControlContext();\n var group = useRadioGroupContext();\n var isWithinRadioGroup = !!group || !!dataRadioGroup;\n var isWithinFormControl = !!formControl;\n var id = isWithinFormControl && !isWithinRadioGroup ? formControl.id : uuid;\n id = idProp != null ? idProp : id;\n var isDisabled = isDisabledProp != null ? isDisabledProp : formControl == null ? void 0 : formControl.isDisabled;\n var isReadOnly = isReadOnlyProp != null ? isReadOnlyProp : formControl == null ? void 0 : formControl.isReadOnly;\n var isRequired = isRequiredProp != null ? isRequiredProp : formControl == null ? void 0 : formControl.isRequired;\n var isInvalid = isInvalidProp != null ? isInvalidProp : formControl == null ? void 0 : formControl.isInvalid;\n\n var _useBoolean = useBoolean(),\n isFocused = _useBoolean[0],\n setFocused = _useBoolean[1];\n\n var _useBoolean2 = useBoolean(),\n isHovered = _useBoolean2[0],\n setHovering = _useBoolean2[1];\n\n var _useBoolean3 = useBoolean(),\n isActive = _useBoolean3[0],\n setActive = _useBoolean3[1];\n\n var _useState = useState(Boolean(defaultChecked)),\n isCheckedState = _useState[0],\n setChecked = _useState[1];\n\n var _useControllableProp = useControllableProp(isCheckedProp, isCheckedState),\n isControlled = _useControllableProp[0],\n isChecked = _useControllableProp[1];\n\n var handleChange = useCallback(function (event) {\n if (isReadOnly || isDisabled) {\n event.preventDefault();\n return;\n }\n\n if (!isControlled) {\n setChecked(event.target.checked);\n }\n\n onChange == null ? void 0 : onChange(event);\n }, [isControlled, isDisabled, isReadOnly, onChange]);\n var onKeyDown = useCallback(function (event) {\n if (event.key === \" \") {\n setActive.on();\n }\n }, [setActive]);\n var onKeyUp = useCallback(function (event) {\n if (event.key === \" \") {\n setActive.off();\n }\n }, [setActive]);\n var getRadioProps = useCallback(function (props, ref) {\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n return _extends({}, props, {\n ref: ref,\n \"data-active\": dataAttr(isActive),\n \"data-hover\": dataAttr(isHovered),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-invalid\": dataAttr(isInvalid),\n \"data-checked\": dataAttr(isChecked),\n \"data-focus\": dataAttr(isFocused),\n \"data-readonly\": dataAttr(isReadOnly),\n \"aria-hidden\": true,\n onMouseDown: callAllHandlers(props.onMouseDown, setActive.on),\n onMouseUp: callAllHandlers(props.onMouseUp, setActive.off),\n onMouseEnter: callAllHandlers(props.onMouseEnter, setHovering.on),\n onMouseLeave: callAllHandlers(props.onMouseLeave, setHovering.off)\n });\n }, [isActive, isHovered, isDisabled, isInvalid, isChecked, isFocused, isReadOnly, setActive.on, setActive.off, setHovering.on, setHovering.off]);\n\n var _ref = formControl != null ? formControl : {},\n onFocus = _ref.onFocus,\n onBlur = _ref.onBlur;\n\n var getInputProps = useCallback(function (props, ref) {\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n var trulyDisabled = isDisabled && !isFocusable;\n return _extends({}, props, {\n id: id,\n ref: ref,\n type: \"radio\",\n name: name,\n value: value,\n onChange: callAllHandlers(props.onChange, handleChange),\n onBlur: callAllHandlers(onBlur, props.onBlur, setFocused.off),\n onFocus: callAllHandlers(onFocus, props.onFocus, setFocused.on),\n onKeyDown: callAllHandlers(props.onKeyDown, onKeyDown),\n onKeyUp: callAllHandlers(props.onKeyUp, onKeyUp),\n checked: isChecked,\n disabled: trulyDisabled,\n readOnly: isReadOnly,\n required: isRequired,\n \"aria-invalid\": ariaAttr(isInvalid),\n \"aria-disabled\": ariaAttr(trulyDisabled),\n \"aria-required\": ariaAttr(isRequired),\n \"data-readonly\": dataAttr(isReadOnly),\n \"aria-describedby\": ariaDescribedBy,\n style: visuallyHiddenStyle\n });\n }, [isDisabled, isFocusable, id, name, value, handleChange, onBlur, setFocused, onFocus, onKeyDown, onKeyUp, isChecked, isReadOnly, isRequired, isInvalid, ariaDescribedBy]);\n\n var getLabelProps = function getLabelProps(props, ref) {\n if (props === void 0) {\n props = {};\n }\n\n if (ref === void 0) {\n ref = null;\n }\n\n return _extends({}, props, {\n ref: ref,\n onMouseDown: callAllHandlers(props.onMouseDown, stop),\n onTouchStart: callAllHandlers(props.onTouchStart, stop),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-checked\": dataAttr(isChecked),\n \"data-invalid\": dataAttr(isInvalid)\n });\n };\n\n var getRootProps = function getRootProps(props, ref) {\n if (ref === void 0) {\n ref = null;\n }\n\n return _extends({}, props, {\n ref: ref,\n \"data-disabled\": dataAttr(isDisabled),\n \"data-checked\": dataAttr(isChecked),\n \"data-invalid\": dataAttr(isInvalid)\n });\n };\n\n var state = {\n isInvalid: isInvalid,\n isFocused: isFocused,\n isChecked: isChecked,\n isActive: isActive,\n isHovered: isHovered,\n isDisabled: isDisabled,\n isReadOnly: isReadOnly,\n isRequired: isRequired\n };\n return {\n state: state,\n // the function is renamed to getRadioProps to make the code more consistent. It is renamed towards outside because otherwise this would produce a breaking change\n getCheckboxProps: getRadioProps,\n getInputProps: getInputProps,\n getLabelProps: getLabelProps,\n getRootProps: getRootProps,\n htmlProps: htmlProps\n };\n}\n/**\n * Prevent `onBlur` being fired when the radio label is touched\n */\n\nfunction stop(event) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nvar _excluded = [\"spacing\", \"children\", \"isDisabled\", \"isFocusable\", \"inputProps\"];\n\n/**\n * Radio component is used in forms when a user needs to select a single value from\n * several options.\n *\n * @see Docs https://chakra-ui.com/radio\n */\nvar Radio = /*#__PURE__*/forwardRef(function (props, ref) {\n var _props$name;\n\n var group = useRadioGroupContext();\n var onChangeProp = props.onChange,\n valueProp = props.value;\n var styles = useMultiStyleConfig(\"Radio\", _extends({}, group, props));\n var ownProps = omitThemingProps(props);\n\n var _ownProps$spacing = ownProps.spacing,\n spacing = _ownProps$spacing === void 0 ? \"0.5rem\" : _ownProps$spacing,\n children = ownProps.children,\n _ownProps$isDisabled = ownProps.isDisabled,\n isDisabled = _ownProps$isDisabled === void 0 ? group == null ? void 0 : group.isDisabled : _ownProps$isDisabled,\n _ownProps$isFocusable = ownProps.isFocusable,\n isFocusable = _ownProps$isFocusable === void 0 ? group == null ? void 0 : group.isFocusable : _ownProps$isFocusable,\n htmlInputProps = ownProps.inputProps,\n rest = _objectWithoutPropertiesLoose(ownProps, _excluded);\n\n var isChecked = props.isChecked;\n\n if ((group == null ? void 0 : group.value) != null && valueProp != null) {\n isChecked = group.value === valueProp;\n }\n\n var onChange = onChangeProp;\n\n if (group != null && group.onChange && valueProp != null) {\n onChange = callAll(group.onChange, onChangeProp);\n }\n\n var name = (_props$name = props == null ? void 0 : props.name) != null ? _props$name : group == null ? void 0 : group.name;\n\n var _useRadio = useRadio(_extends({}, rest, {\n isChecked: isChecked,\n isFocusable: isFocusable,\n isDisabled: isDisabled,\n onChange: onChange,\n name: name\n })),\n getInputProps = _useRadio.getInputProps,\n getCheckboxProps = _useRadio.getCheckboxProps,\n getLabelProps = _useRadio.getLabelProps,\n getRootProps = _useRadio.getRootProps,\n htmlProps = _useRadio.htmlProps;\n\n var _split = split(htmlProps, layoutPropNames),\n layoutProps = _split[0],\n otherProps = _split[1];\n\n var checkboxProps = getCheckboxProps(otherProps);\n var inputProps = getInputProps(htmlInputProps, ref);\n var labelProps = getLabelProps();\n var rootProps = Object.assign({}, layoutProps, getRootProps());\n\n var rootStyles = _extends({\n display: \"inline-flex\",\n alignItems: \"center\",\n verticalAlign: \"top\",\n cursor: \"pointer\",\n position: \"relative\"\n }, styles.container);\n\n var checkboxStyles = _extends({\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: 0\n }, styles.control);\n\n var labelStyles = _extends({\n userSelect: \"none\",\n marginStart: spacing\n }, styles.label);\n\n return /*#__PURE__*/React.createElement(chakra.label, _extends({\n className: \"chakra-radio\"\n }, rootProps, {\n __css: rootStyles\n }), /*#__PURE__*/React.createElement(\"input\", _extends({\n className: \"chakra-radio__input\"\n }, inputProps)), /*#__PURE__*/React.createElement(chakra.span, _extends({\n className: \"chakra-radio__control\"\n }, checkboxProps, {\n __css: checkboxStyles\n })), children && /*#__PURE__*/React.createElement(chakra.span, _extends({\n className: \"chakra-radio__label\"\n }, labelProps, {\n __css: labelStyles\n }), children));\n});\n\nif (__DEV__) {\n Radio.displayName = \"Radio\";\n}\n\nexport { Radio, RadioGroup, useRadio, useRadioGroup, useRadioGroupContext };\n","import { useFormControl } from '@chakra-ui/form-control';\nimport { forwardRef, chakra, useMultiStyleConfig, omitThemingProps, layoutPropNames } from '@chakra-ui/system';\nimport { cx, __DEV__, split, mergeWith, dataAttr } from '@chakra-ui/utils';\nimport * as React from 'react';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded = [\"children\", \"placeholder\", \"className\"],\n _excluded2 = [\"rootProps\", \"placeholder\", \"icon\", \"color\", \"height\", \"h\", \"minH\", \"minHeight\", \"iconColor\", \"iconSize\"],\n _excluded3 = [\"children\"];\nvar SelectField = /*#__PURE__*/forwardRef(function (props, ref) {\n var children = props.children,\n placeholder = props.placeholder,\n className = props.className,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n\n return /*#__PURE__*/React.createElement(chakra.select, _extends({}, rest, {\n ref: ref,\n className: cx(\"chakra-select\", className)\n }), placeholder && /*#__PURE__*/React.createElement(\"option\", {\n value: \"\"\n }, placeholder), children);\n});\n\nif (__DEV__) {\n SelectField.displayName = \"SelectField\";\n}\n\n/**\n * React component used to select one item from a list of options.\n */\nvar Select = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useMultiStyleConfig(\"Select\", props);\n\n var _omitThemingProps = omitThemingProps(props),\n rootProps = _omitThemingProps.rootProps,\n placeholder = _omitThemingProps.placeholder,\n icon = _omitThemingProps.icon,\n color = _omitThemingProps.color,\n height = _omitThemingProps.height,\n h = _omitThemingProps.h,\n minH = _omitThemingProps.minH,\n minHeight = _omitThemingProps.minHeight,\n iconColor = _omitThemingProps.iconColor,\n iconSize = _omitThemingProps.iconSize,\n rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded2);\n\n var _split = split(rest, layoutPropNames),\n layoutProps = _split[0],\n otherProps = _split[1];\n\n var ownProps = useFormControl(otherProps);\n var rootStyles = {\n width: \"100%\",\n height: \"fit-content\",\n position: \"relative\",\n color: color\n };\n var fieldStyles = mergeWith({\n paddingEnd: \"2rem\"\n }, styles.field, {\n _focus: {\n zIndex: \"unset\"\n }\n });\n return /*#__PURE__*/React.createElement(chakra.div, _extends({\n className: \"chakra-select__wrapper\",\n __css: rootStyles\n }, layoutProps, rootProps), /*#__PURE__*/React.createElement(SelectField, _extends({\n ref: ref,\n height: h != null ? h : height,\n minH: minH != null ? minH : minHeight,\n placeholder: placeholder\n }, ownProps, {\n __css: fieldStyles\n }), props.children), /*#__PURE__*/React.createElement(SelectIcon, _extends({\n \"data-disabled\": dataAttr(ownProps.disabled)\n }, (iconColor || color) && {\n color: iconColor || color\n }, {\n __css: styles.icon\n }, iconSize && {\n fontSize: iconSize\n }), icon));\n});\n\nif (__DEV__) {\n Select.displayName = \"Select\";\n}\n\nvar DefaultIcon = function DefaultIcon(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"0 0 24 24\"\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z\"\n }));\n};\nvar IconWrapper = chakra(\"div\", {\n baseStyle: {\n position: \"absolute\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n pointerEvents: \"none\",\n top: \"50%\",\n transform: \"translateY(-50%)\"\n }\n});\n\nvar SelectIcon = function SelectIcon(props) {\n var _props$children = props.children,\n children = _props$children === void 0 ? /*#__PURE__*/React.createElement(DefaultIcon, null) : _props$children,\n rest = _objectWithoutPropertiesLoose(props, _excluded3);\n\n var clone = /*#__PURE__*/React.cloneElement(children, {\n role: \"presentation\",\n className: \"chakra-select__icon\",\n focusable: false,\n \"aria-hidden\": true,\n // force icon to adhere to `IconWrapper` styles\n style: {\n width: \"1em\",\n height: \"1em\",\n color: \"currentColor\"\n }\n });\n return /*#__PURE__*/React.createElement(IconWrapper, _extends({}, rest, {\n className: \"chakra-select__icon-wrapper\"\n }), /*#__PURE__*/React.isValidElement(children) ? clone : null);\n};\n\nif (__DEV__) {\n SelectIcon.displayName = \"SelectIcon\";\n}\n\nexport { DefaultIcon, Select, SelectField };\n","import { useCheckbox } from '@chakra-ui/checkbox';\nimport { forwardRef, useMultiStyleConfig, omitThemingProps, chakra } from '@chakra-ui/system';\nimport { cx, dataAttr, __DEV__ } from '@chakra-ui/utils';\nimport * as React from 'react';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded = [\"spacing\", \"children\"];\nvar Switch = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useMultiStyleConfig(\"Switch\", props);\n\n var _omitThemingProps = omitThemingProps(props),\n _omitThemingProps$spa = _omitThemingProps.spacing,\n spacing = _omitThemingProps$spa === void 0 ? \"0.5rem\" : _omitThemingProps$spa,\n children = _omitThemingProps.children,\n ownProps = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded);\n\n var _useCheckbox = useCheckbox(ownProps),\n state = _useCheckbox.state,\n getInputProps = _useCheckbox.getInputProps,\n getCheckboxProps = _useCheckbox.getCheckboxProps,\n getRootProps = _useCheckbox.getRootProps,\n getLabelProps = _useCheckbox.getLabelProps;\n\n var containerStyles = React.useMemo(function () {\n return _extends({\n display: \"inline-block\",\n position: \"relative\",\n verticalAlign: \"middle\",\n lineHeight: 0\n }, styles.container);\n }, [styles.container]);\n var trackStyles = React.useMemo(function () {\n return _extends({\n display: \"inline-flex\",\n flexShrink: 0,\n justifyContent: \"flex-start\",\n boxSizing: \"content-box\",\n cursor: \"pointer\"\n }, styles.track);\n }, [styles.track]);\n var labelStyles = React.useMemo(function () {\n return _extends({\n userSelect: \"none\",\n marginStart: spacing\n }, styles.label);\n }, [spacing, styles.label]);\n return /*#__PURE__*/React.createElement(chakra.label, _extends({}, getRootProps(), {\n className: cx(\"chakra-switch\", props.className),\n __css: containerStyles\n }), /*#__PURE__*/React.createElement(\"input\", _extends({\n className: \"chakra-switch__input\"\n }, getInputProps({}, ref))), /*#__PURE__*/React.createElement(chakra.span, _extends({}, getCheckboxProps(), {\n className: \"chakra-switch__track\",\n __css: trackStyles\n }), /*#__PURE__*/React.createElement(chakra.span, {\n __css: styles.thumb,\n className: \"chakra-switch__thumb\",\n \"data-checked\": dataAttr(state.isChecked),\n \"data-hover\": dataAttr(state.isHovered)\n })), children && /*#__PURE__*/React.createElement(chakra.span, _extends({\n className: \"chakra-switch__label\"\n }, getLabelProps(), {\n __css: labelStyles\n }), children));\n});\n\nif (__DEV__) {\n Switch.displayName = \"Switch\";\n}\n\nexport { Switch };\n","import { useFormControl } from '@chakra-ui/form-control';\nimport { forwardRef, useStyleConfig, omitThemingProps, chakra } from '@chakra-ui/system';\nimport { omit, cx, __DEV__ } from '@chakra-ui/utils';\nimport * as React from 'react';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded = [\"className\", \"rows\"];\nvar omitted = [\"h\", \"minH\", \"height\", \"minHeight\"];\n\n/**\n * Textarea is used to enter an amount of text that's longer than a single line\n * @see Docs https://chakra-ui.com/textarea\n */\nvar Textarea = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyleConfig(\"Textarea\", props);\n\n var _omitThemingProps = omitThemingProps(props),\n className = _omitThemingProps.className,\n rows = _omitThemingProps.rows,\n rest = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded);\n\n var textareaProps = useFormControl(rest);\n var textareaStyles = rows ? omit(styles, omitted) : styles;\n return /*#__PURE__*/React.createElement(chakra.textarea, _extends({\n ref: ref,\n rows: rows\n }, textareaProps, {\n className: cx(\"chakra-textarea\", className),\n __css: textareaStyles\n }));\n});\n\nif (__DEV__) {\n Textarea.displayName = \"Textarea\";\n}\n\nexport { Textarea };\n","import*as e from\"react\";import{forwardRef as r,NumberInput as t,NumberInputField as n,NumberInputStepper as c,NumberIncrementStepper as a,NumberDecrementStepper as i}from\"@chakra-ui/react\";import{__DEV__ as o}from\"@chakra-ui/utils\";function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},l.apply(this,arguments)}const p=[\"hideStepper\",\"incrementIcon\",\"decrementIcon\"],u=r((r,o)=>{const{hideStepper:u,incrementIcon:m,decrementIcon:s}=r,f=function(e,r){if(null==e)return{};var t,n,c={},a=Object.keys(e);for(n=0;n<a.length;n++)r.indexOf(t=a[n])>=0||(c[t]=e[t]);return c}(r,p);/*#__PURE__*/return e.createElement(t,l({},f,{ref:o}),/*#__PURE__*/e.createElement(n,null),!u&&/*#__PURE__*/e.createElement(c,null,/*#__PURE__*/e.createElement(a,{children:m}),/*#__PURE__*/e.createElement(i,{children:s})))});u.defaultProps={hideStepper:!1},o&&(u.displayName=\"NumberInput\");export{u as NumberInput};\n//# sourceMappingURL=index.modern.mjs.map\n","import { forwardRef, chakra } from '@chakra-ui/system';\nimport { cx, __DEV__ } from '@chakra-ui/utils';\nimport * as React from 'react';\n\nfunction _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\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded = [\"as\", \"viewBox\", \"color\", \"focusable\", \"children\", \"className\", \"__css\"];\nvar fallbackIcon = {\n path: /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n strokeWidth: \"1.5\"\n }, /*#__PURE__*/React.createElement(\"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 }), /*#__PURE__*/React.createElement(\"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 }), /*#__PURE__*/React.createElement(\"circle\", {\n fill: \"none\",\n strokeMiterlimit: \"10\",\n cx: \"12\",\n cy: \"12\",\n r: \"11.25\"\n })),\n viewBox: \"0 0 24 24\"\n};\nvar Icon = /*#__PURE__*/forwardRef(function (props, ref) {\n var element = props.as,\n viewBox = props.viewBox,\n _props$color = props.color,\n color = _props$color === void 0 ? \"currentColor\" : _props$color,\n _props$focusable = props.focusable,\n focusable = _props$focusable === void 0 ? false : _props$focusable,\n children = props.children,\n className = props.className,\n __css = props.__css,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n\n var _className = cx(\"chakra-icon\", className);\n\n var styles = _extends({\n w: \"1em\",\n h: \"1em\",\n display: \"inline-block\",\n lineHeight: \"1em\",\n flexShrink: 0,\n color: color\n }, __css);\n\n var shared = {\n ref: ref,\n focusable: focusable,\n className: _className,\n __css: styles\n };\n\n var _viewBox = viewBox != null ? viewBox : fallbackIcon.viewBox;\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\n\n if (element && typeof element !== \"string\") {\n return /*#__PURE__*/React.createElement(chakra.svg, _extends({\n as: element\n }, shared, rest));\n }\n\n var _path = children != null ? children : fallbackIcon.path;\n\n return /*#__PURE__*/React.createElement(chakra.svg, _extends({\n verticalAlign: \"middle\",\n viewBox: _viewBox\n }, shared, rest), _path);\n});\n\nif (__DEV__) {\n Icon.displayName = \"Icon\";\n}\n\nvar Icon$1 = Icon;\n\nfunction createIcon(options) {\n var _options$viewBox = options.viewBox,\n viewBox = _options$viewBox === void 0 ? \"0 0 24 24\" : _options$viewBox,\n pathDefinition = options.d,\n displayName = options.displayName,\n _options$defaultProps = options.defaultProps,\n defaultProps = _options$defaultProps === void 0 ? {} : _options$defaultProps;\n var path = React.Children.toArray(options.path);\n var Comp = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(Icon, _extends({\n ref: ref,\n viewBox: viewBox\n }, defaultProps, props), path.length ? path : /*#__PURE__*/React.createElement(\"path\", {\n fill: \"currentColor\",\n d: pathDefinition\n }));\n });\n\n if (__DEV__) {\n Comp.displayName = displayName;\n }\n\n return Comp;\n}\n\nexport { Icon, createIcon, Icon$1 as default };\n","import { createIcon } from '@chakra-ui/icon';\nexport * from '@chakra-ui/icon';\nimport * as React from 'react';\n\nvar CopyIcon = createIcon({\n d: \"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\",\n displayName: \"CopyIcon\"\n});\n\nvar SearchIcon = createIcon({\n d: \"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z\",\n displayName: \"SearchIcon\"\n});\n\nvar Search2Icon = createIcon({\n d: \"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z\",\n displayName: \"Search2Icon\"\n});\n\nvar MoonIcon = createIcon({\n d: \"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z\",\n displayName: \"MoonIcon\"\n});\n\nvar SunIcon = createIcon({\n displayName: \"SunIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n strokeLinejoin: \"round\",\n strokeLinecap: \"round\",\n strokeWidth: \"2\",\n fill: \"none\",\n stroke: \"currentColor\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"5\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 1v2\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 21v2\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4.22 4.22l1.42 1.42\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18.36 18.36l1.42 1.42\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1 12h2\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21 12h2\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4.22 19.78l1.42-1.42\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18.36 5.64l1.42-1.42\"\n }))\n});\n\nvar AddIcon = createIcon({\n d: \"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z\",\n displayName: \"AddIcon\"\n});\n\nvar SmallAddIcon = createIcon({\n displayName: \"SmallAddIcon\",\n viewBox: \"0 0 20 20\",\n path: /*#__PURE__*/React.createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z\",\n fillRule: \"evenodd\"\n })\n});\n\nvar SettingsIcon = createIcon({\n viewBox: \"0 0 14 14\",\n d: \"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z\",\n displayName: \"SettingsIcon\"\n});\n\nvar CheckCircleIcon = createIcon({\n displayName: \"CheckCircleIcon\",\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\nvar LockIcon = createIcon({\n d: \"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z\",\n displayName: \"LockIcon\"\n});\n\nvar UnlockIcon = createIcon({\n d: \"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z\",\n displayName: \"UnlockIcon\"\n});\n\nvar ViewIcon = createIcon({\n displayName: \"ViewIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"currentColor\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z\"\n }), /*#__PURE__*/React.createElement(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"2\"\n }))\n});\n\nvar ViewOffIcon = createIcon({\n displayName: \"ViewOffIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"currentColor\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z\"\n }))\n});\n\nvar DownloadIcon = createIcon({\n d: \"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z\",\n displayName: \"DownloadIcon\",\n viewBox: \"0 0 14 14\"\n});\n\nvar DeleteIcon = createIcon({\n displayName: \"DeleteIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"currentColor\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z\"\n }))\n});\n\nvar RepeatIcon = createIcon({\n displayName: \"RepeatIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"currentColor\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z\"\n }))\n});\n\nvar RepeatClockIcon = createIcon({\n displayName: \"RepeatClockIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"currentColor\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z\"\n }))\n});\n\nvar EditIcon = createIcon({\n displayName: \"EditIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeWidth: \"2\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"\n }))\n});\n\nvar ChevronLeftIcon = createIcon({\n d: \"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\",\n displayName: \"ChevronLeftIcon\"\n});\n\nvar ChevronRightIcon = createIcon({\n d: \"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\",\n displayName: \"ChevronRightIcon\"\n});\n\nvar ChevronDownIcon = createIcon({\n displayName: \"ChevronDownIcon\",\n d: \"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z\"\n});\n\nvar ChevronUpIcon = createIcon({\n d: \"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z\",\n displayName: \"ChevronUpIcon\"\n});\n\nvar ArrowBackIcon = createIcon({\n d: \"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\",\n displayName: \"ArrowBackIcon\"\n});\n\nvar ArrowForwardIcon = createIcon({\n d: \"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\",\n displayName: \"ArrowForwardIcon\"\n});\n\nvar ArrowUpIcon = createIcon({\n d: \"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z\",\n displayName: \"ArrowUpIcon\"\n});\n\nvar ArrowUpDownIcon = createIcon({\n viewBox: \"0 0 16 16\",\n d: \"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z\",\n displayName: \"ArrowUpDownIcon\"\n});\n\nvar ArrowDownIcon = createIcon({\n d: \"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\",\n displayName: \"ArrowDownIcon\"\n});\n\nvar ExternalLinkIcon = createIcon({\n displayName: \"ExternalLinkIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeWidth: \"2\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15 3h6v6\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 14L21 3\"\n }))\n});\n\nvar LinkIcon = createIcon({\n displayName: \"LinkIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"currentColor\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z\"\n }))\n});\n\nvar PlusSquareIcon = createIcon({\n displayName: \"PlusSquareIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"none\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeWidth: \"2\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n height: \"18\",\n width: \"18\",\n rx: \"2\",\n ry: \"2\",\n x: \"3\",\n y: \"3\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 8v8\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8 12h8\"\n }))\n});\n\nvar CalendarIcon = createIcon({\n displayName: \"CalendarIcon\",\n viewBox: \"0 0 14 14\",\n d: \"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z\"\n});\n\nvar ChatIcon = createIcon({\n d: \"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z\",\n displayName: \"ChatIcon\",\n viewBox: \"0 0 14 14\"\n});\n\nvar TimeIcon = createIcon({\n displayName: \"TimeIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"currentColor\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z\"\n }))\n});\n\nvar ArrowRightIcon = createIcon({\n displayName: \"ArrowRightIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"currentColor\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z\"\n }))\n});\n\nvar ArrowLeftIcon = createIcon({\n displayName: \"ArrowLeftIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"currentColor\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z\"\n }))\n});\n\nvar AtSignIcon = createIcon({\n displayName: \"AtSignIcon\",\n d: \"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z\"\n});\n\nvar AttachmentIcon = createIcon({\n displayName: \"AttachmentIcon\",\n d: \"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z\"\n});\n\nvar UpDownIcon = createIcon({\n displayName: \"UpDownIcon\",\n viewBox: \"-1 -1 9 11\",\n d: \"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z\"\n});\n\nvar StarIcon = createIcon({\n d: \"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z\",\n displayName: \"StarIcon\"\n});\n\nvar EmailIcon = createIcon({\n displayName: \"EmailIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"currentColor\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z\"\n }))\n});\n\nvar PhoneIcon = createIcon({\n d: \"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z\",\n displayName: \"PhoneIcon\",\n viewBox: \"0 0 14 14\"\n});\n\nvar DragHandleIcon = createIcon({\n viewBox: \"0 0 10 10\",\n d: \"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z\",\n displayName: \"DragHandleIcon\"\n});\n\nvar SpinnerIcon = createIcon({\n displayName: \"SpinnerIcon\",\n path: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"linearGradient\", {\n x1: \"28.154%\",\n y1: \"63.74%\",\n x2: \"74.629%\",\n y2: \"17.783%\",\n id: \"a\"\n }, /*#__PURE__*/React.createElement(\"stop\", {\n stopColor: \"currentColor\",\n offset: \"0%\"\n }), /*#__PURE__*/React.createElement(\"stop\", {\n stopColor: \"#fff\",\n stopOpacity: \"0\",\n offset: \"100%\"\n }))), /*#__PURE__*/React.createElement(\"g\", {\n transform: \"translate(2)\",\n fill: \"none\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n stroke: \"url(#a)\",\n strokeWidth: \"4\",\n cx: \"10\",\n cy: \"12\",\n r: \"10\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 2C4.477 2 0 6.477 0 12\",\n stroke: \"currentColor\",\n strokeWidth: \"4\"\n }), /*#__PURE__*/React.createElement(\"rect\", {\n fill: \"currentColor\",\n x: \"8\",\n width: \"4\",\n height: \"4\",\n rx: \"8\"\n })))\n});\n\nvar CloseIcon = createIcon({\n displayName: \"CloseIcon\",\n d: \"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z\"\n});\n\nvar SmallCloseIcon = createIcon({\n displayName: \"SmallCloseIcon\",\n viewBox: \"0 0 16 16\",\n path: /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z\",\n fillRule: \"evenodd\",\n fill: \"currentColor\"\n })\n});\n\nvar NotAllowedIcon = createIcon({\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z\",\n displayName: \"NotAllowedIcon\"\n});\n\nvar TriangleDownIcon = createIcon({\n d: \"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z\",\n displayName: \"TriangleDownIcon\"\n});\n\nvar TriangleUpIcon = createIcon({\n d: \"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z\",\n displayName: \"TriangleUpIcon\"\n});\n\nvar InfoOutlineIcon = createIcon({\n displayName: \"InfoOutlineIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"currentColor\",\n stroke: \"currentColor\",\n strokeLinecap: \"square\",\n strokeWidth: \"2\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n fill: \"none\",\n r: \"11\",\n stroke: \"currentColor\"\n }), /*#__PURE__*/React.createElement(\"line\", {\n fill: \"none\",\n x1: \"11.959\",\n x2: \"11.959\",\n y1: \"11\",\n y2: \"17\"\n }), /*#__PURE__*/React.createElement(\"circle\", {\n cx: \"11.959\",\n cy: \"7\",\n r: \"1\",\n stroke: \"none\"\n }))\n});\n\nvar BellIcon = createIcon({\n displayName: \"BellIcon\",\n d: \"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z\"\n});\n\nvar InfoIcon = createIcon({\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\nvar QuestionIcon = createIcon({\n d: \"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z\",\n displayName: \"QuestionIcon\"\n});\n\nvar QuestionOutlineIcon = createIcon({\n displayName: \"QuestionOutlineIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"currentColor\",\n strokeWidth: \"1.5\"\n }, /*#__PURE__*/React.createElement(\"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 }), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"none\",\n strokeLinecap: \"round\",\n d: \"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0\"\n }), /*#__PURE__*/React.createElement(\"circle\", {\n fill: \"none\",\n strokeMiterlimit: \"10\",\n cx: \"12\",\n cy: \"12\",\n r: \"11.25\"\n }))\n});\n\nvar WarningIcon = createIcon({\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 displayName: \"WarningIcon\"\n});\n\nvar WarningTwoIcon = createIcon({\n displayName: \"WarningTwoIcon\",\n d: \"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z\"\n});\n\nvar CheckIcon = createIcon({\n viewBox: \"0 0 14 14\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"currentColor\"\n }, /*#__PURE__*/React.createElement(\"polygon\", {\n points: \"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039\"\n }))\n});\n\nvar MinusIcon = createIcon({\n displayName: \"MinusIcon\",\n path: /*#__PURE__*/React.createElement(\"g\", {\n fill: \"currentColor\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n height: \"4\",\n width: \"20\",\n x: \"2\",\n y: \"10\"\n }))\n});\n\nvar HamburgerIcon = createIcon({\n displayName: \"HamburgerIcon\",\n viewBox: \"0 0 24 24\",\n d: \"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z\"\n});\n\nexport { AddIcon, ArrowBackIcon, ArrowDownIcon, ArrowForwardIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, AtSignIcon, AttachmentIcon, BellIcon, CalendarIcon, ChatIcon, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, DeleteIcon, DownloadIcon, DragHandleIcon, EditIcon, EmailIcon, ExternalLinkIcon, HamburgerIcon, InfoIcon, InfoOutlineIcon, LinkIcon, LockIcon, MinusIcon, MoonIcon, NotAllowedIcon, PhoneIcon, PlusSquareIcon, QuestionIcon, QuestionOutlineIcon, RepeatClockIcon, RepeatIcon, Search2Icon, SearchIcon, SettingsIcon, SmallAddIcon, SmallCloseIcon, SpinnerIcon, StarIcon, SunIcon, TimeIcon, TriangleDownIcon, TriangleUpIcon, UnlockIcon, UpDownIcon, ViewIcon, ViewOffIcon, WarningIcon, WarningTwoIcon };\n","import*as r from\"react\";import{Button as t}from\"@chakra-ui/button\";export{ButtonGroup,IconButton}from\"@chakra-ui/button\";import{__DEV__ as e}from\"@chakra-ui/utils\";import{forwardRef as n}from\"@chakra-ui/system\";function o(){return o=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},o.apply(this,arguments)}const a=[\"label\",\"isPrimary\",\"isSecondary\",\"children\"],i=n((e,n)=>{let i,{label:c,isPrimary:u,isSecondary:s,children:l}=e,m=function(r,t){if(null==r)return{};var e,n,o={},a=Object.keys(r);for(n=0;n<a.length;n++)t.indexOf(e=a[n])>=0||(o[e]=r[e]);return o}(e,a);return u&&(i=\"primary\"),s&&(i=\"secondary\"),/*#__PURE__*/r.createElement(t,o({ref:n,colorScheme:i},m),l||c)});e&&(i.displayName=\"Button\");export{i as Button};\n//# sourceMappingURL=index.modern.mjs.map\n","import*as t from\"react\";import{forwardRef as r}from\"@chakra-ui/system\";import{__DEV__ as e}from\"@chakra-ui/utils\";import{InputRightElement as a}from\"@chakra-ui/input\";import{Button as i}from\"@saas-ui/button\";function o(){return o=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},o.apply(this,arguments)}const n=r((r,e)=>/*#__PURE__*/t.createElement(a,{w:\"auto\",px:\"1\",py:\"1\",alignItems:\"stretch\"},/*#__PURE__*/t.createElement(i,o({ref:e,height:\"auto\"},r))));n.id=\"InputRightElement\",e&&(n.displayName=\"InputRightButton\");export{n as InputRightButton};\n//# sourceMappingURL=index.modern.mjs.map\n","import t,{useState as e}from\"react\";import{forwardRef as r,InputGroup as o,Input as n}from\"@chakra-ui/react\";import{__DEV__ as a}from\"@chakra-ui/utils\";import{ViewIcon as i,ViewOffIcon as l}from\"@chakra-ui/icons\";import{InputRightButton as c}from\"@saas-ui/input-right-button\";function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},s.apply(this,arguments)}const u=[\"viewIcon\",\"viewOffIcon\",\"autoComplete\"],p=r((r,a)=>{let{viewIcon:p,viewOffIcon:f,autoComplete:m}=r,h=function(t,e){if(null==t)return{};var r,o,n={},a=Object.keys(t);for(o=0;o<a.length;o++)e.indexOf(r=a[o])>=0||(n[r]=t[r]);return n}(r,u);const[w,v]=e(!1),d=w?\"Hide password\":\"Show password\";let O;return O=w?p||/*#__PURE__*/t.createElement(i,null):f||/*#__PURE__*/t.createElement(l,null),/*#__PURE__*/t.createElement(o,null,/*#__PURE__*/t.createElement(n,s({},h,{ref:a,type:w?\"text\":\"password\",autoComplete:w?\"off\":m})),/*#__PURE__*/t.createElement(c,{onClick:()=>v(!w),\"aria-label\":d,variant:\"ghost\"},O))});a&&(p.displayName=\"PasswordInput\");export{p as PasswordInput};\n//# sourceMappingURL=index.modern.mjs.map\n","import*as e from\"react\";import{forwardRef as n,RadioGroup as r,Stack as t,Radio as a}from\"@chakra-ui/react\";import{__DEV__ as o}from\"@chakra-ui/utils\";function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},i.apply(this,arguments)}function l(e,n){if(null==e)return{};var r,t,a={},o=Object.keys(e);for(t=0;t<o.length;t++)n.indexOf(r=o[t])>=0||(a[r]=e[r]);return a}const c=[\"options\",\"spacing\",\"direction\"],u=[\"onBlur\",\"onChange\"],p=[\"value\",\"label\"],s=n((n,o)=>{let{options:s,spacing:f,direction:m}=n,g=l(n,c);const{onBlur:h,onChange:b}=g,d=l(g,u);/*#__PURE__*/return e.createElement(r,i({onChange:b},d),/*#__PURE__*/e.createElement(t,{spacing:f,direction:m},s.map((n,r)=>{let{value:t,label:c}=n,u=l(n,p);/*#__PURE__*/return e.createElement(a,i({key:r,onBlur:h,value:t,ref:o},u),c||t)})))});o&&(s.displayName=\"RadioInput\");export{s as RadioInput};\n//# sourceMappingURL=index.modern.mjs.map\n","import*as e from\"react\";import{forwardRef as t,HStack as n,PinInput as r,PinInputField as a}from\"@chakra-ui/react\";import{__DEV__ as i}from\"@chakra-ui/utils\";const p=[\"pinLength\",\"spacing\"],c=t((t,i)=>{const{pinLength:c=4,spacing:o}=t,s=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(a[n]=e[n]);return a}(t,p),u=[];for(let t=0;t<c;t++)u.push(/*#__PURE__*/e.createElement(a,{key:t,ref:i}));/*#__PURE__*/return e.createElement(n,{spacing:o},/*#__PURE__*/e.createElement(r,s,u))});c.defaultProps={pinLength:4},i&&(c.displayName=\"PinInput\");export{c as PinInput};\n//# sourceMappingURL=index.modern.mjs.map\n","import*as e from\"react\";import{forwardRef as t,useMultiStyleConfig as a,MenuButton as l,Button as n,omitThemingProps as r,useFormControl as i,Menu as o,chakra as c,MenuList as s,MenuOptionGroup as u,MenuItemOption as m,Select as p}from\"@chakra-ui/react\";import{ChevronDownIcon as f}from\"@chakra-ui/icons\";import{__DEV__ as d,cx as h}from\"@chakra-ui/utils\";function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},v.apply(this,arguments)}function b(e,t){if(null==e)return{};var a,l,n={},r=Object.keys(e);for(l=0;l<r.length;l++)t.indexOf(a=r[l])>=0||(n[a]=e[a]);return n}const g=[\"name\",\"options\",\"children\",\"onChange\",\"defaultValue\",\"value\",\"placeholder\",\"isDisabled\",\"leftIcon\",\"rightIcon\",\"multiple\",\"size\",\"variant\",\"menuListProps\",\"renderValue\"],y=[\"value\",\"label\"],E=t((t,r)=>{const i=a(\"Input\",t),o=v({fontWeight:\"normal\",textAlign:\"left\",color:\"inherit\",_active:{bg:\"transparent\"},minH:i.field.h||i.field.height},i.field,{h:\"auto\"});/*#__PURE__*/return e.createElement(l,v({as:n},t,{ref:r,sx:o}))});d&&(E.displayName=\"SelectButton\");const k=t((t,a)=>{const{name:l,options:n,children:p,onChange:d,defaultValue:k,value:I,placeholder:O,isDisabled:x,leftIcon:N,rightIcon:S=/*#__PURE__*/e.createElement(f,null),multiple:j,size:V,variant:C,menuListProps:z,renderValue:A=(e=>null==e?void 0:e.join(\", \"))}=t,D=b(t,g),P=r(D),[_,w]=e.useState(I||k),H=i({name:l}),L={isDisabled:x,leftIcon:N,rightIcon:S,size:V,variant:C},B=e.useCallback(e=>{if(!n)return e;for(const t of n)if(t.label&&t.value===e)return t.label;return e},[n]),W=_?(Array.isArray(_)?_:[_]).map(B):[];/*#__PURE__*/return e.createElement(o,v({},P,{closeOnSelect:!j}),/*#__PURE__*/e.createElement(c.div,{className:h(\"saas-select\")},/*#__PURE__*/e.createElement(E,v({ref:a},L),A(W)||O),/*#__PURE__*/e.createElement(s,v({maxH:\"60vh\",overflowY:\"auto\"},z),/*#__PURE__*/e.createElement(u,{defaultValue:k||I,onChange:e=>{w(e),null==d||d(e)},type:j?\"checkbox\":\"radio\"},n?n.map((t,a)=>{let{value:l,label:n}=t,r=b(t,y);/*#__PURE__*/return e.createElement(m,v({key:a,value:l},r),n||l)}):p)),/*#__PURE__*/e.createElement(c.input,v({},H,{name:l,type:\"hidden\",value:_,className:\"saas-select__input\"}))))});d&&(k.displayName=\"Select\");const I=[\"options\",\"children\"],O=t((t,a)=>{let{options:l,children:n}=t,r=b(t,I);/*#__PURE__*/return e.createElement(p,v({ref:a},r),n||(null==l?void 0:l.map(({value:t,label:a})=>/*#__PURE__*/e.createElement(\"option\",{key:t,value:t},a||t))))});d&&(O.displayName=\"NativeSelect\");export{O as NativeSelect,k as Select};\n//# sourceMappingURL=index.modern.mjs.map\n","import*as e from\"react\";import{createStylesContext as t,forwardRef as s,useMultiStyleConfig as n,omitThemingProps as r,chakra as a}from\"@chakra-ui/system\";import{Icon as i,CheckIcon as c}from\"@chakra-ui/icons\";import{Collapse as o}from\"@saas-ui/collapse\";import{getChildrenOfType as l,getChildOfType as p}from\"@saas-ui/react-utils\";import{__DEV__ as m,cx as u,dataAttr as d}from\"@chakra-ui/utils\";import{createContext as f}from\"@chakra-ui/react-utils\";function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},S.apply(this,arguments)}function v(e,t){if(null==e)return{};var s,n,r={},a=Object.keys(e);for(n=0;n<a.length;n++)t.indexOf(s=a[n])>=0||(r[s]=e[s]);return r}const[h,_]=f({name:\"StepperContext\",errorMessage:\"useStepperContext: `context` is undefined. Seems you forgot to wrap stepper components in `<Stepper />`\"});function N(t){const{step:s,onChange:n}=t,[r,a]=e.useState(-1),i=e.useRef([]),[,c]=e.useState(Date.now()),o=e.useCallback(e=>{const t=[...i.current];-1===t.indexOf(e)&&t.push(e),i.current=t,c(Date.now())},[i,c]),l=e=>{const t=i.current.indexOf(e);-1!==t&&a(t)};return e.useEffect(()=>{\"string\"==typeof s?l(s):\"number\"==typeof s?a(s):-1===r&&a(0)},[s]),e.useEffect(()=>{null==n||n(r)},[r,n]),{stepsRef:i,activeStep:i.current[r],activeIndex:r,isFirstStep:0===r,isLastStep:r===i.current.length-1,isCompleted:r>=i.current.length,setIndex:a,setStep:l,nextStep:()=>{a(r+1)},prevStep:()=>{a(r-1)},registerStep:o,unregisterStep:e=>{i.current=i.current.slice(i.current.indexOf(e),1)}}}function y(t){const{name:s,isActive:n,isCompleted:r}=t,{registerStep:a,unregisterStep:i,activeStep:c}=_();return e.useEffect(()=>{if(s)return a(s),()=>{i(s)}},[]),{isActive:s?c===s:n,isCompleted:r}}function C({label:e=\"Back\"}={}){const{isFirstStep:t,prevStep:s}=_();return{isDisabled:t,onClick:s,label:e}}function E({label:e=\"Next\",submitLabel:t=\"Submit\"}={}){const{isLastStep:s,isCompleted:n,nextStep:r}=_();return{isDisabled:n,onClick:r,label:s?t:e}}const x=[\"orientation\",\"children\"],g=[\"children\",\"orientation\",\"step\",\"onChange\"],b=[\"children\",\"orientation\",\"stepComponent\"],k=[\"children\",\"isOpen\"],O=[\"icon\",\"isActive\",\"isCompleted\",\"className\"],A=[\"name\",\"title\",\"icon\",\"isActive\",\"isCompleted\"],D=[\"isActive\"],[I,w]=t(\"Stepper\"),j=s((t,s)=>{const{orientation:n,children:r}=t,a=v(t,x);/*#__PURE__*/return e.createElement(z,S({ref:s,orientation:n},a),/*#__PURE__*/e.createElement(F,{orientation:n},r))});m&&(j.displayName=\"Stepper\");const z=s((t,s)=>{const{children:i,orientation:c=\"horizontal\"}=t,o=v(t,g),l=n(\"Stepper\",S({},o,{orientation:c})),p=r(o),m=N(t),d=S({display:\"flex\",flexDirection:\"column\"},l.container);/*#__PURE__*/return e.createElement(I,{value:l},/*#__PURE__*/e.createElement(h,{value:m},/*#__PURE__*/e.createElement(a.div,S({ref:s,__css:d},p,{className:u(\"saas-stepper\",t.className)}),i)))});m&&(z.displayName=\"StepperContainer\");const F=t=>{var s,n;const{children:r,orientation:i=\"horizontal\",stepComponent:c}=t,o=v(t,b),m=w(),{activeIndex:d}=_(),f=S({display:\"flex\",flexDirection:\"row\",alignItems:\"center\"},m.steps),h=\"vertical\"===i,N=c||$,y=l(r,N),C=y.reduce((t,s,n,r)=>(t.push(/*#__PURE__*/e.createElement(N,S({key:n},s.props,{icon:s.props.icon||n+1,isActive:d===n,isCompleted:s.props.isCompleted||d>n}))),h&&t.push(/*#__PURE__*/e.createElement(L,{key:`content-${n}`,isOpen:d===n},s.props.children)),n<r.length-1&&t.push(/*#__PURE__*/e.createElement(B,{key:`separator-${n}`,isActive:n<d})),t),[]),E=p(r,P),x=d>=y.length?E:h?null:/*#__PURE__*/e.createElement(L,null,null==(s=y[d])||null==(n=s.props)?void 0:n.children);/*#__PURE__*/return e.createElement(e.Fragment,null,/*#__PURE__*/e.createElement(a.div,S({__css:f},o,{className:u(\"saas-stepper__steps\",t.className)}),C),x)};m&&(F.displayName=\"StepperSteps\");const L=t=>{const{children:s,isOpen:n=!0}=t,r=v(t,k),i=w();/*#__PURE__*/return e.createElement(a.div,S({__css:i.content},r,{className:u(\"saas-stepper__content\",t.className)}),/*#__PURE__*/e.createElement(o,{in:n},s))};m&&(L.displayName=\"StepperContent\");const R=t=>{const{icon:s,isCompleted:n,className:r}=t,o=v(t,O),l=S({display:\"flex\",alignItems:\"center\",justifyContent:\"center\",borderRadius:\"full\",fontSize:\"1em\"},w().icon);let p;return p=n?/*#__PURE__*/e.createElement(i,{as:c}):s,/*#__PURE__*/e.createElement(a.div,S({__css:l},o,{className:u(\"saas-stepper__icon\",r)}),p)};m&&(R.displayName=\"StepperIcon\");const $=t=>{const{title:s,icon:n,isActive:r,isCompleted:i}=t,c=v(t,A),o=y(t),l=S({display:\"flex\",alignItems:\"center\",flexDirection:\"row\"},w().step);/*#__PURE__*/return e.createElement(a.div,S({},c,{__css:l,\"data-active\":d(o.isActive),\"data-completed\":d(o.isCompleted),className:u(\"saas-stepper__step\",t.className)}),/*#__PURE__*/e.createElement(R,{icon:n,isActive:r,isCompleted:i}),s&&/*#__PURE__*/e.createElement(M,null,s))};m&&($.displayName=\"StepperStep\");const B=t=>{const{isActive:s}=t,n=v(t,D),r=S({flex:1,mx:2},w().separator);/*#__PURE__*/return e.createElement(a.div,S({},n,{\"data-active\":d(s),className:u(\"saas-stepper__separator\",t.className),__css:r}))};m&&(B.displayName=\"StepperSeparator\");const M=t=>{const s=w();/*#__PURE__*/return e.createElement(a.p,S({},t,{__css:s.title,className:u(\"saas-stepper__title\",t.className)}))};m&&(M.displayName=\"StepperStepTitle\");const P=t=>{const s=w();/*#__PURE__*/return e.createElement(a.div,S({__css:s.completed},t,{className:u(\"saas-stepper__completed\",t.className)}))};m&&(P.displayName=\"StepperCompleted\");export{j as Stepper,P as StepperCompleted,z as StepperContainer,L as StepperContent,R as StepperIcon,h as StepperProvider,B as StepperSeparator,$ as StepperStep,M as StepperStepTitle,F as StepperSteps,E as useNext,C as usePrev,y as useStep,N as useStepper,_ as useStepperContext};\n//# sourceMappingURL=index.modern.mjs.map\n","import*as r from\"react\";function t(t,e){return r.Children.toArray(t).find(r=>r.type===e)}function e(t,e){return r.Children.toArray(t).filter(r=>Array.isArray(e)?e.some(t=>t===r.type):r.type===e)}export{t as getChildOfType,e as getChildrenOfType};\n//# sourceMappingURL=index.modern.mjs.map\n","import*as e from\"react\";import{__DEV__ as t,get as a,cx as l,runIfFn as r,callAllHandlers as n}from\"@chakra-ui/utils\";import{useFormContext as s,get as i,Controller as o,useForm as m,FormProvider as c,useFieldArray as d,useWatch as u}from\"react-hook-form\";import{FormControl as p,FormLabel as f,Text as h,forwardRef as b,Input as y,Switch as E,Checkbox as v,Box as g,FormHelperText as F,FormErrorMessage as N,useMergeRefs as x,Textarea as C,chakra as k,useTheme as R,SimpleGrid as S,useStyleConfig as V}from\"@chakra-ui/react\";import{NumberInput as L}from\"@saas-ui/number-input\";import{PasswordInput as I}from\"@saas-ui/password-input\";import{RadioInput as w}from\"@saas-ui/radio\";import{PinInput as A}from\"@saas-ui/pin-input\";import{Select as D,NativeSelect as O}from\"@saas-ui/select\";import{chakra as j,forwardRef as B}from\"@chakra-ui/system\";import{MinusIcon as U,AddIcon as _}from\"@chakra-ui/icons\";import{IconButton as M,Button as P}from\"@saas-ui/button\";import{createContext as $}from\"@chakra-ui/react-utils\";import{useStepper as q,useStep as G,StepperProvider as H,useStepperContext as z,StepperStep as J,StepperContainer as K,StepperSteps as Q}from\"@saas-ui/stepper\";export*from\"@saas-ui/input-right-button\";function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},T.apply(this,arguments)}function W(e,t){if(null==e)return{};var a,l,r={},n=Object.keys(e);for(l=0;l<n.length;l++)t.indexOf(a=n[l])>=0||(r[a]=e[a]);return r}const X=[\"name\",\"label\",\"placeholder\"],Y=t=>{let{name:a,label:l}=t,r=W(t,X);/*#__PURE__*/return e.createElement(p,r,l?/*#__PURE__*/e.createElement(f,{htmlFor:a},l):null,/*#__PURE__*/e.createElement(h,{fontSize:\"md\"},/*#__PURE__*/e.createElement(Z,{name:a})))};t&&(Y.displayName=\"DisplayField\");const Z=({name:e})=>{const{getValues:t}=s();return t(e)||null};t&&(Z.displayName=\"FormValue\");const ee=[\"name\",\"label\",\"help\",\"variant\",\"hideLabel\",\"children\"],te=[\"id\",\"name\",\"label\",\"help\",\"isDisabled\",\"isInvalid\",\"isReadOnly\",\"isRequired\",\"rules\",\"variant\"],ae=[\"name\",\"rules\"],le=[\"ref\"],re=[\"name\",\"rules\"],ne=[\"ref\"],se=[\"type\"],ie=[\"type\"],oe=[\"label\",\"type\"],me={},ce=\"text\",de=t=>{const{name:a,label:l,help:r,variant:n,hideLabel:o,children:m}=t,c=W(t,ee),{formState:d}=s(),u=((e,t)=>i(t.errors,e))(a,d);/*#__PURE__*/return e.createElement(p,T({variant:n},c,{isInvalid:!!u}),l&&!o?/*#__PURE__*/e.createElement(f,{variant:n},l):null,/*#__PURE__*/e.createElement(g,null,m,!r||null!=u&&u.message?null:/*#__PURE__*/e.createElement(F,null,r),(null==u?void 0:u.message)&&/*#__PURE__*/e.createElement(N,null,null==u?void 0:u.message)))};t&&(de.displayName=\"BaseField\");const ue=b((t,a)=>{const{type:l=ce}=t,r=(e=>me[e]||me[ce])(l);/*#__PURE__*/return e.createElement(r,T({ref:a},t))}),pe=t=>b((a,l)=>{let{name:r,rules:n}=a,i=W(a,ae);const{control:m}=s();/*#__PURE__*/return e.createElement(o,{name:r,control:m,rules:n,render:a=>{let{field:{ref:r}}=a,n=W(a.field,le);/*#__PURE__*/return e.createElement(t,T({},n,i,{ref:x(l,r)}))}})}),fe=t=>b((a,l)=>{let{name:r,rules:n}=a,i=W(a,re);const{register:o}=s(),m=o(r,n),{ref:c}=m,d=W(m,ne);/*#__PURE__*/return e.createElement(t,T({},d,i,{ref:x(l,c)}))}),he=(t,a,l)=>{let r;r=null!=l&&l.isControlled?pe(a):fe(a);const n=((t,{displayName:a,hideLabel:l,BaseField:r})=>{const n=b((a,n)=>{const{id:s,name:i,label:o,help:m,isDisabled:c,isInvalid:d,isReadOnly:u,isRequired:p,rules:f,variant:h}=a,b=W(a,te),y=T({required:p},f);/*#__PURE__*/return e.createElement(r,{id:s,name:i,label:o,help:m,hideLabel:l,isDisabled:c,isInvalid:d,isReadOnly:u,isRequired:p,variant:h},/*#__PURE__*/e.createElement(t,T({ref:n,id:s,name:i,label:l?o:void 0,rules:y},b)))});return n.displayName=a,n})(r,{displayName:`${t.split(\"-\").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(\"\")}Field`,hideLabel:null==l?void 0:l.hideLabel,BaseField:(null==l?void 0:l.BaseField)||de});return me[t]=n,n},be=he(\"text\",b((t,a)=>{let{type:l=\"text\"}=t,r=W(t,se);/*#__PURE__*/return e.createElement(y,T({type:l},r,{ref:a}))})),ye=he(\"number\",L,{isControlled:!0}),Ee=he(\"password\",I),ve=he(\"textarea\",C),ge=he(\"switch\",b((t,a)=>{let l=W(t,ie);/*#__PURE__*/return e.createElement(E,T({},l,{ref:a}))}),{isControlled:!0}),Fe=he(\"select\",D,{isControlled:!0}),Ne=he(\"checkbox\",b((t,a)=>{let{label:l}=t,r=W(t,oe);/*#__PURE__*/return e.createElement(v,T({ref:a},r),l)}),{hideLabel:!0}),xe=he(\"radio\",w,{isControlled:!0}),Ce=he(\"pin\",A,{isControlled:!0}),ke=he(\"native-select\",O,{isControlled:!0}),Re=[\"items\"],Se=e=>e&&Object.entries(e).map(([e,t])=>T({},W(t,Re),{name:e})),Ve=e=>({getFields:()=>Se(e),getNestedFields:t=>{var l;const r=a(e,t);return r?\"object\"===(null==(l=r.items)?void 0:l.type)?Se(r.items.properties):\"object\"===r.type?Se(r.properties):[r.items]:[]}}),Le=[\"mode\",\"resolver\",\"reValidateMode\",\"shouldFocusError\",\"shouldUnregister\",\"shouldUseNativeValidation\",\"criteriaMode\",\"delayError\",\"schema\",\"defaultValues\",\"onSubmit\",\"onError\",\"formRef\",\"children\"],Ie=b((t,a)=>{const{mode:r=\"all\",resolver:n,reValidateMode:s,shouldFocusError:i,shouldUnregister:o,shouldUseNativeValidation:d,criteriaMode:u,delayError:p,schema:f,defaultValues:h,onSubmit:b,onError:y,formRef:E,children:v}=t,g=W(t,Le),F={mode:r,resolver:n,defaultValues:h,reValidateMode:s,shouldFocusError:i,shouldUnregister:o,shouldUseNativeValidation:d,criteriaMode:u,delayError:p};f&&!n&&(F.resolver=null==Ie.getResolver?void 0:Ie.getResolver(f));const N=m(F),{handleSubmit:x}=N;return e.useImperativeHandle(a,()=>N,[a,N]),/*#__PURE__*/e.createElement(c,N,/*#__PURE__*/e.createElement(k.form,T({ref:E,onSubmit:x(b,y)},g,{className:l(\"saas-form\",t.className)}),v))});Ie.getFieldResolver=Ve,t&&(Ie.displayName=\"Form\");const we=[\"children\"],Ae=({children:t})=>/*#__PURE__*/e.createElement(k.div,null,t);t&&(Ae.displayName=\"FormLayoutItem\");const De=t=>{var a,r,n;let{children:s}=t,i=W(t,we);const o=T({},null!=(a=null==(r=R().components)||null==(n=r.FormLayout)?void 0:n.defaultProps)?a:{spacing:4},i);/*#__PURE__*/return e.createElement(S,T({},o,{className:l(\"saas-form__layout\",i.className)}),e.Children.map(s,t=>e.isValidElement(t)?/*#__PURE__*/e.createElement(Ae,null,t):t))};t&&(De.displayName=\"FormLayout\");const Oe=(t,a)=>e.Children.map(a,a=>e.isValidElement(a)&&a.props.name?e.cloneElement(a,T({},a.props,{name:`${t}.${a.props.name}`})):a),[je,Be]=$({name:\"ArrayFieldContext\"}),[Ue,_e]=$({name:\"ArrayFieldRowContext\"}),Me=({name:e,defaultValue:t={},keyName:a,min:l,max:r})=>{const{control:n}=s();return T({},d({control:n,name:e,keyName:a}),{name:e,defaultValue:t,min:l,max:r})},Pe=({index:t})=>{const{clearErrors:a}=s(),{name:l,remove:r,fields:n}=Be();return e.useEffect(()=>{a(l)},[]),{index:t,isFirst:0===t,isLast:t===n.length-1,name:`${l}.${t}`,remove:e.useCallback(()=>{a(l),r(t)},[t])}},$e=()=>{const{isFirst:e,remove:t}=_e(),{min:a,fields:l}=Be();return{onClick:()=>t(),isDisabled:e&&!!(a&&l.length<=a)}},qe=()=>{const{append:e,defaultValue:t,max:a,fields:l}=Be();return{onClick:()=>e(t,{shouldFocus:!1}),isDisabled:!!(a&&l.length>=a)}},Ge=[\"children\",\"columns\",\"spacing\"],He=[\"children\"],ze=[\"name\",\"defaultValue\",\"keyName\",\"min\",\"max\",\"children\"],Je=({children:t,columns:a,spacing:l,index:r})=>/*#__PURE__*/e.createElement(Qe,{index:r},/*#__PURE__*/e.createElement(Ke,{columns:a,spacing:l},t),/*#__PURE__*/e.createElement(Te,null));t&&(Je.displayName=\"ArrayFieldRow\");const Ke=t=>{let{children:a,columns:l,spacing:r}=t,n=W(t,Ge);const{name:s}=_e();/*#__PURE__*/return e.createElement(De,T({flex:\"1\",columns:l,gridGap:r,mr:\"2\"},n),Oe(s,a))};t&&(Ke.displayName=\"ArrayFieldRowFields\");const Qe=({children:t,index:a})=>{const l=Pe({index:a});/*#__PURE__*/return e.createElement(Ue,{value:l},/*#__PURE__*/e.createElement(j.div,{__css:{display:\"flex\",flexDirection:\"row\",alignItems:\"flex-end\",width:\"100%\",mb:4}},t))};t&&(Qe.displayName=\"ArrayFieldRowContainer\");const Te=t=>/*#__PURE__*/e.createElement(M,T({icon:/*#__PURE__*/e.createElement(U,null),\"aria-label\":\"Remove row\"},$e(),t));t&&(Te.displayName=\"ArrayFieldRemoveButton\");const We=t=>/*#__PURE__*/e.createElement(M,T({icon:/*#__PURE__*/e.createElement(_,null),\"aria-label\":\"Add row\",float:\"right\"},qe(),t));t&&(We.displayName=\"ArrayFieldAddButton\");const Xe=e.forwardRef((t,a)=>{const{children:l}=t,r=W(t,He);/*#__PURE__*/return e.createElement(Ze,T({ref:a},r),/*#__PURE__*/e.createElement(Ye,null,t=>/*#__PURE__*/e.createElement(e.Fragment,null,t.map(({id:t},a)=>/*#__PURE__*/e.createElement(Je,{key:t,index:a},l)))),/*#__PURE__*/e.createElement(We,null))});t&&(Xe.displayName=\"ArrayField\");const Ye=({children:e})=>{const{fields:t}=Be();return e(t)};t&&(Ye.displayName=\"ArrayFieldRows\");const Ze=e.forwardRef((t,a)=>{let{name:l,defaultValue:r,keyName:n,min:s,max:i,children:o}=t,m=W(t,ze);const c=Me({name:l,defaultValue:r,keyName:n,min:s,max:i});return e.useImperativeHandle(a,()=>c,[a,c]),/*#__PURE__*/e.createElement(je,{value:c},/*#__PURE__*/e.createElement(de,T({name:l},m),o))});t&&(Ze.displayName=\"ArrayFieldContainer\");const et=[\"name\",\"label\",\"hideLabel\",\"children\",\"columns\",\"spacing\"],tt=t=>{const a=V(\"FormLegend\");/*#__PURE__*/return e.createElement(f,T({as:\"legend\",sx:a},t))},at=t=>{const{name:a,label:l,hideLabel:r,children:n,columns:s,spacing:i}=t,o=W(t,et);/*#__PURE__*/return e.createElement(p,T({name:a,as:\"fieldset\"},o),/*#__PURE__*/e.createElement(tt,{display:r?\"none\":\"block\"},l),/*#__PURE__*/e.createElement(De,{columns:s,gridGap:i},Oe(a,n)))};t&&(at.displayName=\"ObjectField\");const lt=[\"name\",\"type\"],rt=[\"schema\",\"fieldResolver\"],nt=[\"name\",\"type\",\"defaultValue\"],st=(t,a)=>{var l;return null==(l=t.getNestedFields(a))?void 0:l.map((t,a)=>{let{name:l,type:r}=t,n=W(t,lt);/*#__PURE__*/return e.createElement(ue,T({key:l||a,name:l,type:r},n))})},it=t=>{let{schema:a,fieldResolver:l}=t,r=W(t,rt);const n=e.useMemo(()=>l||Ie.getFieldResolver(a),[a,l]);/*#__PURE__*/return e.createElement(De,r,n.getFields().map(t=>{let{name:a,type:l}=t,r=W(t,nt);return\"array\"===l?/*#__PURE__*/e.createElement(Xe,T({key:a,name:a},r),st(n,a)):\"object\"===l?/*#__PURE__*/e.createElement(at,T({key:a,name:a},r),st(n,a)):/*#__PURE__*/e.createElement(ue,T({key:a,name:a,type:l},r))}))};t&&(it.displayName=\"Fields\");const ot=[\"children\",\"disableIfUntouched\",\"disableIfInvalid\"],mt=B((t,a)=>{const{children:l,disableIfUntouched:r,disableIfInvalid:n}=t,i=W(t,ot),{formState:o}=s();/*#__PURE__*/return e.createElement(P,T({type:\"submit\",isLoading:o.isSubmitting,isPrimary:!0,ref:a,isDisabled:r&&!o.isDirty||n&&!o.isValid},i),l)});mt.defaultProps={label:\"Submit\",disableIfUntouched:!1,disableIfInvalid:!1},t&&(mt.displayName=\"SubmitButton\");const ct=[\"schema\",\"submitLabel\",\"fieldResolver\",\"children\"],dt=b((t,a)=>{const{schema:l,submitLabel:r=\"Submit\",fieldResolver:n,children:s}=t,i=W(t,ct);/*#__PURE__*/return e.createElement(Ie,T({},i,{schema:l,ref:a}),/*#__PURE__*/e.createElement(De,null,/*#__PURE__*/e.createElement(it,{schema:l,fieldResolver:n}),r&&/*#__PURE__*/e.createElement(mt,{label:r}),s))});t&&(dt.displayName=\"AutoForm\");const ut=({children:e,name:t,defaultValue:a,isDisabled:l,isExact:r,condition:n=(e=>!!e)})=>n(u({name:t,defaultValue:a,disabled:l,exact:r}),s())?e:null;t&&(ut.displayName=\"DisplayIf\");const pt=[\"onChange\"],[ft,ht]=$({name:\"StepFormContext\",errorMessage:\"useStepFormContext: `context` is undefined. Seems you forgot to wrap step form components in `<StepForm />`\"});function bt(t){const a=W(t,pt),l=q(a),{activeStep:r,isLastStep:n,nextStep:s}=l,[i,o]=e.useState({}),m=e.useCallback(async e=>{if(n)return null==t.onSubmit?void 0:t.onSubmit(e).then(()=>{d(T({},i[r],{isCompleted:!0}))}).then(s);s()},[r,n]),c=e.useCallback(()=>{const e=i[r];return{onSubmit:m,schema:null==e?void 0:e.schema,resolver:null==e?void 0:e.resolver}},[i,m,r]),d=e.useCallback(e=>{o(t=>T({},t,{[e.name]:e}))},[i]);return T({getFormProps:c,updateStep:d,steps:i},l)}function yt(t){const{name:a,schema:l,resolver:r}=t,n=G({name:a}),{steps:s,updateStep:i}=ht();return e.useEffect(()=>{i({name:a,schema:l,resolver:r})},[a,l]),T({},n,s[a]||{name:a,schema:l})}const Et=[\"children\"],vt=[\"getFormProps\"],gt=[\"name\",\"schema\",\"resolver\",\"children\",\"className\"],Ft=[\"label\",\"submitLabel\"],Nt=e.forwardRef((t,a)=>{const{children:l}=t,n=W(t,Et),s=bt(t),{getFormProps:i}=s,o=W(s,vt),m=e.useMemo(()=>o,[o]);/*#__PURE__*/return e.createElement(H,{value:m},/*#__PURE__*/e.createElement(ft,{value:m},/*#__PURE__*/e.createElement(Ie,T({ref:a},n,i()),r(l,s))))}),xt=t=>{const{activeIndex:a,setIndex:l}=z(),{children:r}=t,n=e.Children.map(r,t=>{if(e.isValidElement(t)&&(null==t?void 0:t.type)===Ct){const{isCompleted:a}=yt(t.props);/*#__PURE__*/return e.createElement(J,{name:t.props.name,title:t.props.title,isCompleted:a},t.props.children)}return t}),s=e.useCallback(e=>{l(e)},[]);/*#__PURE__*/return e.createElement(K,{step:a,onChange:s},/*#__PURE__*/e.createElement(Q,T({mb:\"4\"},t),n))},Ct=t=>{const{name:a,schema:r,resolver:n,children:s,className:i}=t,o=W(t,gt),m=yt({name:a,schema:r,resolver:n}),{isActive:c}=m;return c?/*#__PURE__*/e.createElement(j.div,T({},o,{className:l(\"saas-form__step\",i)}),s):null};t&&(Ct.displayName=\"FormStep\");const kt=t=>{const{isFirstStep:a,isCompleted:r,prevStep:s}=z();/*#__PURE__*/return e.createElement(P,T({isDisabled:a||r,label:\"Back\"},t,{className:l(\"saas-form__prev-button\",t.className),onClick:n(t.onClick,s)}))};t&&(kt.displayName=\"PrevButton\");const Rt=t=>{const{label:a=\"Next\",submitLabel:r=\"Complete\"}=t,n=W(t,Ft),{isLastStep:s,isCompleted:i}=z();/*#__PURE__*/return e.createElement(mt,T({isDisabled:i,label:s||i?r:a},n,{className:l(\"saas-form__next-button\",t.className)}))};t&&(Rt.displayName=\"NextButton\");export{Xe as ArrayField,We as ArrayFieldAddButton,Ze as ArrayFieldContainer,je as ArrayFieldProvider,Te as ArrayFieldRemoveButton,Je as ArrayFieldRow,Qe as ArrayFieldRowContainer,Ke as ArrayFieldRowFields,Ue as ArrayFieldRowProvider,Ye as ArrayFieldRows,dt as AutoForm,de as BaseField,Ne as CheckboxField,Y as DisplayField,ut as DisplayIf,ue as Field,it as Fields,Ie as Form,De as FormLayout,tt as FormLegend,Ct as FormStep,xt as FormStepper,Z as FormValue,be as InputField,ke as NativeSelectField,Rt as NextButton,ye as NumberInputField,at as ObjectField,Ee as PasswordInputFIeld,Ce as PinField,kt as PrevButton,xe as RadioField,Fe as SelectField,Nt as StepForm,ft as StepFormProvider,mt as SubmitButton,ge as SwitchField,ve as TextareaField,Ve as objectFieldResolver,he as registerFieldType,Me as useArrayField,qe as useArrayFieldAddButton,Be as useArrayFieldContext,$e as useArrayFieldRemoveButton,Pe as useArrayFieldRow,_e as useArrayFieldRowContext,yt as useFormStep,bt as useStepForm,ht as useStepFormContext,pe as withControlledInput,fe as withUncontrolledInput};\n//# sourceMappingURL=index.modern.mjs.map\n","import { ajvResolver } from '@hookform/resolvers/ajv'\nimport { objectFieldResolver, FieldResolver } from '@saas-ui/forms'\n\nimport { JSONSchemaType } from 'ajv'\n\nconst jsonSchemaFieldResolver = (schema: JSONSchemaType<unknown>) => {\n return objectFieldResolver(schema.properties)\n}\n\ninterface JsonSchemaFormReturn {\n schema: JSONSchemaType<unknown>\n fieldResolver: FieldResolver\n resolver: ReturnType<typeof ajvResolver>\n}\n\nexport const jsonSchemaForm = (\n schema: JSONSchemaType<unknown>\n): JsonSchemaFormReturn => {\n return {\n schema,\n fieldResolver: jsonSchemaFieldResolver(schema),\n resolver: ajvResolver(schema),\n }\n}\n"],"names":["l","Symbol","for","n","p","q","r","t","u","v","w","x","y","z","iterator","B","isMounted","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","C","Object","assign","D","E","a","b","e","this","props","context","refs","updater","F","G","prototype","isReactComponent","setState","Error","forceUpdate","H","constructor","isPureReactComponent","I","Array","isArray","J","hasOwnProperty","K","current","L","key","ref","__self","__source","M","d","c","k","h","call","g","arguments","length","children","f","m","defaultProps","$$typeof","type","_owner","O","P","Q","replace","escape","toString","R","N","push","A","next","done","value","String","keys","join","S","T","_status","_result","then","default","U","V","transition","Children","map","forEach","apply","count","toArray","only","ReactCurrentDispatcher","ReactCurrentBatchConfig","ReactCurrentOwner","_currentValue","_currentValue2","_threadCount","Provider","Consumer","_defaultValue","_globalName","_context","bind","render","_payload","_init","compare","useCallback","useContext","useDeferredValue","useEffect","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useSyncExternalStore","useTransition","process","env","NODE_ENV","__REACT_DEVTOOLS_GLOBAL_HOOK__","registerInternalModuleStart","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","ReactCurrentActQueue","isBatchingLegacy","didScheduleLegacyUpdate","ReactDebugCurrentFrame","currentExtraStackFrame","setExtraStackFrame","stack","getCurrentStack","getStackAddendum","impl","ReactSharedInternals","warn","format","_len","args","_key","printWarning","error","_len2","_key2","level","concat","argsWithFormat","item","unshift","Function","console","didWarnStateUpdateForUnmountedComponent","warnNoop","publicInstance","callerName","_constructor","componentName","displayName","name","warningKey","ReactNoopUpdateQueue","callback","completeState","partialState","emptyObject","Component","freeze","deprecatedAPIs","replaceState","defineDeprecationWarning","methodName","info","defineProperty","get","fnName","ComponentDummy","PureComponent","pureComponentPrototype","isArrayImpl","testStringCoercion","checkKeyStringCoercion","willCoercionThrow","toStringTag","typeName","getContextName","getComponentNameFromType","tag","outerType","innerType","wrapperName","functionName","getWrappedName","outerName","payload","init","specialPropKeyWarningShown","specialPropRefWarningShown","didWarnAboutStringRefs","RESERVED_PROPS","hasValidRef","config","getter","getOwnPropertyDescriptor","isReactWarning","undefined","hasValidKey","defineKeyPropWarningGetter","warnAboutAccessingKey","configurable","defineRefPropWarningGetter","warnAboutAccessingRef","warnIfStringRefCannotBeAutoConverted","stateNode","ReactElement","self","source","owner","element","_store","enumerable","writable","createElement","propName","childrenLength","childArray","i","cloneElement","_self","_source","isValidElement","object","REACT_MODULE_REFERENCE","didWarnAboutMaps","userProvidedKeyEscapeRegex","escapeUserProvidedKey","text","getElementKey","index","escaperLookup","match","mapIntoArray","array","escapedPrefix","nameSoFar","oldElement","newKey","child","invokeCallback","_child","mappedChild","childKey","escapedChildKey","subtreeCount","nextNamePrefix","iteratorFn","iterableChildren","entries","step","ii","childrenString","mapChildren","func","result","lazyInitializer","thenable","ctor","moduleObject","resolved","rejected","pending","isValidElementType","getModuleId","resolveDispatcher","dispatcher","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledDepth","disabledLog","__reactDisabledLog","prefix","ReactCurrentDispatcher$1","describeBuiltInComponentFrame","ownerFn","trim","componentFrameCache","reentry","PossiblyWeakMap","WeakMap","Map","describeNativeComponentFrame","fn","construct","control","frame","previousDispatcher","previousPrepareStackTrace","prepareStackTrace","log","group","groupCollapsed","groupEnd","defineProperties","disableLogs","Fake","set","Reflect","sample","sampleLines","split","controlLines","s","_frame","includes","reenableLogs","syntheticFrame","describeUnknownElementTypeFrameInDEV","shouldConstruct","propTypesMisspellWarningShown","loggedTypeFailures","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement","setCurrentlyValidatingElement$1","getDeclarationErrorAddendum","getSourceInfoErrorAddendumForProps","elementProps","fileName","lineNumber","ownerHasKeyUseWarning","validateExplicitKey","parentType","validated","currentComponentErrorInfo","parentName","getCurrentComponentErrorInfo","childOwner","validateChildKeys","node","validatePropTypes","propTypes","typeSpecs","values","location","has","typeSpecName","error$1","err","ex","message","checkPropTypes","PropTypes","getDefaultProps","isReactClassApproved","validateFragmentProps","fragment","createElementWithValidation","validType","typeString","sourceInfo","didWarnAboutDeprecatedCreateFactory","didWarnAboutMessageChannel","enqueueTaskImpl","actScopeDepth","didWarnNoAwaitAct","popActScope","prevActScopeDepth","recursivelyFlushAsyncActWork","returnValue","resolve","reject","queue","flushActQueue","task","requireString","Math","random","slice","module","setImmediate","_err","MessageChannel","channel","port1","onmessage","port2","postMessage","enqueueTask","isFlushing","createElement$1","forEachFunc","forEachContext","exports","Fragment","Profiler","StrictMode","Suspense","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","newElement","createContext","defaultValue","hasWarnedAboutUsingNestedContextConsumers","hasWarnedAboutUsingConsumerProvider","hasWarnedAboutDisplayNameOnConsumer","_Provider","_currentRenderer","_currentRenderer2","createFactory","validatedFactory","createRef","refObject","seal","forwardRef","ownName","elementType","lazy","lazyType","newDefaultProps","newPropTypes","memo","startTransition","scope","options","prevTransition","currentTransition","_updatedFibers","Set","size","clear","unstable_act","prevIsBatchingLegacy","thenableResult","wasAwaited","Promise","_queue","deps","Context","realContext","useDebugValue","formatterFn","create","reducer","initialArg","initialValue","initialState","subscribe","getSnapshot","getServerSnapshot","version","registerInternalModuleStop","require$$0","require$$1","StyleSheet","_this","_insertTag","container","insertBefore","tags","insertionPoint","nextSibling","prepend","firstChild","before","isSpeedy","speedy","ctr","nonce","_proto","hydrate","nodes","insert","rule","document","setAttribute","appendChild","createTextNode","createStyleElement","isImportRule","charCodeAt","_alreadyInsertedOrderInsensitiveRule","sheet","styleSheets","ownerNode","sheetForTag","insertRule","cssRules","test","flush","parentNode","removeChild","MS","WEBKIT","abs","from","fromCharCode","pattern","replacement","indexof","search","indexOf","charat","substr","begin","end","strlen","sizeof","append","line","column","position","character","characters","root","parent","return","copy","prev","peek","caret","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","hash","serialize","output","stringify","memoize","cache","arg","identifierWithPointTracking","fixedElements","compat","isImplicitRule","parsed","toRules","getRules","parentRules","removeLabel","nullifyElement","incorrectImportAlarm","isPrependedWithRegularRules","defaultStylisPlugins","combine","exec","createCache","ssrStyles","querySelectorAll","getAttribute","head","stylisPlugins","_insert","inserted","nodesToHydrate","attrib","omnipresentPlugins","arr","unsafePseudoClasses","prevElement","isIgnoringComment","unsafePseudoClass","createUnsafeSelectorsAlarm","currentSheet","finalizingPlugins","serializer","collection","middleware","selector","serialized","shouldCache","styles","registered","_extends","target","hasSymbol","REACT_ASYNC_MODE_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_BLOCK_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_RESPONDER_TYPE","REACT_SCOPE_TYPE","typeOf","$$typeofType","ConcurrentMode","ContextConsumer","ContextProvider","Element","ForwardRef","Lazy","Memo","Portal","hasWarnedAboutDeprecatedIsAsyncMode","isConcurrentMode","AsyncMode","isAsyncMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","getRegisteredStyles","registeredStyles","classNames","rawClassName","className","registerStyles","isStringTag","insertStyles","unitlessKeys","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","ILLEGAL_ESCAPE_SEQUENCE_ERROR","hyphenateRegex","animationRegex","isCustomProperty","isProcessableValue","processStyleName","styleName","toLowerCase","processStyleValue","p1","p2","cursor","unitless","contentValuePattern","contentValues","oldProcessStyleValue","msPattern","hyphenPattern","hyphenatedCache","charAt","processed","str","_char","toUpperCase","handleInterpolation","mergedProps","interpolation","__emotion_styles","anim","obj","string","interpolated","_i","createStringFromObject","previousCursor","matched","replaced","fakeVarName","cached","sourceMapPattern","labelPattern","serializeStyles","stringMode","sourceMap","strings","raw","lastIndex","identifierName","len","hashString","EmotionCacheContext","HTMLElement","withEmotionCache","ThemeContext","React","useInsertionEffectMaybe","Insertion","_ref","Emotion","cssProp","css","WrappedComponent","labelFromStack","newProps","warnedAboutCssPropForGlobal","Global","sheetRef","rehydrating","querySelector","sheetRefCurrent","nextElementSibling","classnames","cls","toAdd","merge","serializedArr","ClassNames","hasRendered","content","cx","theme","ele","jest","globalContext","globalThis","window","globalKey","assignRef","isFunction","mergeRefs","_options$strict","strict","_options$errorMessage","errorMessage","React.createContext","React.useContext","captureStackTrace","getValidChildren","React.Children","filter","React.isValidElement","useSafeLayoutEffect","isBrowser","React.useLayoutEffect","React.useEffect","useCallbackRef","React.useRef","React.useCallback","useEventListener","event","handler","listener","_runIfFn","runIfFn","addEventListener","removeEventListener","_runIfFn2","useBoolean","_useState","setValue","callbacks","on","off","toggle","useControllableProp","prop","state","isControlled","useControllableState","valueProp","_props$shouldUpdate","shouldUpdate","onChangeProp","onChange","shouldUpdateProp","_React$useState","React.useState","updateValue","nextValue","idProp","id","React.useId","React.useMemo","Boolean","useUpdateEffect","effect","renderCycleRef","effectCycleRef","useUnmountEffect","useMergeRefs","every","isValidEvent","_ref$current","button","getOwnerDocument","contains","ColorModeContext","__DEV__","_spaceXTemplate","_spaceYTemplate","withoutImportant","isString","tokenToCSSVar","scale","valueStr","important","isImportant","valueWithoutImportant","transformed","isObject","__cssMap","varRef","createTransform","transform","compose","_transform","_value","toConfig","transformTemplate","filterTemplate","backdropFilterTemplate","backdropFilter","flexDirectionTemplate","space","divide","spaceXTemplate","marginInlineStart","marginInlineEnd","spaceYTemplate","marginTop","marginBottom","_setPrototypeOf","o","setPrototypeOf","__proto__","_inherits","subClass","superClass","TypeError","_wrapRegExp","re","groups","BabelRegExp","_super","RegExp","_groups","flags","buildGroups","reduce","substitution","_","directionMap","valueSet","globalSet","trimSpace","isCSSFunction","wrap","transformFunctions","ring","boxShadow","getRingTemplate","px","bgClip","color","backgroundClip","_analyzeCSSValue","num","parseFloat","unit","analyzeCSSValue","isNumber","fraction","float","direction","left","right","degree","isCssVar","endsWith","gradient","_regex$exec$groups","_regex$exec","_type","_values$split$map$fil","maybeDirection","stops","_values","stop","firstStop","_ref2","_color","_stop","_stopOrFunc","parseGradient","blur","brightness","contrast","dropShadow","grayscale","hueRotate","invert","saturate","sepia","bgImage","outline","isNoneOrZero","outlineOffset","flexDirection","borderWidths","borderStyles","colors","borders","radii","spaceT","degreeT","propT","sizes","sizesT","shadows","logical","rtl","ltr","background","backgroundColor","backgroundImage","backgroundSize","backgroundPosition","backgroundRepeat","backgroundAttachment","bgSize","bgPosition","bg","bgColor","bgPos","bgRepeat","bgAttachment","bgGradient","bgImg","border","borderWidth","borderStyle","borderColor","borderRadius","borderTop","borderBlockStart","borderTopLeftRadius","borderStartStartRadius","borderEndStartRadius","borderTopRightRadius","borderStartEndRadius","borderEndEndRadius","borderRight","borderInlineEnd","borderBottom","borderBlockEnd","borderBottomLeftRadius","borderBottomRightRadius","borderLeft","borderInlineStart","borderInlineStartRadius","borderInlineEndRadius","borderX","borderInline","borderY","borderBlock","borderTopWidth","borderBlockStartWidth","borderTopColor","borderBlockStartColor","borderTopStyle","borderBlockStartStyle","borderBottomWidth","borderBlockEndWidth","borderBottomColor","borderBlockEndColor","borderBottomStyle","borderBlockEndStyle","borderLeftWidth","borderInlineStartWidth","borderLeftColor","borderInlineStartColor","borderLeftStyle","borderInlineStartStyle","borderRightWidth","borderInlineEndWidth","borderRightColor","borderInlineEndColor","borderRightStyle","borderInlineEndStyle","borderTopRadius","borderBottomRadius","borderLeftRadius","borderRightRadius","rounded","roundedTop","roundedTopLeft","roundedTopRight","roundedTopStart","roundedTopEnd","roundedBottom","roundedBottomLeft","roundedBottomRight","roundedBottomStart","roundedBottomEnd","roundedLeft","roundedRight","roundedStart","roundedEnd","borderStart","borderEnd","borderTopStartRadius","borderTopEndRadius","borderBottomStartRadius","borderBottomEndRadius","borderStartRadius","borderEndRadius","borderStartWidth","borderEndWidth","borderStartColor","borderEndColor","borderStartStyle","borderEndStyle","textColor","fill","stroke","mixBlendMode","blendMode","backgroundBlendMode","bgBlendMode","shadow","backdropBlur","backdropBrightness","backdropContrast","backdropHueRotate","backdropInvert","backdropSaturate","flexbox","alignItems","alignContent","justifyItems","justifyContent","flexWrap","experimental_spaceX","static","experimental_spaceY","flexFlow","flexBasis","justifySelf","alignSelf","placeItems","placeContent","placeSelf","gap","rowGap","columnGap","flexDir","grid","gridGap","gridColumnGap","gridRowGap","gridAutoFlow","gridAutoColumns","gridAutoRows","gridTemplate","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","gridArea","interactivity","appearance","resize","userSelect","pointerEvents","outlineColor","layout","width","inlineSize","height","blockSize","boxSize","minWidth","minInlineSize","minHeight","minBlockSize","maxWidth","maxInlineSize","maxHeight","maxBlockSize","overflow","overflowX","overflowY","overscrollBehavior","overscrollBehaviorX","overscrollBehaviorY","display","verticalAlign","boxSizing","boxDecorationBreak","objectFit","objectPosition","visibility","isolation","minW","maxW","minH","maxH","overscroll","overscrollX","overscrollY","list","listStyleType","listStylePosition","listStylePos","listStyleImage","listStyleImg","srOnly","clip","margin","padding","whiteSpace","srFocusable","getWithPriority","memoizedGet","others","layerStyle","processResult","textStyle","pos","inset","insetX","insetInline","insetY","insetBlock","top","insetBlockStart","bottom","insetBlockEnd","insetInlineStart","insetInlineEnd","insetStart","insetEnd","ringColor","ringOffset","ringOffsetColor","ringInset","marginBlockStart","marginRight","marginBlockEnd","marginLeft","marginX","marginInline","marginY","marginBlock","paddingTop","paddingBlockStart","paddingRight","paddingBottom","paddingBlockEnd","paddingLeft","paddingInlineStart","paddingInlineEnd","paddingX","paddingInline","paddingY","paddingBlock","mt","mr","me","marginEnd","mb","ml","ms","marginStart","mx","my","pt","py","pb","pl","ps","paddingStart","pr","pe","paddingEnd","textDecoration","textDecorationColor","textDecor","textDecorationLine","textDecorationStyle","textDecorationThickness","textUnderlineOffset","textShadow","clipPath","transformOrigin","translateX","translateY","skewX","skewY","scaleX","scaleY","rotate","transitionDelay","animation","willChange","transitionDuration","transitionProperty","transitionTimingFunction","typography","fontFamily","fontSize","letterSpacing","textAlign","fontStyle","wordBreak","overflowWrap","textOverflow","textTransform","noOfLines","WebkitBoxOrient","scroll","scrollBehavior","scrollSnapAlign","scrollSnapStop","scrollSnapType","scrollMargin","scrollMarginTop","scrollMarginBottom","scrollMarginLeft","scrollMarginRight","scrollMarginX","scrollMarginY","scrollPadding","scrollPaddingTop","scrollPaddingBottom","scrollPaddingLeft","scrollPaddingRight","scrollPaddingX","scrollPaddingY","resolveReference","operand","toExpression","operator","operands","_add","_subtract","_len3","_key3","_multiply","_len4","_key4","_divide","_len5","_key5","_negate","Number","isNaN","startsWith","calc","add","_len6","_key6","subtract","_len7","_key7","multiply","_len8","_key8","_len9","_key9","negate","toGroup","toPeer","selectors","pseudoSelectors","_hover","_active","_focus","_highlighted","_focusWithin","_focusVisible","_disabled","_readOnly","_before","_after","_empty","_expanded","_checked","_grabbed","_pressed","_invalid","_valid","_loading","_selected","_hidden","_autofill","_even","_odd","_first","_last","_notFirst","_notLast","_visited","_activeLink","_activeStep","_indeterminate","_groupHover","_peerHover","_groupFocus","_peerFocus","_groupFocusVisible","_peerFocusVisible","_groupActive","_peerActive","_groupDisabled","_peerDisabled","_groupInvalid","_peerInvalid","_groupChecked","_peerChecked","_groupFocusWithin","_peerFocusWithin","_peerPlaceholderShown","_placeholder","_placeholderShown","_fullScreen","_selection","_rtl","_ltr","_mediaDark","_mediaReduceMotion","_dark","_light","pseudoPropNames","objectKeys","_arrayLikeToArray","arr2","_createForOfIteratorHelperLoose","allowArrayLike","it","minLen","_unsupportedIterableToArray","systemProps","mergeWith","layoutPropNames","propNames","styleProps","isStyleProp","isCSSVariableTokenValue","resolveTokenValue","_getVar2","getVar","val","_theme$__cssMap","_theme$__cssMap$val","getValue","_getVar","valueSplit","fallbackValue","hasElementType","hasMap","hasSet","hasArrayBuffer","ArrayBuffer","isView","equal","valueOf","reactFastCompare","reactPropsRegex","testOmitPropsOnStringTag","testOmitPropsOnComponent","getDefaultShouldForwardProp","composeShouldForwardProps","isReal","shouldForwardProp","optionsShouldForwardProp","__emotion_forwardProp","newStyled","createStyled","targetClassName","__emotion_real","baseTag","__emotion_base","label","defaultShouldForwardProp","shouldUseAs","Styled","FinalTag","as","classInterpolations","finalShouldForwardProp","withComponent","nextTag","nextOptions","useTheme","tagName","createStylesContext","omitThemingProps","omit","_objectWithoutPropertiesLoose","excluded","sourceKeys","allPropNames","validHTMLProps","_excluded$1","_excluded2","styled","component","baseStyle","styledOptions","styleObject","__css","sx","rest","objectFilter","finalBaseStyle","finalStyles","filterUndefined","computedCSS","_options$configs","configs","_options$pseudos","pseudos","stylesOrFn","nested","_styles","__breakpoints","_theme$__breakpoints","isResponsive","toArrayValue","medias","media","computedStyles","queries","expandResponsive","_config$transform","_config","_config2","_config3","_config4","_computedStyles$key","rawValue","configProperty","staticStyles","_step","_iterator","getCss","cssFn","toCSSObject","_styled","React.forwardRef","_excluded","useStyleConfigImpl","themeKey","_styleConfig$defaultP","styleConfigProp","styleConfig","_useChakra","useColorMode","colorMode","themeStyleConfig","stylesRef","getStyles","_config$baseStyle","variant","recipe","breakpointUtil","normalized","normalize","isSingle","isMultipart","parts","_loop","_config$prop","_config$parts","details","nextKey","getNextIndex","query","toMediaQueryString","_minW","part","_mergeWith","createResolver","isEqual","useStyleConfig","useMultiStyleConfig","chakra","Proxy","thisArg","argArray","visuallyHiddenStyle","VisuallyHidden","VisuallyHiddenInput","spin","insertable","keyframes","Spinner","_omitThemingProps","_omitThemingProps$lab","_omitThemingProps$thi","thickness","_omitThemingProps$spe","speed","_omitThemingProps$emp","emptyColor","_className","spinnerStyles","React.createElement","div","fallbackIcon","path","strokeLinecap","cy","viewBox","Icon","_props$color","_props$focusable","focusable","shared","_viewBox","svg","_path","Icon$1","extendStatics","__extends","__","__assign","__rest","getOwnPropertySymbols","propertyIsEnumerable","__read","ar","__spreadArray","to","pack","createDefinition","isEnabled","some","featureDefinitions","measureLayout","exit","drag","focus","hover","tap","pan","inView","warning","invariant","check","LazyContext","featureNames","numFeatures","MotionConfigContext","transformPagePoint","isStatic","reducedMotion","MotionContext","PresenceContext","useIsomorphicLayoutEffect","prefersReducedMotion","hasDetected","isRefObject","isVariantLabels","isVariantLabel","resolveVariantFromProps","definition","custom","currentValues","currentVelocity","_a","variants","resolveVariant","visualElement","getProps","forEachValue","getCurrent","velocity","getVelocity","checkIfControllingVariants","animate","start","initial","whileHover","whileDrag","whileTap","whileFocus","checkIfVariantNode","variantLabelsAsDependency","useConstant","getCurrentTime","performance","now","Date","onNextFrame","requestAnimationFrame","setTimeout","useDefaultElapsed","runNextFrame","isProcessing","delta","timestamp","stepsOrder","steps","acc","toRun","toRunNextFrame","numToRun","flushNextFrame","toKeepAlive","WeakSet","schedule","keepAlive","immediate","addToCurrentFrame","buffer","cancel","splice","delete","frameData","createRenderStep","sync","startLoop","cancelSync","flushSync","processStep","stepId","processFrame","max","min","getFrameData","clamp","calcAngularFreq","undampedFreq","dampingRatio","sqrt","durationKeys","physicsKeys","isSpringType","spring","restSpeed","restDelta","stiffness","damping","mass","duration","isResolvedFromDuration","springOptions","derived","bounce","envelope","derivative","maxDuration","exponentialDecay","exp","pow","initialGuess","approximateRoot","findSpring","getSpringOptions","resolveSpring","zero","resolveVelocity","createSpring","initialVelocity","initialDelta","undampedAngularFreq","angularFreq","sin","cos","dampedAngularFreq","freqForT","sinh","cosh","isBelowVelocityThreshold","isBelowDisplacementThreshold","flipTarget","needsInterpolation","_t","progress","toFromDifference","mix","sanitize","toFixed","floatRegex","colorRegex","singleColorRegex","number","alpha","createUnitType","degrees","percent","vh","vw","progressPercentage","isColorString","testProp","splitColor","aName","bName","cName","hsla","hue","saturation","lightness","alpha$1","round","clampRgbUnit","rgbUnit","rgba","red","green","blue","hex","parseInt","analyse","numColors","numbers","tokenised","createTransformer","numValues","convertNumbersToZero","complex","_b","_c","_d","getAnimatableNone","transformer","maxDefaults","applyDefaultFilter","functionRegex","functions","hueToRgb","hslaToRgba","mixLinearColor","fromExpo","colorTypes","getColorType","find","notAnimatable","mixColor","fromColorType","toColorType","fromColor","toColor","blended","isNum","combineFunctions","pipe","transformers","getMixer","origin","mixComplex","mixArray","blendValue","fromThis","mixObject","numNumbers","numRGB","numHSL","template","originStats","targetStats","mixNumber","interpolate","input","isClamp","ease","mixer","inputLength","reverse","mixers","customMixer","mixerFactory","detectMixerFactory","numMixers","easingFunction","createMixers","interpolator","fastInterpolate","lastInputIndex","mixerIndex","foundMixerIndex","progressInRange","slowInterpolate","reverseEasing","easing","mirrorEasing","createBackIn","power","linear","easeIn","easeOut","easeInOut","circIn","acos","circOut","circInOut","backIn","backOut","backInOut","anticipate","backEasing","createAnticipate","bounceOut","bounceIn","defaultEasing","times","convertOffsetToTimes","defaultOffset","createInterpolator","types","decay","timeConstant","modifyTarget","amplitude","ideal","loopElapsed","elapsed","delay","framesync","update","passTimestamp","autoplay","driver","repeat","repeatMax","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate","driverControls","latest","interpolateFromNumber","repeatCount","computedDuration","isComplete","isForwardPlayback","animator","detectAnimationFromOptions","hasRepeatDelayElapsed","reverseElapsed","velocityPerSecond","frameDuration","isPoint","point","isPoint3D","distance1D","distance","xDelta","yDelta","zDelta","a1","a2","calcBezier","getSlope","addUniqueItem","removeItem","SubscriptionManager","subscriptions","notify","numSubscriptions","getSize","MotionValue","timeDelta","lastUpdated","updateSubscribers","velocityUpdateSubscribers","renderSubscribers","canTrackVelocity","updateAndNotify","postRender","scheduleVelocityCheck","velocityCheck","hasAnimated","subscription","clearListeners","onRenderRequest","attach","passiveEffect","getPrevious","stopAnimation","clearAnimation","isAnimating","destroy","motionValue","isMotionValue","secondsToMilliseconds","seconds","easingLookup","bounceInOut","easingDefinitionToFunction","mX1","mY1","mX2","mY2","sampleValues","Float32Array","aX","intervalStart","currentSample","kSplineTableSize","guessForT","initialSlope","aGuessT","currentSlope","newtonRaphsonIterate","aA","aB","currentX","currentT","binarySubdivide","getTForX","cubicBezier","isAnimatable","isKeyframesTarget","underDampedSpring","criticallyDampedSpring","linearTween","defaultTransitions","rotateX","rotateY","rotateZ","int","numberValueTypes","radius","scaleZ","skew","translateZ","perspective","transformPerspective","originX","originY","originZ","numOctaves","defaultValueTypes","WebkitFilter","getDefaultValueType","defaultValueType","resolveFinalValueInKeyframes","legacyRepeatWarning","isZero","getZeroUnit","potentialUnitType","getValueTransition","startAnimation","delayTimer","controls","valueTransition","isTargetAnimatable","isOriginAnimatable","bounceStiffness","bounceDamping","currentAnimation","isOutOfBounds","boundaryNearest","startSpring","boundary","heading","checkBoundary","inertia","valueKey","transitionFactory","hydrateKeyframes","isTransitionDefined","yoyo","flip","loop","isEasingArray","convertTransitionToAnimationOptions","getPopmotionAnimationOptions","finalTarget","getAnimation","getDelayFromTransition","clearTimeout","numBorders","asNumber","isPx","getRadius","radiusName","easeCrossfadeIn","compress","easeCrossfadeOut","copyAxisInto","axis","originAxis","copyBoxInto","box","originBox","isIdentityScale","hasScale","hasTransform","hasTranslate","scalePoint","originPoint","applyPointDelta","translate","boxScale","applyAxisDelta","applyBoxDelta","translateAxis","transformAxis","transforms","scaleKey","originKey","xKeys","yKeys","transformBox","calcLength","isNear","maxDistance","calcAxisDelta","calcBoxDelta","calcRelativeAxis","relative","calcRelativeAxisPosition","calcRelativePosition","removePointDelta","removeAxisTransforms","sourceAxis","removeAxisDelta","removeBoxTransforms","sourceBox","isAxisDeltaZero","isDeltaZero","boxEquals","NodeStack","members","scheduleRender","remove","prevLead","lead","promote","relegate","indexOfNode","findIndex","member","isPresent","preserveFollowOpacity","show","instance","resumeFrom","preserveOpacity","snapshot","latestValues","animationValues","isShared","isUpdating","isLayoutDirty","crossfade","hide","exitAnimationComplete","_e","onExitComplete","resumingFrom","removeLeadSnapshot","scaleCorrectors","buildProjectionTransform","treeScale","latestTransform","yTranslate","eachAxis","transformAxes","transformProps","sortTransformProps","operationKey","axesKey","transformPropSet","isTransformProp","transformOriginProps","isTransformOriginProp","compareByDepth","depth","FlatTree","isDirty","sort","resolveMotionValue","unwrappedValue","toValue","isCustomValue","globalProjectionState","hasAnimatedSinceResize","hasEverUpdated","createProjectionNode","attachResizeListener","defaultParent","measureScroll","resetTransform","ProjectionNode","isTreeAnimating","isAnimationBlocked","updateManuallyBlocked","updateBlockedByResize","isSVG","needsReset","shouldResetTransform","eventHandlers","potentialNodes","checkUpdateFailed","clearAllSnapshots","updateProjection","resolveTargetDelta","calcProjection","hasProjected","isVisible","animationProgress","sharedNodes","registerPotentialNode","notifyListeners","subscriptionManager","hasListeners","mount","SVGElement","layoutId","getInstance","unblockTimeout_1","resizeUnblockUpdate_1","finishAnimation","registerSharedNode","_f","hasLayoutChanged","hasRelativeTargetChanged","newLayout","isTreeAnimationBlocked","relativeTarget","layoutTransition","getDefaultTransition","defaultLayoutTransition","_g","onLayoutAnimationStart","onLayoutAnimationComplete","targetChanged","targetLayout","hasOnlyRelativeTargetChanged","setAnimationOrigin","animationOptions","shouldReduceMotion","isLead","unmount","willUpdate","getStack","preRender","blockUpdate","unblockUpdate","isUpdateBlocked","startUpdate","resetRotation","shouldNotifyListeners","updateScroll","prevTransformTemplateValue","updateSnapshot","didUpdate","clearMeasurements","mountNodeEarly","resetTransformStyle","updateLayout","notifyLayoutUpdate","clearSnapshot","removeLeadSnapshots","scheduleUpdateProjection","scheduleCheckAfterUnmount","measured","measure","removeTransform","removeElementScroll","roundBox","alwaysMeasureLayout","prevLayout","actual","layoutCorrected","projectionDelta","notifyLayoutMeasure","layoutScroll","isResetRequested","hasProjection","transformTemplateValue","transformTemplateHasChanged","measureViewportBox","boxWithoutScroll","scroll_1","applyTransform","transformOnly","withTransforms","boxWithoutTransform","setTargetDelta","targetDelta","setOptions","relativeParent","getClosestProjectingParent","relativeTargetOrigin","targetWithTransforms","attemptToResolveRelativeTarget","pendingAnimation","getLead","treePath","isSharedTransition","treeLength","style","applyTreeDeltas","projectionDeltaWithTransform","prevTreeScaleX","prevTreeScaleY","prevProjectionTransform","projectionTransform","notifyAll","snapshotLatestValues","mixedValues","relativeLayout","isSharedLayoutAnimation","isOnlyMember","shouldCrossfadeOpacity","hasOpacityCrossfade","mixTargetDelta","mixAxisDelta","mixAxis","mixBox","follow","opacityExit","borderLabel","followRadius","leadRadius","mixValues","completeAnimation","applyTransformsToTarget","initialPromotionConfig","shouldPreserveFollowOpacity","getPrevLead","hasRotate","resetValues","getStaticValue","setStaticValue","syncRender","getProjectionStyles","styleProp","emptyStyles","valuesToRender","_h","applyTo","corrected","correct","resetTree","layout_1","measuredLayout","animationType","axisSnapshot","layoutDelta","visualDelta","parentSnapshot","parentLayout","relativeSnapshot","onBeforeLayoutMeasure","notifyBeforeLayoutMeasure","searchNode","roundAxis","LayoutGroupContext","SwitchLayoutGroupContext","VisualElementHandler","getSnapshotBeforeUpdate","updateProps","componentDidUpdate","setProps","React__default","createMotionProxy","createConfig","customMotionComponentConfig","preloadedFeatures","createVisualElement","projectionNodeConstructor","useRender","useVisualState","features","loadFeatures","externalRef","layoutGroupId","useLayoutId","inherit","getCurrentTreeVariants","useCreateMotionContext","projectionId","visualState","reducedMotionPreference","lazyContext","presenceContext","matchMedia","motionMediaQuery_1","setReducedMotionPreferences","matches","addListener","initPrefersReducedMotion","visualElementRef","renderer","presenceId","blockInitialAnimation","animationState","animateChanges","notifyUnmount","useVisualElement","ProjectionNodeConstructor","dragConstraints","projection","getLatestValues","useProjection","name_1","useFeatures","useMotionRef","createMotionComponent","componentCache","_target","lowercaseSVGElements","isSVGComponent","isForcedMotionValue","translateAlias","isCSSVariable","getValueAsType","buildHTMLStyles","vars","transformKeys","hasTransformOrigin","transformIsNone","valueType","valueAsType","transformIsDefault","enableHardwareAcceleration","allowTransformNone","transformString","transformHasZ","numTransformKeys","buildTransform","buildTransformOrigin","copyRawValuesOnly","useHTMLProps","htmlProps","useInitialMotionValues","transformValues","useStyle","dragListener","draggable","WebkitUserSelect","WebkitTouchCallout","touchAction","validMotionProps","isValidMotionProp","isValidProp","shouldForward","require","calcOrigin","dashKeys","camelKeys","buildSVGAttrs","attrX","attrY","pathLength","pathSpacing","pathOffset","attrs","dimensions","pxOriginX","pxOriginY","calcSVGTransformOrigin","spacing","useDashCase","buildSVGPath","createSvgRenderState","useSVGProps","visualProps","rawStyles","createUseRender","forwardMotionProps","filteredProps","isDom","filterProps","CAMEL_CASE_PATTERN","camelToDash","renderHTML","setProperty","camelCaseAttributes","renderSVG","renderState","_styleProp","scrapeMotionValuesFromProps","newValues","scrapeMotionValuesFromProps$1","isAnimationControls","makeState","createRenderState","onMount","makeLatestValues","makeUseVisualState","scrapeMotionValues","motionValues","isControllingVariants","isVariantNode","initialAnimationIsBlocked","variantToSet","transitionEnd","valueTarget","AnimationType","svgMotionConfig","getBBox","getBoundingClientRect","htmlMotionConfig","addDomEvent","eventName","passive","useDomEvent","isMouseEvent","PointerEvent","pointerType","MouseEvent","isTouchEvent","touches","defaultPagePoint","pageX","pageY","pointFromTouch","pointType","changedTouches","pointFromMouse","extractEventInfo","wrapHandler","shouldFilterPrimaryPointer","eventHandler","mouseEventNames","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","pointerenter","pointerleave","touchEventNames","getPointerEventName","onpointerdown","ontouchstart","onmousedown","addPointerEvent","usePointerEvent","createLock","lock","globalHorizontalLock","globalVerticalLock","getGlobalLock","openHorizontal_1","openVertical_1","isDragActive","openGestureLock","createHoverEvent","isActive","setActive","Hover","isNodeOrChild","parentElement","warned","warnOnce","condition","observerCallbacks","observers","fireObserverCallback","entry","fireAllObserverCallbacks","thresholdNames","all","useIntersectionObserver","shouldObserve","rootMargin","amount","once","threshold","rootInteresectionObserver","lookupRoot","rootObservers","JSON","IntersectionObserver","initIntersectionObserver","isIntersecting","isInView","hasEnteredView","InView","onViewportEnter","onViewportLeave","observe","unobserve","observeIntersection","useMissingIntersectionObserver","fallback","makeRenderlessComponent","hook","gestureAnimations","whileInView","viewport","onTap","onTapStart","onTapCancel","hasPressListeners","isPressing","cancelPointerEndListeners","eventOptions","onPointerDown","removePointerEndListener","checkPointerEnd","Tap","onPointerUp","onPointerCancel","Focus","onHoverStart","onHoverEnd","counter","incrementId","usePresence","register","shallowCompare","prevLength","isNumericalString","isZeroValueString","testValueType","dimensionValueTypes","findDimensionValueType","valueTypes","findValueType","setMotionValue","hasValue","addValue","getOriginFromTransition","animateVariant","transitionOverride","animateTarget","getChildAnimations","variantChildren","forwardDelay","delayChildren","staggerChildren","staggerDirection","animations","maxStaggerDuration","generateStaggerDuration","sortByTreeOrder","notifyAnimationComplete","animateChildren","when","last","first","makeTargetAnimatable","animationTypeState","getState","shouldBlockAnimation","setTarget","sortNodePosition","needsAnimating","shouldBlock","protectedKeys","variantPriorityOrder","Animate","Drag","Exit","reversePriorityOrder","numAnimationTypes","createTypeState","prevResolvedValues","notifyAnimationStart","resolvedDefinition","animateVisualElement","animateList","allAnimatedKeys","isInitialRender","buildResolvedTypeValues","changedActiveType","getVariantContext","removedKeys","encounteredKeys","removedVariantIndex","Infinity","_loop_1","typeState","propIsVariant","activeDelta","isInherited","manuallyAnimateOnMount","prevProp","variantDidChange","checkVariantsDidChange","shouldAnimateType","definitionList","resolvedValues","allKeys","markToAnimate","fallbackAnimation_1","fallbackTarget","getBaseTarget","shouldAnimate","isAnimated","setAnimateFunction","makeAnimator","createAnimationState","safeToRemove","PanSession","handlers","startEvent","lastMoveEvent","lastMoveEventInfo","updatePoint","getPanInfo","history","isPanStarted","isDistancePastThreshold","onStart","onMove","handlePointerMove","transformPoint","buttons","handlePointerUp","onEnd","onSessionEnd","panInfo","initialInfo","onSessionStart","removeListeners","updateHandlers","subtractPoint","lastDevicePoint","startDevicePoint","timestampedPoint","lastPoint","time","calcRelativeAxisConstraints","calcViewportAxisConstraints","layoutAxis","constraintsAxis","resolveAxisElastic","dragElastic","minLabel","maxLabel","resolvePointElastic","convertBoundingBoxToBox","topLeft","bottomRight","transformBoxPoints","elementDragControls","VisualElementDragControls","openGlobalLock","isDragging","currentDirection","constraints","hasMutatedConstraints","elastic","originEvent","snapToCursor","panSession","onDragStart","dragPropagation","resolveConstraints","getAxisMotionValue","measuredAxis","onDirectionLock","onDrag","dragDirectionLock","lockThreshold","getCurrentDirection","updateAxis","getTransformPagePoint","onDragEnd","_point","shouldDrag","axisValue","applyConstraints","prevConstraints","resolveRefConstraints","layoutBox","calcRelativeConstraints","resolveDragElastic","relativeConstraints","rebaseAxisConstraints","onMeasureDragConstraints","constraintsElement","constraintsBox","rootProjectionNode","viewportBox","measurePageBox","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","dragMomentum","dragTransition","dragSnapToOrigin","onDragTransitionEnd","momentumAnimations","startAxisValueAnimation","dragKey","scalePositionWithinConstraints","boxProgress","sourceLength","targetLength","addListeners","stopPointerListener","measureDragConstraints","stopMeasureLayoutListener","stopResizeListener","onPan","onPanStart","onPanEnd","onPanSessionStart","hasPanEvents","groupDragControls","dragControls","names","treeType","build","renderInstance","readValueFromInstance","removeValueFromRenderState","removeFromVariantTree","lifecycles","managers","propSubscriptions","clearAllListeners","manager","updatePropListeners","propListener","createLifecycles","valueSubscriptions","prevMotionValues","baseTarget","triggerBuild","notifyUpdate","bindToMotionValue","removeOnChange","latestValue","removeOnRenderRequest","initialMotionValues","newInstance","addVariantChild","closestVariantNode","getClosestVariantNode","other","getLayoutId","setVisibility","canMutate","removeValue","readValue","setBaseTarget","prevValue","existingValue","updateMotionValuesFromProps","getVariant","startAtParent","context_1","numVariantProps","variantProps","cssVariableRegex","getVariableValue","parseCSSVariable","getComputedStyle","getPropertyValue","BoundingBoxDimension","positionalKeys","isPositionalKey","setAndResetVelocity","isNumOrPxType","getPosFromMatrix","matrix","getTranslateFromMatrix","pos2","pos3","_bbox","matrix3d","nonTranslationalTransformKeys","positionalValues","htmlConfig","domElement","defaultType","computedStyle","compareDocumentPosition","restoreTransform","mutableState","getOrigin","newValueKeys","numNewValues","targetValue","checkTargetForNewValues","resolveCSSVariables","hasPositionalKey","targetPositionalKeys","removedTransformValues","hasAttemptedToRemoveTransformValues","changedValueTypeKeys","toType","fromType","numKeyframes","fromIndex","removedTransforms","removeNonTranslationalTransform","scrollY_1","pageYOffset","convertedTarget","changedKeys","originBbox","elementComputedStyle","targetBbox","convertChangedValueTypes","scrollTo","checkAndConvertChangedValueTypes","unitConversion","parseDomVariant","htmlVisualElement","svgVisualElement","_element","createDomVisualElement","pixelsToPercent","pixels","correctBorderRadius","correctBoxShadow","original","containsCSSVariables","cssVariables","xScale","yScale","averageScale","i_1","cssVariable","MeasureLayoutWithContext","componentDidMount","layoutGroup","switchLayoutGroup","defaultScaleCorrectors","prevProps","layoutDependency","componentWillUnmount","promoteContext","deregister","layoutFeatures","DocumentProjectionNode","documentElement","scrollLeft","body","scrollTop","HTMLProjectionNode","documentNode","featureBundle","motion","baseConfig","createDomMotionConfig","useIsMounted","PresenceChild","presenceAffectsLayout","presenceChildren","newChildrenMap","childId","e_1","__values","e_1_1","getChildKey","AnimatePresence","exitBeforeEnter","forcedRenderCount","setForcedRenderCount","forceRender","useForceUpdate","forceRenderLayoutGroup","filteredChildren","filtered","onlyElements","childrenToRender","exiting","presentChildren","allChildren","updateChildLookup","React.Fragment","presentKeys","targetKeys","numPresent","insertionIndex","removeIndex","presentChild","TransitionEasings","TransitionVariants","enter","slideTransition","_options$direction","TransitionDefaults","withDelay","_excluded$4","variants$4","_transition$exit","startingHeight","animateOpacity","_transition$enter","endingHeight","Collapse","isOpen","unmountOnExit","_props$animateOpacity","_props$startingHeight","_props$endingHeight","mounted","setMounted","timeout","hasStartingHeight","_excluded$3","variants$3","_temp","_temp2","fadeConfig","Fade","_excluded$2","variants$2","initialScale","scaleFadeConfig","ScaleFade","_props$reverse","_props$initialScale","defaultTransition","variants$1","Slide","_props$direction","transitionStyles","offsetX","offsetY","_ref3","_transition$exit2","slideFadeConfig","SlideFade","_props$offsetX","_props$offsetY","sortNodes","Node","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","DOCUMENT_POSITION_DISCONNECTED","DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC","getPrevIndex","DescendantsManager","descendants","nodeOrOptions","el","nodeType","ELEMENT_NODE","registerNode","unregister","sorted","assignIndex","descendant","dataset","enabledCount","enabledValues","disabled","enabledItem","firstEnabled","lastEnabled","_this$descendants$get","_this$descendants$get2","enabledIndexOf","isSameNode","nextEnabled","nextEnabledIndex","prevEnabled","prevEnabledIndex","_createContext","DescendantsContextProvider","useDescendantsContext","createDescendantContext","setIndex","dataIndex","refCallback","enabledIndex","useDescendant","ButtonGroupProvider","useButtonGroup","colorScheme","_props$spacing","isAttached","isDisabled","groupStyles","role","ButtonSpinner","placement","_props$children","marginProp","_extends2","ButtonIcon","_children","React.cloneElement","span","Button","isButton","setIsButton","_omitThemingProps$isD","isLoading","leftIcon","rightIcon","loadingText","_omitThemingProps$ico","iconSpacing","spinner","_omitThemingProps$spi","spinnerPlacement","buttonStyles","_styles$_focus","_useButtonType","contentProps","dataAttr","ButtonContent","IconButton","icon","isRound","ariaLabel","_excluded2$1","_createStylesContext$1","StylesProvider$1","useStyles$1","useFormControlStyles","FormControlProvider","useFormControlContext","FormControl","_useFormControlProvid","isRequired","isInvalid","isReadOnly","uuid","labelId","feedbackId","helpTextId","hasFeedbackText","setHasFeedbackText","_React$useState2","hasHelpText","setHasHelpText","_useBoolean","isFocused","setFocus","getHelpTextProps","forwardedRef","getLabelProps","_props$id","_props$htmlFor","htmlFor","getErrorMessageProps","getRootProps","getRequiredIndicatorProps","onFocus","onBlur","useFormControlProvider","FormHelperText","field","helperText","useFormControl","_useFormControlProps","useFormControlProps","readOnly","required","ariaAttr","labelIds","callAllHandlers","_createStylesContext","StylesProvider","useStyles","FormErrorMessage","ownProps","FormLabel","passedProps","_field$getLabelProps","_props$requiredIndica","requiredIndicator","RequiredIndicator","_props$optionalIndica","optionalIndicator","hasSetup","modality","hasEventBeforeFocus","isMac","navigator","platform","trigger","modality2","onKeyboardEvent","metaKey","altKey","ctrlKey","isValidKey","onPointerEvent","onWindowFocus","onWindowBlur","isFocusVisible","trackFocusVisible","setupGlobalFocusEvents","useCheckboxGroupContext","MotionSvg","__motion","CheckIcon","unchecked","checked","IndeterminateIcon","x1","x2","y1","y2","CheckboxTransition","open","CheckboxIcon","isIndeterminate","isChecked","useCheckbox","formControlProps","ariaDescribedBy","defaultChecked","checkedProp","isFocusable","_props$tabIndex","tabIndex","ariaLabelledBy","ariaInvalid","onBlurProp","onFocusProp","setIsFocusVisible","setFocused","_useBoolean2","isHovered","setHovered","_useBoolean3","inputRef","_useState2","rootIsLabelElement","setRootIsLabelElement","_useState3","setCheckedState","_useControllableProp","handleChange","preventDefault","indeterminate","form","onreset","trulyDisabled","onKeyDown","onKeyUp","getCheckboxProps","onMouseDown","onMouseUp","onMouseEnter","onMouseLeave","onClick","_inputRef$current","click","nextTick","getInputProps","stopEvent","onTouchStart","stopPropagation","CheckboxControl","Label","Checkbox","_ownProps$spacing","iconColor","iconSize","_ownProps$icon","isCheckedProp","_ownProps$isDisabled","inputProps","callAll","_useCheckbox","iconStyles","clonedIcon","useCounter","precisionProp","precision","_props$step","stepProp","_props$min","minSafeInteger","_props$max","maxSafeInteger","_props$keepWithinRang","keepWithinRange","_cast","cast","decimalPlaces","getDecimalPlaces","clampValue","toPrecision","increment","decrement","reset","_cast2","castValue","_cast3","valueAsNumber","isOutOfRange","isAtMax","isAtMin","countDecimalPlaces","parsedValue","Input","htmlSize","useInputGroupStyles","InputGroup","validChildren","_input$height","_input$height2","clones","_child$props","_child$props2","theming","placements","StyledAddon","InputAddon","_placements$placement","_props$placement","placementStyles","addon","InputLeftAddon","InputRightAddon","_excluded3","StyledElement","InputElement","elementStyles","InputLeftElement","InputRightElement","_excluded$h","AspectRatio","_props$ratio","ratio","mapResponsive","_excluded$g","_excluded$f","_excluded2$5","Box","Square","_props$centerContent","centerContent","Center","_excluded$d","code","_excluded$c","_excluded$b","_excluded2$4","_useStyleConfig","_omitThemingProps$ori","orientation","hr","vertical","horizontal","_excluded$a","Flex","align","justify","basis","grow","shrink","_excluded$9","Grid","templateAreas","row","autoFlow","autoRows","templateRows","autoColumns","templateColumns","_excluded$8","h2","_excluded$7","kbd","_excluded$6","isExternal","rel","_excluded$5","_excluded2$2","List","_omitThemingProps$sty","styleType","stylePosition","spacingStyle","ul","li","SimpleGrid","spacingX","spacingY","minChildWidth","isNull","toPx","Spacer","StackItem","Stack","isInline","directionProp","divider","shouldWrapChildren","directionStyles","getStackStyles","dividerStyle","dividerStyles","getDividerStyles","hasDivider","shouldUseChildren","isLast","HStack","aliasedProps","decoration","casing","Wrap","_spacingX$spacingY","_spacingX$spacingY$sp","_spacingX$spacingY$sp2","WrapItem","isContentEditable","basePlacements","variationPlacements","modifierPhases","getNodeName","nodeName","getWindow","ownerDocument","defaultView","isHTMLElement","isShadowRoot","ShadowRoot","getBasePlacement","includeScale","rect","offsetHeight","offsetWidth","getLayoutRect","clientRect","offsetLeft","offsetTop","rootNode","getRootNode","host","isTableElement","getDocumentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getOffsetParent","isFirefox","userAgent","currentNode","contain","getContainingBlock","getMainAxisFromPlacement","within","mathMax","mathMin","mergePaddingObject","paddingObject","expandToHashMap","hashMap","getVariation","unsetSides","mapToStyles","_Object$assign2","popper","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","hasX","hasY","sideX","sideY","win","heightProp","widthProp","visualViewport","_Object$assign","commonStyles","_ref4","dpr","devicePixelRatio","roundOffsetsByDPR","eventListeners","enabled","phase","_options$scroll","_options$resize","elements","scrollParents","scrollParent","data","getOppositePlacement","getOppositeVariationPlacement","getWindowScroll","pageXOffset","getWindowScrollBarX","isScrollParent","_getComputedStyle","getScrollParent","listScrollParents","_element$ownerDocumen","isBody","updatedList","rectToClientRect","getClientRectFromMixedType","clippingParent","html","clientWidth","clientHeight","getViewportRect","clientTop","clientLeft","getInnerBoundingClientRect","winScroll","scrollWidth","scrollHeight","getDocumentRect","computeOffsets","basePlacement","commonX","commonY","mainAxis","detectOverflow","_options$placement","_options$boundary","_options$rootBoundary","rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","rects","clippingClientRect","mainClippingParents","clippingParents","clipperElement","getClippingParents","clippingRect","accRect","getClippingRect","contextElement","referenceClientRect","popperOffsets","strategy","popperClientRect","elementClientRect","overflowOffsets","offsetData","modifiersData","computeAutoPlacement","flipVariations","_options$allowedAutoP","allowedAutoPlacements","allPlacements","allowedPlacements","overflows","flip$1","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","preferredPlacement","oppositePlacement","getExpandedFallbackPlacements","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","fittingPlacement","requiresIfExists","getSideOffsets","preventedOffsets","isAnySideFullyClipped","side","offset$1","requires","_options$offset","invertDistance","skidding","distanceAndSkiddingToXY","_data$state$placement","preventOverflow$1","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","maxLen","arrowElement","arrow","arrowRect","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","arrowOffsetParent","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_offset","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","withinMaxClamp","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","isElementScaled","getNodeScroll","modifiers","visited","modifier","dep","depModifier","INVALID_MODIFIER_ERROR","VALID_PROPERTIES","INVALID_ELEMENT_ERROR","DEFAULT_OPTIONS","areValidElements","popperGenerator","generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","orderedModifiers","attributes","effectCleanupFns","isDestroyed","setOptionsAction","cleanupModifierEffects","identifiers","orderModifiers","merged","existing","mergeByName","requirement","mod","validateModifiers","_ref3$options","cleanupFn","_state$elements","__debug_loops__","_state$orderedModifie","_state$orderedModifie2","onFirstUpdate","createPopper","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","removeAttribute","initialStyles","attribute","preventOverflow","_state$modifiersData$","toPaddingObject","minProp","maxProp","endDiff","startDiff","clientSize","center","centerOffset","_options$element","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","toVar","var","cssVars","arrowShadowColor","arrowSize","arrowSizeHalf","arrowBg","arrowOffset","defaultEventListeners","matchWidth","setTransformOrigin","positionArrow","setArrowStyles","overrides","getArrowStyle$1","_vars","innerArrow","_ref6","setInnerArrowStyles","_ref7","inner","logicals","opposites","getArrowStyle","shadowColor","_excluded3$1","_excluded4$1","_createDescendantCont","MenuDescendantsProvider","useMenuDescendantsContext","useMenuDescendants","useMenuDescendant","MenuProvider","useMenuContext","isTargetMenuItem","_target$getAttribute","useMenuItem","onMouseEnterProp","onMouseMoveProp","onMouseMove","onMouseLeaveProp","onClickProp","closeOnSelect","typeProp","menu","setFocusedIndex","focusedIndex","menuCloseOnSelect","onClose","menuRef","menuId","_useMenuDescendant","isActiveElement","currentTarget","selectTextIfInput","preventScroll","clickableProps","htmlRef","_props$clickOnEnter","clickOnEnter","_props$clickOnSpace","clickOnSpace","tabIndexProp","onMouseOver","isPressed","setIsPressed","listeners","currentListeners","useEventListeners","handleClick","onDocumentKeyUp","handleKeyDown","defaultPrevented","nativeEvent","shouldClickOnEnter","handleKeyUp","onDocumentMouseUp","handleMouseDown","isRightClick","handleMouseUp","handleMouseOver","handleMouseLeave","useClickable","_excluded4","_excluded5","_excluded6","_excluded7","_excluded8","_excluded9","Menu","_useMenu","_props$closeOnSelect","_props$closeOnBlur","closeOnBlur","_props$autoSelect","autoSelect","isOpenProp","defaultIsOpen","onCloseProp","onOpenProp","onOpen","_props$lazyBehavior","lazyBehavior","_props$computePositio","computePositionOnMount","popperProps","buttonRef","focusMenu","focusFirstItem","timeoutIds","focusLastItem","_useDisclosure","onOpenPropCallbackRef","onClosePropCallbackRef","setIsOpen","onToggle","getButtonProps","getDisclosureProps","hidden","useDisclosure","_props$enabled","savedHandler","isPointerDown","ignoreEmulatedMouseEvents","onTouchEnd","doc","useOutsideClick","_buttonRef$current","containerRef","focusRef","shouldFocus","placementProp","_props$strategy","_props$arrowPadding","arrowPadding","_props$eventListeners","_props$gutter","gutter","_props$flip","_props$boundary","_props$preventOverflo","matchWidth$1","dir","_placement","_placement2","getPopperPlacement","cleanup","setupPopper","_instance$current","referenceRef","getReferenceProps","popperRef","getPopperProps","getArrowProps","getArrowInnerProps","_instance$current2","_instance$current3","usePopper","activeElement","getActiveElement","isTabbable","preventReturnFocus","visible","setOnce","present","evt","getOwnerWindow","CustomEvent","bubbles","dispatchEvent","useAnimationState","_useIds","prefixes","useIds","buttonId","openAndFocusMenu","openAndFocusFirstItem","openAndFocusLastItem","refocus","_menuRef$current","_descendants$item","hasFocusWithin","onTransitionEnd","unstable__animationState","useMenu","ctx","StyledMenuButton","MenuButton","As","buttonProps","eventKey","normalizeEventKey","action","Enter","ArrowDown","ArrowUp","useMenuButton","motionVariants","easings","MenuTransition","MenuList","_props$zIndex","_styles$list","rootProps","_useMenuContext","animated","createTypeaheadHandler","_props$timeout","_props$preventDefault","setKeys","timeoutRef","keysCopy","pop","isPrintableCharacter","_keysCopy","useShortcut","keyMap","Tab","Escape","onTypeahead","nextItem","getNextItemFromSearch","_item$node$textConten","_item$node","textContent","hasBeenOpened","shouldRenderChildren","determineLazyBehavior","hasBeenSelected","isSelected","useMenuList","positionerProps","useMenuPositioner","onAnimationComplete","StyledMenuItem","btnType","_props$iconSpacing","command","_props$commandSpacing","commandSpacing","menuitemProps","MenuIcon","MenuCommand","MenuItemOption","_props$iconSpacing2","optionProps","_props3$type","useMenuOption","MenuOptionGroup","title","_props4$type","_useControllableState","selectedValue","addItem","useMenuOptionGroup","MenuGroup","groupTitle","clone","TriangleDownIcon","TriangleUpIcon","useAttributeObserver","obs","MutationObserver","changes","change","attributeName","attributeFilter","disconnect","FLOATING_POINT_REGEX","isFloatingPointNumericCharacter","NumberInputProvider","useNumberInputContext","NumberInput","_useNumberInput","_props$focusInputOnCh","focusInputOnChange","_props$clampValueOnBl","clampValueOnBlur","_props$pattern","_props$inputMode","inputMode","allowMouseWheel","ariaDescBy","onInvalidProp","onInvalid","getAriaValueTextProp","getAriaValueText","isValidCharacterProp","isValidCharacter","formatValue","parseValue","updateFn","incrementFn","decrementFn","isInteractive","inputSelectionRef","incrementButtonRef","decrementButtonRef","_parseValue","_formatValue","parsedInput","isSpinning","setIsSpinning","setAction","runOnce","setRunOnce","removeTimeout","intervalId","setInterval","clearInterval","up","down","useSpinner","isComposing","selectionStart","selectionEnd","_onFocus","_inputSelectionRef$cu","_event$currentTarget$","_inputSelectionRef$cu2","isValid","isValidNumericKeyboardEvent","stepFactor","getStepFactor","Home","End","shiftKey","ariaValueText","validateAndClamp","onInputBlur","focusInput","spinUp","spinDown","sign","deltaY","getIncrementButtonProps","onPointerLeave","getDecrementButtonProps","_props$readOnly","_props$readOnly2","_props$required","_props$required2","autoComplete","autoCorrect","useNumberInput","NumberInputStepper","stepperGroup","NumberInputField","StyledStepper","NumberDecrementStepper","stepper","NumberIncrementStepper","_props$children2","PinInputDescendantsProvider","usePinInputDescendants","usePinInputDescendant","PinInputProvider","usePinInputContext","validate","PinInput","_usePinInput","autoFocus","_onChange","_props$placeholder","placeholder","_props$manageFocus","manageFocus","_props$otp","otp","_props$type","mask","moveFocus","setMoveFocus","setValues","focusNext","nextValues","inputValue","getNextValue","eventValue","hasFocus","_nextValue","prevInput","usePinInput","PinInputField","_usePinInputDescendan","usePinInputField","RadioGroupProvider","useRadioGroupContext","RadioGroup","_useRadioGroup","nameProp","isNative","firstEnabledAndCheckedInput","firstEnabledInput","fallbackName","eventOrValue","isInputEvent","getRadioProps","useRadioGroup","groupProps","Radio","_props$name","_ownProps$isFocusable","htmlInputProps","_useRadio","isDisabledProp","isReadOnlyProp","isRequiredProp","isInvalidProp","dataRadioGroup","formControl","setHovering","setChecked","useRadio","_split","layoutProps","checkboxProps","labelProps","rootStyles","checkboxStyles","labelStyles","SelectField","select","Select","fieldStyles","SelectIcon","DefaultIcon","IconWrapper","Switch","_omitThemingProps$spa","containerStyles","trackStyles","track","thumb","omitted","Textarea","rows","textareaProps","textareaStyles","textarea","hideStepper","incrementIcon","decrementIcon","ChakraNumberInput","createIcon","_options$viewBox","pathDefinition","_options$defaultProps","Comp","strokeLinejoin","AddIcon","fillRule","ViewIcon","ViewOffIcon","ChevronDownIcon","rx","ry","stopColor","MinusIcon","isPrimary","isSecondary","ChakraButton","InputRightButton","viewIcon","viewOffIcon","setShow","PasswordInput","RadioInput","radioProps","pinLength","inputs","ChakraPinInput","SelectButton","multiple","menuListProps","renderValue","menuProps","currentValue","setCurrentValue","controlProps","getDisplayValue","option","displayValue","StepperProvider","useStepperContext","activeIndex","stepsRef","registerStep","newSteps","setStep","activeStep","isFirstStep","isLastStep","isCompleted","nextStep","prevStep","unregisterStep","DisplayField","ee","te","ae","le","ne","se","ie","oe","jsonSchemaFieldResolver","schema","objectFieldResolver","properties","jsonSchemaForm","fieldResolver","resolver","ajvResolver"],"mappings":"oyCASa,IAAIA,GAAEC,OAAOC,IAAI,iBAAiBC,GAAEF,OAAOC,IAAI,gBAAgBE,GAAEH,OAAOC,IAAI,kBAAkBG,GAAEJ,OAAOC,IAAI,qBAAqBI,GAAEL,OAAOC,IAAI,kBAAkBK,GAAEN,OAAOC,IAAI,kBAAkBM,GAAEP,OAAOC,IAA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