sanity-plugin-sgntech-interview 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../node_modules/@sanity/color/dist/index.js","../../node_modules/@sanity/ui/dist/_chunks/getScopedTheme.js","../../node_modules/react-compiler-runtime/dist/index.js","../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.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/stylis/src/Middleware.js","../../node_modules/styled-components/dist/styled-components.esm.js","../../node_modules/react-is/cjs/react-is.production.js","../../node_modules/react-is/cjs/react-is.development.js","../../node_modules/react-is/index.js","../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../../node_modules/react-dom/cjs/react-dom.production.js","../../node_modules/react-dom/cjs/react-dom.development.js","../../node_modules/react-dom/index.js","../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","../../node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs","../../node_modules/framer-motion/dist/es/utils/use-constant.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/context/PresenceContext.mjs","../../node_modules/motion-utils/dist/es/array.mjs","../../node_modules/motion-utils/dist/es/clamp.mjs","../../node_modules/motion-utils/dist/es/format-error-message.mjs","../../node_modules/motion-utils/dist/es/errors.mjs","../../node_modules/motion-utils/dist/es/global-config.mjs","../../node_modules/motion-utils/dist/es/is-numerical-string.mjs","../../node_modules/motion-utils/dist/es/is-object.mjs","../../node_modules/motion-utils/dist/es/is-zero-value-string.mjs","../../node_modules/motion-utils/dist/es/memo.mjs","../../node_modules/motion-utils/dist/es/noop.mjs","../../node_modules/motion-utils/dist/es/pipe.mjs","../../node_modules/motion-utils/dist/es/progress.mjs","../../node_modules/motion-utils/dist/es/subscription-manager.mjs","../../node_modules/motion-utils/dist/es/time-conversion.mjs","../../node_modules/motion-utils/dist/es/velocity-per-second.mjs","../../node_modules/motion-utils/dist/es/warn-once.mjs","../../node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs","../../node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs","../../node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs","../../node_modules/motion-utils/dist/es/easing/back.mjs","../../node_modules/motion-utils/dist/es/easing/anticipate.mjs","../../node_modules/motion-utils/dist/es/easing/circ.mjs","../../node_modules/motion-utils/dist/es/easing/ease.mjs","../../node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs","../../node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs","../../node_modules/motion-utils/dist/es/easing/utils/map.mjs","../../node_modules/motion-dom/dist/es/frameloop/order.mjs","../../node_modules/motion-dom/dist/es/frameloop/render-step.mjs","../../node_modules/motion-dom/dist/es/frameloop/batcher.mjs","../../node_modules/motion-dom/dist/es/frameloop/frame.mjs","../../node_modules/motion-dom/dist/es/frameloop/sync-time.mjs","../../node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs","../../node_modules/motion-dom/dist/es/value/types/numbers/index.mjs","../../node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs","../../node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs","../../node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs","../../node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs","../../node_modules/motion-dom/dist/es/value/types/color/utils.mjs","../../node_modules/motion-dom/dist/es/value/types/color/rgba.mjs","../../node_modules/motion-dom/dist/es/value/types/color/hex.mjs","../../node_modules/motion-dom/dist/es/value/types/numbers/units.mjs","../../node_modules/motion-dom/dist/es/value/types/color/hsla.mjs","../../node_modules/motion-dom/dist/es/value/types/color/index.mjs","../../node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs","../../node_modules/motion-dom/dist/es/value/types/complex/index.mjs","../../node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs","../../node_modules/motion-dom/dist/es/utils/mix/immediate.mjs","../../node_modules/motion-dom/dist/es/utils/mix/number.mjs","../../node_modules/motion-dom/dist/es/utils/mix/color.mjs","../../node_modules/motion-dom/dist/es/utils/mix/visibility.mjs","../../node_modules/motion-dom/dist/es/utils/mix/complex.mjs","../../node_modules/motion-dom/dist/es/utils/mix/index.mjs","../../node_modules/motion-dom/dist/es/animation/drivers/frame.mjs","../../node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs","../../node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs","../../node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs","../../node_modules/motion-dom/dist/es/animation/generators/spring.mjs","../../node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs","../../node_modules/motion-dom/dist/es/animation/generators/inertia.mjs","../../node_modules/motion-dom/dist/es/utils/interpolate.mjs","../../node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs","../../node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs","../../node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs","../../node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs","../../node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs","../../node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs","../../node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs","../../node_modules/motion-dom/dist/es/animation/JSAnimation.mjs","../../node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs","../../node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs","../../node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs","../../node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs","../../node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs","../../node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs","../../node_modules/motion-dom/dist/es/render/dom/style-set.mjs","../../node_modules/motion-dom/dist/es/utils/supports/flags.mjs","../../node_modules/motion-dom/dist/es/utils/supports/memo.mjs","../../node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs","../../node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs","../../node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs","../../node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs","../../node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs","../../node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs","../../node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs","../../node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs","../../node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs","../../node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs","../../node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs","../../node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs","../../node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs","../../node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs","../../node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs","../../node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs","../../node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs","../../node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs","../../node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs","../../node_modules/motion-dom/dist/es/value/index.mjs","../../node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs","../../node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs","../../node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs","../../node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs","../../node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs","../../node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs","../../node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs","../../node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs","../../node_modules/motion-dom/dist/es/render/utils/keys-position.mjs","../../node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs","../../node_modules/motion-dom/dist/es/render/utils/setters.mjs","../../node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs","../../node_modules/motion-dom/dist/es/value/will-change/is.mjs","../../node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs","../../node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs","../../node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs","../../node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs","../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs","../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs","../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs","../../node_modules/motion-dom/dist/es/value/types/auto.mjs","../../node_modules/motion-dom/dist/es/value/types/test.mjs","../../node_modules/motion-dom/dist/es/value/types/dimensions.mjs","../../node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs","../../node_modules/motion-dom/dist/es/value/types/complex/filter.mjs","../../node_modules/motion-dom/dist/es/value/types/complex/mask.mjs","../../node_modules/motion-dom/dist/es/value/types/int.mjs","../../node_modules/motion-dom/dist/es/value/types/maps/transform.mjs","../../node_modules/motion-dom/dist/es/value/types/maps/number.mjs","../../node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs","../../node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs","../../node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs","../../node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs","../../node_modules/motion-dom/dist/es/utils/border-radius.mjs","../../node_modules/motion-dom/dist/es/utils/resolve-elements.mjs","../../node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs","../../node_modules/motion-dom/dist/es/utils/is-html-element.mjs","../../node_modules/motion-dom/dist/es/frameloop/microtask.mjs","../../node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs","../../node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs","../../node_modules/motion-dom/dist/es/gestures/utils/setup.mjs","../../node_modules/motion-dom/dist/es/gestures/hover.mjs","../../node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs","../../node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs","../../node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs","../../node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs","../../node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs","../../node_modules/motion-dom/dist/es/gestures/press/index.mjs","../../node_modules/motion-dom/dist/es/utils/is-svg-element.mjs","../../node_modules/motion-dom/dist/es/resize/handle-element.mjs","../../node_modules/motion-dom/dist/es/resize/handle-window.mjs","../../node_modules/motion-dom/dist/es/resize/index.mjs","../../node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs","../../node_modules/motion-dom/dist/es/value/types/utils/find.mjs","../../node_modules/motion-dom/dist/es/projection/geometry/models.mjs","../../node_modules/motion-dom/dist/es/render/store.mjs","../../node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs","../../node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs","../../node_modules/motion-dom/dist/es/render/utils/variant-props.mjs","../../node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs","../../node_modules/motion-dom/dist/es/render/utils/motion-values.mjs","../../node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs","../../node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs","../../node_modules/motion-dom/dist/es/render/VisualElement.mjs","../../node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs","../../node_modules/motion-dom/dist/es/render/Feature.mjs","../../node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs","../../node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs","../../node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs","../../node_modules/motion-dom/dist/es/projection/utils/measure.mjs","../../node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs","../../node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs","../../node_modules/motion-dom/dist/es/render/html/utils/render.mjs","../../node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs","../../node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs","../../node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs","../../node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs","../../node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs","../../node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs","../../node_modules/motion-dom/dist/es/render/svg/utils/path.mjs","../../node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs","../../node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs","../../node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs","../../node_modules/motion-dom/dist/es/render/svg/utils/render.mjs","../../node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs","../../node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs","../../node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs","../../node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs","../../node_modules/motion-dom/dist/es/render/utils/animation-state.mjs","../../node_modules/motion-dom/dist/es/projection/geometry/copy.mjs","../../node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs","../../node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs","../../node_modules/motion-dom/dist/es/projection/geometry/utils.mjs","../../node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs","../../node_modules/motion-dom/dist/es/projection/styles/transform.mjs","../../node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs","../../node_modules/motion-dom/dist/es/animation/animate/single-value.mjs","../../node_modules/motion-dom/dist/es/events/add-dom-event.mjs","../../node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs","../../node_modules/motion-dom/dist/es/projection/utils/flat-tree.mjs","../../node_modules/motion-dom/dist/es/utils/delay.mjs","../../node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.mjs","../../node_modules/motion-dom/dist/es/projection/shared/stack.mjs","../../node_modules/motion-dom/dist/es/projection/node/state.mjs","../../node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs","../../node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs","../../node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs","../../node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","../../node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs","../../node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs","../../node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs","../../node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","../../node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs","../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs","../../node_modules/framer-motion/dist/es/context/LazyContext.mjs","../../node_modules/framer-motion/dist/es/motion/features/definitions.mjs","../../node_modules/framer-motion/dist/es/motion/features/load-features.mjs","../../node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","../../node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","../../node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","../../node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","../../node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","../../node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","../../node_modules/framer-motion/dist/es/render/html/use-props.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/svg/lowercase-elements.mjs","../../node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs","../../node_modules/framer-motion/dist/es/render/dom/use-render.mjs","../../node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","../../node_modules/framer-motion/dist/es/render/html/use-html-visual-state.mjs","../../node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.mjs","../../node_modules/framer-motion/dist/es/motion/utils/symbol.mjs","../../node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","../../node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs","../../node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","../../node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","../../node_modules/framer-motion/dist/es/motion/index.mjs","../../node_modules/framer-motion/dist/es/render/components/create-proxy.mjs","../../node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs","../../node_modules/framer-motion/dist/es/motion/features/animation/index.mjs","../../node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs","../../node_modules/framer-motion/dist/es/motion/features/animations.mjs","../../node_modules/framer-motion/dist/es/events/event-info.mjs","../../node_modules/framer-motion/dist/es/events/add-pointer-event.mjs","../../node_modules/framer-motion/dist/es/utils/get-context-window.mjs","../../node_modules/framer-motion/dist/es/utils/distance.mjs","../../node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs","../../node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs","../../node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs","../../node_modules/framer-motion/dist/es/gestures/drag/index.mjs","../../node_modules/framer-motion/dist/es/gestures/pan/index.mjs","../../node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs","../../node_modules/framer-motion/dist/es/motion/features/drag.mjs","../../node_modules/framer-motion/dist/es/gestures/hover.mjs","../../node_modules/framer-motion/dist/es/gestures/focus.mjs","../../node_modules/framer-motion/dist/es/gestures/press.mjs","../../node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","../../node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs","../../node_modules/framer-motion/dist/es/motion/features/gestures.mjs","../../node_modules/framer-motion/dist/es/motion/features/layout.mjs","../../node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs","../../node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs","../../node_modules/motion/dist/es/react.mjs","../../node_modules/@juggle/resize-observer/lib/utils/resizeObservers.js","../../node_modules/@juggle/resize-observer/lib/algorithms/hasActiveObservations.js","../../node_modules/@juggle/resize-observer/lib/algorithms/hasSkippedObservations.js","../../node_modules/@juggle/resize-observer/lib/algorithms/deliverResizeLoopError.js","../../node_modules/@juggle/resize-observer/lib/ResizeObserverBoxOptions.js","../../node_modules/@juggle/resize-observer/lib/utils/freeze.js","../../node_modules/@juggle/resize-observer/lib/ResizeObserverSize.js","../../node_modules/@juggle/resize-observer/lib/DOMRectReadOnly.js","../../node_modules/@juggle/resize-observer/lib/utils/element.js","../../node_modules/@juggle/resize-observer/lib/utils/global.js","../../node_modules/@juggle/resize-observer/lib/algorithms/calculateBoxSize.js","../../node_modules/@juggle/resize-observer/lib/ResizeObserverEntry.js","../../node_modules/@juggle/resize-observer/lib/algorithms/calculateDepthForNode.js","../../node_modules/@juggle/resize-observer/lib/algorithms/broadcastActiveObservations.js","../../node_modules/@juggle/resize-observer/lib/algorithms/gatherActiveObservationsAtDepth.js","../../node_modules/@juggle/resize-observer/lib/utils/process.js","../../node_modules/@juggle/resize-observer/lib/utils/queueMicroTask.js","../../node_modules/@juggle/resize-observer/lib/utils/queueResizeObserver.js","../../node_modules/@juggle/resize-observer/lib/utils/scheduler.js","../../node_modules/@juggle/resize-observer/lib/ResizeObservation.js","../../node_modules/@juggle/resize-observer/lib/ResizeObserverDetail.js","../../node_modules/@juggle/resize-observer/lib/ResizeObserverController.js","../../node_modules/@juggle/resize-observer/lib/ResizeObserver.js","../../node_modules/use-effect-event/dist/index.js","../../node_modules/@sanity/ui/dist/_chunks/portalProvider.js","../../node_modules/@sanity/ui/dist/index.js","../../src/components/SpeakerInput.tsx","../../src/components/InterviewIcon.tsx","../../src/schema/interviewBlock.ts","../../src/schema/speakers.ts","../../src/index.ts"],"sourcesContent":["/**\n* Color hue keys.\n* @public\n*/\nconst COLOR_HUES = [\n\t\"gray\",\n\t\"blue\",\n\t\"purple\",\n\t\"magenta\",\n\t\"red\",\n\t\"orange\",\n\t\"yellow\",\n\t\"green\",\n\t\"cyan\"\n], COLOR_TINTS = [\n\t\"50\",\n\t\"100\",\n\t\"200\",\n\t\"300\",\n\t\"400\",\n\t\"500\",\n\t\"600\",\n\t\"700\",\n\t\"800\",\n\t\"900\",\n\t\"950\"\n];\n/** @internal */\nfunction hslToRgb(hsl) {\n\tlet h = hsl[0], s = hsl[1] / 100, l = hsl[2] / 100, k = (n) => (n + h / 30) % 12, a = s * Math.min(l, 1 - l), f = (n) => l - a * Math.max(-1, Math.min(k(n) - 3, Math.min(9 - k(n), 1)));\n\treturn [\n\t\t255 * f(0),\n\t\t255 * f(8),\n\t\t255 * f(4)\n\t];\n}\n/** @internal */\nfunction rgbToHex([r, g, b]) {\n\tlet _r = Math.round(r), _g = Math.round(g), _b = Math.round(b);\n\treturn \"#\" + ((1 << 24) + (_r << 16) + (_g << 8) + _b).toString(16).slice(1);\n}\n/** @internal */\nfunction buildTints(options) {\n\tlet { hueKey, color } = options;\n\treturn COLOR_TINTS.reduce((acc, tintKey) => {\n\t\tlet tint = Number(tintKey), rgb = hslToRgb(color.tints[tintKey].hsl), hex = rgbToHex([\n\t\t\tMath.round(rgb[0]),\n\t\t\tMath.round(rgb[1]),\n\t\t\tMath.round(rgb[2])\n\t\t]);\n\t\treturn acc[tintKey] = {\n\t\t\ttitle: `${hueKey.slice(0, 1).toUpperCase()}${hueKey.slice(1)} ${tint}`,\n\t\t\thex\n\t\t}, acc;\n\t}, {});\n}\n/** @public */\nconst black = {\n\ttitle: \"Black\",\n\thex: \"#0d0e12\"\n}, white = {\n\ttitle: \"White\",\n\thex: \"#ffffff\"\n}, gray = {\n\t50: {\n\t\ttitle: \"Gray 50\",\n\t\thex: \"#f6f6f8\"\n\t},\n\t100: {\n\t\ttitle: \"Gray 100\",\n\t\thex: \"#eeeef1\"\n\t},\n\t200: {\n\t\ttitle: \"Gray 200\",\n\t\thex: \"#e3e4e8\"\n\t},\n\t300: {\n\t\ttitle: \"Gray 300\",\n\t\thex: \"#bbbdc9\"\n\t},\n\t400: {\n\t\ttitle: \"Gray 400\",\n\t\thex: \"#9499ad\"\n\t},\n\t500: {\n\t\ttitle: \"Gray 500\",\n\t\thex: \"#727892\"\n\t},\n\t600: {\n\t\ttitle: \"Gray 600\",\n\t\thex: \"#515870\"\n\t},\n\t700: {\n\t\ttitle: \"Gray 700\",\n\t\thex: \"#383d51\"\n\t},\n\t800: {\n\t\ttitle: \"Gray 800\",\n\t\thex: \"#252837\"\n\t},\n\t900: {\n\t\ttitle: \"Gray 900\",\n\t\thex: \"#1b1d27\"\n\t},\n\t950: {\n\t\ttitle: \"Gray 950\",\n\t\thex: \"#13141b\"\n\t}\n}, blue = {\n\t50: {\n\t\ttitle: \"Blue 50\",\n\t\thex: \"#f5f8ff\"\n\t},\n\t100: {\n\t\ttitle: \"Blue 100\",\n\t\thex: \"#e5edff\"\n\t},\n\t200: {\n\t\ttitle: \"Blue 200\",\n\t\thex: \"#dbe5ff\"\n\t},\n\t300: {\n\t\ttitle: \"Blue 300\",\n\t\thex: \"#a8bfff\"\n\t},\n\t400: {\n\t\ttitle: \"Blue 400\",\n\t\thex: \"#7595ff\"\n\t},\n\t500: {\n\t\ttitle: \"Blue 500\",\n\t\thex: \"#556bfc\"\n\t},\n\t600: {\n\t\ttitle: \"Blue 600\",\n\t\thex: \"#4043e7\"\n\t},\n\t700: {\n\t\ttitle: \"Blue 700\",\n\t\thex: \"#2927aa\"\n\t},\n\t800: {\n\t\ttitle: \"Blue 800\",\n\t\thex: \"#192457\"\n\t},\n\t900: {\n\t\ttitle: \"Blue 900\",\n\t\thex: \"#161a41\"\n\t},\n\t950: {\n\t\ttitle: \"Blue 950\",\n\t\thex: \"#101228\"\n\t}\n}, purple = {\n\t50: {\n\t\ttitle: \"Purple 50\",\n\t\thex: \"#f8f5ff\"\n\t},\n\t100: {\n\t\ttitle: \"Purple 100\",\n\t\thex: \"#f1ebff\"\n\t},\n\t200: {\n\t\ttitle: \"Purple 200\",\n\t\thex: \"#ece1fe\"\n\t},\n\t300: {\n\t\ttitle: \"Purple 300\",\n\t\thex: \"#ccb1fc\"\n\t},\n\t400: {\n\t\ttitle: \"Purple 400\",\n\t\thex: \"#b087f7\"\n\t},\n\t500: {\n\t\ttitle: \"Purple 500\",\n\t\thex: \"#8f57ef\"\n\t},\n\t600: {\n\t\ttitle: \"Purple 600\",\n\t\thex: \"#721fe5\"\n\t},\n\t700: {\n\t\ttitle: \"Purple 700\",\n\t\thex: \"#4c1a9e\"\n\t},\n\t800: {\n\t\ttitle: \"Purple 800\",\n\t\thex: \"#2f1862\"\n\t},\n\t900: {\n\t\ttitle: \"Purple 900\",\n\t\thex: \"#23173f\"\n\t},\n\t950: {\n\t\ttitle: \"Purple 950\",\n\t\thex: \"#181128\"\n\t}\n}, magenta = {\n\t50: {\n\t\ttitle: \"Magenta 50\",\n\t\thex: \"#fef6f9\"\n\t},\n\t100: {\n\t\ttitle: \"Magenta 100\",\n\t\thex: \"#fde8ef\"\n\t},\n\t200: {\n\t\ttitle: \"Magenta 200\",\n\t\thex: \"#fcdee9\"\n\t},\n\t300: {\n\t\ttitle: \"Magenta 300\",\n\t\thex: \"#f7abc5\"\n\t},\n\t400: {\n\t\ttitle: \"Magenta 400\",\n\t\thex: \"#f0709b\"\n\t},\n\t500: {\n\t\ttitle: \"Magenta 500\",\n\t\thex: \"#e72767\"\n\t},\n\t600: {\n\t\ttitle: \"Magenta 600\",\n\t\thex: \"#b11651\"\n\t},\n\t700: {\n\t\ttitle: \"Magenta 700\",\n\t\thex: \"#7c1342\"\n\t},\n\t800: {\n\t\ttitle: \"Magenta 800\",\n\t\thex: \"#4b1130\"\n\t},\n\t900: {\n\t\ttitle: \"Magenta 900\",\n\t\thex: \"#341325\"\n\t},\n\t950: {\n\t\ttitle: \"Magenta 950\",\n\t\thex: \"#1f0f14\"\n\t}\n}, red = {\n\t50: {\n\t\ttitle: \"Red 50\",\n\t\thex: \"#fff6f5\"\n\t},\n\t100: {\n\t\ttitle: \"Red 100\",\n\t\thex: \"#ffe7e5\"\n\t},\n\t200: {\n\t\ttitle: \"Red 200\",\n\t\thex: \"#ffdedc\"\n\t},\n\t300: {\n\t\ttitle: \"Red 300\",\n\t\thex: \"#fdada5\"\n\t},\n\t400: {\n\t\ttitle: \"Red 400\",\n\t\thex: \"#f77769\"\n\t},\n\t500: {\n\t\ttitle: \"Red 500\",\n\t\thex: \"#ef4434\"\n\t},\n\t600: {\n\t\ttitle: \"Red 600\",\n\t\thex: \"#cc2819\"\n\t},\n\t700: {\n\t\ttitle: \"Red 700\",\n\t\thex: \"#8b2018\"\n\t},\n\t800: {\n\t\ttitle: \"Red 800\",\n\t\thex: \"#4d1714\"\n\t},\n\t900: {\n\t\ttitle: \"Red 900\",\n\t\thex: \"#321615\"\n\t},\n\t950: {\n\t\ttitle: \"Red 950\",\n\t\thex: \"#1e1011\"\n\t}\n}, orange = {\n\t50: {\n\t\ttitle: \"Orange 50\",\n\t\thex: \"#fff7f0\"\n\t},\n\t100: {\n\t\ttitle: \"Orange 100\",\n\t\thex: \"#ffeadb\"\n\t},\n\t200: {\n\t\ttitle: \"Orange 200\",\n\t\thex: \"#ffddc7\"\n\t},\n\t300: {\n\t\ttitle: \"Orange 300\",\n\t\thex: \"#ffb685\"\n\t},\n\t400: {\n\t\ttitle: \"Orange 400\",\n\t\thex: \"#ff8e42\"\n\t},\n\t500: {\n\t\ttitle: \"Orange 500\",\n\t\thex: \"#fa6400\"\n\t},\n\t600: {\n\t\ttitle: \"Orange 600\",\n\t\thex: \"#b14802\"\n\t},\n\t700: {\n\t\ttitle: \"Orange 700\",\n\t\thex: \"#7c3404\"\n\t},\n\t800: {\n\t\ttitle: \"Orange 800\",\n\t\thex: \"#461e07\"\n\t},\n\t900: {\n\t\ttitle: \"Orange 900\",\n\t\thex: \"#32160b\"\n\t},\n\t950: {\n\t\ttitle: \"Orange 950\",\n\t\thex: \"#21120d\"\n\t}\n}, yellow = {\n\t50: {\n\t\ttitle: \"Yellow 50\",\n\t\thex: \"#fefae1\"\n\t},\n\t100: {\n\t\ttitle: \"Yellow 100\",\n\t\thex: \"#fcf3bb\"\n\t},\n\t200: {\n\t\ttitle: \"Yellow 200\",\n\t\thex: \"#f9e994\"\n\t},\n\t300: {\n\t\ttitle: \"Yellow 300\",\n\t\thex: \"#f7d455\"\n\t},\n\t400: {\n\t\ttitle: \"Yellow 400\",\n\t\thex: \"#f9bc15\"\n\t},\n\t500: {\n\t\ttitle: \"Yellow 500\",\n\t\thex: \"#d28a04\"\n\t},\n\t600: {\n\t\ttitle: \"Yellow 600\",\n\t\thex: \"#965908\"\n\t},\n\t700: {\n\t\ttitle: \"Yellow 700\",\n\t\thex: \"#653a0b\"\n\t},\n\t800: {\n\t\ttitle: \"Yellow 800\",\n\t\thex: \"#3b220c\"\n\t},\n\t900: {\n\t\ttitle: \"Yellow 900\",\n\t\thex: \"#271a11\"\n\t},\n\t950: {\n\t\ttitle: \"Yellow 950\",\n\t\thex: \"#181410\"\n\t}\n}, green = {\n\t50: {\n\t\ttitle: \"Green 50\",\n\t\thex: \"#e7fef5\"\n\t},\n\t100: {\n\t\ttitle: \"Green 100\",\n\t\thex: \"#c5fce8\"\n\t},\n\t200: {\n\t\ttitle: \"Green 200\",\n\t\thex: \"#a9f9dc\"\n\t},\n\t300: {\n\t\ttitle: \"Green 300\",\n\t\thex: \"#59f3ba\"\n\t},\n\t400: {\n\t\ttitle: \"Green 400\",\n\t\thex: \"#0ff0a1\"\n\t},\n\t500: {\n\t\ttitle: \"Green 500\",\n\t\thex: \"#04b97a\"\n\t},\n\t600: {\n\t\ttitle: \"Green 600\",\n\t\thex: \"#01794f\"\n\t},\n\t700: {\n\t\ttitle: \"Green 700\",\n\t\thex: \"#015133\"\n\t},\n\t800: {\n\t\ttitle: \"Green 800\",\n\t\thex: \"#023120\"\n\t},\n\t900: {\n\t\ttitle: \"Green 900\",\n\t\thex: \"#06231a\"\n\t},\n\t950: {\n\t\ttitle: \"Green 950\",\n\t\thex: \"#071715\"\n\t}\n}, cyan = {\n\t50: {\n\t\ttitle: \"Cyan 50\",\n\t\thex: \"#e7fefe\"\n\t},\n\t100: {\n\t\ttitle: \"Cyan 100\",\n\t\thex: \"#c5fcfc\"\n\t},\n\t200: {\n\t\ttitle: \"Cyan 200\",\n\t\thex: \"#96f8f8\"\n\t},\n\t300: {\n\t\ttitle: \"Cyan 300\",\n\t\thex: \"#62efef\"\n\t},\n\t400: {\n\t\ttitle: \"Cyan 400\",\n\t\thex: \"#18e2e2\"\n\t},\n\t500: {\n\t\ttitle: \"Cyan 500\",\n\t\thex: \"#04b8be\"\n\t},\n\t600: {\n\t\ttitle: \"Cyan 600\",\n\t\thex: \"#037782\"\n\t},\n\t700: {\n\t\ttitle: \"Cyan 700\",\n\t\thex: \"#024950\"\n\t},\n\t800: {\n\t\ttitle: \"Cyan 800\",\n\t\thex: \"#042f34\"\n\t},\n\t900: {\n\t\ttitle: \"Cyan 900\",\n\t\thex: \"#072227\"\n\t},\n\t950: {\n\t\ttitle: \"Cyan 950\",\n\t\thex: \"#0d181c\"\n\t}\n}, hues = {\n\tgray,\n\tblue,\n\tpurple,\n\tmagenta,\n\tred,\n\torange,\n\tyellow,\n\tgreen,\n\tcyan\n}, color = {\n\tblack,\n\twhite,\n\t...hues\n}, config = {\n\tblack: {\n\t\ttitle: \"Black\",\n\t\thsl: [\n\t\t\t225,\n\t\t\t16,\n\t\t\t6\n\t\t]\n\t},\n\twhite: {\n\t\ttitle: \"White\",\n\t\thsl: [\n\t\t\t0,\n\t\t\t0,\n\t\t\t100\n\t\t]\n\t},\n\tgray: {\n\t\ttitle: \"Gray\",\n\t\ttints: {\n\t\t\t50: {\n\t\t\t\ttitle: \"Gray 50\",\n\t\t\t\thsl: [\n\t\t\t\t\t240,\n\t\t\t\t\t12,\n\t\t\t\t\t97\n\t\t\t\t]\n\t\t\t},\n\t\t\t100: {\n\t\t\t\ttitle: \"Gray 100\",\n\t\t\t\thsl: [\n\t\t\t\t\t240,\n\t\t\t\t\t10,\n\t\t\t\t\t94\n\t\t\t\t]\n\t\t\t},\n\t\t\t200: {\n\t\t\t\ttitle: \"Gray 200\",\n\t\t\t\thsl: [\n\t\t\t\t\t231,\n\t\t\t\t\t10,\n\t\t\t\t\t90\n\t\t\t\t]\n\t\t\t},\n\t\t\t300: {\n\t\t\t\ttitle: \"Gray 300\",\n\t\t\t\thsl: [\n\t\t\t\t\t232,\n\t\t\t\t\t11,\n\t\t\t\t\t76\n\t\t\t\t]\n\t\t\t},\n\t\t\t400: {\n\t\t\t\ttitle: \"Gray 400\",\n\t\t\t\thsl: [\n\t\t\t\t\t228,\n\t\t\t\t\t13,\n\t\t\t\t\t63\n\t\t\t\t]\n\t\t\t},\n\t\t\t500: {\n\t\t\t\ttitle: \"Gray 500\",\n\t\t\t\thsl: [\n\t\t\t\t\t229,\n\t\t\t\t\t13,\n\t\t\t\t\t51\n\t\t\t\t]\n\t\t\t},\n\t\t\t600: {\n\t\t\t\ttitle: \"Gray 600\",\n\t\t\t\thsl: [\n\t\t\t\t\t228,\n\t\t\t\t\t16,\n\t\t\t\t\t38\n\t\t\t\t]\n\t\t\t},\n\t\t\t700: {\n\t\t\t\ttitle: \"Gray 700\",\n\t\t\t\thsl: [\n\t\t\t\t\t229,\n\t\t\t\t\t18,\n\t\t\t\t\t27\n\t\t\t\t]\n\t\t\t},\n\t\t\t800: {\n\t\t\t\ttitle: \"Gray 800\",\n\t\t\t\thsl: [\n\t\t\t\t\t229,\n\t\t\t\t\t19,\n\t\t\t\t\t18\n\t\t\t\t]\n\t\t\t},\n\t\t\t900: {\n\t\t\t\ttitle: \"Gray 900\",\n\t\t\t\thsl: [\n\t\t\t\t\t228,\n\t\t\t\t\t19,\n\t\t\t\t\t13\n\t\t\t\t]\n\t\t\t},\n\t\t\t950: {\n\t\t\t\ttitle: \"Gray 950\",\n\t\t\t\thsl: [\n\t\t\t\t\t233,\n\t\t\t\t\t17,\n\t\t\t\t\t9\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t},\n\tblue: {\n\t\ttitle: \"Blue\",\n\t\ttints: {\n\t\t\t50: {\n\t\t\t\ttitle: \"Blue 50\",\n\t\t\t\thsl: [\n\t\t\t\t\t222,\n\t\t\t\t\t100,\n\t\t\t\t\t98\n\t\t\t\t]\n\t\t\t},\n\t\t\t100: {\n\t\t\t\ttitle: \"Blue 100\",\n\t\t\t\thsl: [\n\t\t\t\t\t222,\n\t\t\t\t\t100,\n\t\t\t\t\t95\n\t\t\t\t]\n\t\t\t},\n\t\t\t200: {\n\t\t\t\ttitle: \"Blue 200\",\n\t\t\t\thsl: [\n\t\t\t\t\t223,\n\t\t\t\t\t100,\n\t\t\t\t\t93\n\t\t\t\t]\n\t\t\t},\n\t\t\t300: {\n\t\t\t\ttitle: \"Blue 300\",\n\t\t\t\thsl: [\n\t\t\t\t\t224,\n\t\t\t\t\t100,\n\t\t\t\t\t83\n\t\t\t\t]\n\t\t\t},\n\t\t\t400: {\n\t\t\t\ttitle: \"Blue 400\",\n\t\t\t\thsl: [\n\t\t\t\t\t226,\n\t\t\t\t\t100,\n\t\t\t\t\t73\n\t\t\t\t]\n\t\t\t},\n\t\t\t500: {\n\t\t\t\ttitle: \"Blue 500\",\n\t\t\t\thsl: [\n\t\t\t\t\t232,\n\t\t\t\t\t96,\n\t\t\t\t\t66\n\t\t\t\t]\n\t\t\t},\n\t\t\t600: {\n\t\t\t\ttitle: \"Blue 600\",\n\t\t\t\thsl: [\n\t\t\t\t\t239,\n\t\t\t\t\t78,\n\t\t\t\t\t58\n\t\t\t\t]\n\t\t\t},\n\t\t\t700: {\n\t\t\t\ttitle: \"Blue 700\",\n\t\t\t\thsl: [\n\t\t\t\t\t241,\n\t\t\t\t\t63,\n\t\t\t\t\t41\n\t\t\t\t]\n\t\t\t},\n\t\t\t800: {\n\t\t\t\ttitle: \"Blue 800\",\n\t\t\t\thsl: [\n\t\t\t\t\t230,\n\t\t\t\t\t55,\n\t\t\t\t\t22\n\t\t\t\t]\n\t\t\t},\n\t\t\t900: {\n\t\t\t\ttitle: \"Blue 900\",\n\t\t\t\thsl: [\n\t\t\t\t\t234,\n\t\t\t\t\t49,\n\t\t\t\t\t17\n\t\t\t\t]\n\t\t\t},\n\t\t\t950: {\n\t\t\t\ttitle: \"Blue 950\",\n\t\t\t\thsl: [\n\t\t\t\t\t235,\n\t\t\t\t\t43,\n\t\t\t\t\t11\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t},\n\tpurple: {\n\t\ttitle: \"Purple\",\n\t\ttints: {\n\t\t\t50: {\n\t\t\t\ttitle: \"Purple 50\",\n\t\t\t\thsl: [\n\t\t\t\t\t260,\n\t\t\t\t\t95,\n\t\t\t\t\t98\n\t\t\t\t]\n\t\t\t},\n\t\t\t100: {\n\t\t\t\ttitle: \"Purple 100\",\n\t\t\t\thsl: [\n\t\t\t\t\t260,\n\t\t\t\t\t98,\n\t\t\t\t\t96\n\t\t\t\t]\n\t\t\t},\n\t\t\t200: {\n\t\t\t\ttitle: \"Purple 200\",\n\t\t\t\thsl: [\n\t\t\t\t\t263,\n\t\t\t\t\t96,\n\t\t\t\t\t94\n\t\t\t\t]\n\t\t\t},\n\t\t\t300: {\n\t\t\t\ttitle: \"Purple 300\",\n\t\t\t\thsl: [\n\t\t\t\t\t262,\n\t\t\t\t\t92,\n\t\t\t\t\t84\n\t\t\t\t]\n\t\t\t},\n\t\t\t400: {\n\t\t\t\ttitle: \"Purple 400\",\n\t\t\t\thsl: [\n\t\t\t\t\t262,\n\t\t\t\t\t88,\n\t\t\t\t\t75\n\t\t\t\t]\n\t\t\t},\n\t\t\t500: {\n\t\t\t\ttitle: \"Purple 500\",\n\t\t\t\thsl: [\n\t\t\t\t\t262,\n\t\t\t\t\t83,\n\t\t\t\t\t64\n\t\t\t\t]\n\t\t\t},\n\t\t\t600: {\n\t\t\t\ttitle: \"Purple 600\",\n\t\t\t\thsl: [\n\t\t\t\t\t265,\n\t\t\t\t\t79,\n\t\t\t\t\t51\n\t\t\t\t]\n\t\t\t},\n\t\t\t700: {\n\t\t\t\ttitle: \"Purple 700\",\n\t\t\t\thsl: [\n\t\t\t\t\t263,\n\t\t\t\t\t72,\n\t\t\t\t\t36\n\t\t\t\t]\n\t\t\t},\n\t\t\t800: {\n\t\t\t\ttitle: \"Purple 800\",\n\t\t\t\thsl: [\n\t\t\t\t\t258,\n\t\t\t\t\t60,\n\t\t\t\t\t24\n\t\t\t\t]\n\t\t\t},\n\t\t\t900: {\n\t\t\t\ttitle: \"Purple 900\",\n\t\t\t\thsl: [\n\t\t\t\t\t257,\n\t\t\t\t\t46,\n\t\t\t\t\t17\n\t\t\t\t]\n\t\t\t},\n\t\t\t950: {\n\t\t\t\ttitle: \"Purple 950\",\n\t\t\t\thsl: [\n\t\t\t\t\t260,\n\t\t\t\t\t41,\n\t\t\t\t\t11\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t},\n\tmagenta: {\n\t\ttitle: \"Magenta\",\n\t\ttints: {\n\t\t\t50: {\n\t\t\t\ttitle: \"Magenta 50\",\n\t\t\t\thsl: [\n\t\t\t\t\t340,\n\t\t\t\t\t82,\n\t\t\t\t\t98\n\t\t\t\t]\n\t\t\t},\n\t\t\t100: {\n\t\t\t\ttitle: \"Magenta 100\",\n\t\t\t\thsl: [\n\t\t\t\t\t339,\n\t\t\t\t\t83,\n\t\t\t\t\t95\n\t\t\t\t]\n\t\t\t},\n\t\t\t200: {\n\t\t\t\ttitle: \"Magenta 200\",\n\t\t\t\thsl: [\n\t\t\t\t\t339,\n\t\t\t\t\t83,\n\t\t\t\t\t93\n\t\t\t\t]\n\t\t\t},\n\t\t\t300: {\n\t\t\t\ttitle: \"Magenta 300\",\n\t\t\t\thsl: [\n\t\t\t\t\t340,\n\t\t\t\t\t82,\n\t\t\t\t\t82\n\t\t\t\t]\n\t\t\t},\n\t\t\t400: {\n\t\t\t\ttitle: \"Magenta 400\",\n\t\t\t\thsl: [\n\t\t\t\t\t340,\n\t\t\t\t\t81,\n\t\t\t\t\t69\n\t\t\t\t]\n\t\t\t},\n\t\t\t500: {\n\t\t\t\ttitle: \"Magenta 500\",\n\t\t\t\thsl: [\n\t\t\t\t\t340,\n\t\t\t\t\t80,\n\t\t\t\t\t53\n\t\t\t\t]\n\t\t\t},\n\t\t\t600: {\n\t\t\t\ttitle: \"Magenta 600\",\n\t\t\t\thsl: [\n\t\t\t\t\t337,\n\t\t\t\t\t78,\n\t\t\t\t\t39\n\t\t\t\t]\n\t\t\t},\n\t\t\t700: {\n\t\t\t\ttitle: \"Magenta 700\",\n\t\t\t\thsl: [\n\t\t\t\t\t333,\n\t\t\t\t\t73,\n\t\t\t\t\t28\n\t\t\t\t]\n\t\t\t},\n\t\t\t800: {\n\t\t\t\ttitle: \"Magenta 800\",\n\t\t\t\thsl: [\n\t\t\t\t\t328,\n\t\t\t\t\t63,\n\t\t\t\t\t18\n\t\t\t\t]\n\t\t\t},\n\t\t\t900: {\n\t\t\t\ttitle: \"Magenta 900\",\n\t\t\t\thsl: [\n\t\t\t\t\t327,\n\t\t\t\t\t46,\n\t\t\t\t\t14\n\t\t\t\t]\n\t\t\t},\n\t\t\t950: {\n\t\t\t\ttitle: \"Magenta 950\",\n\t\t\t\thsl: [\n\t\t\t\t\t341,\n\t\t\t\t\t35,\n\t\t\t\t\t9\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t},\n\tred: {\n\t\ttitle: \"Red\",\n\t\ttints: {\n\t\t\t50: {\n\t\t\t\ttitle: \"Red 50\",\n\t\t\t\thsl: [\n\t\t\t\t\t5,\n\t\t\t\t\t100,\n\t\t\t\t\t98\n\t\t\t\t]\n\t\t\t},\n\t\t\t100: {\n\t\t\t\ttitle: \"Red 100\",\n\t\t\t\thsl: [\n\t\t\t\t\t4,\n\t\t\t\t\t100,\n\t\t\t\t\t95\n\t\t\t\t]\n\t\t\t},\n\t\t\t200: {\n\t\t\t\ttitle: \"Red 200\",\n\t\t\t\thsl: [\n\t\t\t\t\t4,\n\t\t\t\t\t98,\n\t\t\t\t\t93\n\t\t\t\t]\n\t\t\t},\n\t\t\t300: {\n\t\t\t\ttitle: \"Red 300\",\n\t\t\t\thsl: [\n\t\t\t\t\t5,\n\t\t\t\t\t95,\n\t\t\t\t\t82\n\t\t\t\t]\n\t\t\t},\n\t\t\t400: {\n\t\t\t\ttitle: \"Red 400\",\n\t\t\t\thsl: [\n\t\t\t\t\t6,\n\t\t\t\t\t90,\n\t\t\t\t\t69\n\t\t\t\t]\n\t\t\t},\n\t\t\t500: {\n\t\t\t\ttitle: \"Red 500\",\n\t\t\t\thsl: [\n\t\t\t\t\t5,\n\t\t\t\t\t85,\n\t\t\t\t\t57\n\t\t\t\t]\n\t\t\t},\n\t\t\t600: {\n\t\t\t\ttitle: \"Red 600\",\n\t\t\t\thsl: [\n\t\t\t\t\t5,\n\t\t\t\t\t78,\n\t\t\t\t\t45\n\t\t\t\t]\n\t\t\t},\n\t\t\t700: {\n\t\t\t\ttitle: \"Red 700\",\n\t\t\t\thsl: [\n\t\t\t\t\t4,\n\t\t\t\t\t70,\n\t\t\t\t\t32\n\t\t\t\t]\n\t\t\t},\n\t\t\t800: {\n\t\t\t\ttitle: \"Red 800\",\n\t\t\t\thsl: [\n\t\t\t\t\t3,\n\t\t\t\t\t58,\n\t\t\t\t\t19\n\t\t\t\t]\n\t\t\t},\n\t\t\t900: {\n\t\t\t\ttitle: \"Red 900\",\n\t\t\t\thsl: [\n\t\t\t\t\t2,\n\t\t\t\t\t41,\n\t\t\t\t\t14\n\t\t\t\t]\n\t\t\t},\n\t\t\t950: {\n\t\t\t\ttitle: \"Red 950\",\n\t\t\t\thsl: [\n\t\t\t\t\t356,\n\t\t\t\t\t30,\n\t\t\t\t\t9\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t},\n\torange: {\n\t\ttitle: \"Orange\",\n\t\ttints: {\n\t\t\t50: {\n\t\t\t\ttitle: \"Orange 50\",\n\t\t\t\thsl: [\n\t\t\t\t\t28,\n\t\t\t\t\t100,\n\t\t\t\t\t97\n\t\t\t\t]\n\t\t\t},\n\t\t\t100: {\n\t\t\t\ttitle: \"Orange 100\",\n\t\t\t\thsl: [\n\t\t\t\t\t25,\n\t\t\t\t\t100,\n\t\t\t\t\t93\n\t\t\t\t]\n\t\t\t},\n\t\t\t200: {\n\t\t\t\ttitle: \"Orange 200\",\n\t\t\t\thsl: [\n\t\t\t\t\t24,\n\t\t\t\t\t100,\n\t\t\t\t\t89\n\t\t\t\t]\n\t\t\t},\n\t\t\t300: {\n\t\t\t\ttitle: \"Orange 300\",\n\t\t\t\thsl: [\n\t\t\t\t\t24,\n\t\t\t\t\t100,\n\t\t\t\t\t76\n\t\t\t\t]\n\t\t\t},\n\t\t\t400: {\n\t\t\t\ttitle: \"Orange 400\",\n\t\t\t\thsl: [\n\t\t\t\t\t24,\n\t\t\t\t\t100,\n\t\t\t\t\t63\n\t\t\t\t]\n\t\t\t},\n\t\t\t500: {\n\t\t\t\ttitle: \"Orange 500\",\n\t\t\t\thsl: [\n\t\t\t\t\t24,\n\t\t\t\t\t100,\n\t\t\t\t\t49\n\t\t\t\t]\n\t\t\t},\n\t\t\t600: {\n\t\t\t\ttitle: \"Orange 600\",\n\t\t\t\thsl: [\n\t\t\t\t\t24,\n\t\t\t\t\t98,\n\t\t\t\t\t35\n\t\t\t\t]\n\t\t\t},\n\t\t\t700: {\n\t\t\t\ttitle: \"Orange 700\",\n\t\t\t\thsl: [\n\t\t\t\t\t24,\n\t\t\t\t\t94,\n\t\t\t\t\t25\n\t\t\t\t]\n\t\t\t},\n\t\t\t800: {\n\t\t\t\ttitle: \"Orange 800\",\n\t\t\t\thsl: [\n\t\t\t\t\t22,\n\t\t\t\t\t82,\n\t\t\t\t\t15\n\t\t\t\t]\n\t\t\t},\n\t\t\t900: {\n\t\t\t\ttitle: \"Orange 900\",\n\t\t\t\thsl: [\n\t\t\t\t\t17,\n\t\t\t\t\t65,\n\t\t\t\t\t12\n\t\t\t\t]\n\t\t\t},\n\t\t\t950: {\n\t\t\t\ttitle: \"Orange 950\",\n\t\t\t\thsl: [\n\t\t\t\t\t14,\n\t\t\t\t\t43,\n\t\t\t\t\t9\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t},\n\tyellow: {\n\t\ttitle: \"Yellow\",\n\t\ttints: {\n\t\t\t50: {\n\t\t\t\ttitle: \"Yellow 50\",\n\t\t\t\thsl: [\n\t\t\t\t\t51,\n\t\t\t\t\t94,\n\t\t\t\t\t94\n\t\t\t\t]\n\t\t\t},\n\t\t\t100: {\n\t\t\t\ttitle: \"Yellow 100\",\n\t\t\t\thsl: [\n\t\t\t\t\t52,\n\t\t\t\t\t91,\n\t\t\t\t\t86\n\t\t\t\t]\n\t\t\t},\n\t\t\t200: {\n\t\t\t\ttitle: \"Yellow 200\",\n\t\t\t\thsl: [\n\t\t\t\t\t50,\n\t\t\t\t\t90,\n\t\t\t\t\t78\n\t\t\t\t]\n\t\t\t},\n\t\t\t300: {\n\t\t\t\ttitle: \"Yellow 300\",\n\t\t\t\thsl: [\n\t\t\t\t\t47,\n\t\t\t\t\t91,\n\t\t\t\t\t65\n\t\t\t\t]\n\t\t\t},\n\t\t\t400: {\n\t\t\t\ttitle: \"Yellow 400\",\n\t\t\t\thsl: [\n\t\t\t\t\t44,\n\t\t\t\t\t95,\n\t\t\t\t\t53\n\t\t\t\t]\n\t\t\t},\n\t\t\t500: {\n\t\t\t\ttitle: \"Yellow 500\",\n\t\t\t\thsl: [\n\t\t\t\t\t39,\n\t\t\t\t\t96,\n\t\t\t\t\t42\n\t\t\t\t]\n\t\t\t},\n\t\t\t600: {\n\t\t\t\ttitle: \"Yellow 600\",\n\t\t\t\thsl: [\n\t\t\t\t\t34,\n\t\t\t\t\t90,\n\t\t\t\t\t31\n\t\t\t\t]\n\t\t\t},\n\t\t\t700: {\n\t\t\t\ttitle: \"Yellow 700\",\n\t\t\t\thsl: [\n\t\t\t\t\t31,\n\t\t\t\t\t80,\n\t\t\t\t\t22\n\t\t\t\t]\n\t\t\t},\n\t\t\t800: {\n\t\t\t\ttitle: \"Yellow 800\",\n\t\t\t\thsl: [\n\t\t\t\t\t28,\n\t\t\t\t\t66,\n\t\t\t\t\t14\n\t\t\t\t]\n\t\t\t},\n\t\t\t900: {\n\t\t\t\ttitle: \"Yellow 900\",\n\t\t\t\thsl: [\n\t\t\t\t\t24,\n\t\t\t\t\t40,\n\t\t\t\t\t11\n\t\t\t\t]\n\t\t\t},\n\t\t\t950: {\n\t\t\t\ttitle: \"Yellow 950\",\n\t\t\t\thsl: [\n\t\t\t\t\t24,\n\t\t\t\t\t20,\n\t\t\t\t\t8\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t},\n\tgreen: {\n\t\ttitle: \"Green\",\n\t\ttints: {\n\t\t\t50: {\n\t\t\t\ttitle: \"Green 50\",\n\t\t\t\thsl: [\n\t\t\t\t\t157,\n\t\t\t\t\t89,\n\t\t\t\t\t95\n\t\t\t\t]\n\t\t\t},\n\t\t\t100: {\n\t\t\t\ttitle: \"Green 100\",\n\t\t\t\thsl: [\n\t\t\t\t\t158,\n\t\t\t\t\t89,\n\t\t\t\t\t88\n\t\t\t\t]\n\t\t\t},\n\t\t\t200: {\n\t\t\t\ttitle: \"Green 200\",\n\t\t\t\thsl: [\n\t\t\t\t\t158,\n\t\t\t\t\t87,\n\t\t\t\t\t82\n\t\t\t\t]\n\t\t\t},\n\t\t\t300: {\n\t\t\t\ttitle: \"Green 300\",\n\t\t\t\thsl: [\n\t\t\t\t\t158,\n\t\t\t\t\t86,\n\t\t\t\t\t65\n\t\t\t\t]\n\t\t\t},\n\t\t\t400: {\n\t\t\t\ttitle: \"Green 400\",\n\t\t\t\thsl: [\n\t\t\t\t\t159,\n\t\t\t\t\t88,\n\t\t\t\t\t50\n\t\t\t\t]\n\t\t\t},\n\t\t\t500: {\n\t\t\t\ttitle: \"Green 500\",\n\t\t\t\thsl: [\n\t\t\t\t\t159,\n\t\t\t\t\t96,\n\t\t\t\t\t37\n\t\t\t\t]\n\t\t\t},\n\t\t\t600: {\n\t\t\t\ttitle: \"Green 600\",\n\t\t\t\thsl: [\n\t\t\t\t\t159,\n\t\t\t\t\t98,\n\t\t\t\t\t24\n\t\t\t\t]\n\t\t\t},\n\t\t\t700: {\n\t\t\t\ttitle: \"Green 700\",\n\t\t\t\thsl: [\n\t\t\t\t\t158,\n\t\t\t\t\t98,\n\t\t\t\t\t16\n\t\t\t\t]\n\t\t\t},\n\t\t\t800: {\n\t\t\t\ttitle: \"Green 800\",\n\t\t\t\thsl: [\n\t\t\t\t\t158,\n\t\t\t\t\t91,\n\t\t\t\t\t10\n\t\t\t\t]\n\t\t\t},\n\t\t\t900: {\n\t\t\t\ttitle: \"Green 900\",\n\t\t\t\thsl: [\n\t\t\t\t\t162,\n\t\t\t\t\t72,\n\t\t\t\t\t8\n\t\t\t\t]\n\t\t\t},\n\t\t\t950: {\n\t\t\t\ttitle: \"Green 950\",\n\t\t\t\thsl: [\n\t\t\t\t\t172,\n\t\t\t\t\t51,\n\t\t\t\t\t6\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t},\n\tcyan: {\n\t\ttitle: \"Cyan\",\n\t\ttints: {\n\t\t\t50: {\n\t\t\t\ttitle: \"Cyan 50\",\n\t\t\t\thsl: [\n\t\t\t\t\t180,\n\t\t\t\t\t92,\n\t\t\t\t\t95\n\t\t\t\t]\n\t\t\t},\n\t\t\t100: {\n\t\t\t\ttitle: \"Cyan 100\",\n\t\t\t\thsl: [\n\t\t\t\t\t180,\n\t\t\t\t\t91,\n\t\t\t\t\t88\n\t\t\t\t]\n\t\t\t},\n\t\t\t200: {\n\t\t\t\ttitle: \"Cyan 200\",\n\t\t\t\thsl: [\n\t\t\t\t\t180,\n\t\t\t\t\t87,\n\t\t\t\t\t78\n\t\t\t\t]\n\t\t\t},\n\t\t\t300: {\n\t\t\t\ttitle: \"Cyan 300\",\n\t\t\t\thsl: [\n\t\t\t\t\t180,\n\t\t\t\t\t81,\n\t\t\t\t\t66\n\t\t\t\t]\n\t\t\t},\n\t\t\t400: {\n\t\t\t\ttitle: \"Cyan 400\",\n\t\t\t\thsl: [\n\t\t\t\t\t180,\n\t\t\t\t\t81,\n\t\t\t\t\t49\n\t\t\t\t]\n\t\t\t},\n\t\t\t500: {\n\t\t\t\ttitle: \"Cyan 500\",\n\t\t\t\thsl: [\n\t\t\t\t\t182,\n\t\t\t\t\t96,\n\t\t\t\t\t38\n\t\t\t\t]\n\t\t\t},\n\t\t\t600: {\n\t\t\t\ttitle: \"Cyan 600\",\n\t\t\t\thsl: [\n\t\t\t\t\t185,\n\t\t\t\t\t96,\n\t\t\t\t\t26\n\t\t\t\t]\n\t\t\t},\n\t\t\t700: {\n\t\t\t\ttitle: \"Cyan 700\",\n\t\t\t\thsl: [\n\t\t\t\t\t185,\n\t\t\t\t\t95,\n\t\t\t\t\t16\n\t\t\t\t]\n\t\t\t},\n\t\t\t800: {\n\t\t\t\ttitle: \"Cyan 800\",\n\t\t\t\thsl: [\n\t\t\t\t\t187,\n\t\t\t\t\t86,\n\t\t\t\t\t11\n\t\t\t\t]\n\t\t\t},\n\t\t\t900: {\n\t\t\t\ttitle: \"Cyan 900\",\n\t\t\t\thsl: [\n\t\t\t\t\t188,\n\t\t\t\t\t68,\n\t\t\t\t\t9\n\t\t\t\t]\n\t\t\t},\n\t\t\t950: {\n\t\t\t\ttitle: \"Cyan 950\",\n\t\t\t\thsl: [\n\t\t\t\t\t196,\n\t\t\t\t\t37,\n\t\t\t\t\t8\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t}\n};\n/** @internal */\nfunction hexToRgb(hex) {\n\tlet result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n\tif (!result) throw Error(\"input is not valid hex\");\n\treturn [\n\t\tparseInt(result[1], 16),\n\t\tparseInt(result[2], 16),\n\t\tparseInt(result[3], 16)\n\t];\n}\n/**\n* @see https://css-tricks.com/converting-color-spaces-in-javascript/\n*\n* @internal\n*/\nfunction rgbToHsl([r, g, b]) {\n\tr /= 255, g /= 255, b /= 255;\n\tlet cmin = Math.min(r, g, b), cmax = Math.max(r, g, b), delta = cmax - cmin, h = 0, s = 0, l = 0;\n\treturn h = delta == 0 ? 0 : cmax == r ? (g - b) / delta % 6 : cmax == g ? (b - r) / delta + 2 : (r - g) / delta + 4, h = Math.round(h * 60), h < 0 && (h += 360), l = (cmax + cmin) / 2, s = delta == 0 ? 0 : delta / (1 - Math.abs(2 * l - 1)), s = +(s * 100).toFixed(0), l = +(l * 100).toFixed(0), [\n\t\th,\n\t\ts,\n\t\tl\n\t];\n}\n/** @internal */\nfunction clamp(num) {\n\treturn Math.max(Math.min(num, 255), 0);\n}\nfunction darkenChannel(backdrop, source) {\n\treturn Math.min(backdrop, source);\n}\n/**\n* Apply the `darken` blend mode\n* Source: https://www.w3.org/TR/compositing-1/#blendingdarken\n*\n* @internal\n*/\nfunction darken(b, s) {\n\treturn [\n\t\tMath.round(clamp(darkenChannel(b[0] / 255, s[0] / 255) * 255)),\n\t\tMath.round(clamp(darkenChannel(b[1] / 255, s[1] / 255) * 255)),\n\t\tMath.round(clamp(darkenChannel(b[2] / 255, s[2] / 255) * 255))\n\t];\n}\n/** @internal */\nfunction interpolate(min, max, val) {\n\treturn min + (max - min) * val;\n}\n/** @internal */\nfunction limit(darkest, lightest, source) {\n\treturn [\n\t\tMath.round(interpolate(darkest[0], lightest[0], source[0] / 255)),\n\t\tMath.round(interpolate(darkest[1], lightest[1], source[1] / 255)),\n\t\tMath.round(interpolate(darkest[2], lightest[2], source[2] / 255))\n\t];\n}\nfunction screenChannel(backdrop, source) {\n\treturn backdrop + source - backdrop * source;\n}\n/**\n* Apply the `screen` blend mode\n* Source: https://www.w3.org/TR/compositing-1/#blendingscreen\n*\n* @internal\n*/\nfunction screen(b, s) {\n\treturn [\n\t\tMath.round(clamp(screenChannel(b[0] / 255, s[0] / 255) * 255)),\n\t\tMath.round(clamp(screenChannel(b[1] / 255, s[1] / 255) * 255)),\n\t\tMath.round(clamp(screenChannel(b[2] / 255, s[2] / 255) * 255))\n\t];\n}\nexport { COLOR_HUES, COLOR_TINTS, black, blue, buildTints, color, config, cyan, darken, gray, green, hexToRgb, hslToRgb, hues, limit, magenta, orange, purple, red, rgbToHex, rgbToHsl, screen, white, yellow };\n\n//# sourceMappingURL=index.js.map","import { COLOR_HUES, COLOR_TINTS, color } from \"@sanity/color\";\nconst defaultThemeConfig = {\n\t_version: 2,\n\tavatar: {\n\t\tsizes: [\n\t\t\t{\n\t\t\t\tdistance: -4,\n\t\t\t\tsize: 19\n\t\t\t},\n\t\t\t{\n\t\t\t\tdistance: -4,\n\t\t\t\tsize: 25\n\t\t\t},\n\t\t\t{\n\t\t\t\tdistance: -8,\n\t\t\t\tsize: 33\n\t\t\t},\n\t\t\t{\n\t\t\t\tdistance: -12,\n\t\t\t\tsize: 49\n\t\t\t}\n\t\t],\n\t\tfocusRing: {\n\t\t\toffset: 1,\n\t\t\twidth: 1\n\t\t}\n\t},\n\tbutton: {\n\t\ttextWeight: \"medium\",\n\t\tborder: { width: 1 },\n\t\tfocusRing: {\n\t\t\toffset: -1,\n\t\t\twidth: 1\n\t\t}\n\t},\n\tcard: {\n\t\tborder: { width: 1 },\n\t\tfocusRing: {\n\t\t\toffset: -1,\n\t\t\twidth: 1\n\t\t},\n\t\tshadow: { outline: .5 }\n\t},\n\tcontainer: [\n\t\t320,\n\t\t640,\n\t\t960,\n\t\t1280,\n\t\t1600,\n\t\t1920\n\t],\n\tmedia: [\n\t\t360,\n\t\t600,\n\t\t900,\n\t\t1200,\n\t\t1800,\n\t\t2400\n\t],\n\tlayer: {\n\t\tdialog: { zOffset: 600 },\n\t\tpopover: { zOffset: 400 },\n\t\ttooltip: { zOffset: 200 }\n\t},\n\tradius: [\n\t\t0,\n\t\t1,\n\t\t3,\n\t\t6,\n\t\t9,\n\t\t12,\n\t\t21\n\t],\n\tshadow: [\n\t\tnull,\n\t\t{\n\t\t\tumbra: [\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t0\n\t\t\t],\n\t\t\tpenumbra: [\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t0\n\t\t\t],\n\t\t\tambient: [\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t0\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\tumbra: [\n\t\t\t\t0,\n\t\t\t\t3,\n\t\t\t\t5,\n\t\t\t\t-2\n\t\t\t],\n\t\t\tpenumbra: [\n\t\t\t\t0,\n\t\t\t\t6,\n\t\t\t\t10,\n\t\t\t\t0\n\t\t\t],\n\t\t\tambient: [\n\t\t\t\t0,\n\t\t\t\t1,\n\t\t\t\t18,\n\t\t\t\t1\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\tumbra: [\n\t\t\t\t0,\n\t\t\t\t7,\n\t\t\t\t8,\n\t\t\t\t-4\n\t\t\t],\n\t\t\tpenumbra: [\n\t\t\t\t0,\n\t\t\t\t12,\n\t\t\t\t17,\n\t\t\t\t2\n\t\t\t],\n\t\t\tambient: [\n\t\t\t\t0,\n\t\t\t\t5,\n\t\t\t\t22,\n\t\t\t\t4\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\tumbra: [\n\t\t\t\t0,\n\t\t\t\t9,\n\t\t\t\t11,\n\t\t\t\t-5\n\t\t\t],\n\t\t\tpenumbra: [\n\t\t\t\t0,\n\t\t\t\t18,\n\t\t\t\t28,\n\t\t\t\t2\n\t\t\t],\n\t\t\tambient: [\n\t\t\t\t0,\n\t\t\t\t7,\n\t\t\t\t34,\n\t\t\t\t6\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\tumbra: [\n\t\t\t\t0,\n\t\t\t\t11,\n\t\t\t\t15,\n\t\t\t\t-7\n\t\t\t],\n\t\t\tpenumbra: [\n\t\t\t\t0,\n\t\t\t\t24,\n\t\t\t\t38,\n\t\t\t\t3\n\t\t\t],\n\t\t\tambient: [\n\t\t\t\t0,\n\t\t\t\t9,\n\t\t\t\t46,\n\t\t\t\t8\n\t\t\t]\n\t\t}\n\t],\n\tspace: [\n\t\t0,\n\t\t4,\n\t\t8,\n\t\t12,\n\t\t20,\n\t\t32,\n\t\t52,\n\t\t84,\n\t\t136,\n\t\t220\n\t],\n\tinput: {\n\t\tborder: { width: 1 },\n\t\tcheckbox: {\n\t\t\tsize: 17,\n\t\t\tfocusRing: {\n\t\t\t\toffset: -1,\n\t\t\t\twidth: 1\n\t\t\t}\n\t\t},\n\t\tradio: {\n\t\t\tsize: 17,\n\t\t\tmarkSize: 9,\n\t\t\tfocusRing: {\n\t\t\t\toffset: -1,\n\t\t\t\twidth: 1\n\t\t\t}\n\t\t},\n\t\tswitch: {\n\t\t\twidth: 25,\n\t\t\theight: 17,\n\t\t\tpadding: 5,\n\t\t\ttransitionDurationMs: 150,\n\t\t\ttransitionTimingFunction: \"ease-out\",\n\t\t\tfocusRing: {\n\t\t\t\toffset: 1,\n\t\t\t\twidth: 1\n\t\t\t}\n\t\t},\n\t\tselect: { focusRing: {\n\t\t\toffset: -1,\n\t\t\twidth: 1\n\t\t} },\n\t\ttext: { focusRing: {\n\t\t\toffset: -1,\n\t\t\twidth: 1\n\t\t} }\n\t},\n\tstyle: { button: { root: { transition: \"background-color 100ms,border-color 100ms,color 100ms\" } } }\n}, defaultThemeFonts = {\n\tcode: {\n\t\tfamily: \"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace\",\n\t\tweights: {\n\t\t\tregular: 400,\n\t\t\tmedium: 500,\n\t\t\tsemibold: 600,\n\t\t\tbold: 700\n\t\t},\n\t\tsizes: [\n\t\t\t{\n\t\t\t\tascenderHeight: 4,\n\t\t\t\tdescenderHeight: 4,\n\t\t\t\tfontSize: 10,\n\t\t\t\ticonSize: 17,\n\t\t\t\tlineHeight: 15,\n\t\t\t\tletterSpacing: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 5,\n\t\t\t\tdescenderHeight: 5,\n\t\t\t\tfontSize: 13,\n\t\t\t\ticonSize: 21,\n\t\t\t\tlineHeight: 19,\n\t\t\t\tletterSpacing: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 6,\n\t\t\t\tdescenderHeight: 6,\n\t\t\t\tfontSize: 16,\n\t\t\t\ticonSize: 25,\n\t\t\t\tlineHeight: 23,\n\t\t\t\tletterSpacing: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 7,\n\t\t\t\tdescenderHeight: 7,\n\t\t\t\tfontSize: 19,\n\t\t\t\ticonSize: 29,\n\t\t\t\tlineHeight: 27,\n\t\t\t\tletterSpacing: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 8,\n\t\t\t\tdescenderHeight: 8,\n\t\t\t\tfontSize: 22,\n\t\t\t\ticonSize: 33,\n\t\t\t\tlineHeight: 31,\n\t\t\t\tletterSpacing: 0\n\t\t\t}\n\t\t]\n\t},\n\theading: {\n\t\tfamily: \"Inter, -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, \\\"Helvetica Neue\\\", \\\"Liberation Sans\\\", Helvetica, Arial, system-ui, sans-serif\",\n\t\tweights: {\n\t\t\tregular: 700,\n\t\t\tmedium: 800,\n\t\t\tsemibold: 900,\n\t\t\tbold: 900\n\t\t},\n\t\tsizes: [\n\t\t\t{\n\t\t\t\tascenderHeight: 5,\n\t\t\t\tdescenderHeight: 5,\n\t\t\t\tfontSize: 13,\n\t\t\t\ticonSize: 17,\n\t\t\t\tlineHeight: 19,\n\t\t\t\tletterSpacing: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 6,\n\t\t\t\tdescenderHeight: 6,\n\t\t\t\tfontSize: 16,\n\t\t\t\ticonSize: 25,\n\t\t\t\tlineHeight: 23,\n\t\t\t\tletterSpacing: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 7,\n\t\t\t\tdescenderHeight: 7,\n\t\t\t\tfontSize: 21,\n\t\t\t\ticonSize: 33,\n\t\t\t\tlineHeight: 29,\n\t\t\t\tletterSpacing: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 8,\n\t\t\t\tdescenderHeight: 8,\n\t\t\t\tfontSize: 27,\n\t\t\t\ticonSize: 41,\n\t\t\t\tlineHeight: 35,\n\t\t\t\tletterSpacing: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 9.5,\n\t\t\t\tdescenderHeight: 8.5,\n\t\t\t\tfontSize: 33,\n\t\t\t\ticonSize: 49,\n\t\t\t\tlineHeight: 41,\n\t\t\t\tletterSpacing: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 10.5,\n\t\t\t\tdescenderHeight: 9.5,\n\t\t\t\tfontSize: 38,\n\t\t\t\ticonSize: 53,\n\t\t\t\tlineHeight: 47,\n\t\t\t\tletterSpacing: 0\n\t\t\t}\n\t\t]\n\t},\n\tlabel: {\n\t\tfamily: \"Inter, -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, \\\"Helvetica Neue\\\", \\\"Liberation Sans\\\", system-ui, sans-serif\",\n\t\tweights: {\n\t\t\tregular: 600,\n\t\t\tmedium: 700,\n\t\t\tsemibold: 800,\n\t\t\tbold: 900\n\t\t},\n\t\tsizes: [\n\t\t\t{\n\t\t\t\tascenderHeight: 2,\n\t\t\t\tdescenderHeight: 2,\n\t\t\t\tfontSize: 8.1,\n\t\t\t\ticonSize: 13,\n\t\t\t\tlineHeight: 10,\n\t\t\t\tletterSpacing: .5\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 2,\n\t\t\t\tdescenderHeight: 2,\n\t\t\t\tfontSize: 9.5,\n\t\t\t\ticonSize: 15,\n\t\t\t\tlineHeight: 11,\n\t\t\t\tletterSpacing: .5\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 2,\n\t\t\t\tdescenderHeight: 2,\n\t\t\t\tfontSize: 10.8,\n\t\t\t\ticonSize: 17,\n\t\t\t\tlineHeight: 12,\n\t\t\t\tletterSpacing: .5\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 2,\n\t\t\t\tdescenderHeight: 2,\n\t\t\t\tfontSize: 12.25,\n\t\t\t\ticonSize: 19,\n\t\t\t\tlineHeight: 13,\n\t\t\t\tletterSpacing: .5\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 2,\n\t\t\t\tdescenderHeight: 2,\n\t\t\t\tfontSize: 13.6,\n\t\t\t\ticonSize: 21,\n\t\t\t\tlineHeight: 14,\n\t\t\t\tletterSpacing: .5\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 2,\n\t\t\t\tdescenderHeight: 2,\n\t\t\t\tfontSize: 15,\n\t\t\t\ticonSize: 23,\n\t\t\t\tlineHeight: 15,\n\t\t\t\tletterSpacing: .5\n\t\t\t}\n\t\t]\n\t},\n\ttext: {\n\t\tfamily: \"Inter, -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, \\\"Helvetica Neue\\\", \\\"Liberation Sans\\\", Helvetica, Arial, system-ui, sans-serif\",\n\t\tweights: {\n\t\t\tregular: 400,\n\t\t\tmedium: 500,\n\t\t\tsemibold: 600,\n\t\t\tbold: 700\n\t\t},\n\t\tsizes: [\n\t\t\t{\n\t\t\t\tascenderHeight: 4,\n\t\t\t\tdescenderHeight: 4,\n\t\t\t\tfontSize: 10,\n\t\t\t\ticonSize: 17,\n\t\t\t\tlineHeight: 15,\n\t\t\t\tletterSpacing: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 5,\n\t\t\t\tdescenderHeight: 5,\n\t\t\t\tfontSize: 13,\n\t\t\t\ticonSize: 21,\n\t\t\t\tlineHeight: 19,\n\t\t\t\tletterSpacing: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 6,\n\t\t\t\tdescenderHeight: 6,\n\t\t\t\tfontSize: 15,\n\t\t\t\ticonSize: 25,\n\t\t\t\tlineHeight: 23,\n\t\t\t\tletterSpacing: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 7,\n\t\t\t\tdescenderHeight: 7,\n\t\t\t\tfontSize: 18,\n\t\t\t\ticonSize: 29,\n\t\t\t\tlineHeight: 27,\n\t\t\t\tletterSpacing: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\tascenderHeight: 8,\n\t\t\t\tdescenderHeight: 8,\n\t\t\t\tfontSize: 21,\n\t\t\t\ticonSize: 33,\n\t\t\t\tlineHeight: 31,\n\t\t\t\tletterSpacing: 0\n\t\t\t}\n\t\t]\n\t}\n};\n/**\n* Defines a lazy, self-replacing property on `obj`.\n*\n* On first access the `factory` is called and the getter is replaced with the\n* computed plain value — subsequent reads have zero overhead.\n*\n* The property is enumerable (visible in `Object.keys` / spread) in both states.\n*\n* @internal\n*/\nfunction defineLazyProperty(obj, key, factory) {\n\tObject.defineProperty(obj, key, {\n\t\tget() {\n\t\t\tlet value = factory();\n\t\t\treturn Object.defineProperty(obj, key, {\n\t\t\t\tvalue,\n\t\t\t\tenumerable: !0,\n\t\t\t\twritable: !1,\n\t\t\t\tconfigurable: !1\n\t\t\t}), value;\n\t\t},\n\t\tenumerable: !0,\n\t\tconfigurable: !0\n\t});\n}\nconst cache$4 = /* @__PURE__ */ new WeakMap(), V0_TONES = [\n\t\"transparent\",\n\t\"default\",\n\t\"primary\",\n\t\"positive\",\n\t\"caution\",\n\t\"critical\"\n];\nfunction lazyV0Scheme(schemeKey, color) {\n\tlet scheme = {};\n\tfor (let tone of V0_TONES) defineLazyProperty(scheme, tone, () => themeColor_v2_v0(color[schemeKey][tone]));\n\treturn scheme;\n}\n/** @internal */\nfunction v2_v0(v2) {\n\tlet cachedTheme = cache$4.get(v2);\n\tif (cachedTheme) return cachedTheme;\n\tlet { avatar, button, color, container, font: fonts, input, media, radius, shadow: shadows, space, style: styles } = v2, v0Color = {};\n\tdefineLazyProperty(v0Color, \"light\", () => lazyV0Scheme(\"light\", color)), defineLazyProperty(v0Color, \"dark\", () => lazyV0Scheme(\"dark\", color));\n\tlet theme = {\n\t\t_version: 0,\n\t\tavatar,\n\t\tbutton,\n\t\tcontainer,\n\t\tcolor: v0Color,\n\t\tfocusRing: input.text.focusRing,\n\t\tfonts,\n\t\tinput,\n\t\tmedia,\n\t\tradius,\n\t\tshadows,\n\t\tspace,\n\t\tstyles,\n\t\tv2\n\t};\n\treturn cache$4.set(v2, theme), theme;\n}\nfunction themeColor_v2_v0(color_v2) {\n\treturn {\n\t\tbase: {\n\t\t\tbg: color_v2.bg,\n\t\t\tfg: color_v2.fg,\n\t\t\tborder: color_v2.border,\n\t\t\tfocusRing: color_v2.focusRing,\n\t\t\tshadow: color_v2.shadow\n\t\t},\n\t\tbutton: color_v2.button,\n\t\tcard: color_v2.selectable.default,\n\t\tdark: color_v2._dark,\n\t\tinput: {\n\t\t\tdefault: inputStatesThemeColor_v2_v0(color_v2.input.default),\n\t\t\tinvalid: inputStatesThemeColor_v2_v0(color_v2.input.invalid)\n\t\t},\n\t\tmuted: {\n\t\t\t...color_v2.button.ghost,\n\t\t\ttransparent: color_v2.button.ghost.default\n\t\t},\n\t\tsolid: {\n\t\t\t...color_v2.button.default,\n\t\t\ttransparent: color_v2.button.default.default\n\t\t},\n\t\tselectable: color_v2.selectable,\n\t\tspot: {\n\t\t\tgray: color_v2.avatar.gray.bg,\n\t\t\tblue: color_v2.avatar.blue.bg,\n\t\t\tpurple: color_v2.avatar.purple.bg,\n\t\t\tmagenta: color_v2.avatar.magenta.bg,\n\t\t\tred: color_v2.avatar.red.bg,\n\t\t\torange: color_v2.avatar.orange.bg,\n\t\t\tyellow: color_v2.avatar.yellow.bg,\n\t\t\tgreen: color_v2.avatar.green.bg,\n\t\t\tcyan: color_v2.avatar.cyan.bg\n\t\t},\n\t\tsyntax: color_v2.syntax\n\t};\n}\nfunction inputStatesThemeColor_v2_v0(t) {\n\treturn {\n\t\tenabled: inputStateThemeColor_v2_v0(t.enabled),\n\t\tdisabled: inputStateThemeColor_v2_v0(t.disabled),\n\t\treadOnly: inputStateThemeColor_v2_v0(t.readOnly),\n\t\thovered: inputStateThemeColor_v2_v0(t.hovered)\n\t};\n}\nfunction inputStateThemeColor_v2_v0(t) {\n\treturn {\n\t\tbg: t.bg,\n\t\tbg2: t.muted.bg,\n\t\tborder: t.border,\n\t\tfg: t.fg,\n\t\tplaceholder: t.placeholder\n\t};\n}\n/** @public */\nconst THEME_COLOR_SCHEMES = [\"light\", \"dark\"], THEME_COLOR_BLEND_MODES = [\"multiply\", \"screen\"], THEME_COLOR_CARD_TONES = [\n\t\"transparent\",\n\t\"default\",\n\t\"neutral\",\n\t\"primary\",\n\t\"suggest\",\n\t\"positive\",\n\t\"caution\",\n\t\"critical\"\n], THEME_COLOR_STATE_TONES = [\n\t\"default\",\n\t\"neutral\",\n\t\"primary\",\n\t\"suggest\",\n\t\"positive\",\n\t\"caution\",\n\t\"critical\"\n], THEME_COLOR_STATES = [\n\t\"enabled\",\n\t\"hovered\",\n\t\"pressed\",\n\t\"selected\",\n\t\"disabled\"\n], THEME_COLOR_BUTTON_MODES = [\n\t\"default\",\n\t\"ghost\",\n\t\"bleed\"\n], THEME_COLOR_INPUT_MODES = [\"default\", \"invalid\"], THEME_COLOR_INPUT_STATES = [\n\t\"enabled\",\n\t\"hovered\",\n\t\"readOnly\",\n\t\"disabled\"\n], THEME_COLOR_AVATAR_COLORS = COLOR_HUES;\n/** @internal */\nfunction isColorBlendModeValue(str) {\n\treturn THEME_COLOR_BLEND_MODES.includes(str);\n}\n/** @internal */\nfunction isColorHueKey(str) {\n\treturn COLOR_HUES.includes(str);\n}\n/** @internal */\nfunction isColorTintKey(str) {\n\treturn COLOR_TINTS.includes(str);\n}\n/** @internal */\nfunction isColorButtonMode(str) {\n\treturn THEME_COLOR_BUTTON_MODES.includes(str);\n}\n/** @public */\nconst COLOR_CONFIG_STATE_KEYS = [\n\t\"_hue\",\n\t\"bg\",\n\t\"fg\",\n\t\"border\",\n\t\"focusRing\",\n\t\"muted/fg\",\n\t\"accent/fg\",\n\t\"link/fg\",\n\t\"code/bg\",\n\t\"code/fg\",\n\t\"skeleton/from\",\n\t\"skeleton/to\",\n\t\"status/dot\",\n\t\"status/icon\"\n], COLOR_CONFIG_CARD_KEYS = [\n\t...COLOR_CONFIG_STATE_KEYS,\n\t\"_hue\",\n\t\"bg\",\n\t\"fg\",\n\t\"border\",\n\t\"focusRing\",\n\t\"shadow/outline\",\n\t\"shadow/umbra\",\n\t\"shadow/penumbra\",\n\t\"shadow/ambient\"\n], COLOR_CONFIG_BLEND_KEYS = [\"_blend\"], COLOR_CONFIG_AVATAR_COLORS = [\"*\", ...THEME_COLOR_AVATAR_COLORS], COLOR_CONFIG_CARD_TONES = [\"*\", ...THEME_COLOR_CARD_TONES], COLOR_CONFIG_STATE_TONES = [\"*\", ...THEME_COLOR_STATE_TONES], COLOR_CONFIG_STATES = [\"*\", ...THEME_COLOR_STATES], COLOR_CONFIG_INPUT_MODES = [\"*\", ...THEME_COLOR_INPUT_MODES], COLOR_CONFIG_INPUT_STATES = [\"*\", ...THEME_COLOR_INPUT_STATES];\n/** @internal */\nfunction isColorConfigBaseTone(str) {\n\treturn COLOR_CONFIG_CARD_TONES.includes(str);\n}\n/** @internal */\nfunction isColorConfigBaseKey(str) {\n\treturn COLOR_CONFIG_CARD_KEYS.includes(str);\n}\n/** @internal */\nfunction isColorConfigStateKey(str) {\n\treturn COLOR_CONFIG_STATE_KEYS.includes(str);\n}\n/** @internal */\nfunction isColorConfigStateTone(str) {\n\treturn COLOR_CONFIG_STATE_TONES.includes(str);\n}\n/** @internal */\nfunction isColorConfigBlendKey(str) {\n\treturn COLOR_CONFIG_BLEND_KEYS.includes(str);\n}\n/** @internal */\nfunction isColorTokenValue(str) {\n\treturn parseTokenValue(str)?.type === \"color\" || parseTokenValue(str)?.type === \"hue\";\n}\n/** @internal */\nfunction isColorValue(str) {\n\treturn str === \"black\" || str === \"white\";\n}\n/** @internal */\nfunction isColorOpacityValue(str) {\n\treturn str === \"0\" || /^0\\.[0-9]+$/.test(str) || str === \"1\";\n}\nfunction isColorMixPercentValue(str) {\n\treturn /^\\d+%$/.test(str);\n}\n/** @internal */\nfunction parseTokenValue(str) {\n\tlet segments = str.split(\"/\"), nextSegment = segments.shift() || \"\", [segment0, segment0mix] = nextSegment.split(\" \");\n\tif (isColorTintKey(segment0)) {\n\t\tlet tint = segment0, segment1 = segments.shift() || \"\";\n\t\treturn isColorMixPercentValue(segment0mix) ? {\n\t\t\ttype: \"color\",\n\t\t\ttint,\n\t\t\tmix: Number(segment0mix.slice(0, -1)) / 100\n\t\t} : isColorOpacityValue(segment1) ? {\n\t\t\ttype: \"color\",\n\t\t\ttint,\n\t\t\topacity: Number(segment1)\n\t\t} : {\n\t\t\ttype: \"color\",\n\t\t\ttint\n\t\t};\n\t}\n\tif (isColorValue(segment0)) {\n\t\tlet key = segment0, segment1 = segments.shift() || \"\";\n\t\treturn isColorMixPercentValue(segment0mix) ? {\n\t\t\ttype: \"color\",\n\t\t\tkey,\n\t\t\tmix: Number(segment0mix.slice(0, -1)) / 100\n\t\t} : isColorOpacityValue(segment1) ? {\n\t\t\ttype: \"color\",\n\t\t\tkey,\n\t\t\topacity: Number(segment1)\n\t\t} : {\n\t\t\ttype: \"color\",\n\t\t\tkey\n\t\t};\n\t}\n\tif (isColorHueKey(segment0)) {\n\t\tlet hue = segment0;\n\t\tnextSegment = segments.shift() || \"\";\n\t\tlet [segment1, segment1mix] = nextSegment.split(\" \");\n\t\tif (isColorTintKey(segment1)) {\n\t\t\tlet tint = segment1, segment2 = segments.shift() || \"\";\n\t\t\treturn isColorMixPercentValue(segment1mix) ? {\n\t\t\t\ttype: \"color\",\n\t\t\t\thue,\n\t\t\t\ttint,\n\t\t\t\tmix: Number(segment1mix.slice(0, -1)) / 100\n\t\t\t} : isColorOpacityValue(segment2) ? {\n\t\t\t\ttype: \"color\",\n\t\t\t\thue,\n\t\t\t\ttint,\n\t\t\t\topacity: Number(segment2)\n\t\t\t} : {\n\t\t\t\ttype: \"color\",\n\t\t\t\thue,\n\t\t\t\ttint\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\ttype: \"hue\",\n\t\t\tvalue: hue\n\t\t};\n\t}\n\tif (isColorBlendModeValue(segment0)) return {\n\t\ttype: \"blendMode\",\n\t\tvalue: segment0\n\t};\n}\nfunction compileColorTokenValue(node) {\n\tlet key = \"\";\n\treturn key = node.key === \"black\" || node.key === \"white\" ? node.key : `${node.hue}/${node.tint}`, node.mix === void 0 ? (node.opacity !== void 0 && (key += `/${node.opacity}`), key) : `${key} ${node.mix * 100}%`;\n}\nconst DEFAULT_COLOR_TOKEN_VALUE = [\"500\", \"500\"];\nfunction resolveColorTokenValue(context, value = DEFAULT_COLOR_TOKEN_VALUE) {\n\tlet { hue, scheme } = context, node = parseTokenValue(value[scheme === \"light\" ? 0 : 1]);\n\tif (!node || node.type !== \"color\") throw Error(`Invalid color token: ${value[0]}`);\n\treturn compileColorTokenValue({\n\t\t...node,\n\t\thue: node.hue || hue\n\t});\n}\nconst defaultColorTokens = {\n\tbase: {\n\t\t\"*\": {\n\t\t\t_blend: [\"multiply\", \"screen\"],\n\t\t\taccent: { fg: [\"purple/600\", \"purple/400\"] },\n\t\t\tavatar: { \"*\": {\n\t\t\t\t_blend: [\"screen\", \"multiply\"],\n\t\t\t\tbg: [\"500\", \"400\"],\n\t\t\t\tfg: [\"white\", \"black\"]\n\t\t\t} },\n\t\t\tbackdrop: [\"gray/200/0.5\", \"black/0.5\"],\n\t\t\tbadge: {\n\t\t\t\t\"*\": {\n\t\t\t\t\tbg: [\"100\", \"900\"],\n\t\t\t\t\tfg: [\"600\", \"400\"],\n\t\t\t\t\ticon: [\"500\", \"500\"],\n\t\t\t\t\tdot: [\"500\", \"500\"]\n\t\t\t\t},\n\t\t\t\tpositive: {\n\t\t\t\t\tbg: [\"200 50%\", \"900\"],\n\t\t\t\t\tfg: [\"600\", \"500\"]\n\t\t\t\t},\n\t\t\t\tcaution: {\n\t\t\t\t\tbg: [\"200 50%\", \"900\"],\n\t\t\t\t\tfg: [\"600\", \"500\"]\n\t\t\t\t}\n\t\t\t},\n\t\t\tbg: [\"50\", \"950\"],\n\t\t\tborder: [\"200\", \"800\"],\n\t\t\tcode: {\n\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\tfg: [\"600\", \"400\"]\n\t\t\t},\n\t\t\tfg: [\"800\", \"200\"],\n\t\t\tfocusRing: [\"blue/500\", \"blue/500\"],\n\t\t\ticon: [\"600\", \"400\"],\n\t\t\tkbd: {\n\t\t\t\tbg: [\"white\", \"black\"],\n\t\t\t\tfg: [\"600\", \"400\"],\n\t\t\t\tborder: [\"200\", \"800\"]\n\t\t\t},\n\t\t\tlink: { fg: [\"blue/600\", \"blue/300\"] },\n\t\t\tmuted: {\n\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\tfg: [\"700 75%\", \"300 75%\"]\n\t\t\t},\n\t\t\tshadow: {\n\t\t\t\toutline: [\"500/0.3\", \"500/0.4\"],\n\t\t\t\tumbra: [\"gray/500/0.1\", \"black/0.2\"],\n\t\t\t\tpenumbra: [\"gray/500/0.07\", \"black/0.14\"],\n\t\t\t\tambient: [\"gray/500/0.06\", \"black/0.12\"]\n\t\t\t},\n\t\t\tskeleton: {\n\t\t\t\tfrom: [\"100\", \"900\"],\n\t\t\t\tto: [\"100 50%\", \"900 50%\"]\n\t\t\t}\n\t\t},\n\t\ttransparent: { bg: [\"50\", \"black\"] },\n\t\tdefault: {\n\t\t\tbg: [\"white\", \"950\"],\n\t\t\tfg: [\"800\", \"200\"],\n\t\t\tmuted: { fg: [\"600\", \"400\"] }\n\t\t},\n\t\tprimary: { _hue: \"blue\" },\n\t\tsuggest: { _hue: \"purple\" },\n\t\tpositive: {\n\t\t\t_hue: \"green\",\n\t\t\tshadow: { outline: [\"500/0.4\", \"500/0.4\"] }\n\t\t},\n\t\tcaution: {\n\t\t\t_hue: \"yellow\",\n\t\t\tshadow: { outline: [\"600/0.3\", \"500/0.4\"] }\n\t\t},\n\t\tcritical: { _hue: \"red\" }\n\t},\n\tbutton: {\n\t\tdefault: {\n\t\t\t\"*\": {\n\t\t\t\t\"*\": {\n\t\t\t\t\t_blend: [\"screen\", \"multiply\"],\n\t\t\t\t\taccent: { fg: [\"purple/300\", \"purple/700\"] },\n\t\t\t\t\tavatar: { \"*\": {\n\t\t\t\t\t\t_blend: [\"screen\", \"multiply\"],\n\t\t\t\t\t\tbg: [\"500\", \"400\"],\n\t\t\t\t\t\tfg: [\"white\", \"black\"]\n\t\t\t\t\t} },\n\t\t\t\t\tbadge: { \"*\": {\n\t\t\t\t\t\tbg: [\"900\", \"100\"],\n\t\t\t\t\t\tfg: [\"400\", \"600\"],\n\t\t\t\t\t\tdot: [\"500\", \"500\"],\n\t\t\t\t\t\ticon: [\"500\", \"500\"]\n\t\t\t\t\t} },\n\t\t\t\t\tbg: [\"500\", \"400\"],\n\t\t\t\t\tborder: [\"500/0\", \"400/0\"],\n\t\t\t\t\tcode: {\n\t\t\t\t\t\tbg: [\"500 20%\", \"400 20%\"],\n\t\t\t\t\t\tfg: [\"200\", \"600\"]\n\t\t\t\t\t},\n\t\t\t\t\tfg: [\"white\", \"black\"],\n\t\t\t\t\ticon: [\"100 70%\", \"900 70%\"],\n\t\t\t\t\tkbd: {\n\t\t\t\t\t\tbg: [\"black\", \"white\"],\n\t\t\t\t\t\tfg: [\"200\", \"600\"],\n\t\t\t\t\t\tborder: [\"800\", \"200\"]\n\t\t\t\t\t},\n\t\t\t\t\tlink: { fg: [\"blue/200\", \"blue/600\"] },\n\t\t\t\t\tmuted: {\n\t\t\t\t\t\tbg: [\"950\", \"50\"],\n\t\t\t\t\t\tfg: [\"100 70%\", \"900 70%\"]\n\t\t\t\t\t},\n\t\t\t\t\tskeleton: {\n\t\t\t\t\t\tfrom: [\"900\", \"100\"],\n\t\t\t\t\t\tto: [\"900 50%\", \"100 50%\"]\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\thovered: {\n\t\t\t\t\tbg: [\"600\", \"300\"],\n\t\t\t\t\tborder: [\"700/0\", \"300/0\"]\n\t\t\t\t},\n\t\t\t\tpressed: { bg: [\"700\", \"300\"] },\n\t\t\t\tselected: { bg: [\"700\", \"300\"] },\n\t\t\t\tdisabled: {\n\t\t\t\t\t_hue: \"gray\",\n\t\t\t\t\taccent: { fg: [\"100 70%\", \"900 70%\"] },\n\t\t\t\t\tavatar: { \"*\": {\n\t\t\t\t\t\t_blend: [\"screen\", \"multiply\"],\n\t\t\t\t\t\tbg: [\"gray/500\", \"gray/400\"],\n\t\t\t\t\t\tfg: [\"white\", \"black\"]\n\t\t\t\t\t} },\n\t\t\t\t\tbadge: { \"*\": {\n\t\t\t\t\t\tbg: [\"gray/700\", \"gray/300\"],\n\t\t\t\t\t\tfg: [\"white\", \"black\"],\n\t\t\t\t\t\tdot: [\"white\", \"black\"],\n\t\t\t\t\t\ticon: [\"white\", \"black\"]\n\t\t\t\t\t} },\n\t\t\t\t\tbg: [\"300\", \"600\"],\n\t\t\t\t\tcode: {\n\t\t\t\t\t\tbg: [\"950\", \"50\"],\n\t\t\t\t\t\tfg: [\"300\", \"600\"]\n\t\t\t\t\t},\n\t\t\t\t\tfg: [\"300\", \"600\"],\n\t\t\t\t\tmuted: {\n\t\t\t\t\t\tbg: [\"950\", \"50\"],\n\t\t\t\t\t\tfg: [\"300\", \"600\"]\n\t\t\t\t\t},\n\t\t\t\t\tkbd: {\n\t\t\t\t\t\tbg: [\"black\", \"white\"],\n\t\t\t\t\t\tfg: [\"white\", \"black\"],\n\t\t\t\t\t\tborder: [\"700\", \"300\"]\n\t\t\t\t\t},\n\t\t\t\t\tlink: { fg: [\"100 70%\", \"900 70%\"] }\n\t\t\t\t}\n\t\t\t},\n\t\t\tdefault: {\n\t\t\t\t\"*\": {\n\t\t\t\t\tavatar: { \"*\": {\n\t\t\t\t\t\t_blend: [\"screen\", \"multiply\"],\n\t\t\t\t\t\tbg: [\"500\", \"400\"],\n\t\t\t\t\t\tfg: [\"white\", \"black\"]\n\t\t\t\t\t} },\n\t\t\t\t\tbg: [\"800\", \"200\"],\n\t\t\t\t\tmuted: {\n\t\t\t\t\t\tbg: [\"950\", \"50\"],\n\t\t\t\t\t\tfg: [\"400\", \"600\"]\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\thovered: { bg: [\"900\", \"100\"] },\n\t\t\t\tpressed: { bg: [\"black\", \"white\"] },\n\t\t\t\tselected: { bg: [\"black\", \"white\"] }\n\t\t\t}\n\t\t},\n\t\tghost: {\n\t\t\t\"*\": {\n\t\t\t\t\"*\": {\n\t\t\t\t\t_blend: [\"multiply\", \"screen\"],\n\t\t\t\t\taccent: { fg: [\"purple/700 60%\", \"purple/300 70%\"] },\n\t\t\t\t\tavatar: { \"*\": {\n\t\t\t\t\t\t_blend: [\"screen\", \"multiply\"],\n\t\t\t\t\t\tbg: [\"500\", \"400\"],\n\t\t\t\t\t\tfg: [\"white\", \"black\"]\n\t\t\t\t\t} },\n\t\t\t\t\tbadge: { \"*\": {\n\t\t\t\t\t\tbg: [\"100\", \"900\"],\n\t\t\t\t\t\tfg: [\"600\", \"400\"],\n\t\t\t\t\t\tdot: [\"500\", \"500\"],\n\t\t\t\t\t\ticon: [\"500\", \"500\"]\n\t\t\t\t\t} },\n\t\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\t\tborder: [\"100\", \"900\"],\n\t\t\t\t\tcode: {\n\t\t\t\t\t\tbg: [\"500 10%\", \"400 10%\"],\n\t\t\t\t\t\tfg: [\"700 60%\", \"400 60%\"]\n\t\t\t\t\t},\n\t\t\t\t\tfg: [\"600\", \"400\"],\n\t\t\t\t\ticon: [\"700 60%\", \"300 60%\"],\n\t\t\t\t\tkbd: {\n\t\t\t\t\t\tbg: [\"white\", \"black\"],\n\t\t\t\t\t\tfg: [\"600\", \"400\"],\n\t\t\t\t\t\tborder: [\"200\", \"800\"]\n\t\t\t\t\t},\n\t\t\t\t\tlink: { fg: [\"blue/700 60%\", \"blue/300 60%\"] },\n\t\t\t\t\tmuted: {\n\t\t\t\t\t\tbg: [\"100\", \"950\"],\n\t\t\t\t\t\tfg: [\"700 60%\", \"300 60%\"]\n\t\t\t\t\t},\n\t\t\t\t\tskeleton: {\n\t\t\t\t\t\tfrom: [\"100\", \"900\"],\n\t\t\t\t\t\tto: [\"100 50%\", \"900 50%\"]\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\thovered: {\n\t\t\t\t\tbg: [\"100\", \"900\"],\n\t\t\t\t\tfg: [\"700\", \"300\"]\n\t\t\t\t},\n\t\t\t\tpressed: {\n\t\t\t\t\tbg: [\"200\", \"800\"],\n\t\t\t\t\tfg: [\"800\", \"200\"]\n\t\t\t\t},\n\t\t\t\tselected: {\n\t\t\t\t\tbg: [\"200\", \"800\"],\n\t\t\t\t\tfg: [\"800\", \"200\"]\n\t\t\t\t},\n\t\t\t\tdisabled: {\n\t\t\t\t\t_hue: \"gray\",\n\t\t\t\t\taccent: { fg: [\"200\", \"800\"] },\n\t\t\t\t\tavatar: { \"*\": {\n\t\t\t\t\t\t_blend: [\"screen\", \"multiply\"],\n\t\t\t\t\t\tbg: [\"gray/100\", \"gray/900\"],\n\t\t\t\t\t\tfg: [\"white\", \"black\"]\n\t\t\t\t\t} },\n\t\t\t\t\tbadge: { \"*\": {\n\t\t\t\t\t\t_hue: \"gray\",\n\t\t\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\t\t\tfg: [\"gray/200\", \"gray/800\"],\n\t\t\t\t\t\tdot: [\"gray/200\", \"gray/800\"],\n\t\t\t\t\t\ticon: [\"gray/200\", \"gray/800\"]\n\t\t\t\t\t} },\n\t\t\t\t\tborder: [\"100\", \"900\"],\n\t\t\t\t\tcode: {\n\t\t\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\t\t\tfg: [\"200\", \"800\"]\n\t\t\t\t\t},\n\t\t\t\t\tfg: [\"400\", \"600\"],\n\t\t\t\t\ticon: [\"300\", \"700\"],\n\t\t\t\t\tmuted: { fg: [\"300\", \"700\"] },\n\t\t\t\t\tkbd: {\n\t\t\t\t\t\tbg: [\"white\", \"black\"],\n\t\t\t\t\t\tfg: [\"200\", \"800\"],\n\t\t\t\t\t\tborder: [\"100\", \"900\"]\n\t\t\t\t\t},\n\t\t\t\t\tlink: { fg: [\"200\", \"800\"] }\n\t\t\t\t}\n\t\t\t},\n\t\t\tpositive: { \"*\": { border: [\"600 20%\", \"800\"] } },\n\t\t\tcaution: { \"*\": { border: [\"600 20%\", \"800\"] } }\n\t\t},\n\t\tbleed: { \"*\": {\n\t\t\t\"*\": {\n\t\t\t\t_blend: [\"multiply\", \"screen\"],\n\t\t\t\taccent: { fg: [\"purple/700 70%\", \"purple/300 70%\"] },\n\t\t\t\tavatar: { \"*\": {\n\t\t\t\t\t_blend: [\"screen\", \"multiply\"],\n\t\t\t\t\tbg: [\"500\", \"400\"],\n\t\t\t\t\tfg: [\"white\", \"black\"]\n\t\t\t\t} },\n\t\t\t\tbadge: { \"*\": {\n\t\t\t\t\tbg: [\"100\", \"900\"],\n\t\t\t\t\tfg: [\"600\", \"400\"],\n\t\t\t\t\tdot: [\"500\", \"500\"],\n\t\t\t\t\ticon: [\"500\", \"500\"]\n\t\t\t\t} },\n\t\t\t\tbg: [\"white\", \"black\"],\n\t\t\t\tborder: [\"white/0\", \"black/0\"],\n\t\t\t\tcode: {\n\t\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\t\tfg: [\"700 75%\", \"300 75%\"]\n\t\t\t\t},\n\t\t\t\tfg: [\"700\", \"300\"],\n\t\t\t\ticon: [\"700 75%\", \"300 75%\"],\n\t\t\t\tkbd: {\n\t\t\t\t\tbg: [\"white\", \"black\"],\n\t\t\t\t\tfg: [\"700\", \"300\"],\n\t\t\t\t\tborder: [\"200\", \"800\"]\n\t\t\t\t},\n\t\t\t\tlink: { fg: [\"blue/700 70%\", \"blue/300 70%\"] },\n\t\t\t\tmuted: {\n\t\t\t\t\tbg: [\"100\", \"950\"],\n\t\t\t\t\tfg: [\"700 75%\", \"300 75%\"]\n\t\t\t\t},\n\t\t\t\tskeleton: {\n\t\t\t\t\tfrom: [\"100\", \"900\"],\n\t\t\t\t\tto: [\"100 50%\", \"900 50%\"]\n\t\t\t\t}\n\t\t\t},\n\t\t\thovered: {\n\t\t\t\tbg: [\"50\", \"900\"],\n\t\t\t\tfg: [\"800\", \"200\"],\n\t\t\t\ticon: [\"800 70%\", \"300 70%\"]\n\t\t\t},\n\t\t\tpressed: {\n\t\t\t\tbg: [\"100\", \"800\"],\n\t\t\t\tfg: [\"800\", \"200\"],\n\t\t\t\ticon: [\"800 70%\", \"200 70%\"]\n\t\t\t},\n\t\t\tselected: {\n\t\t\t\tbg: [\"100\", \"900\"],\n\t\t\t\tfg: [\"800\", \"200\"],\n\t\t\t\ticon: [\"800 60%\", \"200 60%\"]\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\t_hue: \"gray\",\n\t\t\t\taccent: { fg: [\"200\", \"800\"] },\n\t\t\t\tavatar: { \"*\": {\n\t\t\t\t\t_blend: [\"screen\", \"multiply\"],\n\t\t\t\t\tbg: [\"gray/100\", \"gray/900\"],\n\t\t\t\t\tfg: [\"white\", \"black\"]\n\t\t\t\t} },\n\t\t\t\tbadge: { \"*\": {\n\t\t\t\t\t_hue: \"gray\",\n\t\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\t\tfg: [\"gray/200\", \"gray/800\"],\n\t\t\t\t\tdot: [\"gray/200\", \"gray/800\"],\n\t\t\t\t\ticon: [\"gray/200\", \"gray/800\"]\n\t\t\t\t} },\n\t\t\t\tcode: {\n\t\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\t\tfg: [\"200\", \"800\"]\n\t\t\t\t},\n\t\t\t\tfg: [\"400\", \"600\"],\n\t\t\t\ticon: [\"300\", \"700\"],\n\t\t\t\tmuted: { fg: [\"400\", \"600\"] },\n\t\t\t\tkbd: {\n\t\t\t\t\tbg: [\"white\", \"black\"],\n\t\t\t\t\tfg: [\"200\", \"800\"],\n\t\t\t\t\tborder: [\"100\", \"900\"]\n\t\t\t\t},\n\t\t\t\tlink: { fg: [\"200\", \"800\"] }\n\t\t\t}\n\t\t} }\n\t},\n\tinput: {\n\t\t\"*\": {\n\t\t\t\"*\": {\n\t\t\t\t_blend: [\"multiply\", \"screen\"],\n\t\t\t\tbg: [\"white\", \"black\"],\n\t\t\t\tborder: [\"200\", \"700\"],\n\t\t\t\tfg: [\"black\", \"200\"],\n\t\t\t\tmuted: { bg: [\"50\", \"950\"] },\n\t\t\t\tplaceholder: [\"400\", \"600\"]\n\t\t\t},\n\t\t\thovered: { border: [\"300\", \"700\"] },\n\t\t\treadOnly: {\n\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\tborder: [\"200\", \"800\"],\n\t\t\t\tfg: [\"800\", \"200\"]\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\tfg: [\"400\", \"600\"],\n\t\t\t\tborder: [\"100\", \"900\"],\n\t\t\t\tplaceholder: [\"200\", \"800 50%\"]\n\t\t\t}\n\t\t},\n\t\tinvalid: { \"*\": {\n\t\t\t_hue: \"red\",\n\t\t\tbg: [\"100\", \"950\"]\n\t\t} }\n\t},\n\tselectable: {\n\t\t\"*\": {\n\t\t\t\"*\": {\n\t\t\t\t_blend: [\"multiply\", \"screen\"],\n\t\t\t\taccent: { fg: [\"purple/700 70%\", \"purple/300 70%\"] },\n\t\t\t\tavatar: { \"*\": {\n\t\t\t\t\t_blend: [\"screen\", \"multiply\"],\n\t\t\t\t\tbg: [\"500\", \"400\"],\n\t\t\t\t\tfg: [\"white\", \"black\"]\n\t\t\t\t} },\n\t\t\t\tbadge: { \"*\": {\n\t\t\t\t\tbg: [\"100\", \"900\"],\n\t\t\t\t\tfg: [\"600\", \"400\"],\n\t\t\t\t\tdot: [\"500\", \"500\"],\n\t\t\t\t\ticon: [\"500\", \"500\"]\n\t\t\t\t} },\n\t\t\t\tbg: [\"white\", \"black\"],\n\t\t\t\tborder: [\"200\", \"800\"],\n\t\t\t\tcode: {\n\t\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\t\tfg: [\"600\", \"400\"]\n\t\t\t\t},\n\t\t\t\tfg: [\"700\", \"300\"],\n\t\t\t\ticon: [\"700 75%\", \"300 75%\"],\n\t\t\t\tkbd: {\n\t\t\t\t\tbg: [\"white\", \"black\"],\n\t\t\t\t\tfg: [\"600\", \"400\"],\n\t\t\t\t\tborder: [\"200\", \"800\"]\n\t\t\t\t},\n\t\t\t\tlink: { fg: [\"blue/700 70%\", \"blue/300 70%\"] },\n\t\t\t\tmuted: {\n\t\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\t\tfg: [\"700 75%\", \"300 75%\"]\n\t\t\t\t},\n\t\t\t\tskeleton: {\n\t\t\t\t\tfrom: [\"100\", \"900\"],\n\t\t\t\t\tto: [\"100 50%\", \"900 50%\"]\n\t\t\t\t}\n\t\t\t},\n\t\t\thovered: { bg: [\"50\", \"950\"] },\n\t\t\tpressed: { bg: [\"100\", \"900\"] },\n\t\t\tselected: {\n\t\t\t\t_blend: [\"screen\", \"multiply\"],\n\t\t\t\taccent: { fg: [\"purple/300\", \"purple/700\"] },\n\t\t\t\tavatar: { \"*\": {\n\t\t\t\t\t_blend: [\"multiply\", \"screen\"],\n\t\t\t\t\tbg: [\"white\", \"black\"],\n\t\t\t\t\tfg: [\"black\", \"white\"]\n\t\t\t\t} },\n\t\t\t\tbadge: { \"*\": {\n\t\t\t\t\tbg: [\"900\", \"100\"],\n\t\t\t\t\tfg: [\"400\", \"600\"],\n\t\t\t\t\tdot: [\"500\", \"500\"],\n\t\t\t\t\ticon: [\"500\", \"500\"]\n\t\t\t\t} },\n\t\t\t\tbg: [\"500\", \"400\"],\n\t\t\t\tborder: [\"500 20%\", \"400 20%\"],\n\t\t\t\tcode: {\n\t\t\t\t\tbg: [\"500 20%\", \"400 20%\"],\n\t\t\t\t\tfg: [\"200\", \"600\"]\n\t\t\t\t},\n\t\t\t\tfg: [\"white\", \"black\"],\n\t\t\t\ticon: [\"100 70%\", \"900 70%\"],\n\t\t\t\tkbd: {\n\t\t\t\t\tbg: [\"black\", \"white\"],\n\t\t\t\t\tfg: [\"200\", \"600\"],\n\t\t\t\t\tborder: [\"800\", \"200\"]\n\t\t\t\t},\n\t\t\t\tlink: { fg: [\"blue/200\", \"blue/600\"] },\n\t\t\t\tmuted: {\n\t\t\t\t\tbg: [\"500 10%\", \"400 10%\"],\n\t\t\t\t\tfg: [\"100 70%\", \"900 70%\"]\n\t\t\t\t},\n\t\t\t\tskeleton: {\n\t\t\t\t\tfrom: [\"900\", \"100\"],\n\t\t\t\t\tto: [\"900 50%\", \"100 50%\"]\n\t\t\t\t}\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\t_hue: \"gray\",\n\t\t\t\taccent: { fg: [\"200\", \"800\"] },\n\t\t\t\tavatar: { \"*\": {\n\t\t\t\t\t_blend: [\"screen\", \"multiply\"],\n\t\t\t\t\tbg: [\"gray/100\", \"gray/900\"],\n\t\t\t\t\tfg: [\"white\", \"black\"]\n\t\t\t\t} },\n\t\t\t\tbadge: { \"*\": {\n\t\t\t\t\t_hue: \"gray\",\n\t\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\t\tfg: [\"gray/200\", \"gray/800\"],\n\t\t\t\t\tdot: [\"gray/200\", \"gray/800\"],\n\t\t\t\t\ticon: [\"gray/200\", \"gray/800\"]\n\t\t\t\t} },\n\t\t\t\tborder: [\"100\", \"900\"],\n\t\t\t\tcode: {\n\t\t\t\t\tbg: [\"50\", \"950\"],\n\t\t\t\t\tfg: [\"200\", \"800\"]\n\t\t\t\t},\n\t\t\t\tfg: [\"200\", \"800\"],\n\t\t\t\ticon: [\"200\", \"800\"],\n\t\t\t\tkbd: {\n\t\t\t\t\tbg: [\"white\", \"black\"],\n\t\t\t\t\tfg: [\"200\", \"800\"],\n\t\t\t\t\tborder: [\"100\", \"900\"]\n\t\t\t\t},\n\t\t\t\tlink: { fg: [\"200\", \"800\"] },\n\t\t\t\tmuted: {\n\t\t\t\t\tbg: [\"50 50%\", \"950 50%\"],\n\t\t\t\t\tfg: [\"200\", \"800\"]\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdefault: { selected: { _hue: \"blue\" } },\n\t\tcritical: { disabled: { bg: [\"50 50%\", \"950 50%\"] } }\n\t},\n\tsyntax: {\n\t\tatrule: [\"purple/600\", \"purple/400\"],\n\t\tattrName: [\"green/600\", \"green/400\"],\n\t\tattrValue: [\"yellow/600\", \"yellow/400\"],\n\t\tattribute: [\"yellow/600\", \"yellow/400\"],\n\t\tboolean: [\"purple/600\", \"purple/400\"],\n\t\tbuiltin: [\"purple/600\", \"purple/400\"],\n\t\tcdata: [\"yellow/600\", \"yellow/400\"],\n\t\tchar: [\"yellow/600\", \"yellow/400\"],\n\t\tclass: [\"orange/600\", \"orange/400\"],\n\t\tclassName: [\"cyan/600\", \"cyan/400\"],\n\t\tcomment: [\"gray/400\", \"gray/600\"],\n\t\tconstant: [\"purple/600\", \"purple/400\"],\n\t\tdeleted: [\"red/600\", \"red/400\"],\n\t\tentity: [\"red/600\", \"red/400\"],\n\t\tfunction: [\"green/600\", \"green/400\"],\n\t\thexcode: [\"blue/600\", \"blue/400\"],\n\t\tid: [\"purple/600\", \"purple/400\"],\n\t\timportant: [\"purple/600\", \"purple/400\"],\n\t\tinserted: [\"yellow/600\", \"yellow/400\"],\n\t\tkeyword: [\"magenta/600\", \"magenta/400\"],\n\t\tnumber: [\"purple/600\", \"purple/400\"],\n\t\toperator: [\"magenta/600\", \"magenta/400\"],\n\t\tproperty: [\"blue/600\", \"blue/400\"],\n\t\tpseudoClass: [\"yellow/600\", \"yellow/400\"],\n\t\tpseudoElement: [\"yellow/600\", \"yellow/400\"],\n\t\tpunctuation: [\"gray/600\", \"gray/400\"],\n\t\tregex: [\"blue/600\", \"blue/400\"],\n\t\tselector: [\"red/600\", \"red/400\"],\n\t\tstring: [\"yellow/600\", \"yellow/400\"],\n\t\tsymbol: [\"purple/600\", \"purple/400\"],\n\t\ttag: [\"red/600\", \"red/400\"],\n\t\tunit: [\"orange/600\", \"orange/400\"],\n\t\turl: [\"red/600\", \"red/400\"],\n\t\tvariable: [\"red/600\", \"red/400\"]\n\t}\n};\nfunction isRecord(value) {\n\treturn !!(value && typeof value == \"object\" && !Array.isArray(value));\n}\nfunction merge(...records) {\n\tlet _records = records.filter(Boolean);\n\treturn _records.length === 0 ? {} : _records.reduce(_merge, {});\n}\nfunction _merge(acc, source) {\n\tfor (let key of Object.keys(source)) {\n\t\tlet prevValue = acc[key], nextValue = source[key];\n\t\tisRecord(prevValue) && isRecord(nextValue) ? acc[key] = merge(prevValue, nextValue) : acc[key] = nextValue;\n\t}\n\treturn acc;\n}\n/**\n* Convert a tree of color tokens from a sparse format to a dense format.\n*/\nfunction resolveColorTokens(inputTokens) {\n\tlet tokens = merge(defaultColorTokens, inputTokens);\n\treturn {\n\t\tbase: resolveBaseColorTokens(tokens),\n\t\tbutton: resolveButtonColorTokens(tokens),\n\t\tinput: resolveInputColorTokens(tokens),\n\t\tselectable: resolveSelectableColorTokens(tokens),\n\t\tsyntax: tokens.syntax\n\t};\n}\nfunction resolveBaseColorTokens(sparseTokens) {\n\tlet tokens = {};\n\tfor (let tone of THEME_COLOR_CARD_TONES) tokens[tone] = resolveBaseColorTones(sparseTokens, tone);\n\treturn tokens;\n}\nfunction resolveBaseColorTones(inputTokens, tone) {\n\tlet spec = merge(inputTokens?.base?.[\"*\"], inputTokens?.base?.[tone]), hue = spec._hue || inputTokens?.base?.[tone]?._hue || \"gray\";\n\treturn {\n\t\t...spec,\n\t\t_hue: hue,\n\t\tavatar: COLOR_HUES.reduce((acc, hue) => ({\n\t\t\t...acc,\n\t\t\t[hue]: merge({ _hue: hue }, spec.avatar?.[\"*\"], spec.avatar?.[hue])\n\t\t}), {}),\n\t\tbadge: THEME_COLOR_STATE_TONES.reduce((acc, tone) => ({\n\t\t\t...acc,\n\t\t\t[tone]: {\n\t\t\t\t_hue: inputTokens?.base?.[tone]?._hue || hue,\n\t\t\t\t...spec.badge?.[\"*\"],\n\t\t\t\t...spec.badge?.[tone]\n\t\t\t}\n\t\t}), {})\n\t};\n}\nfunction resolveButtonColorTokens(inputTokens) {\n\tlet tokens = {};\n\tfor (let mode of THEME_COLOR_BUTTON_MODES) tokens[mode] = resolveButtonToneColorTokens(inputTokens, mode);\n\treturn tokens;\n}\nfunction resolveButtonToneColorTokens(inputTokens, mode) {\n\tlet tokens = {};\n\tfor (let tone of THEME_COLOR_STATE_TONES) tokens[tone] = resolveButtonModeColorTokens(inputTokens, mode, tone);\n\treturn tokens;\n}\nfunction resolveButtonModeColorTokens(inputTokens, mode, tone) {\n\tlet tokens = {};\n\tfor (let state of THEME_COLOR_STATES) tokens[state] = resolveButtonStateColorTokens(inputTokens, tone, mode, state);\n\treturn tokens;\n}\nfunction resolveButtonStateColorTokens(inputTokens, tone, mode, state) {\n\tlet spec = merge(inputTokens?.button?.[mode]?.[\"*\"]?.[\"*\"], inputTokens?.button?.[mode]?.[tone]?.[\"*\"], inputTokens?.button?.[mode]?.[\"*\"]?.[state], inputTokens?.button?.[mode]?.[tone]?.[state]), hue = spec._hue || inputTokens?.base?.[tone]?._hue;\n\treturn {\n\t\t...spec,\n\t\t_hue: hue,\n\t\tavatar: COLOR_HUES.reduce((acc, hue) => ({\n\t\t\t...acc,\n\t\t\t[hue]: merge({ _hue: hue }, spec.avatar?.[\"*\"], spec.avatar?.[hue])\n\t\t}), {}),\n\t\tbadge: THEME_COLOR_STATE_TONES.reduce((acc, tone) => ({\n\t\t\t...acc,\n\t\t\t[tone]: {\n\t\t\t\t_hue: inputTokens?.base?.[tone]?._hue || hue,\n\t\t\t\t...spec.badge?.[\"*\"],\n\t\t\t\t...spec.badge?.[tone]\n\t\t\t}\n\t\t}), {})\n\t};\n}\nfunction resolveInputColorTokens(inputTokens) {\n\tlet tokens = {};\n\tfor (let mode of THEME_COLOR_INPUT_MODES) tokens[mode] = resolveInputModeColorTokens(inputTokens, mode);\n\treturn tokens;\n}\nfunction resolveInputModeColorTokens(inputTokens, mode) {\n\tlet states = {};\n\tfor (let state of THEME_COLOR_INPUT_STATES) states[state] = resolveInputStateColorTokens(inputTokens, mode, state);\n\treturn states;\n}\nfunction resolveInputStateColorTokens(inputTokens, mode, state) {\n\tlet spec = merge(inputTokens?.input?.[\"*\"]?.[\"*\"], inputTokens?.input?.[mode]?.[\"*\"], inputTokens?.input?.[\"*\"]?.[state], inputTokens?.input?.[mode]?.[state]), hue = spec._hue || inputTokens?.input?.[mode]?._hue;\n\treturn {\n\t\t...spec,\n\t\t_hue: hue\n\t};\n}\nfunction resolveSelectableColorTokens(inputTokens) {\n\tlet tokens = {};\n\tfor (let tone of THEME_COLOR_STATE_TONES) tokens[tone] = resolveSelectableToneColorTokens(inputTokens, tone);\n\treturn tokens;\n}\nfunction resolveSelectableToneColorTokens(inputTokens, tone) {\n\tlet states = { _hue: inputTokens?.selectable?.[tone]?._hue || inputTokens?.base?.[tone]?._hue };\n\tfor (let state of THEME_COLOR_STATES) states[state] = resolveSelectableStateColorTokens(inputTokens, tone, state);\n\treturn states;\n}\nfunction resolveSelectableStateColorTokens(inputTokens, tone, state) {\n\tlet spec = merge(inputTokens?.selectable?.[\"*\"]?.[\"*\"], inputTokens?.selectable?.[tone]?.[\"*\"], inputTokens?.selectable?.[\"*\"]?.[state], inputTokens?.selectable?.[tone]?.[state]), hue = spec._hue || inputTokens?.base?.[tone]?._hue;\n\treturn {\n\t\t...spec,\n\t\t_hue: hue,\n\t\tavatar: COLOR_HUES.reduce((acc, hue) => ({\n\t\t\t...acc,\n\t\t\t[hue]: merge({ _hue: hue }, spec.avatar?.[\"*\"], spec.avatar?.[hue])\n\t\t}), {}),\n\t\tbadge: THEME_COLOR_STATE_TONES.reduce((acc, tone) => ({\n\t\t\t...acc,\n\t\t\t[tone]: {\n\t\t\t\t_hue: inputTokens?.base?.[tone]?._hue || hue,\n\t\t\t\t...spec.badge?.[\"*\"],\n\t\t\t\t...spec.badge?.[tone]\n\t\t\t}\n\t\t}), {})\n\t};\n}\nfunction buildColorTheme(config) {\n\tlet resolvedConfig = {\n\t\t...config,\n\t\tcolor: resolveColorTokens(config?.color)\n\t}, schemes = {};\n\treturn defineLazyProperty(schemes, \"light\", () => buildColorScheme({ scheme: \"light\" }, resolvedConfig)), defineLazyProperty(schemes, \"dark\", () => buildColorScheme({ scheme: \"dark\" }, resolvedConfig)), schemes;\n}\nfunction buildColorScheme(options, config) {\n\tlet { scheme } = options, colorScheme = {};\n\tfor (let tone of THEME_COLOR_CARD_TONES) defineLazyProperty(colorScheme, tone, () => buildCardColorTheme({\n\t\tscheme,\n\t\ttone\n\t}, config));\n\treturn colorScheme;\n}\nfunction buildCardColorTheme(options, config) {\n\tlet { scheme, tone } = options, tokens = config?.color?.base?.[tone], context = {\n\t\thue: tokens?._hue || \"gray\",\n\t\tscheme\n\t};\n\treturn {\n\t\t_blend: (tokens?._blend || [\"multiply\", \"screen\"])[scheme === \"light\" ? 0 : 1],\n\t\t_dark: scheme === \"dark\",\n\t\taccent: { fg: resolveColorTokenValue(context, tokens?.accent?.fg) },\n\t\tavatar: buildAvatarColorTheme({ scheme }, tokens),\n\t\tbackdrop: resolveColorTokenValue(context, tokens?.backdrop),\n\t\tbadge: buildBadgeColorTheme(tokens?.badge, { scheme }, config),\n\t\tbg: resolveColorTokenValue(context, tokens?.bg),\n\t\tborder: resolveColorTokenValue(context, tokens?.border),\n\t\tbutton: buildButtonColorTheme({\n\t\t\tscheme,\n\t\t\ttone\n\t\t}, config),\n\t\tcode: {\n\t\t\tbg: resolveColorTokenValue(context, tokens?.code?.bg),\n\t\t\tfg: resolveColorTokenValue(context, tokens?.code?.fg)\n\t\t},\n\t\tfg: resolveColorTokenValue(context, tokens?.fg),\n\t\tfocusRing: resolveColorTokenValue(context, tokens?.focusRing),\n\t\ticon: resolveColorTokenValue(context, tokens?.icon),\n\t\tinput: buildInputColorTheme({\n\t\t\tscheme,\n\t\t\ttone\n\t\t}, config),\n\t\tkbd: {\n\t\t\tbg: resolveColorTokenValue(context, tokens?.kbd?.bg),\n\t\t\tfg: resolveColorTokenValue(context, tokens?.kbd?.fg),\n\t\t\tborder: resolveColorTokenValue(context, tokens?.kbd?.border)\n\t\t},\n\t\tlink: { fg: resolveColorTokenValue(context, tokens?.link?.fg) },\n\t\tmuted: {\n\t\t\tbg: resolveColorTokenValue(context, tokens?.muted?.bg),\n\t\t\tfg: resolveColorTokenValue(context, tokens?.muted?.fg)\n\t\t},\n\t\tselectable: buildSelectableColorTheme({\n\t\t\tscheme,\n\t\t\ttone\n\t\t}, config),\n\t\tshadow: buildShadowColorTheme({\n\t\t\tscheme,\n\t\t\ttone\n\t\t}, config),\n\t\tskeleton: {\n\t\t\tfrom: resolveColorTokenValue(context, tokens?.skeleton?.from),\n\t\t\tto: resolveColorTokenValue(context, tokens?.skeleton?.to)\n\t\t},\n\t\tsyntax: buildSyntaxColorTheme({ scheme }, config)\n\t};\n}\nfunction buildShadowColorTheme(options, config) {\n\tlet { scheme, tone } = options, tokens = config?.color?.base?.[tone], context = {\n\t\thue: tokens?._hue || \"gray\",\n\t\tscheme\n\t};\n\treturn {\n\t\toutline: resolveColorTokenValue(context, tokens?.shadow?.outline),\n\t\tumbra: resolveColorTokenValue(context, tokens?.shadow?.umbra),\n\t\tpenumbra: resolveColorTokenValue(context, tokens?.shadow?.penumbra),\n\t\tambient: resolveColorTokenValue(context, tokens?.shadow?.ambient)\n\t};\n}\nfunction buildAvatarColorTheme(options, stateTokens) {\n\tlet { scheme } = options;\n\treturn {\n\t\tgray: _buildAvatarColorTheme({\n\t\t\tcolor: \"gray\",\n\t\t\tscheme\n\t\t}, stateTokens),\n\t\tblue: _buildAvatarColorTheme({\n\t\t\tcolor: \"blue\",\n\t\t\tscheme\n\t\t}, stateTokens),\n\t\tpurple: _buildAvatarColorTheme({\n\t\t\tcolor: \"purple\",\n\t\t\tscheme\n\t\t}, stateTokens),\n\t\tmagenta: _buildAvatarColorTheme({\n\t\t\tcolor: \"magenta\",\n\t\t\tscheme\n\t\t}, stateTokens),\n\t\tred: _buildAvatarColorTheme({\n\t\t\tcolor: \"red\",\n\t\t\tscheme\n\t\t}, stateTokens),\n\t\torange: _buildAvatarColorTheme({\n\t\t\tcolor: \"orange\",\n\t\t\tscheme\n\t\t}, stateTokens),\n\t\tyellow: _buildAvatarColorTheme({\n\t\t\tcolor: \"yellow\",\n\t\t\tscheme\n\t\t}, stateTokens),\n\t\tgreen: _buildAvatarColorTheme({\n\t\t\tcolor: \"green\",\n\t\t\tscheme\n\t\t}, stateTokens),\n\t\tcyan: _buildAvatarColorTheme({\n\t\t\tcolor: \"cyan\",\n\t\t\tscheme\n\t\t}, stateTokens)\n\t};\n}\nfunction _buildAvatarColorTheme(options, stateTokens) {\n\tlet { color, scheme } = options, tokens = stateTokens?.avatar?.[color], context = {\n\t\thue: tokens?._hue || \"gray\",\n\t\tscheme\n\t};\n\treturn {\n\t\t_blend: (tokens?._blend || [\"screen\", \"multiply\"])[scheme === \"light\" ? 0 : 1],\n\t\tbg: resolveColorTokenValue(context, tokens?.bg),\n\t\tfg: resolveColorTokenValue(context, tokens?.fg)\n\t};\n}\nfunction buildBadgeColorTheme(tokens, options, config) {\n\tlet { scheme } = options, colorBadge = {};\n\tfor (let tone of THEME_COLOR_STATE_TONES) colorBadge[tone] = _buildBadgeColorTheme(tokens, {\n\t\tscheme,\n\t\ttone\n\t}, config);\n\treturn colorBadge;\n}\nfunction _buildBadgeColorTheme(parentTokens, options, config) {\n\tlet { scheme, tone } = options, tokens = parentTokens?.[tone], context = {\n\t\thue: tokens?._hue || config?.color?.base?.[tone]?._hue || \"gray\",\n\t\tscheme\n\t};\n\treturn {\n\t\tbg: resolveColorTokenValue(context, tokens?.bg),\n\t\tfg: resolveColorTokenValue(context, tokens?.fg),\n\t\tdot: resolveColorTokenValue(context, tokens?.dot),\n\t\ticon: resolveColorTokenValue(context, tokens?.icon)\n\t};\n}\nfunction buildButtonColorTheme(options, config) {\n\tlet { scheme, tone: cardTone } = options, modes = {};\n\tfor (let mode of THEME_COLOR_BUTTON_MODES) modes[mode] = buildButtonTonesColorTheme({\n\t\tcardTone,\n\t\tscheme,\n\t\tmode\n\t}, config);\n\treturn modes;\n}\nfunction buildButtonTonesColorTheme(options, config) {\n\tlet { cardTone, mode, scheme } = options, tones = {};\n\tfor (let tone of THEME_COLOR_STATE_TONES) tones[tone] = buildButtonStatesColorTheme({\n\t\tcardTone,\n\t\tmode,\n\t\tscheme,\n\t\ttone\n\t}, config);\n\treturn tones;\n}\nfunction buildButtonStatesColorTheme(options, config) {\n\tlet { cardTone, mode, scheme, tone } = options, states = {};\n\tfor (let state of THEME_COLOR_STATES) states[state] = buildButtonStateColorTheme({\n\t\tcardTone,\n\t\tmode,\n\t\ttone,\n\t\tscheme,\n\t\tstate\n\t}, config);\n\treturn states;\n}\nfunction buildButtonStateColorTheme(options, config) {\n\tlet { cardTone, mode, tone, scheme, state } = options, cardTokens = config?.color?.base?.[cardTone], tokens = config?.color?.button?.[mode]?.[tone]?.[state], hue = tokens?._hue || cardTokens?._hue || \"gray\", blendMode = tokens?._blend || [\"screen\", \"multiply\"], context = {\n\t\thue,\n\t\tscheme\n\t};\n\treturn {\n\t\t_blend: blendMode[scheme === \"light\" ? 0 : 1],\n\t\taccent: { fg: resolveColorTokenValue(context, tokens?.accent?.fg) },\n\t\tavatar: buildAvatarColorTheme({ scheme }, tokens),\n\t\tbadge: buildBadgeColorTheme(tokens?.badge, { scheme }, config),\n\t\tbg: resolveColorTokenValue(context, tokens?.bg),\n\t\tborder: resolveColorTokenValue(context, tokens?.border),\n\t\tcode: {\n\t\t\tbg: resolveColorTokenValue(context, tokens?.code?.bg),\n\t\t\tfg: resolveColorTokenValue(context, tokens?.code?.fg)\n\t\t},\n\t\tfg: resolveColorTokenValue(context, tokens?.fg),\n\t\ticon: resolveColorTokenValue(context, tokens?.icon),\n\t\tmuted: {\n\t\t\tbg: resolveColorTokenValue(context, tokens?.muted?.bg),\n\t\t\tfg: resolveColorTokenValue(context, tokens?.muted?.fg)\n\t\t},\n\t\tkbd: {\n\t\t\tbg: resolveColorTokenValue(context, tokens?.kbd?.bg),\n\t\t\tfg: resolveColorTokenValue(context, tokens?.kbd?.fg),\n\t\t\tborder: resolveColorTokenValue(context, tokens?.kbd?.border)\n\t\t},\n\t\tlink: { fg: resolveColorTokenValue(context, tokens?.link?.fg) },\n\t\tskeleton: {\n\t\t\tfrom: resolveColorTokenValue(context, tokens?.skeleton?.from),\n\t\t\tto: resolveColorTokenValue(context, tokens?.skeleton?.to)\n\t\t}\n\t};\n}\nfunction buildInputColorTheme(options, config) {\n\tlet { scheme, tone } = options;\n\treturn {\n\t\tdefault: buildInputStatesColorTheme({\n\t\t\tmode: \"default\",\n\t\t\tscheme,\n\t\t\ttone\n\t\t}, config),\n\t\tinvalid: buildInputStatesColorTheme({\n\t\t\tmode: \"invalid\",\n\t\t\tscheme,\n\t\t\ttone\n\t\t}, config)\n\t};\n}\nfunction buildInputStatesColorTheme(options, config) {\n\tlet { mode, scheme, tone } = options;\n\treturn {\n\t\tenabled: buildInputStateColorTheme({\n\t\t\tmode,\n\t\t\tscheme,\n\t\t\tstate: \"enabled\",\n\t\t\tcardTone: tone\n\t\t}, config),\n\t\thovered: buildInputStateColorTheme({\n\t\t\tmode,\n\t\t\tscheme,\n\t\t\tstate: \"hovered\",\n\t\t\tcardTone: tone\n\t\t}, config),\n\t\treadOnly: buildInputStateColorTheme({\n\t\t\tmode,\n\t\t\tscheme,\n\t\t\tstate: \"readOnly\",\n\t\t\tcardTone: tone\n\t\t}, config),\n\t\tdisabled: buildInputStateColorTheme({\n\t\t\tmode,\n\t\t\tscheme,\n\t\t\tstate: \"disabled\",\n\t\t\tcardTone: tone\n\t\t}, config)\n\t};\n}\nfunction buildInputStateColorTheme(options, config) {\n\tlet { cardTone, mode, scheme, state } = options, cardTokens = config?.color?.base?.[cardTone], tokens = config?.color?.input?.[mode]?.[state], hue = tokens?._hue || cardTokens?._hue || \"gray\", blendMode = tokens?._blend || [\"screen\", \"multiply\"], context = {\n\t\thue,\n\t\tscheme\n\t};\n\treturn {\n\t\t_blend: blendMode[scheme === \"light\" ? 0 : 1],\n\t\tbg: resolveColorTokenValue(context, tokens?.bg),\n\t\tborder: resolveColorTokenValue(context, tokens?.border),\n\t\tfg: resolveColorTokenValue(context, tokens?.fg),\n\t\tmuted: { bg: resolveColorTokenValue(context, tokens?.muted?.bg) },\n\t\tplaceholder: resolveColorTokenValue(context, tokens?.placeholder)\n\t};\n}\nfunction buildSelectableColorTheme(options, config) {\n\tlet { scheme, tone: cardTone } = options, tones = {};\n\tfor (let tone of THEME_COLOR_STATE_TONES) tones[tone] = buildSelectableStatesColorTheme({\n\t\tcardTone,\n\t\tscheme,\n\t\ttone\n\t}, config);\n\treturn tones;\n}\nfunction buildSelectableStatesColorTheme(options, config) {\n\tlet { cardTone, scheme, tone } = options, states = {};\n\tfor (let state of THEME_COLOR_STATES) states[state] = buildSelectableStateColorTheme({\n\t\tcardTone,\n\t\ttone,\n\t\tscheme,\n\t\tstate\n\t}, config);\n\treturn states;\n}\nfunction buildSelectableStateColorTheme(options, config) {\n\tlet { cardTone, scheme, state, tone } = options, cardTokens = config?.color?.base?.[cardTone], tokens = config?.color?.selectable?.[tone]?.[state], hue = tokens?._hue || cardTokens?._hue || \"gray\", blendMode = tokens?._blend || [\"screen\", \"multiply\"], context = {\n\t\thue,\n\t\tscheme\n\t};\n\treturn {\n\t\t_blend: blendMode[scheme === \"light\" ? 0 : 1],\n\t\taccent: { fg: resolveColorTokenValue(context, tokens?.accent?.fg) },\n\t\tavatar: buildAvatarColorTheme({ scheme }, tokens),\n\t\tbadge: buildBadgeColorTheme(tokens?.badge, { scheme }, config),\n\t\tbg: resolveColorTokenValue(context, tokens?.bg),\n\t\tborder: resolveColorTokenValue(context, tokens?.border),\n\t\tcode: {\n\t\t\tbg: resolveColorTokenValue(context, tokens?.code?.bg),\n\t\t\tfg: resolveColorTokenValue(context, tokens?.code?.fg)\n\t\t},\n\t\tfg: resolveColorTokenValue(context, tokens?.fg),\n\t\ticon: resolveColorTokenValue(context, tokens?.icon),\n\t\tmuted: {\n\t\t\tbg: resolveColorTokenValue(context, tokens?.muted?.bg),\n\t\t\tfg: resolveColorTokenValue(context, tokens?.muted?.fg)\n\t\t},\n\t\tkbd: {\n\t\t\tbg: resolveColorTokenValue(context, tokens?.kbd?.bg),\n\t\t\tfg: resolveColorTokenValue(context, tokens?.kbd?.fg),\n\t\t\tborder: resolveColorTokenValue(context, tokens?.kbd?.border)\n\t\t},\n\t\tlink: { fg: resolveColorTokenValue(context, tokens?.link?.fg) },\n\t\tskeleton: {\n\t\t\tfrom: resolveColorTokenValue(context, tokens?.skeleton?.from),\n\t\t\tto: resolveColorTokenValue(context, tokens?.skeleton?.to)\n\t\t}\n\t};\n}\nfunction buildSyntaxColorTheme(options, config) {\n\tlet { scheme } = options, tokens = config?.color?.syntax, context = {\n\t\thue: \"gray\",\n\t\tscheme\n\t};\n\treturn {\n\t\tatrule: resolveColorTokenValue(context, tokens?.atrule),\n\t\tattrName: resolveColorTokenValue(context, tokens?.attrName),\n\t\tattrValue: resolveColorTokenValue(context, tokens?.attrValue),\n\t\tattribute: resolveColorTokenValue(context, tokens?.attribute),\n\t\tboolean: resolveColorTokenValue(context, tokens?.boolean),\n\t\tbuiltin: resolveColorTokenValue(context, tokens?.builtin),\n\t\tcdata: resolveColorTokenValue(context, tokens?.cdata),\n\t\tchar: resolveColorTokenValue(context, tokens?.char),\n\t\tclass: resolveColorTokenValue(context, tokens?.class),\n\t\tclassName: resolveColorTokenValue(context, tokens?.className),\n\t\tcomment: resolveColorTokenValue(context, tokens?.comment),\n\t\tconstant: resolveColorTokenValue(context, tokens?.constant),\n\t\tdeleted: resolveColorTokenValue(context, tokens?.deleted),\n\t\tdoctype: resolveColorTokenValue(context, tokens?.doctype),\n\t\tentity: resolveColorTokenValue(context, tokens?.entity),\n\t\tfunction: resolveColorTokenValue(context, tokens?.function),\n\t\thexcode: resolveColorTokenValue(context, tokens?.hexcode),\n\t\tid: resolveColorTokenValue(context, tokens?.id),\n\t\timportant: resolveColorTokenValue(context, tokens?.important),\n\t\tinserted: resolveColorTokenValue(context, tokens?.inserted),\n\t\tkeyword: resolveColorTokenValue(context, tokens?.keyword),\n\t\tnumber: resolveColorTokenValue(context, tokens?.number),\n\t\toperator: resolveColorTokenValue(context, tokens?.operator),\n\t\tprolog: resolveColorTokenValue(context, tokens?.prolog),\n\t\tproperty: resolveColorTokenValue(context, tokens?.property),\n\t\tpseudoClass: resolveColorTokenValue(context, tokens?.pseudoClass),\n\t\tpseudoElement: resolveColorTokenValue(context, tokens?.pseudoElement),\n\t\tpunctuation: resolveColorTokenValue(context, tokens?.punctuation),\n\t\tregex: resolveColorTokenValue(context, tokens?.regex),\n\t\tselector: resolveColorTokenValue(context, tokens?.selector),\n\t\tstring: resolveColorTokenValue(context, tokens?.string),\n\t\tsymbol: resolveColorTokenValue(context, tokens?.symbol),\n\t\ttag: resolveColorTokenValue(context, tokens?.tag),\n\t\tunit: resolveColorTokenValue(context, tokens?.unit),\n\t\turl: resolveColorTokenValue(context, tokens?.url),\n\t\tvariable: resolveColorTokenValue(context, tokens?.variable)\n\t};\n}\nconst defaultColorPalette = color;\nfunction mixChannel(b, s, weight) {\n\treturn b + (s - b) * weight;\n}\n/**\n* Apply the \\`mix\\` blend mode\n* @internal\n*/\nfunction mix(b, s, weight) {\n\treturn {\n\t\tr: mixChannel(b.r, s.r, weight),\n\t\tg: mixChannel(b.g, s.g, weight),\n\t\tb: mixChannel(b.b, s.b, weight)\n\t};\n}\nfunction lerp(x, y, a) {\n\treturn x * (1 - a) + y * a;\n}\nfunction invlerp(x, y, a) {\n\treturn clamp((a - x) / (y - x));\n}\nfunction clamp(a, min = 0, max = 1) {\n\treturn Math.min(max, Math.max(min, a));\n}\nfunction range(x1, y1, x2, y2, a) {\n\treturn lerp(x2, y2, invlerp(x1, y1, a));\n}\nfunction round(value) {\n\treturn Math.round(value);\n}\n/**\n* @internal\n*/\nfunction hexToRgb(hex) {\n\tif (hex.length === 4) {\n\t\tlet hexR = hex.slice(1, 2), hexG = hex.slice(2, 3), hexB = hex.slice(3, 4);\n\t\treturn {\n\t\t\tr: parseInt(hexR + hexR, 16),\n\t\t\tg: parseInt(hexG + hexG, 16),\n\t\t\tb: parseInt(hexB + hexB, 16)\n\t\t};\n\t}\n\treturn {\n\t\tr: parseInt(hex.slice(1, 3), 16),\n\t\tg: parseInt(hex.slice(3, 5), 16),\n\t\tb: parseInt(hex.slice(5, 7), 16)\n\t};\n}\n/**\n* @internal\n*/\nfunction rgbaToRGBA(rgba) {\n\tlet values = rgba.replace(/rgba\\(|\\)/g, \"\").split(\",\");\n\treturn {\n\t\tr: parseInt(values[0]),\n\t\tg: parseInt(values[1]),\n\t\tb: parseInt(values[2]),\n\t\ta: parseFloat(values[3])\n\t};\n}\n/**\n* @internal\n*/\nfunction rgbToHex(color) {\n\tlet r = round(clamp(Math.round(color.r), 0, 255)), g = round(clamp(Math.round(color.g), 0, 255)), b = round(clamp(Math.round(color.b), 0, 255));\n\treturn \"a\" in color ? `rgba(${r},${g},${b},${color.a})` : \"#\" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);\n}\n/**\n* @internal\n* @see https://css-tricks.com/converting-color-spaces-in-javascript/\n*/\nfunction rgbToHsl({ r, g, b }) {\n\tr /= 255, g /= 255, b /= 255;\n\tlet cmin = Math.min(r, g, b), cmax = Math.max(r, g, b), delta = cmax - cmin, h = 0, s = 0, l = 0;\n\treturn h = delta == 0 ? 0 : cmax == r ? (g - b) / delta % 6 : cmax == g ? (b - r) / delta + 2 : (r - g) / delta + 4, h = Math.round(h * 60), h < 0 && (h += 360), l = (cmax + cmin) / 2, s = delta == 0 ? 0 : delta / (1 - Math.abs(2 * l - 1)), s = +(s * 100).toFixed(1), l = +(l * 100).toFixed(1), {\n\t\th,\n\t\ts,\n\t\tl\n\t};\n}\n/**\n* @internal\n*/\nfunction hslToRgb(hsl) {\n\tlet s = hsl.s / 100, l = hsl.l / 100, c = (1 - Math.abs(2 * l - 1)) * s, x = c * (1 - Math.abs(hsl.h / 60 % 2 - 1)), m = l - c / 2, r = 0, g = 0, b = 0;\n\treturn 0 <= hsl.h && hsl.h < 60 ? (r = c, g = x, b = 0) : 60 <= hsl.h && hsl.h < 120 ? (r = x, g = c, b = 0) : 120 <= hsl.h && hsl.h < 180 ? (r = 0, g = c, b = x) : 180 <= hsl.h && hsl.h < 240 ? (r = 0, g = x, b = c) : 240 <= hsl.h && hsl.h < 300 ? (r = x, g = 0, b = c) : 300 <= hsl.h && hsl.h < 360 && (r = c, g = 0, b = x), {\n\t\tr: Math.round((r + m) * 255),\n\t\tg: Math.round((g + m) * 255),\n\t\tb: Math.round((b + m) * 255)\n\t};\n}\nconst HSL_RE = /hsl\\(\\s*(\\d+)\\s*,\\s*((\\d+(?:\\.\\d+)?)%)\\s*,\\s*((\\d+(?:\\.\\d+)?)%)\\s*\\)/i;\nfunction isHexChars(str) {\n\tfor (let c of str) if (\"0123456789ABCDEFabcdef\".indexOf(c) === -1) return !1;\n\treturn !0;\n}\nfunction isHex(str) {\n\treturn str[0] !== \"#\" || str.length !== 4 && str.length !== 7 ? !1 : isHexChars(str.slice(1));\n}\nfunction parseHsl(str) {\n\tlet res = HSL_RE.exec(str);\n\tif (!res) throw Error(`parseHsl: string is not a HSL color: \"${str}\"`);\n\treturn {\n\t\th: parseInt(res[1]),\n\t\ts: parseFloat(res[3]),\n\t\tl: parseFloat(res[5])\n\t};\n}\n/**\n* @internal\n*/\nfunction parseColor(color) {\n\tif (!color) return {\n\t\tr: 0,\n\t\tg: 0,\n\t\tb: 0\n\t};\n\tif (typeof color != \"string\") throw Error(\"parseColor: expected a string\");\n\tif (isHex(color)) return hexToRgb(color);\n\tif (color.startsWith(\"hsl(\")) return hslToRgb(parseHsl(color));\n\tif (color.startsWith(\"rgba(\")) return rgbaToRGBA(color);\n\tthrow Error(`parseColor: unexpected color format: \"${color}\"`);\n}\n/**\n* @internal\n*/\nfunction rgba(color, a) {\n\tlet rgb = parseColor(color);\n\treturn `rgba(${rgb.r},${rgb.g},${rgb.b},${a})`;\n}\nfunction multiplyChannel(b, s) {\n\treturn b * s;\n}\n/**\n* Apply the \\`multiply\\` blend mode\n* Source: https://www.w3.org/TR/compositing-1/#blendingmultiply\n* @internal\n*/\nfunction multiply(b, s) {\n\treturn {\n\t\tr: multiplyChannel(b.r / 255, s.r / 255) * 255,\n\t\tg: multiplyChannel(b.g / 255, s.g / 255) * 255,\n\t\tb: multiplyChannel(b.b / 255, s.b / 255) * 255\n\t};\n}\nfunction screenChannel(b, s) {\n\treturn b + s - b * s;\n}\n/**\n* Apply the \\`screen\\` blend mode\n* Source: https://www.w3.org/TR/compositing-1/#blendingscreen\n* @internal\n*/\nfunction screen(b, s) {\n\treturn {\n\t\tr: screenChannel(b.r / 255, s.r / 255) * 255,\n\t\tg: screenChannel(b.g / 255, s.g / 255) * 255,\n\t\tb: screenChannel(b.b / 255, s.b / 255) * 255\n\t};\n}\nconst RGB_RANGE = [0, 255];\nfunction mixThemeColor(value, options) {\n\tlet { blendMode } = options, color = parseColor(value), black = parseColor(options.black), white = parseColor(options.white), bg = options.bg ? parseColor(options.bg) : blendMode === \"multiply\" ? white : black, paletteRange = {\n\t\tr: [black.r, white.r],\n\t\tg: [black.g, white.g],\n\t\tb: [black.b, white.b]\n\t}, convertedBgColor = {\n\t\tr: clamp(range(...paletteRange.r, ...RGB_RANGE, bg.r), ...RGB_RANGE),\n\t\tg: clamp(range(...paletteRange.g, ...RGB_RANGE, bg.g), ...RGB_RANGE),\n\t\tb: clamp(range(...paletteRange.b, ...RGB_RANGE, bg.b), ...RGB_RANGE)\n\t}, convertedColor = {\n\t\tr: clamp(range(...paletteRange.r, ...RGB_RANGE, color.r), ...RGB_RANGE),\n\t\tg: clamp(range(...paletteRange.g, ...RGB_RANGE, color.g), ...RGB_RANGE),\n\t\tb: clamp(range(...paletteRange.b, ...RGB_RANGE, color.b), ...RGB_RANGE)\n\t}, resultColor = blendMode === \"multiply\" ? multiply(convertedBgColor, convertedColor) : screen(convertedBgColor, convertedColor);\n\treturn rgbToHex({\n\t\tr: clamp(range(...RGB_RANGE, ...paletteRange.r, resultColor.r), ...paletteRange.r),\n\t\tg: clamp(range(...RGB_RANGE, ...paletteRange.g, resultColor.g), ...paletteRange.g),\n\t\tb: clamp(range(...RGB_RANGE, ...paletteRange.b, resultColor.b), ...paletteRange.b)\n\t});\n}\nfunction renderColorValue(str, options) {\n\tlet { bg, blendMode, colorPalette } = options;\n\tif (bg === \"white\") throw Error(\"Cannot blend with white background\");\n\tlet node = parseTokenValue(str);\n\tif (!node || node.type !== \"color\") throw Error(`Invalid color token value: ${str}`);\n\tlet hex = \"\";\n\tif (node.key === \"black\" && (hex = renderColorHex(colorPalette.black)), node.key === \"white\" && (hex = renderColorHex(colorPalette.white)), node.hue && node.tint && (hex = renderColorHex(colorPalette[node.hue][node.tint])), !hex) throw Error(`Invalid color token value: ${str}`);\n\tlet hexBeforeMix = hex, mixOptions = {\n\t\tblendMode,\n\t\tbg,\n\t\tblack: renderColorHex(colorPalette.black),\n\t\twhite: renderColorHex(colorPalette.white)\n\t};\n\ttry {\n\t\thex = mixThemeColor(hex, mixOptions), bg && node.mix !== void 0 && (hex = rgbToHex(mix(hexToRgb(bg), hexToRgb(hex), node.mix)));\n\t} catch (err) {\n\t\tthrow console.warn(\"could not blend\", hex, mixOptions), err;\n\t}\n\treturn hex === \"#aN\" && (console.warn(`invalid color token value: ${str}`), hex = hexBeforeMix), node.opacity !== void 0 && (hex = rgba(hex, node.opacity)), hex;\n}\nfunction renderColorHex(color) {\n\treturn typeof color == \"string\" ? color : color.hex;\n}\nfunction renderThemeColorSchemes(value, config) {\n\tlet colorPalette = config?.palette ?? defaultColorPalette, schemes = {};\n\treturn defineLazyProperty(schemes, \"light\", () => renderThemeColorScheme(colorPalette, value.light)), defineLazyProperty(schemes, \"dark\", () => renderThemeColorScheme(colorPalette, value.dark)), schemes;\n}\nfunction renderThemeColorScheme(colorPalette, value) {\n\tlet renderedDefaultTone = renderThemeColor(value.default, { colorPalette }), bg = renderedDefaultTone.bg;\n\tif (bg === \"white\") throw Error(\"Cannot blend with white background\");\n\tlet scheme = { default: renderedDefaultTone };\n\tfor (let tone of THEME_COLOR_CARD_TONES) {\n\t\tif (tone === \"default\") continue;\n\t\tlet opts = tone === \"transparent\" ? { colorPalette } : {\n\t\t\tbg,\n\t\t\tcolorPalette\n\t\t};\n\t\tdefineLazyProperty(scheme, tone, () => renderThemeColor(value[tone], opts));\n\t}\n\treturn scheme;\n}\nfunction renderThemeColor(value, options) {\n\tlet { colorPalette, bg } = options, blendMode = value._blend || \"multiply\", baseBg = renderColorValue(value.bg, {\n\t\tcolorPalette,\n\t\tbg,\n\t\tblendMode\n\t}), colorOptions = {\n\t\tcolorPalette,\n\t\tbg: baseBg,\n\t\tblendMode\n\t}, button = renderThemeColorButton(value.button, {\n\t\tbaseBg,\n\t\tblendMode,\n\t\tcolorPalette\n\t}), selectable = renderThemeColorSelectable(value.selectable, {\n\t\tcolorPalette,\n\t\tbaseBg,\n\t\tblendMode\n\t}), shadow = {\n\t\toutline: renderColorValue(value.shadow.outline, colorOptions),\n\t\tumbra: renderColorValue(value.shadow.umbra, {\n\t\t\t...colorOptions,\n\t\t\tbg: void 0,\n\t\t\tcolorPalette: {\n\t\t\t\t...colorPalette,\n\t\t\t\tblack: \"#000000\"\n\t\t\t}\n\t\t}),\n\t\tpenumbra: renderColorValue(value.shadow.penumbra, {\n\t\t\t...colorOptions,\n\t\t\tbg: void 0,\n\t\t\tcolorPalette: {\n\t\t\t\t...colorPalette,\n\t\t\t\tblack: \"#000000\"\n\t\t\t}\n\t\t}),\n\t\tambient: renderColorValue(value.shadow.ambient, {\n\t\t\t...colorOptions,\n\t\t\tbg: void 0,\n\t\t\tcolorPalette: {\n\t\t\t\t...colorPalette,\n\t\t\t\tblack: \"#000000\"\n\t\t\t}\n\t\t})\n\t};\n\treturn {\n\t\t_blend: blendMode,\n\t\t_dark: value._dark,\n\t\taccent: { fg: renderColorValue(value.accent.fg, colorOptions) },\n\t\tavatar: renderThemeColorAvatar(value.avatar, {\n\t\t\tbaseBg,\n\t\t\tcolorPalette,\n\t\t\tblendMode\n\t\t}),\n\t\tbackdrop: renderColorValue(value.backdrop, colorOptions),\n\t\tbadge: renderThemeColorBadge(value.badge, {\n\t\t\tbaseBg,\n\t\t\tcolorPalette,\n\t\t\tblendMode\n\t\t}),\n\t\tbg: baseBg,\n\t\tborder: renderColorValue(value.border, colorOptions),\n\t\tbutton,\n\t\tcode: {\n\t\t\tbg: renderColorValue(value.code.bg, colorOptions),\n\t\t\tfg: renderColorValue(value.code.fg, colorOptions)\n\t\t},\n\t\tfg: renderColorValue(value.fg, colorOptions),\n\t\tfocusRing: renderColorValue(value.focusRing, colorOptions),\n\t\ticon: renderColorValue(value.icon, colorOptions),\n\t\tinput: renderThemeColorInput(value.input, {\n\t\t\tbaseBg,\n\t\t\tcolorPalette,\n\t\t\tblendMode\n\t\t}),\n\t\tkbd: renderThemeColorKBD(value.kbd, {\n\t\t\tbaseBg,\n\t\t\tcolorPalette,\n\t\t\tblendMode\n\t\t}),\n\t\tlink: { fg: renderColorValue(value.link.fg, colorOptions) },\n\t\tmuted: {\n\t\t\tbg: renderColorValue(value.muted.bg, colorOptions),\n\t\t\tfg: renderColorValue(value.muted.fg, colorOptions)\n\t\t},\n\t\tshadow,\n\t\tskeleton: {\n\t\t\tfrom: renderColorValue(value.skeleton.from, colorOptions),\n\t\t\tto: renderColorValue(value.skeleton.to, colorOptions)\n\t\t},\n\t\tsyntax: renderSyntaxColorTheme(value.syntax, {\n\t\t\tbaseBg,\n\t\t\tcolorPalette,\n\t\t\tblendMode\n\t\t}),\n\t\tselectable\n\t};\n}\nfunction renderThemeColorKBD(value, options) {\n\tlet { baseBg, blendMode, colorPalette } = options, rootOptions = {\n\t\tbg: baseBg,\n\t\tblendMode,\n\t\tcolorPalette\n\t}, bg = renderColorValue(value.bg, rootOptions), colorOptions = {\n\t\tbg,\n\t\tblendMode,\n\t\tcolorPalette\n\t};\n\treturn {\n\t\tbg,\n\t\tfg: renderColorValue(value.fg, colorOptions),\n\t\tborder: renderColorValue(value.border, colorOptions)\n\t};\n}\nfunction renderThemeColorAvatar(value, options) {\n\tlet colorAvatar = {};\n\tfor (let hue of COLOR_HUES) colorAvatar[hue] = renderThemeColorAvatarColor(value[hue], options);\n\treturn colorAvatar;\n}\nfunction renderThemeColorAvatarColor(value, options) {\n\tlet { baseBg, blendMode: rootBlendMode, colorPalette } = options, blendMode = value._blend || \"multiply\", rootOptions = {\n\t\tbg: baseBg,\n\t\tblendMode: rootBlendMode,\n\t\tcolorPalette\n\t}, bg = renderColorValue(value.bg, rootOptions), colorOptions = {\n\t\tbg,\n\t\tblendMode,\n\t\tcolorPalette\n\t};\n\treturn {\n\t\t_blend: blendMode,\n\t\tbg,\n\t\tfg: renderColorValue(value.fg, colorOptions)\n\t};\n}\nfunction renderThemeColorBadge(value, options) {\n\tlet colorBadge = {};\n\tfor (let tone of THEME_COLOR_STATE_TONES) colorBadge[tone] = renderThemeColorBadgeColor(value[tone], options);\n\treturn colorBadge;\n}\nfunction renderThemeColorBadgeColor(value, options) {\n\tlet { baseBg, blendMode: rootBlendMode, colorPalette } = options, blendMode = rootBlendMode, rootOptions = {\n\t\tbg: baseBg,\n\t\tblendMode: rootBlendMode,\n\t\tcolorPalette\n\t}, bg = renderColorValue(value.bg, rootOptions), colorOptions = {\n\t\tbg,\n\t\tblendMode,\n\t\tcolorPalette\n\t};\n\treturn {\n\t\tbg,\n\t\tdot: renderColorValue(value.dot, colorOptions),\n\t\tfg: renderColorValue(value.fg, colorOptions),\n\t\ticon: renderColorValue(value.icon, colorOptions)\n\t};\n}\nfunction renderThemeColorButton(value, options) {\n\treturn {\n\t\tdefault: renderThemeColorButtonTones(value.default, options),\n\t\tghost: renderThemeColorButtonTones(value.ghost, options),\n\t\tbleed: renderThemeColorButtonTones(value.bleed, options)\n\t};\n}\nfunction renderThemeColorButtonTones(value, options) {\n\tlet colorButtonMode = {};\n\tfor (let tone of THEME_COLOR_STATE_TONES) colorButtonMode[tone] = renderThemeColorButtonStates(value[tone], options);\n\treturn colorButtonMode;\n}\nfunction renderThemeColorButtonStates(value, options) {\n\treturn {\n\t\tenabled: renderThemeColorState(value.enabled, options),\n\t\thovered: renderThemeColorState(value.hovered, options),\n\t\tpressed: renderThemeColorState(value.pressed, options),\n\t\tselected: renderThemeColorState(value.selected, options),\n\t\tdisabled: renderThemeColorState(value.disabled, options)\n\t};\n}\nfunction renderThemeColorState(value, options) {\n\tlet { baseBg, blendMode: rootBlendMode, colorPalette } = options, blendMode = value._blend || \"multiply\", rootOptions = {\n\t\tbg: baseBg,\n\t\tblendMode: rootBlendMode,\n\t\tcolorPalette\n\t}, bg = renderColorValue(value.bg, rootOptions), colorOptions = {\n\t\tbg,\n\t\tblendMode,\n\t\tcolorPalette\n\t};\n\treturn {\n\t\t_blend: blendMode,\n\t\taccent: { fg: renderColorValue(value.accent.fg, colorOptions) },\n\t\tavatar: renderThemeColorAvatar(value.avatar, {\n\t\t\tbaseBg: bg,\n\t\t\tcolorPalette,\n\t\t\tblendMode\n\t\t}),\n\t\tbadge: renderThemeColorBadge(value.badge, {\n\t\t\tbaseBg: bg,\n\t\t\tcolorPalette,\n\t\t\tblendMode\n\t\t}),\n\t\tbg,\n\t\tborder: renderColorValue(value.border, colorOptions),\n\t\tcode: {\n\t\t\tbg: renderColorValue(value.code.bg, colorOptions),\n\t\t\tfg: renderColorValue(value.code.fg, colorOptions)\n\t\t},\n\t\tfg: renderColorValue(value.fg, colorOptions),\n\t\ticon: renderColorValue(value.icon, colorOptions),\n\t\tlink: { fg: renderColorValue(value.link.fg, colorOptions) },\n\t\tmuted: {\n\t\t\tbg: renderColorValue(value.muted.bg, colorOptions),\n\t\t\tfg: renderColorValue(value.muted.fg, colorOptions)\n\t\t},\n\t\tkbd: {\n\t\t\tbg: renderColorValue(value.kbd.bg, colorOptions),\n\t\t\tfg: renderColorValue(value.kbd.fg, colorOptions),\n\t\t\tborder: renderColorValue(value.kbd.border, colorOptions)\n\t\t},\n\t\tskeleton: {\n\t\t\tfrom: renderColorValue(value.skeleton?.from, colorOptions),\n\t\t\tto: renderColorValue(value.skeleton?.to, colorOptions)\n\t\t}\n\t};\n}\nfunction renderThemeColorInput(value, options) {\n\treturn {\n\t\tdefault: renderInputStatesColorTheme(value.default, options),\n\t\tinvalid: renderInputStatesColorTheme(value.invalid, options)\n\t};\n}\nfunction renderInputStatesColorTheme(value, options) {\n\treturn {\n\t\tenabled: renderInputStateColorTheme(value.enabled, options),\n\t\thovered: renderInputStateColorTheme(value.hovered, options),\n\t\treadOnly: renderInputStateColorTheme(value.readOnly, options),\n\t\tdisabled: renderInputStateColorTheme(value.disabled, options)\n\t};\n}\nfunction renderInputStateColorTheme(value, options) {\n\tlet { baseBg, blendMode: rootBlendMode, colorPalette } = options, blendMode = value._blend || \"multiply\", rootOptions = {\n\t\tcolorPalette,\n\t\tbg: baseBg,\n\t\tblendMode: rootBlendMode\n\t}, bg = renderColorValue(value.bg, rootOptions), colorOptions = {\n\t\tcolorPalette,\n\t\tbg,\n\t\tblendMode\n\t};\n\treturn {\n\t\t_blend: blendMode,\n\t\tbg,\n\t\tborder: renderColorValue(value.border, colorOptions),\n\t\tfg: renderColorValue(value.fg, colorOptions),\n\t\tmuted: { bg: renderColorValue(value.muted.bg, colorOptions) },\n\t\tplaceholder: renderColorValue(value.placeholder, colorOptions)\n\t};\n}\nfunction renderThemeColorSelectable(value, options) {\n\tlet colorSelectable = {};\n\tfor (let tone of THEME_COLOR_STATE_TONES) colorSelectable[tone] = renderThemeColorSelectableStates(value[tone], options);\n\treturn colorSelectable;\n}\nfunction renderThemeColorSelectableStates(value, options) {\n\treturn {\n\t\tenabled: renderThemeColorState(value.enabled, options),\n\t\thovered: renderThemeColorState(value.hovered, options),\n\t\tpressed: renderThemeColorState(value.pressed, options),\n\t\tselected: renderThemeColorState(value.selected, options),\n\t\tdisabled: renderThemeColorState(value.disabled, options)\n\t};\n}\nfunction renderSyntaxColorTheme(value, options) {\n\tlet { colorPalette, baseBg, blendMode } = options, colorOptions = {\n\t\tcolorPalette,\n\t\tbg: baseBg,\n\t\tblendMode\n\t};\n\treturn {\n\t\tatrule: renderColorValue(value.atrule, colorOptions),\n\t\tattrName: renderColorValue(value.attrName, colorOptions),\n\t\tattrValue: renderColorValue(value.attrValue, colorOptions),\n\t\tattribute: renderColorValue(value.attribute, colorOptions),\n\t\tboolean: renderColorValue(value.boolean, colorOptions),\n\t\tbuiltin: renderColorValue(value.builtin, colorOptions),\n\t\tcdata: renderColorValue(value.cdata, colorOptions),\n\t\tchar: renderColorValue(value.char, colorOptions),\n\t\tclass: renderColorValue(value.class, colorOptions),\n\t\tclassName: renderColorValue(value.className, colorOptions),\n\t\tcomment: renderColorValue(value.comment, colorOptions),\n\t\tconstant: renderColorValue(value.constant, colorOptions),\n\t\tdeleted: renderColorValue(value.deleted, colorOptions),\n\t\tdoctype: renderColorValue(value.doctype, colorOptions),\n\t\tentity: renderColorValue(value.entity, colorOptions),\n\t\tfunction: renderColorValue(value.function, colorOptions),\n\t\thexcode: renderColorValue(value.hexcode, colorOptions),\n\t\tid: renderColorValue(value.id, colorOptions),\n\t\timportant: renderColorValue(value.important, colorOptions),\n\t\tinserted: renderColorValue(value.inserted, colorOptions),\n\t\tkeyword: renderColorValue(value.keyword, colorOptions),\n\t\tnumber: renderColorValue(value.number, colorOptions),\n\t\toperator: renderColorValue(value.operator, colorOptions),\n\t\tprolog: renderColorValue(value.prolog, colorOptions),\n\t\tproperty: renderColorValue(value.property, colorOptions),\n\t\tpseudoClass: renderColorValue(value.pseudoClass, colorOptions),\n\t\tpseudoElement: renderColorValue(value.pseudoElement, colorOptions),\n\t\tpunctuation: renderColorValue(value.punctuation, colorOptions),\n\t\tregex: renderColorValue(value.regex, colorOptions),\n\t\tselector: renderColorValue(value.selector, colorOptions),\n\t\tstring: renderColorValue(value.string, colorOptions),\n\t\tsymbol: renderColorValue(value.symbol, colorOptions),\n\t\ttag: renderColorValue(value.tag, colorOptions),\n\t\tunit: renderColorValue(value.unit, colorOptions),\n\t\turl: renderColorValue(value.url, colorOptions),\n\t\tvariable: renderColorValue(value.variable, colorOptions)\n\t};\n}\n/** @internal */\nfunction buildTheme(config) {\n\tlet colorTheme = buildColorTheme(config);\n\treturn v2_v0({\n\t\t_version: 2,\n\t\tavatar: config?.avatar ?? defaultThemeConfig.avatar,\n\t\tbutton: config?.button ?? defaultThemeConfig.button,\n\t\tcard: config?.card ?? defaultThemeConfig.card,\n\t\tcolor: renderThemeColorSchemes(colorTheme, config),\n\t\tcontainer: config?.container ?? defaultThemeConfig.container,\n\t\tfont: config?.font ?? defaultThemeFonts,\n\t\tinput: config?.input ?? defaultThemeConfig.input,\n\t\tlayer: config?.layer ?? defaultThemeConfig.layer,\n\t\tmedia: config?.media ?? defaultThemeConfig.media,\n\t\tradius: config?.radius ?? defaultThemeConfig.radius,\n\t\tshadow: config?.shadow ?? defaultThemeConfig.shadow,\n\t\tspace: config?.space ?? defaultThemeConfig.space,\n\t\tstyle: config?.style ?? defaultThemeConfig.style\n\t});\n}\nfunction createSelectableTones(opts, base, dark, solid, muted) {\n\treturn {\n\t\tdefault: _createSelectableStates(opts, base, dark, solid, muted, \"default\"),\n\t\tprimary: _createSelectableStates(opts, base, dark, solid, muted, \"primary\"),\n\t\tpositive: _createSelectableStates(opts, base, dark, solid, muted, \"positive\"),\n\t\tcaution: _createSelectableStates(opts, base, dark, solid, muted, \"caution\"),\n\t\tcritical: _createSelectableStates(opts, base, dark, solid, muted, \"critical\")\n\t};\n}\nfunction _createSelectableStates(opts, base, dark, solid, muted, tone) {\n\treturn {\n\t\tenabled: opts.selectable({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tsolid,\n\t\t\tmuted,\n\t\t\tstate: \"enabled\",\n\t\t\ttone\n\t\t}),\n\t\thovered: opts.selectable({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tsolid,\n\t\t\tmuted,\n\t\t\tstate: \"hovered\",\n\t\t\ttone\n\t\t}),\n\t\tpressed: opts.selectable({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tsolid,\n\t\t\tmuted,\n\t\t\tstate: \"pressed\",\n\t\t\ttone\n\t\t}),\n\t\tselected: opts.selectable({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tsolid,\n\t\t\tmuted,\n\t\t\tstate: \"selected\",\n\t\t\ttone\n\t\t}),\n\t\tdisabled: opts.selectable({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tsolid,\n\t\t\tmuted,\n\t\t\tstate: \"disabled\",\n\t\t\ttone\n\t\t})\n\t};\n}\nfunction createSolidTones(opts, base, dark, name) {\n\treturn {\n\t\tdefault: {\n\t\t\tenabled: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"default\",\n\t\t\t\tname,\n\t\t\t\tstate: \"enabled\"\n\t\t\t}),\n\t\t\tdisabled: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"default\",\n\t\t\t\tname,\n\t\t\t\tstate: \"disabled\"\n\t\t\t}),\n\t\t\thovered: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"default\",\n\t\t\t\tname,\n\t\t\t\tstate: \"hovered\"\n\t\t\t}),\n\t\t\tpressed: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"default\",\n\t\t\t\tname,\n\t\t\t\tstate: \"pressed\"\n\t\t\t}),\n\t\t\tselected: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"default\",\n\t\t\t\tname,\n\t\t\t\tstate: \"selected\"\n\t\t\t})\n\t\t},\n\t\ttransparent: {\n\t\t\tenabled: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"transparent\",\n\t\t\t\tname,\n\t\t\t\tstate: \"enabled\"\n\t\t\t}),\n\t\t\tdisabled: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"transparent\",\n\t\t\t\tname,\n\t\t\t\tstate: \"disabled\"\n\t\t\t}),\n\t\t\thovered: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"transparent\",\n\t\t\t\tname,\n\t\t\t\tstate: \"hovered\"\n\t\t\t}),\n\t\t\tpressed: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"transparent\",\n\t\t\t\tname,\n\t\t\t\tstate: \"pressed\"\n\t\t\t}),\n\t\t\tselected: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"transparent\",\n\t\t\t\tname,\n\t\t\t\tstate: \"selected\"\n\t\t\t})\n\t\t},\n\t\tprimary: {\n\t\t\tenabled: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"primary\",\n\t\t\t\tname,\n\t\t\t\tstate: \"enabled\"\n\t\t\t}),\n\t\t\tdisabled: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"primary\",\n\t\t\t\tname,\n\t\t\t\tstate: \"disabled\"\n\t\t\t}),\n\t\t\thovered: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"primary\",\n\t\t\t\tname,\n\t\t\t\tstate: \"hovered\"\n\t\t\t}),\n\t\t\tpressed: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"primary\",\n\t\t\t\tname,\n\t\t\t\tstate: \"pressed\"\n\t\t\t}),\n\t\t\tselected: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"primary\",\n\t\t\t\tname,\n\t\t\t\tstate: \"selected\"\n\t\t\t})\n\t\t},\n\t\tpositive: {\n\t\t\tenabled: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"positive\",\n\t\t\t\tname,\n\t\t\t\tstate: \"enabled\"\n\t\t\t}),\n\t\t\tdisabled: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"positive\",\n\t\t\t\tname,\n\t\t\t\tstate: \"disabled\"\n\t\t\t}),\n\t\t\thovered: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"positive\",\n\t\t\t\tname,\n\t\t\t\tstate: \"hovered\"\n\t\t\t}),\n\t\t\tpressed: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"positive\",\n\t\t\t\tname,\n\t\t\t\tstate: \"pressed\"\n\t\t\t}),\n\t\t\tselected: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"positive\",\n\t\t\t\tname,\n\t\t\t\tstate: \"selected\"\n\t\t\t})\n\t\t},\n\t\tcaution: {\n\t\t\tenabled: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"caution\",\n\t\t\t\tname,\n\t\t\t\tstate: \"enabled\"\n\t\t\t}),\n\t\t\tdisabled: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"caution\",\n\t\t\t\tname,\n\t\t\t\tstate: \"disabled\"\n\t\t\t}),\n\t\t\thovered: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"caution\",\n\t\t\t\tname,\n\t\t\t\tstate: \"hovered\"\n\t\t\t}),\n\t\t\tpressed: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"caution\",\n\t\t\t\tname,\n\t\t\t\tstate: \"pressed\"\n\t\t\t}),\n\t\t\tselected: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"caution\",\n\t\t\t\tname,\n\t\t\t\tstate: \"selected\"\n\t\t\t})\n\t\t},\n\t\tcritical: {\n\t\t\tenabled: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"critical\",\n\t\t\t\tname,\n\t\t\t\tstate: \"enabled\"\n\t\t\t}),\n\t\t\tdisabled: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"critical\",\n\t\t\t\tname,\n\t\t\t\tstate: \"disabled\"\n\t\t\t}),\n\t\t\thovered: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"critical\",\n\t\t\t\tname,\n\t\t\t\tstate: \"hovered\"\n\t\t\t}),\n\t\t\tpressed: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"critical\",\n\t\t\t\tname,\n\t\t\t\tstate: \"pressed\"\n\t\t\t}),\n\t\t\tselected: opts.solid({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"critical\",\n\t\t\t\tname,\n\t\t\t\tstate: \"selected\"\n\t\t\t})\n\t\t}\n\t};\n}\nfunction createButtonTones(opts, base, dark, solid, muted, mode) {\n\treturn {\n\t\tdefault: opts.button({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tsolid: solid.default,\n\t\t\tmuted: muted.default,\n\t\t\tmode\n\t\t}),\n\t\tprimary: opts.button({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tsolid: solid.primary,\n\t\t\tmuted: muted.primary,\n\t\t\tmode\n\t\t}),\n\t\tpositive: opts.button({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tsolid: solid.positive,\n\t\t\tmuted: muted.positive,\n\t\t\tmode\n\t\t}),\n\t\tcaution: opts.button({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tsolid: solid.caution,\n\t\t\tmuted: muted.caution,\n\t\t\tmode\n\t\t}),\n\t\tcritical: opts.button({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tsolid: solid.critical,\n\t\t\tmuted: muted.critical,\n\t\t\tmode\n\t\t})\n\t};\n}\nfunction createButtonModes(opts, base, dark, solid, muted) {\n\treturn {\n\t\tdefault: createButtonTones(opts, base, dark, solid, muted, \"default\"),\n\t\tghost: createButtonTones(opts, base, dark, solid, muted, \"ghost\"),\n\t\tbleed: createButtonTones(opts, base, dark, solid, muted, \"bleed\")\n\t};\n}\nfunction createCardStates(opts, base, dark, name, solid, muted) {\n\treturn {\n\t\tenabled: opts.card({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tname,\n\t\t\tstate: \"enabled\",\n\t\t\tsolid,\n\t\t\tmuted\n\t\t}),\n\t\tdisabled: opts.card({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tname,\n\t\t\tstate: \"disabled\",\n\t\t\tsolid,\n\t\t\tmuted\n\t\t}),\n\t\thovered: opts.card({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tname,\n\t\t\tstate: \"hovered\",\n\t\t\tsolid,\n\t\t\tmuted\n\t\t}),\n\t\tpressed: opts.card({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tname,\n\t\t\tstate: \"pressed\",\n\t\t\tsolid,\n\t\t\tmuted\n\t\t}),\n\t\tselected: opts.card({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tname,\n\t\t\tstate: \"selected\",\n\t\t\tsolid,\n\t\t\tmuted\n\t\t})\n\t};\n}\nconst black = \"hsl(0, 0%, 0%)\", white = \"hsl(0, 0%, 100%)\", colors = {\n\tdefault: {\n\t\tlightest: \"hsl(0, 0%, 95%)\",\n\t\tlighter: \"hsl(0, 0%, 70%)\",\n\t\tlight: \"hsl(0, 0%, 65%)\",\n\t\tbase: \"hsl(0, 0%, 50%)\",\n\t\tdark: \"hsl(0, 0%, 35%)\",\n\t\tdarker: \"hsl(0, 0%, 20%)\",\n\t\tdarkest: \"hsl(0, 0%, 5%)\"\n\t},\n\ttransparent: {\n\t\tlightest: \"hsl(240, 100%, 95%)\",\n\t\tlighter: \"hsl(240, 100%, 70%)\",\n\t\tlight: \"hsl(240, 100%, 65%)\",\n\t\tbase: \"hsl(240, 100%, 50%)\",\n\t\tdark: \"hsl(240, 100%, 35%)\",\n\t\tdarker: \"hsl(240, 100%, 20%)\",\n\t\tdarkest: \"hsl(240, 100%, 5%)\"\n\t},\n\tprimary: {\n\t\tlightest: \"hsl(240, 100%, 95%)\",\n\t\tlighter: \"hsl(240, 100%, 70%)\",\n\t\tlight: \"hsl(240, 100%, 65%)\",\n\t\tbase: \"hsl(240, 100%, 50%)\",\n\t\tdark: \"hsl(240, 100%, 35%)\",\n\t\tdarker: \"hsl(240, 100%, 20%)\",\n\t\tdarkest: \"hsl(240, 100%, 5%)\"\n\t},\n\tpositive: {\n\t\tlightest: \"hsl(120, 100%, 95%)\",\n\t\tlighter: \"hsl(120, 100%, 70%)\",\n\t\tlight: \"hsl(120, 100%, 65%)\",\n\t\tbase: \"hsl(120, 100%, 50%)\",\n\t\tdark: \"hsl(120, 100%, 35%)\",\n\t\tdarker: \"hsl(120, 100%, 20%)\",\n\t\tdarkest: \"hsl(120, 100%, 5%)\"\n\t},\n\tcaution: {\n\t\tlightest: \"hsl(60, 100%, 95%)\",\n\t\tlighter: \"hsl(60, 100%, 70%)\",\n\t\tlight: \"hsl(60, 100%, 65%)\",\n\t\tbase: \"hsl(60, 100%, 50%)\",\n\t\tdark: \"hsl(60, 100%, 35%)\",\n\t\tdarker: \"hsl(60, 100%, 20%)\",\n\t\tdarkest: \"hsl(60, 100%, 5%)\"\n\t},\n\tcritical: {\n\t\tlightest: \"hsl(0, 100%, 95%)\",\n\t\tlighter: \"hsl(0, 100%, 70%)\",\n\t\tlight: \"hsl(0, 100%, 65%)\",\n\t\tbase: \"hsl(0, 100%, 50%)\",\n\t\tdark: \"hsl(0, 100%, 35%)\",\n\t\tdarker: \"hsl(0, 100%, 20%)\",\n\t\tdarkest: \"hsl(0, 100%, 5%)\"\n\t}\n}, spots = {\n\tgray: \"hsl(0, 0%, 50%)\",\n\tred: \"hsl(0, 100%, 50%)\",\n\torange: \"hsl(30, 100%, 50%)\",\n\tyellow: \"hsl(60, 100%, 50%)\",\n\tgreen: \"hsl(120, 100%, 50%)\",\n\tcyan: \"hsl(180, 100%, 50%)\",\n\tblue: \"hsl(240, 100%, 50%)\",\n\tpurple: \"hsl(270, 100%, 50%)\",\n\tmagenta: \"hsl(300, 100%, 50%)\"\n}, tones = {\n\ttransparent: {\n\t\tbg: [colors.transparent.darkest, colors.transparent.lightest],\n\t\tfg: [colors.transparent.lightest, colors.transparent.darkest],\n\t\tborder: [colors.transparent.darker, colors.transparent.lighter],\n\t\tfocusRing: [colors.transparent.base, colors.transparent.base]\n\t},\n\tprimary: {\n\t\tbg: [colors.primary.darkest, colors.primary.lightest],\n\t\tfg: [colors.primary.lightest, colors.primary.darkest],\n\t\tborder: [colors.primary.darker, colors.primary.lighter],\n\t\tfocusRing: [colors.primary.base, colors.primary.base]\n\t},\n\tpositive: {\n\t\tbg: [colors.positive.darkest, colors.positive.lightest],\n\t\tfg: [colors.positive.lightest, colors.positive.darkest],\n\t\tborder: [colors.positive.darker, colors.positive.lighter],\n\t\tfocusRing: [colors.positive.base, colors.positive.base]\n\t},\n\tcaution: {\n\t\tbg: [colors.caution.darkest, colors.caution.lightest],\n\t\tfg: [colors.caution.lightest, colors.caution.darkest],\n\t\tborder: [colors.caution.darker, colors.caution.lighter],\n\t\tfocusRing: [colors.caution.base, colors.caution.base]\n\t},\n\tcritical: {\n\t\tbg: [colors.critical.darkest, colors.critical.lightest],\n\t\tfg: [colors.critical.lightest, colors.critical.darkest],\n\t\tborder: [colors.critical.darker, colors.critical.lighter],\n\t\tfocusRing: [colors.critical.base, colors.critical.base]\n\t}\n}, defaultOpts = {\n\tbase: ({ dark, name }) => name === \"default\" ? {\n\t\tbg: dark ? black : white,\n\t\tfg: dark ? white : black,\n\t\tborder: dark ? colors.default.darkest : colors.default.lightest,\n\t\tfocusRing: colors.primary.base,\n\t\tshadow: {\n\t\t\toutline: black,\n\t\t\tumbra: black,\n\t\t\tpenumbra: black,\n\t\t\tambient: black\n\t\t},\n\t\tskeleton: {\n\t\t\tfrom: dark ? white : black,\n\t\t\tto: dark ? white : black\n\t\t}\n\t} : {\n\t\tbg: tones[name].bg[+!dark],\n\t\tfg: tones[name].fg[+!dark],\n\t\tborder: tones[name].border[+!dark],\n\t\tfocusRing: tones[name].focusRing[+!dark],\n\t\tshadow: {\n\t\t\toutline: black,\n\t\t\tumbra: black,\n\t\t\tpenumbra: black,\n\t\t\tambient: black\n\t\t},\n\t\tskeleton: {\n\t\t\tfrom: dark ? white : black,\n\t\t\tto: dark ? white : black\n\t\t}\n\t},\n\tsolid: ({ base, dark, state, tone }) => {\n\t\tlet color = colors[tone];\n\t\treturn state === \"hovered\" ? {\n\t\t\tbg: dark ? color.light : color.dark,\n\t\t\tbg2: dark ? color.light : color.dark,\n\t\t\tborder: dark ? color.lighter : color.darker,\n\t\t\tfg: dark ? color.darkest : color.lightest,\n\t\t\ticon: dark ? color.darkest : color.lightest,\n\t\t\tmuted: { fg: black },\n\t\t\taccent: { fg: black },\n\t\t\tlink: { fg: black },\n\t\t\tcode: {\n\t\t\t\tbg: black,\n\t\t\t\tfg: black\n\t\t\t},\n\t\t\tskeleton: base.skeleton\n\t\t} : {\n\t\t\tbg: color.base,\n\t\t\tbg2: color.base,\n\t\t\tborder: dark ? color.light : color.dark,\n\t\t\tfg: dark ? color.darkest : color.lightest,\n\t\t\ticon: dark ? color.darkest : color.lightest,\n\t\t\tmuted: { fg: black },\n\t\t\taccent: { fg: black },\n\t\t\tlink: { fg: black },\n\t\t\tcode: {\n\t\t\t\tbg: black,\n\t\t\t\tfg: black\n\t\t\t},\n\t\t\tskeleton: base.skeleton\n\t\t};\n\t},\n\tmuted: ({ base, dark, state, tone }) => {\n\t\tlet color = colors[tone];\n\t\treturn state === \"hovered\" ? {\n\t\t\tbg: dark ? color.darker : color.lighter,\n\t\t\tbg2: dark ? color.darker : color.lighter,\n\t\t\tborder: dark ? color.lighter : color.darker,\n\t\t\tfg: dark ? color.lightest : color.darkest,\n\t\t\ticon: dark ? color.lightest : color.darkest,\n\t\t\tmuted: { fg: black },\n\t\t\taccent: { fg: black },\n\t\t\tlink: { fg: black },\n\t\t\tcode: {\n\t\t\t\tbg: black,\n\t\t\t\tfg: black\n\t\t\t},\n\t\t\tskeleton: base.skeleton\n\t\t} : {\n\t\t\tbg: dark ? color.darkest : color.lightest,\n\t\t\tbg2: dark ? color.darkest : color.lightest,\n\t\t\tborder: dark ? color.darker : color.lighter,\n\t\t\tfg: dark ? color.lighter : color.darker,\n\t\t\ticon: dark ? color.lighter : color.darker,\n\t\t\tmuted: { fg: black },\n\t\t\taccent: { fg: black },\n\t\t\tlink: { fg: black },\n\t\t\tcode: {\n\t\t\t\tbg: black,\n\t\t\t\tfg: black\n\t\t\t},\n\t\t\tskeleton: base.skeleton\n\t\t};\n\t},\n\tbutton: ({ base, mode, muted, solid }) => mode === \"bleed\" ? {\n\t\t...muted,\n\t\tenabled: {\n\t\t\tbg: \"transparent\",\n\t\t\tbg2: \"transparent\",\n\t\t\tfg: muted.enabled.fg,\n\t\t\ticon: muted.enabled.fg,\n\t\t\tborder: \"transparent\",\n\t\t\tmuted: { fg: black },\n\t\t\taccent: { fg: black },\n\t\t\tlink: { fg: black },\n\t\t\tcode: {\n\t\t\t\tbg: black,\n\t\t\t\tfg: black\n\t\t\t},\n\t\t\tskeleton: base.skeleton\n\t\t},\n\t\thovered: {\n\t\t\tbg: muted.enabled.bg,\n\t\t\tbg2: muted.enabled.bg,\n\t\t\tfg: muted.hovered.fg,\n\t\t\ticon: muted.hovered.fg,\n\t\t\tborder: \"transparent\",\n\t\t\tmuted: { fg: black },\n\t\t\taccent: { fg: black },\n\t\t\tlink: { fg: black },\n\t\t\tcode: {\n\t\t\t\tbg: black,\n\t\t\t\tfg: black\n\t\t\t},\n\t\t\tskeleton: base.skeleton\n\t\t}\n\t} : mode === \"ghost\" ? {\n\t\t...solid,\n\t\tenabled: muted.enabled\n\t} : solid,\n\tcard: ({ base }) => ({\n\t\tbg: black,\n\t\tbg2: black,\n\t\tfg: black,\n\t\ticon: black,\n\t\tborder: black,\n\t\tmuted: { fg: black },\n\t\taccent: { fg: black },\n\t\tlink: { fg: black },\n\t\tcode: {\n\t\t\tbg: black,\n\t\t\tfg: black\n\t\t},\n\t\tskeleton: base.skeleton\n\t}),\n\tinput: () => ({\n\t\tbg: black,\n\t\tbg2: black,\n\t\tfg: black,\n\t\tborder: black,\n\t\tplaceholder: black\n\t}),\n\tselectable: ({ muted, state, tone }) => muted[tone][state],\n\tspot: ({ key }) => spots[key],\n\tsyntax: () => ({\n\t\tatrule: black,\n\t\tattrName: black,\n\t\tattrValue: black,\n\t\tattribute: black,\n\t\tboolean: black,\n\t\tbuiltin: black,\n\t\tcdata: black,\n\t\tchar: black,\n\t\tclass: black,\n\t\tclassName: black,\n\t\tcomment: black,\n\t\tconstant: black,\n\t\tdeleted: black,\n\t\tdoctype: black,\n\t\tentity: black,\n\t\tfunction: black,\n\t\thexcode: black,\n\t\tid: black,\n\t\timportant: black,\n\t\tinserted: black,\n\t\tkeyword: black,\n\t\tnumber: black,\n\t\toperator: black,\n\t\tprolog: black,\n\t\tproperty: black,\n\t\tpseudoClass: black,\n\t\tpseudoElement: black,\n\t\tpunctuation: black,\n\t\tregex: black,\n\t\tselector: black,\n\t\tstring: black,\n\t\tsymbol: black,\n\t\ttag: black,\n\t\tunit: black,\n\t\turl: black,\n\t\tvariable: black\n\t})\n};\nfunction createInputModes(opts, base, dark, solid, muted) {\n\treturn {\n\t\tdefault: {\n\t\t\tenabled: opts.input({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\tmode: \"default\",\n\t\t\t\tstate: \"enabled\",\n\t\t\t\tsolid: solid.default,\n\t\t\t\tmuted: muted.default\n\t\t\t}),\n\t\t\tdisabled: opts.input({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\tmode: \"default\",\n\t\t\t\tstate: \"disabled\",\n\t\t\t\tsolid: solid.default,\n\t\t\t\tmuted: muted.default\n\t\t\t}),\n\t\t\thovered: opts.input({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\tmode: \"default\",\n\t\t\t\tstate: \"hovered\",\n\t\t\t\tsolid: solid.default,\n\t\t\t\tmuted: muted.default\n\t\t\t}),\n\t\t\treadOnly: opts.input({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\tmode: \"default\",\n\t\t\t\tstate: \"readOnly\",\n\t\t\t\tsolid: solid.default,\n\t\t\t\tmuted: muted.default\n\t\t\t})\n\t\t},\n\t\tinvalid: {\n\t\t\tenabled: opts.input({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\tmode: \"invalid\",\n\t\t\t\tstate: \"enabled\",\n\t\t\t\tsolid: solid.default,\n\t\t\t\tmuted: muted.default\n\t\t\t}),\n\t\t\tdisabled: opts.input({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\tmode: \"invalid\",\n\t\t\t\tstate: \"disabled\",\n\t\t\t\tsolid: solid.default,\n\t\t\t\tmuted: muted.default\n\t\t\t}),\n\t\t\thovered: opts.input({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\tmode: \"invalid\",\n\t\t\t\tstate: \"hovered\",\n\t\t\t\tsolid: solid.default,\n\t\t\t\tmuted: muted.default\n\t\t\t}),\n\t\t\treadOnly: opts.input({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\tmode: \"invalid\",\n\t\t\t\tstate: \"readOnly\",\n\t\t\t\tsolid: solid.default,\n\t\t\t\tmuted: muted.default\n\t\t\t})\n\t\t}\n\t};\n}\nfunction createMutedTones(opts, base, dark, name) {\n\treturn {\n\t\tdefault: {\n\t\t\tenabled: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"default\",\n\t\t\t\tname,\n\t\t\t\tstate: \"enabled\"\n\t\t\t}),\n\t\t\tdisabled: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"default\",\n\t\t\t\tname,\n\t\t\t\tstate: \"disabled\"\n\t\t\t}),\n\t\t\thovered: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"default\",\n\t\t\t\tname,\n\t\t\t\tstate: \"hovered\"\n\t\t\t}),\n\t\t\tpressed: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"default\",\n\t\t\t\tname,\n\t\t\t\tstate: \"pressed\"\n\t\t\t}),\n\t\t\tselected: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"default\",\n\t\t\t\tname,\n\t\t\t\tstate: \"selected\"\n\t\t\t})\n\t\t},\n\t\ttransparent: {\n\t\t\tenabled: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"transparent\",\n\t\t\t\tname,\n\t\t\t\tstate: \"enabled\"\n\t\t\t}),\n\t\t\tdisabled: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"transparent\",\n\t\t\t\tname,\n\t\t\t\tstate: \"disabled\"\n\t\t\t}),\n\t\t\thovered: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"transparent\",\n\t\t\t\tname,\n\t\t\t\tstate: \"hovered\"\n\t\t\t}),\n\t\t\tpressed: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"transparent\",\n\t\t\t\tname,\n\t\t\t\tstate: \"pressed\"\n\t\t\t}),\n\t\t\tselected: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"transparent\",\n\t\t\t\tname,\n\t\t\t\tstate: \"selected\"\n\t\t\t})\n\t\t},\n\t\tprimary: {\n\t\t\tenabled: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"primary\",\n\t\t\t\tname,\n\t\t\t\tstate: \"enabled\"\n\t\t\t}),\n\t\t\tdisabled: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"primary\",\n\t\t\t\tname,\n\t\t\t\tstate: \"disabled\"\n\t\t\t}),\n\t\t\thovered: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"primary\",\n\t\t\t\tname,\n\t\t\t\tstate: \"hovered\"\n\t\t\t}),\n\t\t\tpressed: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"primary\",\n\t\t\t\tname,\n\t\t\t\tstate: \"pressed\"\n\t\t\t}),\n\t\t\tselected: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"primary\",\n\t\t\t\tname,\n\t\t\t\tstate: \"selected\"\n\t\t\t})\n\t\t},\n\t\tpositive: {\n\t\t\tenabled: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"positive\",\n\t\t\t\tname,\n\t\t\t\tstate: \"enabled\"\n\t\t\t}),\n\t\t\tdisabled: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"positive\",\n\t\t\t\tname,\n\t\t\t\tstate: \"disabled\"\n\t\t\t}),\n\t\t\thovered: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"positive\",\n\t\t\t\tname,\n\t\t\t\tstate: \"hovered\"\n\t\t\t}),\n\t\t\tpressed: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"positive\",\n\t\t\t\tname,\n\t\t\t\tstate: \"pressed\"\n\t\t\t}),\n\t\t\tselected: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"positive\",\n\t\t\t\tname,\n\t\t\t\tstate: \"selected\"\n\t\t\t})\n\t\t},\n\t\tcaution: {\n\t\t\tenabled: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"caution\",\n\t\t\t\tname,\n\t\t\t\tstate: \"enabled\"\n\t\t\t}),\n\t\t\tdisabled: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"caution\",\n\t\t\t\tname,\n\t\t\t\tstate: \"disabled\"\n\t\t\t}),\n\t\t\thovered: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"caution\",\n\t\t\t\tname,\n\t\t\t\tstate: \"hovered\"\n\t\t\t}),\n\t\t\tpressed: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"caution\",\n\t\t\t\tname,\n\t\t\t\tstate: \"pressed\"\n\t\t\t}),\n\t\t\tselected: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"caution\",\n\t\t\t\tname,\n\t\t\t\tstate: \"selected\"\n\t\t\t})\n\t\t},\n\t\tcritical: {\n\t\t\tenabled: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"critical\",\n\t\t\t\tname,\n\t\t\t\tstate: \"enabled\"\n\t\t\t}),\n\t\t\tdisabled: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"critical\",\n\t\t\t\tname,\n\t\t\t\tstate: \"disabled\"\n\t\t\t}),\n\t\t\thovered: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"critical\",\n\t\t\t\tname,\n\t\t\t\tstate: \"hovered\"\n\t\t\t}),\n\t\t\tpressed: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"critical\",\n\t\t\t\tname,\n\t\t\t\tstate: \"pressed\"\n\t\t\t}),\n\t\t\tselected: opts.muted({\n\t\t\t\tbase,\n\t\t\t\tdark,\n\t\t\t\ttone: \"critical\",\n\t\t\t\tname,\n\t\t\t\tstate: \"selected\"\n\t\t\t})\n\t\t}\n\t};\n}\nfunction createSpot(opts, base, dark) {\n\treturn {\n\t\tgray: opts.spot({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tkey: \"gray\"\n\t\t}),\n\t\tblue: opts.spot({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tkey: \"blue\"\n\t\t}),\n\t\tpurple: opts.spot({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tkey: \"purple\"\n\t\t}),\n\t\tmagenta: opts.spot({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tkey: \"magenta\"\n\t\t}),\n\t\tred: opts.spot({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tkey: \"red\"\n\t\t}),\n\t\torange: opts.spot({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tkey: \"orange\"\n\t\t}),\n\t\tyellow: opts.spot({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tkey: \"yellow\"\n\t\t}),\n\t\tgreen: opts.spot({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tkey: \"green\"\n\t\t}),\n\t\tcyan: opts.spot({\n\t\t\tbase,\n\t\t\tdark,\n\t\t\tkey: \"cyan\"\n\t\t})\n\t};\n}\n/**\n* @public\n* @deprecated Use `buildColorTheme` instead.\n*/\nfunction createColorTheme(partialOpts = {}) {\n\tlet builders = {\n\t\t...defaultOpts,\n\t\t...partialOpts\n\t};\n\treturn {\n\t\tlight: _createColorScheme(builders, !1),\n\t\tdark: _createColorScheme(builders, !0)\n\t};\n}\n/**\n* @internal\n*/\nfunction _createColorScheme(opts, dark) {\n\treturn {\n\t\tdefault: _createColor(opts, dark, \"default\"),\n\t\ttransparent: _createColor(opts, dark, \"transparent\"),\n\t\tprimary: _createColor(opts, dark, \"primary\"),\n\t\tpositive: _createColor(opts, dark, \"positive\"),\n\t\tcaution: _createColor(opts, dark, \"caution\"),\n\t\tcritical: _createColor(opts, dark, \"critical\")\n\t};\n}\n/**\n* @internal\n*/\nfunction _createColor(opts, dark, name) {\n\tlet base = opts.base({\n\t\tdark,\n\t\tname\n\t}), solid = createSolidTones(opts, base, dark, name), muted = createMutedTones(opts, base, dark, name);\n\treturn {\n\t\tbase,\n\t\tbutton: createButtonModes(opts, base, dark, solid, muted),\n\t\tcard: createCardStates(opts, base, dark, name, solid, muted),\n\t\tdark,\n\t\tinput: createInputModes(opts, base, dark, solid, muted),\n\t\tselectable: createSelectableTones(opts, base, dark, solid, muted),\n\t\tspot: createSpot(opts, base, dark),\n\t\tsyntax: opts.syntax({\n\t\t\tbase,\n\t\t\tdark\n\t\t}),\n\t\tsolid,\n\t\tmuted\n\t};\n}\nconst cache$3 = /* @__PURE__ */ new WeakMap();\n/** @internal */\nfunction themeColor_v0_v2(color_v0) {\n\tlet cached_v2 = cache$3.get(color_v0);\n\tif (cached_v2) return cached_v2;\n\tlet base = stateThemeColor_v0_v2(color_v0, color_v0.card.enabled), color_v2 = {\n\t\t_blend: color_v0._blend || (color_v0.dark ? \"screen\" : \"multiply\"),\n\t\t_dark: color_v0.dark,\n\t\taccent: base.accent,\n\t\tavatar: base.avatar,\n\t\tbackdrop: color_v0.base.shadow.ambient,\n\t\tbadge: base.badge,\n\t\tbg: color_v0.base.bg,\n\t\tborder: color_v0.base.border,\n\t\tbutton: {\n\t\t\tdefault: stateTonesThemeColor_v0_v2(color_v0, color_v0.button.default),\n\t\t\tghost: stateTonesThemeColor_v0_v2(color_v0, color_v0.button.ghost),\n\t\t\tbleed: stateTonesThemeColor_v0_v2(color_v0, color_v0.button.bleed)\n\t\t},\n\t\tcode: base.code,\n\t\tfg: color_v0.base.fg,\n\t\tfocusRing: color_v0.base.focusRing,\n\t\ticon: base.muted.fg,\n\t\tinput: {\n\t\t\tdefault: inputStatesThemeColor_v0_v2(color_v0.input.default),\n\t\t\tinvalid: inputStatesThemeColor_v0_v2(color_v0.input.invalid)\n\t\t},\n\t\tkbd: base.kbd,\n\t\tlink: base.link,\n\t\tmuted: {\n\t\t\t...base.muted,\n\t\t\tbg: color_v0.selectable?.default.enabled.bg2 || color_v0.base.bg\n\t\t},\n\t\tselectable: stateTonesThemeColor_v0_v2(color_v0, color_v0.selectable || color_v0.muted),\n\t\tshadow: color_v0.base.shadow,\n\t\tskeleton: {\n\t\t\tfrom: color_v0.skeleton?.from || color_v0.base.border,\n\t\t\tto: color_v0.skeleton?.to || color_v0.base.border\n\t\t},\n\t\tsyntax: color_v0.syntax\n\t};\n\treturn cache$3.set(color_v0, color_v2), color_v2;\n}\nfunction stateTonesThemeColor_v0_v2(v0, t) {\n\treturn {\n\t\tdefault: {\n\t\t\tenabled: stateThemeColor_v0_v2(v0, t.default.enabled),\n\t\t\thovered: stateThemeColor_v0_v2(v0, t.default.hovered),\n\t\t\tpressed: stateThemeColor_v0_v2(v0, t.default.pressed),\n\t\t\tselected: stateThemeColor_v0_v2(v0, t.default.selected),\n\t\t\tdisabled: stateThemeColor_v0_v2(v0, t.default.disabled)\n\t\t},\n\t\tneutral: {\n\t\t\tenabled: stateThemeColor_v0_v2(v0, t.default.enabled),\n\t\t\thovered: stateThemeColor_v0_v2(v0, t.default.hovered),\n\t\t\tpressed: stateThemeColor_v0_v2(v0, t.default.pressed),\n\t\t\tselected: stateThemeColor_v0_v2(v0, t.default.selected),\n\t\t\tdisabled: stateThemeColor_v0_v2(v0, t.default.disabled)\n\t\t},\n\t\tprimary: {\n\t\t\tenabled: stateThemeColor_v0_v2(v0, t.primary.enabled),\n\t\t\thovered: stateThemeColor_v0_v2(v0, t.primary.hovered),\n\t\t\tpressed: stateThemeColor_v0_v2(v0, t.primary.pressed),\n\t\t\tselected: stateThemeColor_v0_v2(v0, t.primary.selected),\n\t\t\tdisabled: stateThemeColor_v0_v2(v0, t.primary.disabled)\n\t\t},\n\t\tsuggest: {\n\t\t\tenabled: stateThemeColor_v0_v2(v0, t.primary.enabled),\n\t\t\thovered: stateThemeColor_v0_v2(v0, t.primary.hovered),\n\t\t\tpressed: stateThemeColor_v0_v2(v0, t.primary.pressed),\n\t\t\tselected: stateThemeColor_v0_v2(v0, t.primary.selected),\n\t\t\tdisabled: stateThemeColor_v0_v2(v0, t.primary.disabled)\n\t\t},\n\t\tpositive: {\n\t\t\tenabled: stateThemeColor_v0_v2(v0, t.positive.enabled),\n\t\t\thovered: stateThemeColor_v0_v2(v0, t.positive.hovered),\n\t\t\tpressed: stateThemeColor_v0_v2(v0, t.positive.pressed),\n\t\t\tselected: stateThemeColor_v0_v2(v0, t.positive.selected),\n\t\t\tdisabled: stateThemeColor_v0_v2(v0, t.positive.disabled)\n\t\t},\n\t\tcaution: {\n\t\t\tenabled: stateThemeColor_v0_v2(v0, t.caution.enabled),\n\t\t\thovered: stateThemeColor_v0_v2(v0, t.caution.hovered),\n\t\t\tpressed: stateThemeColor_v0_v2(v0, t.caution.pressed),\n\t\t\tselected: stateThemeColor_v0_v2(v0, t.caution.selected),\n\t\t\tdisabled: stateThemeColor_v0_v2(v0, t.caution.disabled)\n\t\t},\n\t\tcritical: {\n\t\t\tenabled: stateThemeColor_v0_v2(v0, t.critical.enabled),\n\t\t\thovered: stateThemeColor_v0_v2(v0, t.critical.hovered),\n\t\t\tpressed: stateThemeColor_v0_v2(v0, t.critical.pressed),\n\t\t\tselected: stateThemeColor_v0_v2(v0, t.critical.selected),\n\t\t\tdisabled: stateThemeColor_v0_v2(v0, t.critical.disabled)\n\t\t}\n\t};\n}\nfunction stateThemeColor_v0_v2(v0, state) {\n\treturn {\n\t\t...state,\n\t\tavatar: {\n\t\t\tgray: {\n\t\t\t\tbg: v0.spot.gray,\n\t\t\t\tfg: v0.base.bg\n\t\t\t},\n\t\t\tblue: {\n\t\t\t\tbg: v0.spot.blue,\n\t\t\t\tfg: v0.base.bg\n\t\t\t},\n\t\t\tpurple: {\n\t\t\t\tbg: v0.spot.purple,\n\t\t\t\tfg: v0.base.bg\n\t\t\t},\n\t\t\tmagenta: {\n\t\t\t\tbg: v0.spot.magenta,\n\t\t\t\tfg: v0.base.bg\n\t\t\t},\n\t\t\tred: {\n\t\t\t\tbg: v0.spot.red,\n\t\t\t\tfg: v0.base.bg\n\t\t\t},\n\t\t\torange: {\n\t\t\t\tbg: v0.spot.orange,\n\t\t\t\tfg: v0.base.bg\n\t\t\t},\n\t\t\tyellow: {\n\t\t\t\tbg: v0.spot.yellow,\n\t\t\t\tfg: v0.base.bg\n\t\t\t},\n\t\t\tgreen: {\n\t\t\t\tbg: v0.spot.green,\n\t\t\t\tfg: v0.base.bg\n\t\t\t},\n\t\t\tcyan: {\n\t\t\t\tbg: v0.spot.cyan,\n\t\t\t\tfg: v0.base.bg\n\t\t\t}\n\t\t},\n\t\tbadge: {\n\t\t\tdefault: {\n\t\t\t\tbg: v0.muted.default.enabled.bg,\n\t\t\t\tfg: v0.muted.default.enabled.fg,\n\t\t\t\tdot: v0.muted.default.enabled.muted.fg,\n\t\t\t\ticon: v0.muted.default.enabled.muted.fg\n\t\t\t},\n\t\t\tneutral: {\n\t\t\t\tbg: v0.muted.transparent.enabled.bg,\n\t\t\t\tfg: v0.muted.transparent.enabled.fg,\n\t\t\t\tdot: v0.muted.transparent.enabled.muted.fg,\n\t\t\t\ticon: v0.muted.transparent.enabled.muted.fg\n\t\t\t},\n\t\t\tprimary: {\n\t\t\t\tbg: v0.muted.primary.enabled.bg,\n\t\t\t\tfg: v0.muted.primary.enabled.fg,\n\t\t\t\tdot: v0.muted.primary.enabled.muted.fg,\n\t\t\t\ticon: v0.muted.primary.enabled.muted.fg\n\t\t\t},\n\t\t\tsuggest: {\n\t\t\t\tbg: v0.muted.primary.enabled.bg,\n\t\t\t\tfg: v0.muted.primary.enabled.fg,\n\t\t\t\tdot: v0.muted.primary.enabled.muted.fg,\n\t\t\t\ticon: v0.muted.primary.enabled.muted.fg\n\t\t\t},\n\t\t\tpositive: {\n\t\t\t\tbg: v0.muted.positive.enabled.bg,\n\t\t\t\tfg: v0.muted.positive.enabled.fg,\n\t\t\t\tdot: v0.muted.positive.enabled.muted.fg,\n\t\t\t\ticon: v0.muted.positive.enabled.muted.fg\n\t\t\t},\n\t\t\tcaution: {\n\t\t\t\tbg: v0.muted.caution.enabled.bg,\n\t\t\t\tfg: v0.muted.caution.enabled.fg,\n\t\t\t\tdot: v0.muted.caution.enabled.muted.fg,\n\t\t\t\ticon: v0.muted.caution.enabled.muted.fg\n\t\t\t},\n\t\t\tcritical: {\n\t\t\t\tbg: v0.muted.critical.enabled.bg,\n\t\t\t\tfg: v0.muted.critical.enabled.fg,\n\t\t\t\tdot: v0.muted.critical.enabled.muted.fg,\n\t\t\t\ticon: v0.muted.critical.enabled.muted.fg\n\t\t\t}\n\t\t},\n\t\tkbd: {\n\t\t\tbg: v0.muted.default.enabled.bg,\n\t\t\tfg: v0.muted.default.enabled.fg,\n\t\t\tborder: v0.muted.default.enabled.border\n\t\t},\n\t\tmuted: {\n\t\t\t...v0.muted.default.enabled.muted,\n\t\t\tbg: state.bg2 || state.bg\n\t\t},\n\t\tskeleton: {\n\t\t\tfrom: state.skeleton?.from || state.border,\n\t\t\tto: state.skeleton?.to || state.border\n\t\t}\n\t};\n}\nfunction inputStatesThemeColor_v0_v2(states) {\n\treturn {\n\t\tenabled: inputStateThemeColor_v0_v2(states.enabled),\n\t\tdisabled: inputStateThemeColor_v0_v2(states.disabled),\n\t\treadOnly: inputStateThemeColor_v0_v2(states.readOnly),\n\t\thovered: inputStateThemeColor_v0_v2(states.hovered)\n\t};\n}\nfunction inputStateThemeColor_v0_v2(state) {\n\treturn {\n\t\tbg: state.bg,\n\t\tborder: state.border,\n\t\tfg: state.fg,\n\t\tmuted: { bg: state.bg2 },\n\t\tplaceholder: state.placeholder\n\t};\n}\nconst cache$2 = /* @__PURE__ */ new WeakMap();\n/** @public */\nfunction getTheme_v2(theme) {\n\tif (theme.sanity.v2?._resolved) return theme.sanity.v2;\n\tlet cached_v2 = cache$2.get(theme);\n\tif (cached_v2) return cached_v2;\n\tlet v2 = {\n\t\t_version: 2,\n\t\t_resolved: !0,\n\t\tavatar: {\n\t\t\t...defaultThemeConfig.avatar,\n\t\t\t...theme.sanity.avatar\n\t\t},\n\t\tbutton: {\n\t\t\t...defaultThemeConfig.button,\n\t\t\t...theme.sanity.button\n\t\t},\n\t\tcard: defaultThemeConfig.card,\n\t\tcolor: themeColor_v0_v2(theme.sanity.color),\n\t\tcontainer: theme.sanity.container,\n\t\tfont: theme.sanity.fonts,\n\t\tinput: {\n\t\t\t...defaultThemeConfig.input,\n\t\t\t...theme.sanity.input,\n\t\t\tcheckbox: {\n\t\t\t\t...defaultThemeConfig.input.checkbox,\n\t\t\t\t...theme.sanity.input.checkbox\n\t\t\t},\n\t\t\tradio: {\n\t\t\t\t...defaultThemeConfig.input.radio,\n\t\t\t\t...theme.sanity.input.radio\n\t\t\t},\n\t\t\tswitch: {\n\t\t\t\t...defaultThemeConfig.input.switch,\n\t\t\t\t...theme.sanity.input.switch\n\t\t\t}\n\t\t},\n\t\tlayer: theme.sanity.layer ?? defaultThemeConfig.layer,\n\t\tmedia: theme.sanity.media,\n\t\tradius: theme.sanity.radius,\n\t\tshadow: theme.sanity.shadows,\n\t\tspace: theme.sanity.space,\n\t\tstyle: theme.sanity.styles\n\t};\n\treturn cache$2.set(theme, v2), v2;\n}\n/** @internal */\nfunction is_v2(themeProp) {\n\treturn themeProp._version === 2;\n}\n/**\n* Apply `neutral` and `suggest` if they're not already part of the color object,\n* as this was introduced in v2.9, but is not compatible with v2.0.\n*\n* @param color - The color object to upgrade\n* @returns The upgraded color object. Returns as-is if already upgraded.\n* @internal\n*/\nfunction themeColor_v0_v2_9(color) {\n\tif (\"neutral\" in color.badge) return color;\n\tlet colors = color;\n\treturn {\n\t\t...colors,\n\t\tbadge: {\n\t\t\t...colors.badge,\n\t\t\tneutral: colors.badge.default,\n\t\t\tsuggest: colors.badge.primary\n\t\t},\n\t\tbutton: {\n\t\t\tbleed: {\n\t\t\t\t...colors.button.bleed,\n\t\t\t\tneutral: colors.button.bleed.default,\n\t\t\t\tsuggest: colors.button.bleed.primary\n\t\t\t},\n\t\t\tdefault: {\n\t\t\t\t...colors.button.default,\n\t\t\t\tneutral: colors.button.default.default,\n\t\t\t\tsuggest: colors.button.default.primary\n\t\t\t},\n\t\t\tghost: {\n\t\t\t\t...colors.button.ghost,\n\t\t\t\tneutral: colors.button.ghost.default,\n\t\t\t\tsuggest: colors.button.ghost.primary\n\t\t\t}\n\t\t},\n\t\tselectable: {\n\t\t\t...colors.selectable,\n\t\t\tneutral: colors.selectable.default,\n\t\t\tsuggest: colors.selectable.primary\n\t\t}\n\t};\n}\nconst cache$1 = /* @__PURE__ */ new WeakMap();\n/** @internal */\nfunction v0_v2(v0) {\n\tif (v0.v2) return v0.v2;\n\tlet cached_v2 = cache$1.get(v0);\n\tif (cached_v2) return cached_v2;\n\tlet { avatar, button, color, container, focusRing: _unused_focusRing, fonts: font, input, layer, media, radius, shadows: shadow, space, styles: style } = v0, v2 = {\n\t\t_version: 2,\n\t\tavatar: {\n\t\t\t...defaultThemeConfig.avatar,\n\t\t\t...avatar\n\t\t},\n\t\tbutton: {\n\t\t\t...defaultThemeConfig.button,\n\t\t\t...button\n\t\t},\n\t\tcard: defaultThemeConfig.card,\n\t\tcolor: {\n\t\t\tlight: {\n\t\t\t\ttransparent: themeColor_v0_v2(color.light.transparent),\n\t\t\t\tdefault: themeColor_v0_v2(color.light.default),\n\t\t\t\tneutral: themeColor_v0_v2(color.light.transparent),\n\t\t\t\tprimary: themeColor_v0_v2(color.light.primary),\n\t\t\t\tsuggest: themeColor_v0_v2(color.light.primary),\n\t\t\t\tpositive: themeColor_v0_v2(color.light.positive),\n\t\t\t\tcaution: themeColor_v0_v2(color.light.caution),\n\t\t\t\tcritical: themeColor_v0_v2(color.light.critical)\n\t\t\t},\n\t\t\tdark: {\n\t\t\t\ttransparent: themeColor_v0_v2(color.dark.transparent),\n\t\t\t\tdefault: themeColor_v0_v2(color.dark.default),\n\t\t\t\tneutral: themeColor_v0_v2(color.dark.transparent),\n\t\t\t\tprimary: themeColor_v0_v2(color.dark.primary),\n\t\t\t\tsuggest: themeColor_v0_v2(color.dark.primary),\n\t\t\t\tpositive: themeColor_v0_v2(color.dark.positive),\n\t\t\t\tcaution: themeColor_v0_v2(color.dark.caution),\n\t\t\t\tcritical: themeColor_v0_v2(color.dark.critical)\n\t\t\t}\n\t\t},\n\t\tcontainer,\n\t\tfont,\n\t\tinput: {\n\t\t\t...defaultThemeConfig.input,\n\t\t\t...input,\n\t\t\tcheckbox: {\n\t\t\t\t...defaultThemeConfig.input.checkbox,\n\t\t\t\t...input.checkbox\n\t\t\t},\n\t\t\tradio: {\n\t\t\t\t...defaultThemeConfig.input.radio,\n\t\t\t\t...input.radio\n\t\t\t},\n\t\t\tswitch: {\n\t\t\t\t...defaultThemeConfig.input.switch,\n\t\t\t\t...input.switch\n\t\t\t}\n\t\t},\n\t\tlayer: layer ?? defaultThemeConfig.layer,\n\t\tmedia,\n\t\tradius,\n\t\tshadow,\n\t\tspace,\n\t\tstyle\n\t};\n\treturn cache$1.set(v0, v2), v2;\n}\nconst cache = /* @__PURE__ */ new Map();\n/** @internal */\nfunction getScopedTheme(themeProp, scheme, tone) {\n\tlet cachedTheme = _getCachedTheme(themeProp, scheme, tone);\n\tif (cachedTheme) return cachedTheme;\n\tlet v0 = is_v2(themeProp) ? v2_v0(themeProp) : themeProp, v2 = is_v2(themeProp) ? themeProp : v0_v2(themeProp), layer_v0 = v0.layer || defaultThemeConfig.layer, colorScheme_v2 = v2.color[scheme] || v2.color.light, color_v2_9 = themeColor_v0_v2_9(colorScheme_v2[tone] || colorScheme_v2.default), layer_v2 = v2.layer || defaultThemeConfig.layer, { color: _v0Color, ...v0Rest } = v0, sanity = {\n\t\t...v0Rest,\n\t\tlayer: layer_v0,\n\t\tv2: {\n\t\t\t...v2,\n\t\t\t_resolved: !0,\n\t\t\tcolor: color_v2_9,\n\t\t\tlayer: layer_v2\n\t\t}\n\t};\n\tdefineLazyProperty(sanity, \"color\", () => {\n\t\tlet colorScheme_v0 = v0.color[scheme] || v0.color.light;\n\t\treturn colorScheme_v0[tone] || colorScheme_v0.default;\n\t});\n\tlet theme = { sanity };\n\treturn _setCachedTheme(themeProp, scheme, tone, theme), theme;\n}\nfunction _getCachedTheme(rootTheme, scheme, tone) {\n\tlet schemeCache = cache.get(scheme);\n\tif (!schemeCache) return;\n\tlet toneCache = schemeCache.get(tone);\n\tif (toneCache) return toneCache.get(rootTheme);\n}\nfunction _setCachedTheme(rootTheme, scheme, tone, theme) {\n\tcache.has(scheme) || cache.set(scheme, /* @__PURE__ */ new Map());\n\tlet schemeCache = cache.get(scheme);\n\tschemeCache.has(tone) || schemeCache.set(tone, /* @__PURE__ */ new WeakMap()), schemeCache.get(tone).set(rootTheme, theme);\n}\nexport { COLOR_CONFIG_INPUT_MODES as A, THEME_COLOR_BLEND_MODES as B, isColorOpacityValue as C, COLOR_CONFIG_BLEND_KEYS as D, COLOR_CONFIG_AVATAR_COLORS as E, isColorBlendModeValue as F, THEME_COLOR_SCHEMES as G, THEME_COLOR_CARD_TONES as H, isColorButtonMode as I, v2_v0 as J, THEME_COLOR_STATES as K, isColorHueKey as L, COLOR_CONFIG_STATES as M, COLOR_CONFIG_STATE_KEYS as N, COLOR_CONFIG_CARD_KEYS as O, COLOR_CONFIG_STATE_TONES as P, isColorTintKey as R, isColorConfigStateTone as S, isColorValue as T, THEME_COLOR_INPUT_MODES as U, THEME_COLOR_BUTTON_MODES as V, THEME_COLOR_INPUT_STATES as W, parseTokenValue as _, createColorTheme as a, isColorConfigBlendKey as b, multiply as c, hexToRgb as d, hslToRgb as f, mix as g, rgbaToRGBA as h, getTheme_v2 as i, COLOR_CONFIG_INPUT_STATES as j, COLOR_CONFIG_CARD_TONES as k, rgba as l, rgbToHsl as m, v0_v2 as n, buildTheme as o, rgbToHex as p, THEME_COLOR_STATE_TONES as q, is_v2 as r, screen as s, getScopedTheme as t, parseColor as u, isColorConfigBaseKey as v, isColorTokenValue as w, isColorConfigStateKey as x, isColorConfigBaseTone as y, THEME_COLOR_AVATAR_COLORS as z };\n\n//# sourceMappingURL=getScopedTheme.js.map","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @lightSyntaxTransform\n * @noflow\n * @nolint\n * @preventMunge\n * @preserve-invariant-messages\n */\n\n\"use no memo\";\n\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n $dispatcherGuard: () => $dispatcherGuard,\n $makeReadOnly: () => $makeReadOnly,\n $reset: () => $reset,\n $structuralCheck: () => $structuralCheck,\n c: () => c,\n clearRenderCounterRegistry: () => clearRenderCounterRegistry,\n renderCounterRegistry: () => renderCounterRegistry,\n useRenderCounter: () => useRenderCounter\n});\nmodule.exports = __toCommonJS(index_exports);\nvar React = __toESM(require(\"react\"));\nvar { useRef, useEffect, isValidElement } = React;\nvar _a;\nvar ReactSecretInternals = (\n //@ts-ignore\n (_a = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE) != null ? _a : React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n);\nvar $empty = Symbol.for(\"react.memo_cache_sentinel\");\nvar _a2;\nvar c = (\n // @ts-expect-error\n typeof ((_a2 = React.__COMPILER_RUNTIME) == null ? void 0 : _a2.c) === \"function\" ? (\n // @ts-expect-error\n React.__COMPILER_RUNTIME.c\n ) : function c2(size) {\n return React.useMemo(() => {\n const $ = new Array(size);\n for (let ii = 0; ii < size; ii++) {\n $[ii] = $empty;\n }\n $[$empty] = true;\n return $;\n }, []);\n }\n);\nvar LazyGuardDispatcher = {};\n[\n \"readContext\",\n \"useCallback\",\n \"useContext\",\n \"useEffect\",\n \"useImperativeHandle\",\n \"useInsertionEffect\",\n \"useLayoutEffect\",\n \"useMemo\",\n \"useReducer\",\n \"useRef\",\n \"useState\",\n \"useDebugValue\",\n \"useDeferredValue\",\n \"useTransition\",\n \"useMutableSource\",\n \"useSyncExternalStore\",\n \"useId\",\n \"unstable_isNewReconciler\",\n \"getCacheSignal\",\n \"getCacheForType\",\n \"useCacheRefresh\"\n].forEach((name) => {\n LazyGuardDispatcher[name] = () => {\n throw new Error(\n `[React] Unexpected React hook call (${name}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `\n );\n };\n});\nvar originalDispatcher = null;\nLazyGuardDispatcher[\"useMemoCache\"] = (count) => {\n if (originalDispatcher == null) {\n throw new Error(\n \"React Compiler internal invariant violation: unexpected null dispatcher\"\n );\n } else {\n return originalDispatcher.useMemoCache(count);\n }\n};\nfunction setCurrent(newDispatcher) {\n ReactSecretInternals.ReactCurrentDispatcher.current = newDispatcher;\n return ReactSecretInternals.ReactCurrentDispatcher.current;\n}\nvar guardFrames = [];\nfunction $dispatcherGuard(kind) {\n const curr = ReactSecretInternals.ReactCurrentDispatcher.current;\n if (kind === 0 /* PushGuardContext */) {\n guardFrames.push(curr);\n if (guardFrames.length === 1) {\n originalDispatcher = curr;\n }\n if (curr === LazyGuardDispatcher) {\n throw new Error(\n `[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.`\n );\n }\n setCurrent(LazyGuardDispatcher);\n } else if (kind === 1 /* PopGuardContext */) {\n const lastFrame = guardFrames.pop();\n if (lastFrame == null) {\n throw new Error(\n \"React Compiler internal error: unexpected null in guard stack\"\n );\n }\n if (guardFrames.length === 0) {\n originalDispatcher = null;\n }\n setCurrent(lastFrame);\n } else if (kind === 2 /* PushExpectHook */) {\n guardFrames.push(curr);\n setCurrent(originalDispatcher);\n } else if (kind === 3 /* PopExpectHook */) {\n const lastFrame = guardFrames.pop();\n if (lastFrame == null) {\n throw new Error(\n \"React Compiler internal error: unexpected null in guard stack\"\n );\n }\n setCurrent(lastFrame);\n } else {\n throw new Error(\"React Compiler internal error: unreachable block\" + kind);\n }\n}\nfunction $reset($) {\n for (let ii = 0; ii < $.length; ii++) {\n $[ii] = $empty;\n }\n}\nfunction $makeReadOnly() {\n throw new Error(\"TODO: implement $makeReadOnly in react-compiler-runtime\");\n}\nvar renderCounterRegistry = /* @__PURE__ */ new Map();\nfunction clearRenderCounterRegistry() {\n for (const counters of renderCounterRegistry.values()) {\n counters.forEach((counter) => {\n counter.count = 0;\n });\n }\n}\nfunction registerRenderCounter(name, val) {\n let counters = renderCounterRegistry.get(name);\n if (counters == null) {\n counters = /* @__PURE__ */ new Set();\n renderCounterRegistry.set(name, counters);\n }\n counters.add(val);\n}\nfunction removeRenderCounter(name, val) {\n const counters = renderCounterRegistry.get(name);\n if (counters == null) {\n return;\n }\n counters.delete(val);\n}\nfunction useRenderCounter(name) {\n const val = useRef(null);\n if (val.current != null) {\n val.current.count += 1;\n }\n useEffect(() => {\n if (val.current == null) {\n const counter = { count: 0 };\n registerRenderCounter(name, counter);\n val.current = counter;\n }\n return () => {\n if (val.current !== null) {\n removeRenderCounter(name, val.current);\n }\n };\n });\n}\nvar seenErrors = /* @__PURE__ */ new Set();\nfunction $structuralCheck(oldValue, newValue, variableName, fnName, kind, loc) {\n function error(l, r, path, depth) {\n const str = `${fnName}:${loc} [${kind}] ${variableName}${path} changed from ${l} to ${r} at depth ${depth}`;\n if (seenErrors.has(str)) {\n return;\n }\n seenErrors.add(str);\n console.error(str);\n }\n const depthLimit = 2;\n function recur(oldValue2, newValue2, path, depth) {\n if (depth > depthLimit) {\n return;\n } else if (oldValue2 === newValue2) {\n return;\n } else if (typeof oldValue2 !== typeof newValue2) {\n error(`type ${typeof oldValue2}`, `type ${typeof newValue2}`, path, depth);\n } else if (typeof oldValue2 === \"object\") {\n const oldArray = Array.isArray(oldValue2);\n const newArray = Array.isArray(newValue2);\n if (oldValue2 === null && newValue2 !== null) {\n error(\"null\", `type ${typeof newValue2}`, path, depth);\n } else if (newValue2 === null) {\n error(`type ${typeof oldValue2}`, \"null\", path, depth);\n } else if (oldValue2 instanceof Map) {\n if (!(newValue2 instanceof Map)) {\n error(`Map instance`, `other value`, path, depth);\n } else if (oldValue2.size !== newValue2.size) {\n error(\n `Map instance with size ${oldValue2.size}`,\n `Map instance with size ${newValue2.size}`,\n path,\n depth\n );\n } else {\n for (const [k, v] of oldValue2) {\n if (!newValue2.has(k)) {\n error(\n `Map instance with key ${k}`,\n `Map instance without key ${k}`,\n path,\n depth\n );\n } else {\n recur(v, newValue2.get(k), `${path}.get(${k})`, depth + 1);\n }\n }\n }\n } else if (newValue2 instanceof Map) {\n error(\"other value\", `Map instance`, path, depth);\n } else if (oldValue2 instanceof Set) {\n if (!(newValue2 instanceof Set)) {\n error(`Set instance`, `other value`, path, depth);\n } else if (oldValue2.size !== newValue2.size) {\n error(\n `Set instance with size ${oldValue2.size}`,\n `Set instance with size ${newValue2.size}`,\n path,\n depth\n );\n } else {\n for (const v of newValue2) {\n if (!oldValue2.has(v)) {\n error(\n `Set instance without element ${v}`,\n `Set instance with element ${v}`,\n path,\n depth\n );\n }\n }\n }\n } else if (newValue2 instanceof Set) {\n error(\"other value\", `Set instance`, path, depth);\n } else if (oldArray || newArray) {\n if (oldArray !== newArray) {\n error(\n `type ${oldArray ? \"array\" : \"object\"}`,\n `type ${newArray ? \"array\" : \"object\"}`,\n path,\n depth\n );\n } else if (oldValue2.length !== newValue2.length) {\n error(\n `array with length ${oldValue2.length}`,\n `array with length ${newValue2.length}`,\n path,\n depth\n );\n } else {\n for (let ii = 0; ii < oldValue2.length; ii++) {\n recur(oldValue2[ii], newValue2[ii], `${path}[${ii}]`, depth + 1);\n }\n }\n } else if (isValidElement(oldValue2) || isValidElement(newValue2)) {\n if (isValidElement(oldValue2) !== isValidElement(newValue2)) {\n error(\n `type ${isValidElement(oldValue2) ? \"React element\" : \"object\"}`,\n `type ${isValidElement(newValue2) ? \"React element\" : \"object\"}`,\n path,\n depth\n );\n } else if (oldValue2.type !== newValue2.type) {\n error(\n `React element of type ${oldValue2.type}`,\n `React element of type ${newValue2.type}`,\n path,\n depth\n );\n } else {\n recur(\n oldValue2.props,\n newValue2.props,\n `[props of ${path}]`,\n depth + 1\n );\n }\n } else {\n for (const key in newValue2) {\n if (!(key in oldValue2)) {\n error(\n `object without key ${key}`,\n `object with key ${key}`,\n path,\n depth\n );\n }\n }\n for (const key in oldValue2) {\n if (!(key in newValue2)) {\n error(\n `object with key ${key}`,\n `object without key ${key}`,\n path,\n depth\n );\n } else {\n recur(oldValue2[key], newValue2[key], `${path}.${key}`, depth + 1);\n }\n }\n }\n } else if (typeof oldValue2 === \"function\") {\n return;\n } else if (isNaN(oldValue2) || isNaN(newValue2)) {\n if (isNaN(oldValue2) !== isNaN(newValue2)) {\n error(\n `${isNaN(oldValue2) ? \"NaN\" : \"non-NaN value\"}`,\n `${isNaN(newValue2) ? \"NaN\" : \"non-NaN value\"}`,\n path,\n depth\n );\n }\n } else if (oldValue2 !== newValue2) {\n error(oldValue2, newValue2, path, depth);\n }\n }\n recur(oldValue, newValue, \"\", 0);\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n $dispatcherGuard,\n $makeReadOnly,\n $reset,\n $structuralCheck,\n c,\n clearRenderCounterRegistry,\n renderCounterRegistry,\n useRenderCounter\n});\n//# sourceMappingURL=index.js.map","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import memoize from '@emotion/memoize';\n\n// eslint-disable-next-line no-undef\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|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|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|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\nexport var SCOPE = '@scope'\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @param {number} position\n * @return {number}\n */\nexport function indexof (value, search, position) {\n\treturn value.indexOf(search, position)\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\n/**\n * @param {string[]} array\n * @param {RegExp} pattern\n * @return {string[]}\n */\nexport function filter (array, pattern) {\n\treturn array.filter(function (value) { return !match(value, pattern) })\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 {object[]} siblings\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length, siblings) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}\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.siblings), root, {length: -root.length}, props)\n}\n\n/**\n * @param {object} root\n */\nexport function lift (root) {\n\twhile (root.root)\n\t\troot = copy(root.root, {children: [root]})\n\n\tappend(root, root.siblings)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, token, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f', abs(index ? points[index - 1] : 0)) != -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), declarations)\n\t\t\t\t\t\tif ((token(previous || 1) == 5 || token(peek() || 1) == 5) && strlen(characters) && substr(characters, -1, void 0) !== ' ') characters += ' '\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length || (variable === 0 && previous === 47)))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), 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), 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// c(ontainer)\n\t\t\t\t\t\t\t\t\tcase 99:\n\t\t\t\t\t\t\t\t\t\tif (charat(characters, 3) === 110) break\n\t\t\t\t\t\t\t\t\t// l(ayer)\n\t\t\t\t\t\t\t\t\tcase 108:\n\t\t\t\t\t\t\t\t\t\tif (charat(characters, 2) === 97) break\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\toffset = 0\n\t\t\t\t\t\t\t\t\t// d(ocument) m(edia) s(upports)\n\t\t\t\t\t\t\t\t\tcase 100: case 109: case 115:\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (offset) parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\telse parse(characters, reference, reference, reference, [''], children, 0, points, children)\n\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 * @param {object[]} siblings\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {\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, siblings)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @param {object[]} siblings\n * @return {object}\n */\nexport function comment (value, root, parent, siblings) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function declaration (value, root, parent, length, siblings) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings)\n}\n","import {MS, MOZ, WEBKIT} from './Enum.js'\nimport {hash, charat, strlen, indexof, replace, substr, match} from './Utility.js'\n\n/**\n * @param {string} value\n * @param {number} length\n * @param {object[]} children\n * @return {string}\n */\nexport function prefix (value, length, children) {\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// 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// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position\n\t\tcase 6391: case 5879: case 5623: case 6135: case 4599:\n\t\t\treturn WEBKIT + value + value\n\t\t// mask-composite\n\t\tcase 4855:\n\t\t\treturn WEBKIT + value.replace('add', 'source-over').replace('substract', 'source-out').replace('intersect', 'source-in').replace('exclude', 'xor') + value\n\t\t// tab-size\n\t\tcase 4789:\n\t\t\treturn MOZ + 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// 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\t// default: fallthrough to below\n\t\t\t}\n\t\t// flex, flex-direction, scroll-snap-type, writing-mode\n\t\tcase 6828: case 4268: case 2903:\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/g, '') + (!match(value, /flex-|baseline/) ? MS + 'grid-row-' + replace(value, /flex-|-self/g, '') : '') + 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/g, '') + 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'), /space-between/, 'justify') + WEBKIT + value + value\n\t\t// justify-self\n\t\tcase 4200:\n\t\t\tif (!match(value, /flex-|baseline/)) return MS + 'grid-column-align' + substr(value, length) + value\n\t\t\tbreak\n\t\t// grid-template-(columns|rows)\n\t\tcase 2592: case 3360:\n\t\t\treturn MS + replace(value, 'template-', '') + value\n\t\t// grid-(row|column)-start\n\t\tcase 4384: case 3616:\n\t\t\tif (children && children.some(function (element, index) { return length = index, match(element.props, /grid-\\w+-end/) })) {\n\t\t\t\treturn ~indexof(value + (children = children[length].value), 'span', 0) ? value : (MS + replace(value, '-start', '') + value + MS + 'grid-row-span:' + (~indexof(children, 'span', 0) ? match(children, /\\d+/) : +match(children, /\\d+/) - +match(value, /\\d+/)) + ';')\n\t\t\t}\n\t\t\treturn MS + replace(value, '-start', '') + value\n\t\t// grid-(row|column)-end\n\t\tcase 4896: case 4128:\n\t\t\treturn (children && children.some(function (element) { return match(element.props, /grid-\\w+-start/) })) ? value : MS + replace(replace(value, '-end', '-span'), 'span ', '') + 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', 0) ? prefix(replace(value, 'stretch', 'fill-available'), length, children) + value : value\n\t\t\t\t}\n\t\t\tbreak\n\t\t// grid-(column|row)\n\t\tcase 5152: case 5920:\n\t\t\treturn replace(value, /(.+?):(\\d+)(\\s*\\/\\s*(span)?\\s*(\\d+))?(.*)/, function (_, a, b, c, d, e, f) { return (MS + a + ':' + b + f) + (c ? (MS + a + '-span:' + (d ? e : +e - +b)) + f : '') + value })\n\t\t// position: sticky\n\t\tcase 4949:\n\t\t\t// stick(y)?\n\t\t\tif (charat(value, length + 6) === 121)\n\t\t\t\treturn replace(value, ':', ':' + WEBKIT) + value\n\t\t\tbreak\n\t\t// display: (flex|inline-flex|grid|inline-grid)\n\t\tcase 6444:\n\t\t\tswitch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {\n\t\t\t\t// (inline-)?fle(x)\n\t\t\t\tcase 120:\n\t\t\t\t\treturn replace(value, /(.+:)([^;\\s!]+)(;|(\\s+)?!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value\n\t\t\t\t// (inline-)?gri(d)\n\t\t\t\tcase 100:\n\t\t\t\t\treturn replace(value, ':', ':' + MS) + value\n\t\t\t}\n\t\t\tbreak\n\t\t// scroll-margin, scroll-margin-(top|right|bottom|left)\n\t\tcase 5719: case 2647: case 2135: case 3927: case 2391:\n\t\t\treturn replace(value, 'scroll-', 'scroll-snap-') + value\n\t}\n\n\treturn value\n}\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES, NAMESPACE} from './Enum.js'\nimport {strlen} 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\n\tfor (var i = 0; i < children.length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case NAMESPACE: 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: if (!strlen(element.value = element.props.join(','))) return ''\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine, filter, assign} from './Utility.js'\nimport {copy, lift, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(children = element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, callback = /(::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\tlift(copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [value]}))\n\t\t\t\t\t\t\t\t\tassign(element, {props: filter(children, callback)})\n\t\t\t\t\t\t\t\t\tbreak\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\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [value]}))\n\t\t\t\t\t\t\t\t\tassign(element, {props: filter(children, callback)})\n\t\t\t\t\t\t\t\t\tbreak\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","import e from\"@emotion/is-prop-valid\";import t,{createElement as n}from\"react\";import*as o from\"stylis\";import{RULESET as s}from\"stylis\";var r,i;const l=\"undefined\"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||\"data-styled\",c=\"active\",a=\"data-styled-version\",u=\"6.5.0\",d=\"/*!sc*/\\n\",h=\"undefined\"!=typeof window&&\"undefined\"!=typeof document,p=void 0===t.createContext;function f(e){if(\"undefined\"!=typeof process&&void 0!==process.env){const t=process.env[e];if(void 0!==t&&\"\"!==t)return\"false\"!==t}}const m=Boolean(\"boolean\"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!==(i=null!==(r=f(\"REACT_APP_SC_DISABLE_SPEEDY\"))&&void 0!==r?r:f(\"SC_DISABLE_SPEEDY\"))&&void 0!==i?i:\"undefined\"!=typeof process&&void 0!==process.env&&\"production\"!==process.env.NODE_ENV),g=\"sc-keyframes-\",y={},v=\"production\"!==process.env.NODE_ENV?{1:\"Cannot create styled-component for component: %s.\\n\\n\",2:\"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\\n\\n- Are you trying to reuse it across renders?\\n- Are you accidentally calling collectStyles twice?\\n\\n\",3:\"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\\n\\n\",4:\"The `StyleSheetManager` expects a valid target or sheet prop!\\n\\n- Does this error occur on the client and is your target falsy?\\n- Does this error occur on the server and is the sheet falsy?\\n\\n\",5:\"The clone method cannot be used on the client!\\n\\n- Are you running in a client-like environment on the server?\\n- Are you trying to run SSR on the client?\\n\\n\",6:\"Trying to insert a new style tag, but the given Node is unmounted!\\n\\n- Are you using a custom target that isn't mounted?\\n- Does your document not have a valid head element?\\n- Have you accidentally removed a style tag manually?\\n\\n\",7:'ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\\n\\n```js\\ntheme={() => ({})}\\n```\\n\\n',8:'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',9:\"Missing document `<head>`\\n\\n\",10:\"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n\",11:\"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n\",12:\"It seems you are interpolating a keyframe declaration (%s) into an untagged string. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://styled-components.com/docs/api#css\\n\\n\",13:\"%s is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n\",14:'ThemeProvider: \"theme\" prop is required.\\n\\n',15:\"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",16:\"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",17:\"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\\n\",18:\"Accessing `useTheme` hook outside of a `<ThemeProvider>` element.\\n\\n```jsx\\nimport { useTheme } from 'styled-components';\\nexport function StyledCompoent({ children }) {\\n const theme = useTheme();\\n return <div style={{ width: theme.sizes.full }}>{children}</div>;\\n}\\n\\nimport { StyledComponent } from './StyledComponent';\\nimport { theme } from './theme';\\nexport function App() {\\n return (\\n <ThemeProvider theme={theme}>\\n <StyledComponent />\\n </ThemeProvider>\\n );\\n}\\n```\\n\\nIf you need access to the theme in an uncertain composition scenario, `React.useContext(ThemeContext)` will not emit an error if there is no `ThemeProvider` ancestor.\\n\"}:{};function S(e,...t){return\"production\"===process.env.NODE_ENV?new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(\", \")}`:\"\"}`):new Error(function(...e){let t=e[0];const n=[];for(let t=1,o=e.length;t<o;t+=1)n.push(e[t]);return n.forEach(e=>{t=t.replace(/%[a-z]/,e)}),t}(v[e],...t).trim())}const b=1<<30;let w=new Map,N=new Map,C=1;const P=e=>{if(w.has(e))return w.get(e);for(;N.has(C);)C++;const t=C++;if(\"production\"!==process.env.NODE_ENV&&((0|t)<0||t>b))throw S(16,`${t}`);return w.set(e,t),N.set(t,e),t},O=e=>N.get(e),E=(e,t)=>{C=t+1,w.set(e,t),N.set(t,e)},I=/invalid hook call/i,A=new Set,_=(e,n)=>{if(\"production\"!==process.env.NODE_ENV){if(p)return;const o=`The component ${e}${n?` with the id of \"${n}\"`:\"\"} has been created dynamically.\\nYou may see this warning because you've called styled inside another component.\\nTo resolve this only create new StyledComponents outside of any render method and function component.\\nSee https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.\\n`,s=console.error;try{let e=!0;console.error=(t,...n)=>{I.test(t)?(e=!1,A.delete(o)):s(t,...n)},\"function\"==typeof t.useState&&t.useState(null),e&&!A.has(o)&&(console.warn(o),A.add(o))}catch(e){I.test(e.message)&&A.delete(o)}finally{console.error=s}}},x=Object.freeze([]),$=Object.freeze({});function R(e,t,n=$){return e.theme!==n.theme&&e.theme||t||n.theme}const j=/[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~-]+/g,k=/(^-|-$)/g;function T(e){return e.replace(j,\"-\").replace(k,\"\")}const D=/(a)(d)/gi,M=e=>String.fromCharCode(e+(e>25?39:97));function V(e){let t,n=\"\";for(t=Math.abs(e);t>52;t=t/52|0)n=M(t%52)+n;return(M(t%52)+n).replace(D,\"$1-$2\")}const G=5381,F=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},z=e=>F(G,e);function W(e){return V(z(e)>>>0)}function B(e){return\"production\"!==process.env.NODE_ENV&&\"string\"==typeof e&&e||e.displayName||e.name||\"Component\"}function L(e){return\"string\"==typeof e&&(\"production\"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}function q(e){return L(e)?`styled.${e}`:`Styled(${B(e)})`}const H=Symbol.for(\"react.memo\"),Y=Symbol.for(\"react.forward_ref\"),U={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},J={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},X={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Z={[Y]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[H]:X};function K(e){return(\"type\"in(t=e)&&t.type.$$typeof)===H?X:\"$$typeof\"in e?Z[e.$$typeof]:U;var t}const Q=Object.defineProperty,ee=Object.getOwnPropertyNames,te=Object.getOwnPropertySymbols,ne=Object.getOwnPropertyDescriptor,oe=Object.getPrototypeOf,se=Object.prototype;function re(e,t,n){if(\"string\"!=typeof t){const o=oe(t);o&&o!==se&&re(e,o,n);const s=ee(t).concat(te(t)),r=K(e),i=K(t);for(let o=0;o<s.length;++o){const l=s[o];if(!(l in J||n&&n[l]||i&&l in i||r&&l in r)){const n=ne(t,l);try{Q(e,l,n)}catch(e){}}}}return e}function ie(e){return\"function\"==typeof e}const le=Symbol.for(\"react.forward_ref\");function ce(e){return null!=e&&(\"object\"==typeof e||\"function\"==typeof e)&&e.$$typeof===le&&\"styledComponentId\"in e}function ae(e,t){return e&&t?e+\" \"+t:e||t||\"\"}function ue(e,t){return e.join(t||\"\")}function de(e){let t=\"\";for(let n=0;n<e.length;n++)t+=e[n]+d;return t}function he(e){return e?e.replaceAll(d,\"\"):e}function pe(e){return null!==e&&\"object\"==typeof e&&e.constructor.name===Object.name&&!(\"props\"in e&&e.$$typeof)}function fe(e,t,n=!1){if(!n&&!pe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=fe(e[n],t[n]);else if(pe(t))for(const n in t)e[n]=fe(e[n],t[n]);return e}function me(e){if(!p)return null;const n=t.cache;return n?n(e):null}function ge(e,t){Object.defineProperty(e,\"toString\",{value:t})}const ye=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let o=n;for(;e>=o;)if(o<<=1,o<0)throw S(16,`${e}`);this.groupSizes=new Uint32Array(o),this.groupSizes.set(t),this.length=o;for(let e=n;e<o;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),o=0;for(let s=0,r=t.length;s<r;s++)this.tag.insertRule(n,t[s])&&(this.groupSizes[e]++,n++,o++);o>0&&this._cGroup>e&&(this._cIndex+=o)}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(let e=n;e<o;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t=\"\";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],o=this.indexOfGroup(e),s=o+n;for(let e=o;e<s;e++)t+=this.tag.getRule(e)+d;return t}},ve=`style[${l}][${a}=\"${u}\"]`,Se=new RegExp(`^${l}\\\\.g(\\\\d+)\\\\[id=\"([\\\\w\\\\d-]+)\"\\\\].*?\"([^\"]*)`),be=e=>\"undefined\"!=typeof ShadowRoot&&e instanceof ShadowRoot||\"host\"in e&&11===e.nodeType,we=e=>{if(!e)return document;if(be(e))return e;if(\"getRootNode\"in e){const t=e.getRootNode();if(be(t))return t}return document},Ne=(e,t,n)=>{const o=n.split(\",\");let s;for(let n=0,r=o.length;n<r;n++)(s=o[n])&&e.registerName(t,s)},Ce=(e,t)=>{var n;const o=(null!==(n=t.textContent)&&void 0!==n?n:\"\").split(d),s=[];for(let t=0,n=o.length;t<n;t++){const n=o[t].trim();if(!n)continue;const r=n.match(Se);if(r){const t=0|parseInt(r[1],10),n=r[2];0!==t&&(E(n,t),Ne(e,n,r[3]),e.getTag().insertRules(t,s)),s.length=0}else s.push(n)}},Pe=e=>{const t=we(e.options.target).querySelectorAll(ve);for(let n=0,o=t.length;n<o;n++){const o=t[n];o&&o.getAttribute(l)!==c&&(Ce(e,o),o.parentNode&&o.parentNode.removeChild(o))}};let Oe=!1;function Ee(){if(!1!==Oe)return Oe;if(\"undefined\"!=typeof document){const e=document.head.querySelector('meta[property=\"csp-nonce\"]');if(e)return Oe=e.nonce||e.getAttribute(\"content\")||void 0;const t=document.head.querySelector('meta[name=\"sc-nonce\"]');if(t)return Oe=t.getAttribute(\"content\")||void 0}return Oe=\"undefined\"!=typeof __webpack_nonce__?__webpack_nonce__:void 0}const Ie=(e,t)=>{const n=document.head,o=e||n,s=document.createElement(\"style\"),r=(e=>{const t=Array.from(e.querySelectorAll(`style[${l}]`));return t[t.length-1]})(o),i=void 0!==r?r.nextSibling:null;s.setAttribute(l,c),s.setAttribute(a,u);const d=t||Ee();return d&&s.setAttribute(\"nonce\",d),o.insertBefore(s,i),s},Ae=class{constructor(e,t){this.element=Ie(e,t),this.element.appendChild(document.createTextNode(\"\")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;const n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets;for(let t=0,o=n.length;t<o;t++){const o=n[t];if(o.ownerNode===e)return o}throw S(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:\"\"}},_e=class{constructor(e,t){this.element=Ie(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:\"\"}},xe=class{constructor(e){this.rules=[],this.length=0}insertRule(e,t){return e<=this.length&&(e===this.length?this.rules.push(t):this.rules.splice(e,0,t),this.length++,!0)}deleteRule(e){this.rules.splice(e,1),this.length--}getRule(e){return e<this.length?this.rules[e]:\"\"}};let $e=h;const Re={isServer:!h,useCSSOMInjection:!m};class je{static registerId(e){return P(e)}constructor(e=$,t={},n){this.options=Object.assign(Object.assign({},Re),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!e.isServer,!this.server&&h&&$e&&($e=!1,Pe(this)),ge(this,()=>(e=>{const t=e.getTag(),{length:n}=t;let o=\"\";for(let s=0;s<n;s++){const n=O(s);if(void 0===n)continue;const r=e.names.get(n);if(void 0===r||!r.size)continue;const i=t.getGroup(s);if(0===i.length)continue;const c=l+\".g\"+s+'[id=\"'+n+'\"]';let a=\"\";for(const e of r)e.length>0&&(a+=e+\",\");o+=i+c+'{content:\"'+a+'\"}'+d}return o})(this))}rehydrate(){!this.server&&h&&Pe(this)}reconstructWithOptions(e,t=!0){const n=new je(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&h&&e.target!==this.options.target&&we(this.options.target)!==we(e.target)&&Pe(n),n}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({isServer:e,useCSSOMInjection:t,target:n,nonce:o})=>e?new xe(n):t?new Ae(n,o):new _e(n,o))(this.options),new ye(e)));var e}hasNameForId(e,t){var n,o;return null!==(o=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==o&&o}registerName(e,t){P(e),e.startsWith(g)&&this.keyframeIds.add(e);const n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(P(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(P(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}const ke=new WeakSet,Te={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function De(e,t){return null==t||\"boolean\"==typeof t||\"\"===t?\"\":\"number\"!=typeof t||0===t||e in Te||e.startsWith(\"--\")?String(t).trim():t+\"px\"}const Me=47;function Ve(e){if(45===e.charCodeAt(0)&&45===e.charCodeAt(1))return e;let t=\"\";for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);t+=o>=65&&o<=90?\"-\"+String.fromCharCode(o+32):e[n]}return t.startsWith(\"ms-\")?\"-\"+t:t}const Ge=Symbol.for(\"sc-keyframes\");function Fe(e){return\"object\"==typeof e&&null!==e&&Ge in e}function ze(e){return ie(e)&&!(e.prototype&&e.prototype.isReactComponent)}const We=e=>null==e||!1===e||\"\"===e,Be=Symbol.for(\"react.client.reference\");function Le(e){return e.$$typeof===Be}function qe(e){const t=e.$$id,n=(t&&t.includes(\"#\")?t.split(\"#\").pop():t)||e.name||\"unknown\";console.warn(`Interpolating a client component (${n}) as a selector is not supported in server components. The component selector pattern requires access to the component's internal class name, which is not available across the server/client boundary. Use a plain CSS class selector instead.`)}function He(e,t){for(const n in e){const o=e[n];e.hasOwnProperty(n)&&!We(o)&&(Array.isArray(o)&&ke.has(o)||ie(o)?t.push(Ve(n)+\":\",o,\";\"):pe(o)?(t.push(n+\" {\"),He(o,t),t.push(\"}\")):t.push(Ve(n)+\": \"+De(n,o)+\";\"))}}function Ye(e,t,n,o,s=[]){if(We(e))return s;const r=typeof e;if(\"string\"===r)return s.push(e),s;if(\"function\"===r){if(Le(e))return\"production\"!==process.env.NODE_ENV&&qe(e),s;if(ze(e)&&t){const r=e(t);return\"production\"===process.env.NODE_ENV||\"object\"!=typeof r||Array.isArray(r)||Fe(r)||pe(r)||null===r||console.error(`${B(e)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),Ye(r,t,n,o,s)}return s.push(e),s}if(Array.isArray(e)){for(let r=0;r<e.length;r++)Ye(e[r],t,n,o,s);return s}return ce(e)?(s.push(`.${e.styledComponentId}`),s):Fe(e)?(n?(e.inject(n,o),s.push(e.getName(o))):s.push(e),s):Le(e)?(\"production\"!==process.env.NODE_ENV&&qe(e),s):pe(e)?e.toString!==Object.prototype.toString?(s.push(e.toString()),s):(He(e,s),s):(s.push(e.toString()),s)}const Ue=z(u),Je=p?new WeakMap:null;function Xe(e,t){if(!Je)return null;const n=Je.get(e);if(!n)return null;const o=t.names.get(e.componentId);if(!o)return null;let s=\"\";for(const e of o){const t=n.get(e);if(!t)return null;s+=t}return s}class Ze{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=F(Ue,t),this.baseStyle=n,je.registerId(t)}generateAndInjectStyles(e,t,n){let o=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):\"\";{let s=\"\";for(let o=0;o<this.rules.length;o++){const r=this.rules[o];if(\"string\"==typeof r)s+=r;else if(r)if(ze(r)){const o=r(e);\"string\"==typeof o?s+=o:null!=o&&!1!==o&&(\"production\"===process.env.NODE_ENV||\"object\"!=typeof o||Array.isArray(o)||Fe(o)||pe(o)||console.error(`${B(r)} is not a styled component and cannot be referred to via component selector. See https://styled-components.com/docs/advanced#referring-to-other-components for more details.`),s+=ue(Ye(o,e,t,n)))}else s+=ue(Ye(r,e,t,n))}if(s){this.dynamicNameCache||(this.dynamicNameCache=new Map);const e=n.hash?n.hash+s:s;let r=this.dynamicNameCache.get(e);if(!r){if(r=V(F(F(this.baseHash,n.hash),s)>>>0),this.dynamicNameCache.size>=200){const e=this.dynamicNameCache.keys().next().value;void 0!==e&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,r)}if(!t.hasNameForId(this.componentId,r))if(p&&function(e,t){var n,o;return null!==(o=null===(n=null==Je?void 0:Je.get(e))||void 0===n?void 0:n.has(t))&&void 0!==o&&o}(this,r))t.registerName(this.componentId,r);else{const e=n(s,\".\"+r,void 0,this.componentId);p&&function(e,t,n){if(!Je)return;let o=Je.get(e);o||(o=new Map,Je.set(e,o)),o.set(t,de(n))}(this,r,e),t.insertRules(this.componentId,r,e)}o=ae(o,r)}}return o}}const Ke=/&/g;function Qe(e,t){let n=0;for(;--t>=0&&92===e.charCodeAt(t);)n++;return!(1&~n)}function et(e){const t=e.length;let n=\"\",o=0,s=0,r=0,i=!1,l=!1;for(let c=0;c<t;c++){const a=e.charCodeAt(c);if(0!==r||i||a!==Me||42!==e.charCodeAt(c+1))if(i)42===a&&e.charCodeAt(c+1)===Me&&(i=!1,c++);else if(34!==a&&39!==a||Qe(e,c)){if(0===r)if(123===a)s++;else if(125===a){if(s--,s<0){l=!0;let n=c+1;for(;n<t;){const t=e.charCodeAt(n);if(59===t||10===t)break;n++}n<t&&59===e.charCodeAt(n)&&n++,s=0,c=n-1,o=n;continue}0===s&&(n+=e.substring(o,c+1),o=c+1)}else 59===a&&0===s&&(n+=e.substring(o,c+1),o=c+1)}else 0===r?r=a:r===a&&(r=0);else i=!0,c++}return l||0!==s||0!==r?(o<t&&0===s&&0===r&&(n+=e.substring(o)),n):e}function tt(e,t){const n=t+\" \",o=\",\"+n;for(let s=0;s<e.length;s++){const r=e[s];if(\"rule\"===r.type){r.value=(n+r.value).replaceAll(\",\",o);const e=r.props,t=[];for(let o=0;o<e.length;o++)t[o]=n+e[o];r.props=t}Array.isArray(r.children)&&\"@keyframes\"!==r.type&&tt(r.children,t)}return e}function nt({options:e=$,plugins:t=x}=$){let n,s,r;const i=(e,t,o)=>o.startsWith(s)&&o.endsWith(s)&&o.replaceAll(s,\"\").length>0?`.${n}`:e,l=t.slice();l.push(e=>{e.type===o.RULESET&&e.value.includes(\"&\")&&(r||(r=new RegExp(`\\\\${s}\\\\b`,\"g\")),e.props[0]=e.props[0].replace(Ke,s).replace(r,i))}),e.prefix&&l.push(o.prefixer),l.push(o.stringify);let c=[];const a=o.middleware(l.concat(o.rulesheet(e=>c.push(e)))),u=(t,i=\"\",l=\"\",u=\"&\")=>{n=u,s=i,r=void 0;const d=function(e){const t=-1!==e.indexOf(\"//\"),n=-1!==e.indexOf(\"}\");if(!t&&!n)return e;if(!t)return et(e);const o=e.length;let s=\"\",r=0,i=0,l=0,c=0,a=0,u=!1;for(;i<o;){const t=e.charCodeAt(i);if(34!==t&&39!==t||Qe(e,i))if(0===l)if(t===Me&&i+1<o&&42===e.charCodeAt(i+1)){for(i+=2;i+1<o&&(42!==e.charCodeAt(i)||e.charCodeAt(i+1)!==Me);)i++;i+=2}else if(40!==t)if(41!==t)if(c>0)i++;else if(42===t&&i+1<o&&e.charCodeAt(i+1)===Me)s+=e.substring(r,i),i+=2,r=i,u=!0;else if(t===Me&&i+1<o&&e.charCodeAt(i+1)===Me){for(s+=e.substring(r,i);i<o&&10!==e.charCodeAt(i);)i++;r=i,u=!0}else 123===t?a++:125===t&&a--,i++;else c>0&&c--,i++;else c++,i++;else i++;else 0===l?l=t:l===t&&(l=0),i++}return u?(r<o&&(s+=e.substring(r)),0===a?s:et(s)):0===a?e:et(e)}(t);let h=o.compile(l||i?l+\" \"+i+\" { \"+d+\" }\":d);return e.namespace&&(h=tt(h,e.namespace)),c=[],o.serialize(h,a),c},d=e;let h=G;for(let e=0;e<t.length;e++)t[e].name||S(15),h=F(h,t[e].name);return(null==d?void 0:d.namespace)&&(h=F(h,d.namespace)),(null==d?void 0:d.prefix)&&(h=F(h,\"p\")),u.hash=h!==G?h.toString():\"\",u}var ot,st,rt;const it=new je,lt=nt();let ct,at=null,ut=lt;const dt=p&&null!==(rt=null===(st=(ot=t).cache)||void 0===st?void 0:st.call(ot,()=>{it.names.clear(),it.keyframeIds.clear(),it.clearTag(),at=null}))&&void 0!==rt?rt:null,ht={shouldForwardProp:void 0,styleSheet:it,stylis:lt,stylisPlugins:void 0},pt=p?{Provider:({children:e})=>e,Consumer:({children:e})=>e(ht)}:t.createContext(ht),ft=pt.Consumer;function mt(){return p?(dt&&dt(),at||ht):t.useContext(pt)}function gt(e){var n,o,s;if(p){dt&&dt();const t=at||ht,s=void 0!==e.stylisPlugins||void 0!==e.namespace||void 0!==e.enableVendorPrefixes;s&&(e.stylisPlugins&&e.stylisPlugins!==ct?(ct=e.stylisPlugins,ut=nt({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:e.stylisPlugins})):void 0===e.namespace&&void 0===e.enableVendorPrefixes||(ut=nt({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:null!==(n=e.stylisPlugins)&&void 0!==n?n:t.stylisPlugins})));const r=s?void 0===e.stylisPlugins||e.stylisPlugins.length?ut:lt:t.stylis,i=\"shouldForwardProp\"in e?e.shouldForwardProp:t.shouldForwardProp,l=null!==(o=e.stylisPlugins)&&void 0!==o?o:t.stylisPlugins;return at=r!==lt||i?{shouldForwardProp:i,styleSheet:it,stylis:r,stylisPlugins:l}:null,e.children}const r=mt(),{styleSheet:i}=r,l=t.useMemo(()=>{let t=i;return e.sheet?t=e.sheet:e.target?t=t.reconstructWithOptions(void 0!==e.nonce?{target:e.target,nonce:e.nonce}:{target:e.target},!1):void 0!==e.nonce&&(t=t.reconstructWithOptions({nonce:e.nonce})),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.nonce,e.sheet,e.target,i]),c=t.useMemo(()=>{var t;return void 0===e.stylisPlugins&&void 0===e.namespace&&void 0===e.enableVendorPrefixes?r.stylis:nt({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:null!==(t=e.stylisPlugins)&&void 0!==t?t:r.stylisPlugins})},[e.enableVendorPrefixes,e.namespace,e.stylisPlugins,r.stylis,r.stylisPlugins]),a=\"shouldForwardProp\"in e?e.shouldForwardProp:r.shouldForwardProp,u=null!==(s=e.stylisPlugins)&&void 0!==s?s:r.stylisPlugins,d=t.useMemo(()=>({shouldForwardProp:a,styleSheet:l,stylis:c,stylisPlugins:u}),[a,l,c,u]);return t.createElement(pt.Provider,{value:d},e.children)}const yt=p?{Provider:({children:e})=>e,Consumer:({children:e})=>e(void 0)}:t.createContext(void 0),vt=yt.Consumer;function St(){const e=p?void 0:t.useContext(yt);if(!e)throw S(18);return e}function bt(e){if(p)return e.children;const n=t.useContext(yt),o=t.useMemo(()=>function(e,t){if(!e)throw S(14);if(ie(e)){const n=e(t);if(\"production\"!==process.env.NODE_ENV&&(null===n||Array.isArray(n)||\"object\"!=typeof n))throw S(7);return n}if(Array.isArray(e)||\"object\"!=typeof e)throw S(8);return t?Object.assign(Object.assign({},t),e):e}(e.theme,n),[e.theme,n]);return e.children?t.createElement(yt.Provider,{value:o},e.children):null}const wt={};function Nt(e,t){const n=\"string\"!=typeof e?\"sc\":T(e);wt[n]=(wt[n]||0)+1;const o=n+\"-\"+W(u+n+wt[n]);return t?t+\"-\"+o:o}let Ct;const Pt=me(()=>new Set),Ot=new Map;function Et(e){let t=Ot.get(e);return t||(t=new RegExp(\"\\\\.\"+e+\"(?![a-zA-Z0-9_-])\",\"g\"),Ot.set(e,t)),t}function It(e,t,n){const o=n.names.get(t);if(o)for(const t of o){const n=Et(t);n.lastIndex=0,e=e.replace(n,\":where(.\"+t+\")\")}return e}function At(o,s,r){const i=ce(o),c=o,a=!L(o),{attrs:u=x,componentId:h=Nt(s.displayName,s.parentComponentId),displayName:f=q(o)}=s,m=s.displayName&&s.componentId?T(s.displayName)+\"-\"+s.componentId:s.componentId||h,g=i&&c.attrs?c.attrs.concat(u).filter(Boolean):u;let{shouldForwardProp:y}=s;if(i&&c.shouldForwardProp){const e=c.shouldForwardProp;if(s.shouldForwardProp){const t=s.shouldForwardProp;y=(n,o)=>e(n,o)&&t(n,o)}else y=e}const v=new Ze(r,m,i?c.componentStyle:void 0);function S(o,s){return function(o,s,r){const{attrs:i,componentStyle:c,defaultProps:a,foldedComponentIds:u,styledComponentId:h,target:f}=o,m=p?void 0:t.useContext(yt),g=mt(),y=o.shouldForwardProp||g.shouldForwardProp;\"production\"!==process.env.NODE_ENV&&t.useDebugValue&&t.useDebugValue(h);const v=R(s,m,a)||(p?void 0:$);let S,b;S=function(e,t,n){const o=Object.assign(Object.assign({},t),{className:void 0,theme:n}),s=e.length>1;for(let n=0;n<e.length;n++){const r=e[n],i=ie(r)?r(s?Object.assign({},o):o):r;for(const e in i)\"className\"===e?o.className=ae(o.className,i[e]):\"style\"===e?o.style=Object.assign(Object.assign({},o.style),i[e]):e in t&&void 0===t[e]||(o[e]=i[e])}return\"className\"in t&&\"string\"==typeof t.className&&(o.className=ae(o.className,t.className)),o}(i,s,v),b=function(e,n,o,s){const r=e.generateAndInjectStyles(n,o,s);return\"production\"!==process.env.NODE_ENV&&t.useDebugValue&&t.useDebugValue(r),r}(c,S,g.styleSheet,g.stylis),\"production\"!==process.env.NODE_ENV&&o.warnTooManyClasses&&o.warnTooManyClasses(b);const w=S.as||f,N=function(t,n,o,s){const r={};for(const i in t)void 0===t[i]||\"$\"===i[0]||\"as\"===i||\"theme\"===i&&t.theme===o||(\"forwardedAs\"===i?r.as=t.forwardedAs:s&&!s(i,n)||(r[i]=t[i],s||\"development\"!==process.env.NODE_ENV||e(i)||(Ct||(Ct=new Set)).has(i)||!L(n)||n.includes(\"-\")||(Ct.add(i),console.warn(`styled-components: it looks like an unknown prop \"${i}\" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via \\`<StyleSheetManager shouldForwardProp={...}>\\` (connect an API like \\`@emotion/is-prop-valid\\`) or consider using transient props (\\`$\\` prefix for automatic filtering.)`))));return r}(S,w,v,y);let C=ae(u,h);b&&(C+=\" \"+b),S.className&&(C+=\" \"+S.className),N[L(w)&&w.includes(\"-\")?\"class\":\"className\"]=C,r&&(N.ref=r);const O=n(w,N);if(p){const e=Pt?Pt():null;let n=null,o=0,s=\"\",r=!0,i=c;for(;i;){const t=g.styleSheet.names.get(i.componentId);if(t){o+=t.size;for(const o of t)e&&e.has(o)||(n||(n=[]),n.push(o),e&&e.add(o))}if(n&&r){let e=Xe(i,g.styleSheet);null===e?r=!1:(i!==c&&(e=It(e,i.componentId,g.styleSheet)),s=e+s)}i=i.baseStyle}if(n&&!r){s=\"\";const e=g.styleSheet.getTag();let t=c;for(;t;){let n=e.getGroup(P(t.componentId));n&&t!==c&&(n=It(n,t.componentId,g.styleSheet)),s=n+s,t=t.baseStyle}}let a=\"\";if(g.styleSheet.keyframeIds.size>0){const t=g.styleSheet.getTag();for(const n of g.styleSheet.keyframeIds){if(e&&e.has(n))continue;const o=t.getGroup(P(n));o&&(a+=o,e&&e.add(n))}}if(s&&e&&n&&n.length<o){const e=s.split(d);let t=\"\";for(let o=0;o<e.length;o++){const s=e[o];if(s)for(let e=0;e<n.length;e++){const o=Et(n[e]);if(o.lastIndex=0,o.test(s)){t+=s+d;break}}}s=t}const u=he(a+s);if(u){const e=t.createElement(\"style\",{[l]:\"\",key:\"sc-\"+c.componentId,children:u});return t.createElement(t.Fragment,null,e,O)}}return O}(b,o,s)}S.displayName=f;let b=t.forwardRef(S);return b.attrs=g,b.componentStyle=v,b.displayName=f,b.shouldForwardProp=y,b.foldedComponentIds=i?ae(c.foldedComponentIds,c.styledComponentId):\"\",b.styledComponentId=m,b.target=i?c.target:o,Object.defineProperty(b,\"defaultProps\",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=i?function(e,...t){for(const n of t)fe(e,n,!0);return e}({},c.defaultProps,e):e}}),\"production\"!==process.env.NODE_ENV&&(_(f,m),b.warnTooManyClasses=((e,t)=>{let n={},o=!1;return s=>{!o&&(n[s]=!0,Object.keys(n).length>=200)&&(console.warn(`Over 200 classes were generated for component ${e}${t?` with the id of \"${t}\"`:\"\"}.\\nConsider using the attrs method, together with a style object for frequently changed styles.\\nExample:\\n const Component = styled.div.attrs(props => ({\\n style: {\\n background: props.background,\\n },\\n }))\\`width: 100%;\\`\\n\\n <Component />`),o=!0,n={})}})(f,m)),ge(b,()=>`.${b.styledComponentId}`),a&&re(b,o,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),b}var _t=new Set([\"a\",\"abbr\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"bdi\",\"bdo\",\"blockquote\",\"body\",\"button\",\"br\",\"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\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"iframe\",\"img\",\"input\",\"ins\",\"kbd\",\"label\",\"legend\",\"li\",\"main\",\"map\",\"mark\",\"menu\",\"meter\",\"nav\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"search\",\"section\",\"select\",\"slot\",\"small\",\"span\",\"strong\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"template\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"tr\",\"u\",\"ul\",\"var\",\"video\",\"wbr\",\"circle\",\"clipPath\",\"defs\",\"ellipse\",\"feBlend\",\"feColorMatrix\",\"feComponentTransfer\",\"feComposite\",\"feConvolveMatrix\",\"feDiffuseLighting\",\"feDisplacementMap\",\"feDistantLight\",\"feDropShadow\",\"feFlood\",\"feFuncA\",\"feFuncB\",\"feFuncG\",\"feFuncR\",\"feGaussianBlur\",\"feImage\",\"feMerge\",\"feMergeNode\",\"feMorphology\",\"feOffset\",\"fePointLight\",\"feSpecularLighting\",\"feSpotLight\",\"feTile\",\"feTurbulence\",\"filter\",\"foreignObject\",\"g\",\"image\",\"line\",\"linearGradient\",\"marker\",\"mask\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialGradient\",\"rect\",\"stop\",\"svg\",\"switch\",\"symbol\",\"text\",\"textPath\",\"tspan\",\"use\"]);function xt(e,t){const n=[e[0]];for(let o=0,s=t.length;o<s;o+=1)n.push(t[o],e[o+1]);return n}const $t=e=>(ke.add(e),e);function Rt(e,...t){if(ie(e)||pe(e))return $t(Ye(xt(x,[e,...t])));const n=e;return 0===t.length&&1===n.length&&\"string\"==typeof n[0]?Ye(n):$t(Ye(xt(n,t)))}function jt(e,t,n=$){if(!t)throw S(1,t);const o=(o,...s)=>e(t,n,Rt(o,...s));return o.attrs=o=>jt(e,t,Object.assign(Object.assign({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)})),o.withConfig=o=>jt(e,t,Object.assign(Object.assign({},n),o)),o}const kt=e=>jt(At,e),Tt=kt;_t.forEach(e=>{Tt[e]=kt(e)});class Dt{constructor(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=function(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(ie(n)&&!ce(n))return!1}return!0}(e),je.registerId(this.componentId)}removeStyles(e,t){this.instanceRules.delete(e),this.rebuildGroup(t)}renderStyles(e,t,n,o){const s=this.componentId;if(this.isStatic){if(n.hasNameForId(s,s+e))this.instanceRules.has(e)||this.computeRules(e,t,n,o);else{const r=this.computeRules(e,t,n,o);n.insertRules(s,r.name,r.rules)}return}const r=this.instanceRules.get(e);if(this.computeRules(e,t,n,o),!n.server&&r){const t=r.rules,n=this.instanceRules.get(e).rules;if(t.length===n.length){let e=!0;for(let o=0;o<t.length;o++)if(t[o]!==n[o]){e=!1;break}if(e)return}}this.rebuildGroup(n)}computeRules(e,t,n,o){const s=ue(Ye(this.rules,t,n,o)),r={name:this.componentId+e,rules:o(s,\"\")};return this.instanceRules.set(e,r),r}rebuildGroup(e){const t=this.componentId;e.clearRules(t);for(const n of this.instanceRules.values())e.insertRules(t,n.name,n.rules)}}const Mt=me(()=>new Set);function Vt(e,...n){const o=Rt(e,...n),s=`sc-global-${W(JSON.stringify(o))}`,r=new Dt(o,s);\"production\"!==process.env.NODE_ENV&&_(s);const i=e=>{const n=mt(),l=p?void 0:t.useContext(yt);let c;if(c=n.styleSheet.allocateGSInstance(s),\"production\"!==process.env.NODE_ENV&&t.Children.count(e.children)&&console.warn(`The global style component ${s} was given child JSX. createGlobalStyle does not render children.`),\"production\"!==process.env.NODE_ENV&&o.some(e=>\"string\"==typeof e&&-1!==e.indexOf(\"@import\"))&&console.warn(\"Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app.\"),(p||n.styleSheet.server)&&function(e,t,n,o,s){if(r.isStatic)r.renderStyles(e,y,n,s);else{const l=Object.assign(Object.assign({},t),{theme:R(t,o,i.defaultProps)});r.renderStyles(e,l,n,s)}}(c,e,n.styleSheet,l,n.stylis),p){const e=\"undefined\"==typeof window?r.instanceRules.get(c):void 0,o=e?de(e.rules):\"\";if(o){r.instanceRules.delete(c);const e=Mt?Mt():null;if(e){const t=r.isStatic?s+n.stylis.hash:o;if(e.has(t))return null;e.add(t)}return t.createElement(\"style\",{key:s+\"-\"+c,\"data-styled-global\":s,children:he(o)})}}return r.instanceRules.delete(c),null};return t.memo(i)}function Gt(e,t,n,o,s){for(const r in e){const i=e[r],l=s?s+\"-\"+r:r;if(\"object\"==typeof i&&null!==i){const e={};Gt(i,t,e,o,l),n[r]=e}else n[r]=o(l,i,r)}}function Ft(e,t,n,o){let s=\"\";for(const r in e){const i=e[r],l=t[r],c=o?o+\"-\"+r:r;\"object\"==typeof i&&null!==i?\"object\"==typeof l&&null!==l&&(s+=Ft(i,l,n,c)):void 0!==l&&\"function\"!=typeof l&&(s+=\"--\"+n+c+\":\"+l+\";\")}return s}function zt(e,t){var n,o;const s=(null!==(n=null==t?void 0:t.prefix)&&void 0!==n?n:\"sc\")+\"-\",r=null!==(o=null==t?void 0:t.selector)&&void 0!==o?o:\":root\",i=function(e,t){const n={};return Gt(e,t,n,e=>\"--\"+t+e),n}(e,s),l=function(e,t){const n={};return Gt(e,t,n,(e,n)=>{if(\"production\"!==process.env.NODE_ENV){const t=String(n);let o=0;for(let e=0;e<t.length&&(40===t.charCodeAt(e)?o++:41===t.charCodeAt(e)&&o--,!(o<0));e++);0!==o&&console.warn(`createTheme: value \"${t}\" at \"${e}\" contains unbalanced parentheses and may break the var() fallback`)}return\"var(--\"+t+e+\", \"+n+\")\"}),n}(e,s),c=Vt`\n ${r} {\n ${t=>Ft(e,t.theme,s)}\n }\n `;return Object.assign(l,{GlobalStyle:c,raw:e,vars:i,resolve(t){if(!h)throw new Error(\"createTheme.resolve() is client-only\");const n=null!=t?t:document.documentElement;return function(e,t,n){const o={};return Gt(e,t,o,(e,o)=>n.getPropertyValue(\"--\"+t+e).trim()||o),o}(e,s,getComputedStyle(n))}})}var Wt;const Bt=p?new WeakMap:null;class Lt{constructor(e,t){this[Wt]=!0,this.inject=(e,t=lt)=>{var n;const o=this.getName(t);if(!e.hasNameForId(this.id,o)){const s=t.hash||\"\",r=p?null===(n=null==Bt?void 0:Bt.get(this))||void 0===n?void 0:n.get(s):void 0;if(r)e.insertRules(this.id,o,r);else{const n=t(this.rules,o,\"@keyframes\");if(p&&Bt){let e=Bt.get(this);e||(e=new Map,Bt.set(this,e)),e.set(s,n)}e.insertRules(this.id,o,n)}}},this.name=e,this.id=g+e,this.rules=t,P(this.id),ge(this,()=>{throw S(12,String(this.name))})}getName(e=lt){return e.hash?this.name+V(+e.hash>>>0):this.name}}function qt(e,...t){\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.\");const n=ue(Rt(e,...t)),o=W(n);return new Lt(o,n)}function Ht(e){const n=t.forwardRef((n,o)=>{const s=R(n,p?void 0:t.useContext(yt),e.defaultProps);return\"production\"!==process.env.NODE_ENV&&void 0===s&&console.warn(`[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"${B(e)}\"`),t.createElement(e,Object.assign(Object.assign({},n),{theme:s,ref:o}))});return n.displayName=`WithTheme(${B(e)})`,re(n,e)}Wt=Ge;const Yt=/^\\s*<\\/[a-z]/i;class Ut{constructor({nonce:e}={}){this._emitSheetCSS=()=>{const e=this.instance.toString();if(!e)return\"\";const t=this.instance.options.nonce||Ee();return`<style ${ue([t&&`nonce=\"${t}\"`,`${l}=\"true\"`,`${a}=\"${u}\"`].filter(Boolean),\" \")}>${e}</style>`},this.getStyleTags=()=>{if(this.sealed)throw S(2);return this._emitSheetCSS()},this.getStyleElement=()=>{if(this.sealed)throw S(2);const e=this.instance.toString();if(!e)return[];const n={[l]:\"\",[a]:u,dangerouslySetInnerHTML:{__html:e}},o=this.instance.options.nonce||Ee();return o&&(n.nonce=o),[t.createElement(\"style\",Object.assign({},n,{key:\"sc-0-0\"}))]},this.seal=()=>{this.sealed=!0},this.instance=new je({isServer:!0,nonce:e}),this.sealed=!1}collectStyles(e){if(this.sealed)throw S(2);return t.createElement(gt,{sheet:this.instance},e)}interleaveWithNodeStream(e){if(this.sealed)throw S(2);this.seal();const{Transform:t}=require(\"stream\"),{instance:n,_emitSheetCSS:o}=this,s=new t({transform:function(e,t,s){const r=e.toString(),i=o();if(n.clearTag(),Yt.test(r)){const e=r.indexOf(\">\")+1,t=r.slice(0,e),n=r.slice(e);this.push(t+i+n)}else this.push(i+r);s()}});if(\"on\"in e&&\"function\"==typeof e.on&&\"pipe\"in e){const t=e;return t.on(\"error\",e=>{s.emit(\"error\",e)}),t.pipe(s)}if(\"pipe\"in e&&\"function\"==typeof e.pipe)return e.pipe(s);throw new Error(\"Unsupported stream type\")}}const Jt={StyleSheet:je,mainSheet:it};\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"It looks like you've imported 'styled-components' on React Native.\\nPerhaps you're looking to import 'styled-components/native'?\\nRead more about this at https://styled-components.com/docs/basics#react-native\");const Xt=`__sc-${l}__`;\"production\"!==process.env.NODE_ENV&&\"test\"!==process.env.NODE_ENV&&\"undefined\"!=typeof window&&(window[Xt]||(window[Xt]=0),1===window[Xt]&&console.warn(\"It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\\n\\nSee https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info.\"),window[Xt]+=1);const Zt=/:(?:(first)-child|(last)-child|(only)-child|(nth-child)\\(([^()]+)\\)|(nth-last-child)\\(([^()]+)\\))/g,Kt=`:not(style[${l}])`,Qt=`style[${l}]`;function en(e){return-1===e.indexOf(\"-child\")?e:(Zt.lastIndex=0,e.replace(Zt,(e,t,n,o,s,r,i,l)=>t?`:nth-child(1 of ${Kt})`:n?`:nth-last-child(1 of ${Kt})`:o?`:nth-child(1 of ${Kt}):nth-last-child(1 of ${Kt})`:s?-1!==r.indexOf(\" of \")?e:`:nth-child(${r} of ${Kt})`:-1!==l.indexOf(\" of \")?e:`:nth-last-child(${l} of ${Kt})`))}function tn(e,t){if(-1===e.indexOf(\"+\"))return;let n=0,o=0;for(let s=0;s<e.length;s++){const r=e.charCodeAt(s);if(40===r)n++;else if(41===r)n--;else if(91===r)o++;else if(93===r)o--;else if(43===r&&0===n&&0===o&&!Qe(e,s)){const n=e.substring(0,s),o=e.substring(s+1);t.push(n+\"+\"+Qt+\"+\"+o),t.push(n+\"+\"+Qt+\"+\"+Qt+\"+\"+o)}}}function nn(e){if(e.type===s){const t=e.props,n=[];for(let e=0;e<t.length;e++){const o=en(t[e]);n.push(o),tn(o,n)}e.props=n}}export{Ut as ServerStyleSheet,ft as StyleSheetConsumer,pt as StyleSheetContext,gt as StyleSheetManager,vt as ThemeConsumer,yt as ThemeContext,bt as ThemeProvider,Jt as __PRIVATE__,Vt as createGlobalStyle,zt as createTheme,Rt as css,Tt as default,ce as isStyledComponent,qt as keyframes,Tt as styled,nn as stylisPluginRSC,St as useTheme,u as version,Ht as withTheme};\n//# sourceMappingURL=styled-components.esm.js.map\n","/**\n * @license React\n * react-is.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and 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\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\");\nfunction typeOf(object) {\n if (\"object\" === typeof object && null !== object) {\n var $$typeof = object.$$typeof;\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n switch (((object = object.type), object)) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n case REACT_VIEW_TRANSITION_TYPE:\n return object;\n default:\n switch (((object = object && object.$$typeof), object)) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n return object;\n case REACT_CONSUMER_TYPE:\n return object;\n default:\n return $$typeof;\n }\n }\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n}\nexports.ContextConsumer = REACT_CONSUMER_TYPE;\nexports.ContextProvider = REACT_CONTEXT_TYPE;\nexports.Element = REACT_ELEMENT_TYPE;\nexports.ForwardRef = REACT_FORWARD_REF_TYPE;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Lazy = REACT_LAZY_TYPE;\nexports.Memo = REACT_MEMO_TYPE;\nexports.Portal = REACT_PORTAL_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;\nexports.isContextConsumer = function (object) {\n return typeOf(object) === REACT_CONSUMER_TYPE;\n};\nexports.isContextProvider = function (object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n};\nexports.isElement = function (object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n};\nexports.isForwardRef = function (object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n};\nexports.isFragment = function (object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n};\nexports.isLazy = function (object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n};\nexports.isMemo = function (object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n};\nexports.isPortal = function (object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n};\nexports.isProfiler = function (object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n};\nexports.isStrictMode = function (object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n};\nexports.isSuspense = function (object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n};\nexports.isSuspenseList = function (object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n};\nexports.isValidElementType = function (type) {\n return \"string\" === typeof type ||\n \"function\" === typeof type ||\n type === REACT_FRAGMENT_TYPE ||\n type === REACT_PROFILER_TYPE ||\n type === REACT_STRICT_MODE_TYPE ||\n type === REACT_SUSPENSE_TYPE ||\n type === REACT_SUSPENSE_LIST_TYPE ||\n (\"object\" === typeof type &&\n null !== type &&\n (type.$$typeof === REACT_LAZY_TYPE ||\n type.$$typeof === REACT_MEMO_TYPE ||\n type.$$typeof === REACT_CONTEXT_TYPE ||\n type.$$typeof === REACT_CONSUMER_TYPE ||\n type.$$typeof === REACT_FORWARD_REF_TYPE ||\n type.$$typeof === REACT_CLIENT_REFERENCE ||\n void 0 !== type.getModuleId))\n ? !0\n : !1;\n};\nexports.typeOf = typeOf;\n","/**\n * @license React\n * react-is.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and 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\"production\" !== process.env.NODE_ENV &&\n (function () {\n function typeOf(object) {\n if (\"object\" === typeof object && null !== object) {\n var $$typeof = object.$$typeof;\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n switch (((object = object.type), object)) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n case REACT_VIEW_TRANSITION_TYPE:\n return object;\n default:\n switch (((object = object && object.$$typeof), object)) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n return object;\n case REACT_CONSUMER_TYPE:\n return object;\n default:\n return $$typeof;\n }\n }\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n }\n var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\");\n exports.ContextConsumer = REACT_CONSUMER_TYPE;\n exports.ContextProvider = REACT_CONTEXT_TYPE;\n exports.Element = REACT_ELEMENT_TYPE;\n exports.ForwardRef = REACT_FORWARD_REF_TYPE;\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.Lazy = REACT_LAZY_TYPE;\n exports.Memo = REACT_MEMO_TYPE;\n exports.Portal = REACT_PORTAL_TYPE;\n exports.Profiler = REACT_PROFILER_TYPE;\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\n exports.Suspense = REACT_SUSPENSE_TYPE;\n exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;\n exports.isContextConsumer = function (object) {\n return typeOf(object) === REACT_CONSUMER_TYPE;\n };\n exports.isContextProvider = function (object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n };\n exports.isElement = function (object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n };\n exports.isForwardRef = function (object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n };\n exports.isFragment = function (object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n };\n exports.isLazy = function (object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n };\n exports.isMemo = function (object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n };\n exports.isPortal = function (object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n };\n exports.isProfiler = function (object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n };\n exports.isStrictMode = function (object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n };\n exports.isSuspense = function (object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n };\n exports.isSuspenseList = function (object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n };\n exports.isValidElementType = function (type) {\n return \"string\" === typeof type ||\n \"function\" === typeof type ||\n type === REACT_FRAGMENT_TYPE ||\n type === REACT_PROFILER_TYPE ||\n type === REACT_STRICT_MODE_TYPE ||\n type === REACT_SUSPENSE_TYPE ||\n type === REACT_SUSPENSE_LIST_TYPE ||\n (\"object\" === typeof type &&\n null !== type &&\n (type.$$typeof === REACT_LAZY_TYPE ||\n type.$$typeof === REACT_MEMO_TYPE ||\n type.$$typeof === REACT_CONTEXT_TYPE ||\n type.$$typeof === REACT_CONSUMER_TYPE ||\n type.$$typeof === REACT_FORWARD_REF_TYPE ||\n type.$$typeof === REACT_CLIENT_REFERENCE ||\n void 0 !== type.getModuleId))\n ? !0\n : !1;\n };\n exports.typeOf = typeOf;\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n const firstChar = placement[0];\n return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n const side = getSide(placement);\n return oppositeSideMap[side] + placement.slice(side.length);\n}\nfunction expandPaddingObject(padding) {\n var _padding$top, _padding$right, _padding$bottom, _padding$left;\n return {\n top: (_padding$top = padding.top) != null ? _padding$top : 0,\n right: (_padding$right = padding.right) != null ? _padding$right : 0,\n bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,\n left: (_padding$left = padding.left) != null ? _padding$left : 0\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n const alignment = getAlignment(placement);\n if (alignment) {\n coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1);\n }\n return coords;\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) && (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n// Maximum number of resets that can occur before bailing to avoid infinite reset loops.\nconst MAX_RESET_COUNT = 50;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const platformWithDetectOverflow = platform.detectOverflow ? platform : {\n ...platform,\n detectOverflow\n };\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let resetCount = 0;\n const middlewareData = {};\n for (let i = 0; i < middleware.length; i++) {\n const currentMiddleware = middleware[i];\n if (!currentMiddleware) {\n continue;\n }\n const {\n name,\n fn\n } = currentMiddleware;\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform: platformWithDetectOverflow,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData[name] = {\n ...middlewareData[name],\n ...data\n };\n if (reset && resetCount < MAX_RESET_COUNT) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(minPadding, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < minPadding ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < minPadding ? center - minPadding : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects,\n platform\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n\n // No rects (e.g. a hidden or detached reference, or a collapsed range) —\n // keep the existing reference rect rather than resetting to an invalid\n // one with non-finite values.\n if (!nativeClientRects.length) {\n return {};\n }\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && (clientRects[0].left > clientRects[1].right || clientRects[1].left > clientRects[0].right) && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n return rectToClientRect({\n x: left,\n y: top,\n width: right - left,\n height: bottom - top\n });\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n return rectToClientRect({\n x: minLeft,\n y: top,\n width: maxRight - minLeft,\n height: bottom - top\n });\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n platform\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const clampCoord = (axis, coord) => clamp(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']);\n if (checkMainAxis) {\n mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);\n }\n if (checkCrossAxis) {\n crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n var _rawOffset$mainAxis, _rawOffset$crossAxis;\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,\n crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n// Method syntax keeps callback parameters bivariant, but expressing the\n// explicit `| undefined` required by `exactOptionalPropertyTypes` needs\n// property syntax, which is contravariant under `strictFunctionTypes`.\n// Extracting the function from a method position restores that bivariance so\n// consumers can still assign callbacks with narrower parameter types.\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const shiftData = state.middlewareData.shift;\n const noShift = !shiftData;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (shiftData != null && shiftData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if (shiftData != null && shiftData.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n if (isYAxis) {\n availableWidth = width - 2 * max(overflow.left, overflow.right);\n } else {\n availableHeight = height - 2 * max(overflow.top, overflow.bottom);\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n try {\n if (element.matches(':popover-open')) {\n return true;\n }\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (isWebKitValue == null) {\n isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n }\n return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return (node.ownerDocument || node).body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n } else {\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n }\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement && offsetParent) {\n const win = getWindow(domElement);\n const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return element.getClientRects ? Array.from(element.getClientRects()) : [];\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(html) {\n const scroll = getNodeScroll(html);\n const body = html.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(html);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy, rootBoundary) {\n if (rootBoundary === void 0) {\n rootBoundary = 'viewport';\n }\n const isLayoutViewport = rootBoundary === 'layoutViewport';\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n // Client coordinates are relative to the layout viewport, except in\n // WebKit with an `absolute` strategy, where they are relative to the\n // visual viewport.\n const layoutRelativeClientCoords = !isWebKit() || strategy === 'fixed';\n if (isLayoutViewport) {\n if (!layoutRelativeClientCoords) {\n x = -visualViewport.offsetLeft;\n y = -visualViewport.offsetTop;\n }\n } else {\n width = visualViewport.width;\n height = visualViewport.height;\n if (layoutRelativeClientCoords) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks\n // the visual width but isn't reflected in `html.clientWidth`, so subtract it.\n // Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also\n // reserves an empty inline-start gutter that clips nothing, so exclude just\n // the one scrollbar-side gutter — halve the measured (two-gutter) total. A\n // left-side scrollbar (`windowScrollbarX > 0`) is already handled by\n // `getHTMLOffset`/`visualViewport.width`; skip it here.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth;\n if (gutter <= SCROLLBAR_MAX) {\n width -= gutter;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = getScale(element);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport' || clippingAncestor === 'layoutViewport') {\n rect = getViewportRect(element, strategy, clippingAncestor);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let lastKeptComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n // Position of the containing block chain below the current node. A fixed\n // element whose containing block hasn't been found yet is a fixed chain.\n const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';\n\n // A non-containing ancestor does not clip the element when the chain\n // below it escapes it: a fixed chain escapes all ancestors up to the\n // next containing block, an absolute chain escapes static ancestors.\n const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static');\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // The kept node carries the chain position for the next iteration.\n lastKeptComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);\n let top = firstRect.top;\n let right = firstRect.right;\n let bottom = firstRect.bottom;\n let left = firstRect.left;\n for (let i = 1; i < clippingAncestors.length; i++) {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);\n top = max(rect.top, top);\n right = min(rect.right, right);\n bottom = min(rect.bottom, bottom);\n left = max(rect.left, left);\n }\n return {\n width: right - left,\n height: bottom - top,\n x: left,\n y: top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n if (!isOffsetParentAnElement && documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove, ancestorResize) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n\n // The entry is a snapshot, so the reference may have moved since the\n // intersection was computed (under performance constraints, or between\n // consecutive frames of a multi-frame layout shift). The reported ratio\n // and the observed area are stale in that case and cannot be trusted to\n // detect subsequent movement, so refresh regardless of the ratio.\n if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n return refresh();\n }\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped in place, the ratio is 0. Throttle\n // the refresh to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n const win = getWindow(element);\n // The window is a resize ancestor, so when `ancestorResize` is enabled its\n // listener already runs the update on resize. Here we only need to rebuild\n // the `IntersectionObserver` for the new root size, skipping a redundant\n // update. When `ancestorResize` is disabled, this becomes the sole update.\n const handleResize = () => refresh(ancestorResize);\n win.addEventListener('resize', handleResize);\n refresh(true);\n return () => {\n win.removeEventListener('resize', handleResize);\n cleanup();\n };\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update);\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n if (floating) {\n resizeObserver.observe(floating);\n }\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = options != null ? options : {};\n const platformWithCache = {\n ...platform,\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","/**\n * @license React\n * react-dom.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and 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\";\nvar React = require(\"react\");\nfunction formatProdErrorMessage(code) {\n var url = \"https://react.dev/errors/\" + code;\n if (1 < arguments.length) {\n url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n for (var i = 2; i < arguments.length; i++)\n url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n }\n return (\n \"Minified React error #\" +\n code +\n \"; visit \" +\n url +\n \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n );\n}\nfunction noop() {}\nvar Internals = {\n d: {\n f: noop,\n r: function () {\n throw Error(formatProdErrorMessage(522));\n },\n D: noop,\n C: noop,\n L: noop,\n m: noop,\n X: noop,\n S: noop,\n M: noop\n },\n p: 0,\n findDOMNode: null\n },\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\");\nfunction createPortal$1(children, containerInfo, implementation) {\n var key =\n 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n return {\n $$typeof: REACT_PORTAL_TYPE,\n key: null == key ? null : \"\" + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\nvar ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\nfunction getCrossOriginStringAs(as, input) {\n if (\"font\" === as) return \"\";\n if (\"string\" === typeof input)\n return \"use-credentials\" === input ? input : \"\";\n}\nexports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n Internals;\nexports.createPortal = function (children, container) {\n var key =\n 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\n if (\n !container ||\n (1 !== container.nodeType &&\n 9 !== container.nodeType &&\n 11 !== container.nodeType)\n )\n throw Error(formatProdErrorMessage(299));\n return createPortal$1(children, container, null, key);\n};\nexports.flushSync = function (fn) {\n var previousTransition = ReactSharedInternals.T,\n previousUpdatePriority = Internals.p;\n try {\n if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();\n } finally {\n (ReactSharedInternals.T = previousTransition),\n (Internals.p = previousUpdatePriority),\n Internals.d.f();\n }\n};\nexports.preconnect = function (href, options) {\n \"string\" === typeof href &&\n (options\n ? ((options = options.crossOrigin),\n (options =\n \"string\" === typeof options\n ? \"use-credentials\" === options\n ? options\n : \"\"\n : void 0))\n : (options = null),\n Internals.d.C(href, options));\n};\nexports.prefetchDNS = function (href) {\n \"string\" === typeof href && Internals.d.D(href);\n};\nexports.preinit = function (href, options) {\n if (\"string\" === typeof href && options && \"string\" === typeof options.as) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n integrity =\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n fetchPriority =\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0;\n \"style\" === as\n ? Internals.d.S(\n href,\n \"string\" === typeof options.precedence ? options.precedence : void 0,\n {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority\n }\n )\n : \"script\" === as &&\n Internals.d.X(href, {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n};\nexports.preinitModule = function (href, options) {\n if (\"string\" === typeof href)\n if (\"object\" === typeof options && null !== options) {\n if (null == options.as || \"script\" === options.as) {\n var crossOrigin = getCrossOriginStringAs(\n options.as,\n options.crossOrigin\n );\n Internals.d.M(href, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n } else null == options && Internals.d.M(href);\n};\nexports.preload = function (href, options) {\n if (\n \"string\" === typeof href &&\n \"object\" === typeof options &&\n null !== options &&\n \"string\" === typeof options.as\n ) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);\n Internals.d.L(href, as, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n type: \"string\" === typeof options.type ? options.type : void 0,\n fetchPriority:\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0,\n referrerPolicy:\n \"string\" === typeof options.referrerPolicy\n ? options.referrerPolicy\n : void 0,\n imageSrcSet:\n \"string\" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,\n imageSizes:\n \"string\" === typeof options.imageSizes ? options.imageSizes : void 0,\n media: \"string\" === typeof options.media ? options.media : void 0\n });\n }\n};\nexports.preloadModule = function (href, options) {\n if (\"string\" === typeof href)\n if (options) {\n var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);\n Internals.d.m(href, {\n as:\n \"string\" === typeof options.as && \"script\" !== options.as\n ? options.as\n : void 0,\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0\n });\n } else Internals.d.m(href);\n};\nexports.requestFormReset = function (form) {\n Internals.d.r(form);\n};\nexports.unstable_batchedUpdates = function (fn, a) {\n return fn(a);\n};\nexports.useFormState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useFormState(action, initialState, permalink);\n};\nexports.useFormStatus = function () {\n return ReactSharedInternals.H.useHostTransitionStatus();\n};\nexports.version = \"19.2.8\";\n","/**\n * @license React\n * react-dom.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and 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\"production\" !== process.env.NODE_ENV &&\n (function () {\n function noop() {}\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function createPortal$1(children, containerInfo, implementation) {\n var key =\n 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n try {\n testStringCoercion(key);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n JSCompiler_inline_result &&\n (console.error(\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n key[Symbol.toStringTag]) ||\n key.constructor.name ||\n \"Object\"\n ),\n testStringCoercion(key));\n return {\n $$typeof: REACT_PORTAL_TYPE,\n key: null == key ? null : \"\" + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n }\n function getCrossOriginStringAs(as, input) {\n if (\"font\" === as) return \"\";\n if (\"string\" === typeof input)\n return \"use-credentials\" === input ? input : \"\";\n }\n function getValueDescriptorExpectingObjectForWarning(thing) {\n return null === thing\n ? \"`null`\"\n : void 0 === thing\n ? \"`undefined`\"\n : \"\" === thing\n ? \"an empty string\"\n : 'something with type \"' + typeof thing + '\"';\n }\n function getValueDescriptorExpectingEnumForWarning(thing) {\n return null === thing\n ? \"`null`\"\n : void 0 === thing\n ? \"`undefined`\"\n : \"\" === thing\n ? \"an empty string\"\n : \"string\" === typeof thing\n ? JSON.stringify(thing)\n : \"number\" === typeof thing\n ? \"`\" + thing + \"`\"\n : 'something with type \"' + typeof thing + '\"';\n }\n function resolveDispatcher() {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"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:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher;\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n Internals = {\n d: {\n f: noop,\n r: function () {\n throw Error(\n \"Invalid form element. requestFormReset must be passed a form that was rendered by React.\"\n );\n },\n D: noop,\n C: noop,\n L: noop,\n m: noop,\n X: noop,\n S: noop,\n M: noop\n },\n p: 0,\n findDOMNode: null\n },\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n (\"function\" === typeof Map &&\n null != Map.prototype &&\n \"function\" === typeof Map.prototype.forEach &&\n \"function\" === typeof Set &&\n null != Set.prototype &&\n \"function\" === typeof Set.prototype.clear &&\n \"function\" === typeof Set.prototype.forEach) ||\n console.error(\n \"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\"\n );\n exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n Internals;\n exports.createPortal = function (children, container) {\n var key =\n 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\n if (\n !container ||\n (1 !== container.nodeType &&\n 9 !== container.nodeType &&\n 11 !== container.nodeType)\n )\n throw Error(\"Target container is not a DOM element.\");\n return createPortal$1(children, container, null, key);\n };\n exports.flushSync = function (fn) {\n var previousTransition = ReactSharedInternals.T,\n previousUpdatePriority = Internals.p;\n try {\n if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))\n return fn();\n } finally {\n (ReactSharedInternals.T = previousTransition),\n (Internals.p = previousUpdatePriority),\n Internals.d.f() &&\n console.error(\n \"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.\"\n );\n }\n };\n exports.preconnect = function (href, options) {\n \"string\" === typeof href && href\n ? null != options && \"object\" !== typeof options\n ? console.error(\n \"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.\",\n getValueDescriptorExpectingEnumForWarning(options)\n )\n : null != options &&\n \"string\" !== typeof options.crossOrigin &&\n console.error(\n \"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.\",\n getValueDescriptorExpectingObjectForWarning(options.crossOrigin)\n )\n : console.error(\n \"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n getValueDescriptorExpectingObjectForWarning(href)\n );\n \"string\" === typeof href &&\n (options\n ? ((options = options.crossOrigin),\n (options =\n \"string\" === typeof options\n ? \"use-credentials\" === options\n ? options\n : \"\"\n : void 0))\n : (options = null),\n Internals.d.C(href, options));\n };\n exports.prefetchDNS = function (href) {\n if (\"string\" !== typeof href || !href)\n console.error(\n \"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n getValueDescriptorExpectingObjectForWarning(href)\n );\n else if (1 < arguments.length) {\n var options = arguments[1];\n \"object\" === typeof options && options.hasOwnProperty(\"crossOrigin\")\n ? console.error(\n \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n getValueDescriptorExpectingEnumForWarning(options)\n )\n : console.error(\n \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n getValueDescriptorExpectingEnumForWarning(options)\n );\n }\n \"string\" === typeof href && Internals.d.D(href);\n };\n exports.preinit = function (href, options) {\n \"string\" === typeof href && href\n ? null == options || \"object\" !== typeof options\n ? console.error(\n \"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.\",\n getValueDescriptorExpectingEnumForWarning(options)\n )\n : \"style\" !== options.as &&\n \"script\" !== options.as &&\n console.error(\n 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are \"style\" and \"script\".',\n getValueDescriptorExpectingEnumForWarning(options.as)\n )\n : console.error(\n \"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n getValueDescriptorExpectingObjectForWarning(href)\n );\n if (\n \"string\" === typeof href &&\n options &&\n \"string\" === typeof options.as\n ) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n integrity =\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n fetchPriority =\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0;\n \"style\" === as\n ? Internals.d.S(\n href,\n \"string\" === typeof options.precedence\n ? options.precedence\n : void 0,\n {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority\n }\n )\n : \"script\" === as &&\n Internals.d.X(href, {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n };\n exports.preinitModule = function (href, options) {\n var encountered = \"\";\n (\"string\" === typeof href && href) ||\n (encountered +=\n \" The `href` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(href) +\n \".\");\n void 0 !== options && \"object\" !== typeof options\n ? (encountered +=\n \" The `options` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options) +\n \".\")\n : options &&\n \"as\" in options &&\n \"script\" !== options.as &&\n (encountered +=\n \" The `as` option encountered was \" +\n getValueDescriptorExpectingEnumForWarning(options.as) +\n \".\");\n if (encountered)\n console.error(\n \"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s\",\n encountered\n );\n else\n switch (\n ((encountered =\n options && \"string\" === typeof options.as ? options.as : \"script\"),\n encountered)\n ) {\n case \"script\":\n break;\n default:\n (encountered =\n getValueDescriptorExpectingEnumForWarning(encountered)),\n console.error(\n 'ReactDOM.preinitModule(): Currently the only supported \"as\" type for this function is \"script\" but received \"%s\" instead. This warning was generated for `href` \"%s\". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',\n encountered,\n href\n );\n }\n if (\"string\" === typeof href)\n if (\"object\" === typeof options && null !== options) {\n if (null == options.as || \"script\" === options.as)\n (encountered = getCrossOriginStringAs(\n options.as,\n options.crossOrigin\n )),\n Internals.d.M(href, {\n crossOrigin: encountered,\n integrity:\n \"string\" === typeof options.integrity\n ? options.integrity\n : void 0,\n nonce:\n \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n } else null == options && Internals.d.M(href);\n };\n exports.preload = function (href, options) {\n var encountered = \"\";\n (\"string\" === typeof href && href) ||\n (encountered +=\n \" The `href` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(href) +\n \".\");\n null == options || \"object\" !== typeof options\n ? (encountered +=\n \" The `options` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options) +\n \".\")\n : (\"string\" === typeof options.as && options.as) ||\n (encountered +=\n \" The `as` option encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options.as) +\n \".\");\n encountered &&\n console.error(\n 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel=\"preload\" as=\"...\" />` tag.%s',\n encountered\n );\n if (\n \"string\" === typeof href &&\n \"object\" === typeof options &&\n null !== options &&\n \"string\" === typeof options.as\n ) {\n encountered = options.as;\n var crossOrigin = getCrossOriginStringAs(\n encountered,\n options.crossOrigin\n );\n Internals.d.L(href, encountered, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n type: \"string\" === typeof options.type ? options.type : void 0,\n fetchPriority:\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0,\n referrerPolicy:\n \"string\" === typeof options.referrerPolicy\n ? options.referrerPolicy\n : void 0,\n imageSrcSet:\n \"string\" === typeof options.imageSrcSet\n ? options.imageSrcSet\n : void 0,\n imageSizes:\n \"string\" === typeof options.imageSizes\n ? options.imageSizes\n : void 0,\n media: \"string\" === typeof options.media ? options.media : void 0\n });\n }\n };\n exports.preloadModule = function (href, options) {\n var encountered = \"\";\n (\"string\" === typeof href && href) ||\n (encountered +=\n \" The `href` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(href) +\n \".\");\n void 0 !== options && \"object\" !== typeof options\n ? (encountered +=\n \" The `options` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options) +\n \".\")\n : options &&\n \"as\" in options &&\n \"string\" !== typeof options.as &&\n (encountered +=\n \" The `as` option encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options.as) +\n \".\");\n encountered &&\n console.error(\n 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel=\"modulepreload\" as=\"...\" />` tag.%s',\n encountered\n );\n \"string\" === typeof href &&\n (options\n ? ((encountered = getCrossOriginStringAs(\n options.as,\n options.crossOrigin\n )),\n Internals.d.m(href, {\n as:\n \"string\" === typeof options.as && \"script\" !== options.as\n ? options.as\n : void 0,\n crossOrigin: encountered,\n integrity:\n \"string\" === typeof options.integrity\n ? options.integrity\n : void 0\n }))\n : Internals.d.m(href));\n };\n exports.requestFormReset = function (form) {\n Internals.d.r(form);\n };\n exports.unstable_batchedUpdates = function (fn, a) {\n return fn(a);\n };\n exports.useFormState = function (action, initialState, permalink) {\n return resolveDispatcher().useFormState(action, initialState, permalink);\n };\n exports.useFormStatus = function () {\n return resolveDispatcher().useHostTransitionStatus();\n };\n exports.version = \"19.2.8\";\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","import { computePosition, arrow as arrow$2, autoPlacement as autoPlacement$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const openRef = useLatestRef(open);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n // The floating element's position may be recomputed while it's closed\n // but still mounted (such as when transitioning out). To ensure\n // `isPositioned` will be `false` initially on the next open, avoid\n // setting it to `true` when `open === false` (must be specified).\n isPositioned: openRef.current !== false\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef, openRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => {\n const result = offset$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => {\n const result = shift$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => {\n const result = limitShift$1(options);\n return {\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => {\n const result = flip$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => {\n const result = size$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => {\n const result = autoPlacement$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => {\n const result = hide$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => {\n const result = inline$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => {\n const result = arrow$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n","\"use client\";\nimport { createContext } from 'react';\n\nconst LayoutGroupContext = createContext({});\n\nexport { LayoutGroupContext };\n//# sourceMappingURL=LayoutGroupContext.mjs.map\n","\"use client\";\nimport { useRef } from 'react';\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nfunction useConstant(init) {\n const ref = useRef(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n\nexport { useConstant };\n//# sourceMappingURL=use-constant.mjs.map\n","const isBrowser = typeof window !== \"undefined\";\n\nexport { isBrowser };\n//# sourceMappingURL=is-browser.mjs.map\n","\"use client\";\nimport { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.mjs';\n\nconst useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n//# sourceMappingURL=use-isomorphic-effect.mjs.map\n","\"use client\";\nimport { createContext } from 'react';\n\n/**\n * @public\n */\nconst PresenceContext = \n/* @__PURE__ */ createContext(null);\n\nexport { PresenceContext };\n//# sourceMappingURL=PresenceContext.mjs.map\n","function addUniqueItem(arr, item) {\n if (arr.indexOf(item) === -1)\n arr.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n if (index > -1)\n arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem([...arr], fromIndex, toIndex) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n const [item] = arr.splice(fromIndex, 1);\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n//# sourceMappingURL=array.mjs.map\n","const clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\nexport { clamp };\n//# sourceMappingURL=clamp.mjs.map\n","function formatErrorMessage(message, errorCode) {\n return errorCode\n ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`\n : message;\n}\n\nexport { formatErrorMessage };\n//# sourceMappingURL=format-error-message.mjs.map\n","import { formatErrorMessage } from './format-error-message.mjs';\n\nlet warning = () => { };\nlet invariant = () => { };\nif (typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\") {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode));\n }\n };\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode));\n }\n };\n}\n\nexport { invariant, warning };\n//# sourceMappingURL=errors.mjs.map\n","const MotionGlobalConfig = {};\n\nexport { MotionGlobalConfig };\n//# sourceMappingURL=global-config.mjs.map\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nconst isNumericalString = (v) => /^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(v);\n\nexport { isNumericalString };\n//# sourceMappingURL=is-numerical-string.mjs.map\n","const isObject = (value) => typeof value === \"object\" && value !== null;\n\nexport { isObject };\n//# sourceMappingURL=is-object.mjs.map\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nconst isZeroValueString = (v) => /^0[^.\\s]+$/u.test(v);\n\nexport { isZeroValueString };\n//# sourceMappingURL=is-zero-value-string.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nfunction memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n//# sourceMappingURL=memo.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n//# sourceMappingURL=noop.mjs.map\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v)));\n\nexport { pipe };\n//# sourceMappingURL=pipe.mjs.map\n","/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst progress = (from, to, value) => {\n const range = to - from;\n return range ? (value - from) / range : 1;\n};\n\nexport { progress };\n//# sourceMappingURL=progress.mjs.map\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nclass SubscriptionManager {\n constructor() {\n this.subscriptions = [];\n }\n add(handler) {\n addUniqueItem(this.subscriptions, handler);\n return () => removeItem(this.subscriptions, handler);\n }\n notify(a, b, c) {\n const numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n }\n else {\n for (let i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n const handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n }\n getSize() {\n return this.subscriptions.length;\n }\n clear() {\n this.subscriptions.length = 0;\n }\n}\n\nexport { SubscriptionManager };\n//# sourceMappingURL=subscription-manager.mjs.map\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n/*#__NO_SIDE_EFFECTS__*/\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\n/*#__NO_SIDE_EFFECTS__*/\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n//# sourceMappingURL=time-conversion.mjs.map\n","/*\n Convert velocity into velocity per second\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst velocityPerSecond = (velocity, frameDuration) => frameDuration ? velocity * (1000 / frameDuration) : 0;\n\nexport { velocityPerSecond };\n//# sourceMappingURL=velocity-per-second.mjs.map\n","import { formatErrorMessage } from './format-error-message.mjs';\n\nconst warned = new Set();\nfunction hasWarned(message) {\n return warned.has(message);\n}\nfunction warnOnce(condition, message, errorCode) {\n if (condition || warned.has(message))\n return;\n console.warn(formatErrorMessage(message, errorCode));\n warned.add(message);\n}\n\nexport { hasWarned, warnOnce };\n//# sourceMappingURL=warn-once.mjs.map\n","import { noop } from '../noop.mjs';\n\n/*\n Bezier function generator\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticeably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0.0) {\n upperBound = currentT;\n }\n else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\n/*#__NO_SIDE_EFFECTS__*/\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2)\n return noop;\n const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n // If animation is at start/end, return t without easing\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n//# sourceMappingURL=cubic-bezier.mjs.map\n","// Accepts an easing function and returns a new one that outputs mirrored values for\n// the second half of the animation. Turns easeIn into easeInOut.\n/*#__NO_SIDE_EFFECTS__*/\nconst mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\nexport { mirrorEasing };\n//# sourceMappingURL=mirror.mjs.map\n","// Accepts an easing function and returns a new one that outputs reversed values.\n// Turns easeIn into easeOut.\n/*#__NO_SIDE_EFFECTS__*/\nconst reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\nexport { reverseEasing };\n//# sourceMappingURL=reverse.mjs.map\n","import { cubicBezier } from './cubic-bezier.mjs';\nimport { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);\nconst backIn = /*@__PURE__*/ reverseEasing(backOut);\nconst backInOut = /*@__PURE__*/ mirrorEasing(backIn);\n\nexport { backIn, backInOut, backOut };\n//# sourceMappingURL=back.mjs.map\n","import { backIn } from './back.mjs';\n\nconst anticipate = (p) => p >= 1\n ? 1\n : (p *= 2) < 1\n ? 0.5 * backIn(p)\n : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n\nexport { anticipate };\n//# sourceMappingURL=anticipate.mjs.map\n","import { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst circIn = (p) => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circIn);\n\nexport { circIn, circInOut, circOut };\n//# sourceMappingURL=circ.mjs.map\n","import { cubicBezier } from './cubic-bezier.mjs';\n\nconst easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);\nconst easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);\nconst easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);\n\nexport { easeIn, easeInOut, easeOut };\n//# sourceMappingURL=ease.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst isEasingArray = (ease) => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\n//# sourceMappingURL=is-easing-array.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n//# sourceMappingURL=is-bezier-definition.mjs.map\n","import { invariant } from '../../errors.mjs';\nimport { noop } from '../../noop.mjs';\nimport { anticipate } from '../anticipate.mjs';\nimport { backOut, backInOut, backIn } from '../back.mjs';\nimport { circOut, circInOut, circIn } from '../circ.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { easeOut, easeInOut, easeIn } from '../ease.mjs';\nimport { isBezierDefinition } from './is-bezier-definition.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst isValidEasing = (easing) => {\n return typeof easing === \"string\";\n};\nconst easingDefinitionToFunction = (definition) => {\n if (isBezierDefinition(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, \"cubic-bezier-length\");\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (isValidEasing(definition)) {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, \"invalid-easing-type\");\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n//# sourceMappingURL=map.mjs.map\n","const stepsOrder = [\n \"setup\", // Compute\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"preUpdate\", // Compute\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\n\nexport { stepsOrder };\n//# sourceMappingURL=order.mjs.map\n","function createRenderStep(runNextFrame) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n // Swap this frame and the next to avoid GC\n const prevFrame = thisFrame;\n thisFrame = nextFrame;\n nextFrame = prevFrame;\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n//# sourceMappingURL=render-step.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame);\n return acc;\n }, {});\n const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;\n const processBatch = () => {\n const useManualTiming = MotionGlobalConfig.useManualTiming;\n const timestamp = useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n if (!useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n }\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n setup.process(state);\n read.process(state);\n resolveKeyframes.process(state);\n preUpdate.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher };\n//# sourceMappingURL=batcher.mjs.map\n","import { noop } from 'motion-utils';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, frameSteps };\n//# sourceMappingURL=frame.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { frameData } from './frame.mjs';\n\nlet now;\nfunction clearTime() {\n now = undefined;\n}\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nconst time = {\n now: () => {\n if (now === undefined) {\n time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now());\n }\n return now;\n },\n set: (newTime) => {\n now = newTime;\n queueMicrotask(clearTime);\n },\n};\n\nexport { time };\n//# sourceMappingURL=sync-time.mjs.map\n","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = \n/*@__PURE__*/ checkStringStartsWith(\"--\");\nconst startsAsVariableToken = \n/*@__PURE__*/ checkStringStartsWith(\"var(--\");\nconst isCSSVariableToken = (value) => {\n const startsWithToken = startsAsVariableToken(value);\n if (!startsWithToken)\n return false;\n // Ensure any comments are stripped from the value as this can harm performance of the regex.\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim());\n};\nconst singleCssVariableRegex = /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;\n/**\n * Check if a value contains a CSS variable anywhere (e.g. inside calc()).\n * Unlike isCSSVariableToken which checks if the value IS a var() token,\n * this checks if the value CONTAINS var() somewhere in the string.\n */\nfunction containsCSSVariable(value) {\n if (typeof value !== \"string\")\n return false;\n // Strip comments to avoid false positives\n return value.split(\"/*\")[0].includes(\"var(--\");\n}\n\nexport { containsCSSVariable, isCSSVariableName, isCSSVariableToken };\n//# sourceMappingURL=is-css-variable.mjs.map\n","import { clamp } from 'motion-utils';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n//# sourceMappingURL=index.mjs.map\n","// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\n\nexport { sanitize };\n//# sourceMappingURL=sanitize.mjs.map\n","const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\n\nexport { floatRegex };\n//# sourceMappingURL=float-regex.mjs.map\n","function isNullish(v) {\n return v == null;\n}\n\nexport { isNullish };\n//# sourceMappingURL=is-nullish.mjs.map\n","const singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\n\nexport { singleColorRegex };\n//# sourceMappingURL=single-color-regex.mjs.map\n","import { floatRegex } from '../utils/float-regex.mjs';\nimport { isNullish } from '../utils/is-nullish.mjs';\nimport { singleColorRegex } from '../utils/single-color-regex.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((typeof v === \"string\" &&\n singleColorRegex.test(v) &&\n v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (typeof v !== \"string\")\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//# sourceMappingURL=utils.mjs.map\n","import { clamp } from 'motion-utils';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n parse: /*@__PURE__*/ 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//# sourceMappingURL=rgba.mjs.map\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n//# sourceMappingURL=hex.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit) => ({\n test: (v) => typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = /*@__PURE__*/ createUnitType(\"deg\");\nconst percent = /*@__PURE__*/ createUnitType(\"%\");\nconst px = /*@__PURE__*/ createUnitType(\"px\");\nconst vh = /*@__PURE__*/ createUnitType(\"vh\");\nconst vw = /*@__PURE__*/ createUnitType(\"vw\");\nconst progressPercentage = /*@__PURE__*/ (() => ({\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n}))();\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n//# sourceMappingURL=units.mjs.map\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst hsla = {\n test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n parse: /*@__PURE__*/ 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//# sourceMappingURL=hsla.mjs.map\n","import { 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 typeof v === \"string\"\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n getAnimatableNone: (v) => {\n const parsed = color.parse(v);\n parsed.alpha = 0;\n return color.transform(parsed);\n },\n};\n\nexport { color };\n//# sourceMappingURL=index.mjs.map\n","const colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\n\nexport { colorRegex };\n//# sourceMappingURL=color-regex.mjs.map\n","import { color } from '../color/index.mjs';\nimport { colorRegex } from '../utils/color-regex.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\n\nfunction test(v) {\n return (isNaN(v) &&\n typeof v === \"string\" &&\n (v.match(floatRegex)?.length || 0) +\n (v.match(colorRegex)?.length || 0) >\n 0);\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: [],\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n }\n else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n }\n else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction buildTransformer({ split, types }) {\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== undefined) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n }\n else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n }\n else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nfunction createTransformer(source) {\n return buildTransformer(analyseComplexValue(source));\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;\n/**\n * Convert a parsed value to its zero equivalent, but preserve numbers\n * that act as divisors in CSS calc() expressions.\n *\n * analyseComplexValue extracts numbers from CSS strings and puts the\n * surrounding text into a `split` template array. For example:\n * \"calc(var(--gap) / 5)\" → values: [var(--gap), 5]\n * split: [\"calc(\", \" / \", \")\"]\n *\n * When building a zero-equivalent for animation, naively zeroing all\n * numbers turns the divisor into 0 → \"calc(var(--gap) / 0)\" → NaN.\n * We detect this by checking whether the text preceding a number\n * (split[i]) ends with \"/\" — the CSS calc division operator.\n */\nconst convertToZero = (value, splitBefore) => {\n if (typeof value === \"number\") {\n return splitBefore?.trim().endsWith(\"/\") ? value : 0;\n }\n return convertNumbersToZero(value);\n};\nfunction getAnimatableNone(v) {\n const info = analyseComplexValue(v);\n const transformer = buildTransformer(info);\n return transformer(info.values.map((value, i) => convertToZero(value, info.split[i])));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n//# sourceMappingURL=index.mjs.map\n","// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n//# sourceMappingURL=hsla-to-rgba.mjs.map\n","function mixImmediate(a, b) {\n return (p) => (p > 0 ? b : a);\n}\n\nexport { mixImmediate };\n//# sourceMappingURL=immediate.mjs.map\n","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mixNumber = (from, to, progress) => {\n return from + (to - from) * progress;\n};\n\nexport { mixNumber };\n//# sourceMappingURL=number.mjs.map\n","import { warning } from 'motion-utils';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\nimport { hslaToRgba } from '../../value/types/color/hsla-to-rgba.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber } from './number.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const expo = v * (to * to - fromExpo) + fromExpo;\n return expo < 0 ? 0 : Math.sqrt(expo);\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`, \"color-not-animatable\");\n if (!Boolean(type))\n return false;\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to);\n }\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n//# sourceMappingURL=color.mjs.map\n","const invisibleValues = new Set([\"none\", \"hidden\"]);\n/**\n * Returns a function that, when provided a progress value between 0 and 1,\n * will return the \"none\" or \"hidden\" string only when the progress is that of\n * the origin or target.\n */\nfunction mixVisibility(origin, target) {\n if (invisibleValues.has(origin)) {\n return (p) => (p <= 0 ? origin : target);\n }\n else {\n return (p) => (p >= 1 ? target : origin);\n }\n}\n\nexport { invisibleValues, mixVisibility };\n//# sourceMappingURL=visibility.mjs.map\n","import { pipe, warning } from 'motion-utils';\nimport { isCSSVariableToken } from '../../animation/utils/is-css-variable.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../../value/types/complex/index.mjs';\nimport { mixColor } from './color.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber as mixNumber$1 } from './number.mjs';\nimport { invisibleValues, mixVisibility } from './visibility.mjs';\n\nfunction mixNumber(a, b) {\n return (p) => mixNumber$1(a, b, p);\n}\nfunction getMixer(a) {\n if (typeof a === \"number\") {\n return mixNumber;\n }\n else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex;\n }\n else if (Array.isArray(a)) {\n return mixArray;\n }\n else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject;\n }\n return mixImmediate;\n}\nfunction mixArray(a, b) {\n const output = [...a];\n const numValues = output.length;\n const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n return (p) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p);\n }\n return output;\n };\n}\nfunction mixObject(a, b) {\n const output = { ...a, ...b };\n const blendValue = {};\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(a[key], b[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 matchOrder(origin, target) {\n const orderedOrigin = [];\n const pointers = { color: 0, var: 0, number: 0 };\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i];\n const originIndex = origin.indexes[type][pointers[type]];\n const originValue = origin.values[originIndex] ?? 0;\n orderedOrigin[i] = originValue;\n pointers[type]++;\n }\n return orderedOrigin;\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length;\n if (canInterpolate) {\n if ((invisibleValues.has(origin) &&\n !targetStats.values.length) ||\n (invisibleValues.has(target) &&\n !originStats.values.length)) {\n return mixVisibility(origin, target);\n }\n return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, \"complex-values-different\");\n return mixImmediate(origin, target);\n }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n//# sourceMappingURL=complex.mjs.map\n","import { getMixer } from './complex.mjs';\nimport { mixNumber } from './number.mjs';\n\nfunction mix(from, to, p) {\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof p === \"number\") {\n return mixNumber(from, to, p);\n }\n const mixer = getMixer(from);\n return mixer(from, to);\n}\n\nexport { mix };\n//# sourceMappingURL=index.mjs.map\n","import { time } from '../../frameloop/sync-time.mjs';\nimport { frameData, cancelFrame, frame } from '../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n };\n};\n\nexport { frameloopDriver };\n//# sourceMappingURL=frame.mjs.map\n","const generateLinearEasing = (easing, duration, // as milliseconds\nresolution = 10 // as milliseconds\n) => {\n let points = \"\";\n const numPoints = Math.max(Math.round(duration / resolution), 2);\n for (let i = 0; i < numPoints; i++) {\n points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + \", \";\n }\n return `linear(${points.substring(0, points.length - 2)})`;\n};\n\nexport { generateLinearEasing };\n//# sourceMappingURL=linear.mjs.map\n","/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n//# sourceMappingURL=calc-duration.mjs.map\n","import { millisecondsToSeconds } from 'motion-utils';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nfunction createGeneratorEasing(options, scale = 100, createGenerator) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] });\n const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n return {\n type: \"keyframes\",\n ease: (progress) => {\n return generator.next(duration * progress).value / scale;\n },\n duration: millisecondsToSeconds(duration),\n };\n}\n\nexport { createGeneratorEasing };\n//# sourceMappingURL=create-generator-easing.mjs.map\n","import { millisecondsToSeconds, clamp, secondsToMilliseconds, warning } from 'motion-utils';\nimport { generateLinearEasing } from '../waapi/utils/linear.mjs';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './utils/calc-duration.mjs';\nimport { createGeneratorEasing } from './utils/create-generator-easing.mjs';\n\nconst springDefaults = {\n // Default spring physics\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n velocity: 0.0,\n // Default duration/bounce-based options\n duration: 800, // in ms\n bounce: 0.3,\n visualDuration: 0.3, // in seconds\n // Rest thresholds\n restSpeed: {\n granular: 0.01,\n default: 2,\n },\n restDelta: {\n granular: 0.005,\n default: 0.5,\n },\n // Limits\n minDuration: 0.01, // in seconds\n maxDuration: 10.0, // in seconds\n minDamping: 0.05,\n maxDamping: 1,\n};\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\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}\n/**\n * This is ported from the Framer implementation of duration-based spring resolution.\n */\nconst safeMin = 0.001;\nfunction findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\", \"spring-duration-limit\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);\n duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\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 durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = {\n velocity: springDefaults.velocity,\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n mass: springDefaults.mass,\n isResolvedFromDuration: false,\n ...options,\n };\n // stiffness/damping/mass overrides duration/bounce\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n // Time-defined springs should ignore inherited velocity.\n // Velocity from interrupted animations can cause findSpring()\n // to compute wildly different spring parameters, leading to\n // massive oscillation on small-range animations.\n springOptions.velocity = 0;\n if (options.visualDuration) {\n const visualDuration = options.visualDuration;\n const root = (2 * Math.PI) / (visualDuration * 1.2);\n const stiffness = root * root;\n const damping = 2 *\n clamp(0.05, 1, 1 - (options.bounce || 0)) *\n Math.sqrt(stiffness);\n springOptions = {\n ...springOptions,\n mass: springDefaults.mass,\n stiffness,\n damping,\n };\n }\n else {\n const derived = findSpring({ ...options, velocity: 0 });\n springOptions = {\n ...springOptions,\n ...derived,\n mass: springDefaults.mass,\n };\n springOptions.isResolvedFromDuration = true;\n }\n }\n return springOptions;\n}\nfunction spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {\n const options = typeof optionsOrVisualDuration !== \"object\"\n ? {\n visualDuration: optionsOrVisualDuration,\n keyframes: [0, 1],\n bounce,\n }\n : optionsOrVisualDuration;\n let { restSpeed, restDelta } = options;\n const origin = options.keyframes[0];\n const target = options.keyframes[options.keyframes.length - 1];\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = { done: false, value: origin };\n const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({\n ...options,\n velocity: -millisecondsToSeconds(options.velocity || 0),\n });\n const initialVelocity = velocity || 0.0;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const initialDelta = target - origin;\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5;\n restSpeed || (restSpeed = isGranularScale\n ? springDefaults.restSpeed.granular\n : springDefaults.restSpeed.default);\n restDelta || (restDelta = isGranularScale\n ? springDefaults.restDelta.granular\n : springDefaults.restDelta.default);\n let resolveSpring;\n let resolveVelocity;\n // Underdamped coefficients, hoisted for use in the inlined next() hot path\n let angularFreq;\n let A;\n let sinCoeff;\n let cosCoeff;\n if (dampingRatio < 1) {\n angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n A =\n (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq;\n // Underdamped spring\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (target -\n envelope *\n (A * Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n // Analytical derivative of underdamped spring (px/ms)\n sinCoeff =\n dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq;\n cosCoeff =\n dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq;\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return envelope *\n (sinCoeff * Math.sin(angularFreq * t) +\n cosCoeff * Math.cos(angularFreq * t));\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t);\n // Analytical derivative of critically damped spring (px/ms)\n const C = initialVelocity + undampedAngularFreq * initialDelta;\n resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) *\n (undampedAngularFreq * C * t - initialVelocity);\n }\n else {\n // Overdamped spring\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (target -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n // Analytical derivative of overdamped spring (px/ms)\n const P = (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n dampedAngularFreq;\n const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq;\n const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq;\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return envelope *\n (sinhCoeff * Math.sinh(freqForT) +\n coshCoeff * Math.cosh(freqForT));\n };\n }\n const generator = {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n velocity: (t) => secondsToMilliseconds(resolveVelocity(t)),\n next: (t) => {\n /**\n * For underdamped physics springs we need both position and\n * velocity each tick. Compute shared trig values once to avoid\n * duplicate Math.exp/sin/cos calls on the hot path.\n */\n if (!isResolvedFromDuration && dampingRatio < 1) {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const sin = Math.sin(angularFreq * t);\n const cos = Math.cos(angularFreq * t);\n const current = target -\n envelope *\n (A * sin + initialDelta * cos);\n const currentVelocity = secondsToMilliseconds(envelope *\n (sinCoeff * sin + cosCoeff * cos));\n state.done =\n Math.abs(currentVelocity) <= restSpeed &&\n Math.abs(target - current) <= restDelta;\n state.value = state.done ? target : current;\n return state;\n }\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n const currentVelocity = secondsToMilliseconds(resolveVelocity(t));\n state.done =\n Math.abs(currentVelocity) <= restSpeed &&\n Math.abs(target - current) <= restDelta;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? target : current;\n return state;\n },\n toString: () => {\n const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30);\n return calculatedDuration + \"ms \" + easing;\n },\n toTransition: () => { },\n };\n return generator;\n}\nspring.applyToOptions = (options) => {\n const generatorOptions = createGeneratorEasing(options, 100, spring);\n options.ease = generatorOptions.ease;\n options.duration = secondsToMilliseconds(generatorOptions.duration);\n options.type = \"keyframes\";\n return options;\n};\n\nexport { spring };\n//# sourceMappingURL=spring.mjs.map\n","import { velocityPerSecond } from 'motion-utils';\n\nconst velocitySampleDuration = 5; // ms\nfunction getGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { getGeneratorVelocity };\n//# sourceMappingURL=velocity.mjs.map\n","import { spring } from './spring.mjs';\nimport { getGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n//# sourceMappingURL=inertia.mjs.map\n","import { invariant, clamp, MotionGlobalConfig, noop, pipe, progress } from 'motion-utils';\nimport { mix } from './mix/index.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revisit this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\", \"range-length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n if (inputLength === 2 && output[0] === output[1])\n return () => output[1];\n const isZeroDeltaRange = input[0] === input[1];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n if (isZeroDeltaRange && v < input[0])\n return output[0];\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n//# sourceMappingURL=interpolate.mjs.map\n","import { progress } from 'motion-utils';\nimport { mixNumber } from '../../../utils/mix/number.mjs';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mixNumber(min, 1, offsetProgress));\n }\n}\n\nexport { fillOffset };\n//# sourceMappingURL=fill.mjs.map\n","import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\nexport { defaultOffset };\n//# sourceMappingURL=default.mjs.map\n","function convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\n//# sourceMappingURL=time.mjs.map\n","import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n//# sourceMappingURL=keyframes.mjs.map\n","const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe, speed = 1) {\n const resolvedKeyframes = keyframes.filter(isNotNull);\n const useFirstKeyframe = speed < 0 || (repeat && repeatType !== \"loop\" && repeat % 2 === 1);\n const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1;\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n//# sourceMappingURL=get-final.mjs.map\n","import { inertia } from '../generators/inertia.mjs';\nimport { keyframes } from '../generators/keyframes.mjs';\nimport { spring } from '../generators/spring.mjs';\n\nconst transitionTypeMap = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes: keyframes,\n spring,\n};\nfunction replaceTransitionType(transition) {\n if (typeof transition.type === \"string\") {\n transition.type = transitionTypeMap[transition.type];\n }\n}\n\nexport { replaceTransitionType };\n//# sourceMappingURL=replace-transition-type.mjs.map\n","class WithPromise {\n constructor() {\n this.updateFinished();\n }\n get finished() {\n return this._finished;\n }\n updateFinished() {\n this._finished = new Promise((resolve) => {\n this.resolve = resolve;\n });\n }\n notifyFinished() {\n this.resolve();\n }\n /**\n * Allows the animation to be awaited.\n *\n * @deprecated Use `finished` instead.\n */\n then(onResolve, onReject) {\n return this.finished.then(onResolve, onReject);\n }\n}\n\nexport { WithPromise };\n//# sourceMappingURL=WithPromise.mjs.map\n","import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/frame.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { getGeneratorVelocity } from './generators/utils/velocity.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nclass JSAnimation extends WithPromise {\n constructor(options) {\n super();\n this.state = \"idle\";\n this.startTime = null;\n this.isStopped = false;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * Reusable state object for the delay phase to avoid\n * allocating a new object every frame.\n */\n this.delayState = {\n done: false,\n value: undefined,\n };\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\n }\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n this.options.onStop?.();\n };\n this.options = options;\n this.initAnimation();\n this.play();\n if (options.autoplay === false)\n this.pause();\n }\n initAnimation() {\n const { options } = this;\n replaceTransitionType(options);\n const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n let { keyframes: keyframes$1 } = options;\n const generatorFactory = type || keyframes;\n if (process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframes) {\n invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, \"spring-two-frames\");\n }\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n this.calculatedDuration = calculatedDuration;\n this.resolvedDuration = calculatedDuration + repeatDelay;\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n this.generator = generator;\n }\n updateTime(timestamp) {\n const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime;\n }\n }\n tick(timestamp, sample = false) {\n const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;\n if (this.startTime === null)\n return generator.next(0);\n const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n }\n else {\n this.updateTime(timestamp);\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n const isInDelayPhase = this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n let state;\n if (isInDelayPhase) {\n this.delayState.value = keyframes[0];\n state = this.delayState;\n }\n else {\n state = frameGenerator.next(elapsed);\n }\n if (mixKeyframes && !isInDelayPhase) {\n state.value = mixKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.finished.then(resolve, reject);\n }\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration);\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n }\n if (this.driver) {\n this.driver.start(false);\n }\n else {\n this.startTime = 0;\n this.state = \"paused\";\n this.holdTime = newTime;\n this.tick(newTime);\n }\n }\n /**\n * Returns the generator's velocity at the current time in units/second.\n * Uses the analytical derivative when available (springs), avoiding\n * the MotionValue's frame-dependent velocity estimation.\n */\n getGeneratorVelocity() {\n const t = this.currentTime;\n if (t <= 0)\n return this.options.velocity || 0;\n if (this.generator.velocity) {\n return this.generator.velocity(t);\n }\n // Fallback: finite difference\n const current = this.generator.next(t).value;\n return getGeneratorVelocity((s) => this.generator.next(s).value, t, current);\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n const hasChanged = this.playbackSpeed !== newSpeed;\n if (hasChanged && this.driver) {\n this.updateTime(time.now());\n }\n this.playbackSpeed = newSpeed;\n if (hasChanged && this.driver) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n this.options.onPlay?.();\n const now = this.driver.now();\n if (this.state === \"finished\") {\n this.updateFinished();\n this.startTime = now;\n }\n else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime) {\n this.startTime = startTime ?? now;\n }\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration;\n }\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n this.state = \"paused\";\n this.updateTime(time.now());\n this.holdTime = this.currentTime;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.notifyFinished();\n this.teardown();\n this.state = \"finished\";\n this.options.onComplete?.();\n }\n cancel() {\n this.holdTime = null;\n this.startTime = 0;\n this.tick(0);\n this.teardown();\n this.options.onCancel?.();\n }\n teardown() {\n this.state = \"idle\";\n this.stopDriver();\n this.startTime = this.holdTime = null;\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(sampleTime) {\n this.startTime = 0;\n return this.tick(sampleTime, true);\n }\n attachTimeline(timeline) {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\";\n this.options.ease = \"linear\";\n this.initAnimation();\n }\n this.driver?.stop();\n return timeline.observe(this);\n }\n}\n// Legacy function support\nfunction animateValue(options) {\n return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue };\n//# sourceMappingURL=JSAnimation.mjs.map\n","function fillWildcards(keyframes) {\n for (let i = 1; i < keyframes.length; i++) {\n keyframes[i] ?? (keyframes[i] = keyframes[i - 1]);\n }\n}\n\nexport { fillWildcards };\n//# sourceMappingURL=fill-wildcards.mjs.map\n","const radToDeg = (rad) => (rad * 180) / Math.PI;\nconst rotate = (v) => {\n const angle = radToDeg(Math.atan2(v[1], v[0]));\n return rebaseAngle(angle);\n};\nconst matrix2dParsers = {\n x: 4,\n y: 5,\n translateX: 4,\n translateY: 5,\n scaleX: 0,\n scaleY: 3,\n scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2,\n rotate,\n rotateZ: rotate,\n skewX: (v) => radToDeg(Math.atan(v[1])),\n skewY: (v) => radToDeg(Math.atan(v[2])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2,\n};\nconst rebaseAngle = (angle) => {\n angle = angle % 360;\n if (angle < 0)\n angle += 360;\n return angle;\n};\nconst rotateZ = rotate;\nconst scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]);\nconst scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]);\nconst matrix3dParsers = {\n x: 12,\n y: 13,\n z: 14,\n translateX: 12,\n translateY: 13,\n translateZ: 14,\n scaleX,\n scaleY,\n scale: (v) => (scaleX(v) + scaleY(v)) / 2,\n rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))),\n rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))),\n rotateZ,\n rotate: rotateZ,\n skewX: (v) => radToDeg(Math.atan(v[4])),\n skewY: (v) => radToDeg(Math.atan(v[1])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2,\n};\nfunction defaultTransformValue(name) {\n return name.includes(\"scale\") ? 1 : 0;\n}\nfunction parseValueFromTransform(transform, name) {\n if (!transform || transform === \"none\") {\n return defaultTransformValue(name);\n }\n const matrix3dMatch = transform.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);\n let parsers;\n let match;\n if (matrix3dMatch) {\n parsers = matrix3dParsers;\n match = matrix3dMatch;\n }\n else {\n const matrix2dMatch = transform.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);\n parsers = matrix2dParsers;\n match = matrix2dMatch;\n }\n if (!match) {\n return defaultTransformValue(name);\n }\n const valueParser = parsers[name];\n const values = match[1].split(\",\").map(convertTransformToNumber);\n return typeof valueParser === \"function\"\n ? valueParser(values)\n : values[valueParser];\n}\nconst readTransformValue = (instance, name) => {\n const { transform = \"none\" } = getComputedStyle(instance);\n return parseValueFromTransform(transform, name);\n};\nfunction convertTransformToNumber(value) {\n return parseFloat(value.trim());\n}\n\nexport { defaultTransformValue, parseValueFromTransform, readTransformValue };\n//# sourceMappingURL=parse-transform.mjs.map\n","/**\n * Generate a list of every possible transform key.\n */\nconst transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n *\n * `pathRotation` is a transform for routing purposes (skipped from raw\n * style application, wired to the transform composite, flags transform\n * dirty) but is intentionally NOT in `transformPropOrder` — it is\n * composed onto `rotate` at the build sites, not serialized in its own\n * slot, and must stay out of the order-array consumers (parse-transform,\n * unit-conversion, keys-position).\n */\nconst transformProps = /*@__PURE__*/ (() => new Set([...transformPropOrder, \"pathRotation\"]))();\n\nexport { transformPropOrder, transformProps };\n//# sourceMappingURL=keys-transform.mjs.map\n","import { parseValueFromTransform } from '../../../render/dom/parse-transform.mjs';\nimport { transformPropOrder } from '../../../render/utils/keys-transform.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst isNumOrPxType = (v) => v === number || v === px;\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n return removedTransforms;\n}\nconst positionalValues = {\n // Dimensions\n width: ({ x }, { paddingLeft = \"0\", paddingRight = \"0\", boxSizing }) => {\n const width = x.max - x.min;\n return boxSizing === \"border-box\"\n ? width\n : width - parseFloat(paddingLeft) - parseFloat(paddingRight);\n },\n height: ({ y }, { paddingTop = \"0\", paddingBottom = \"0\", boxSizing }) => {\n const height = y.max - y.min;\n return boxSizing === \"border-box\"\n ? height\n : height - parseFloat(paddingTop) - parseFloat(paddingBottom);\n },\n top: (_bbox, { top }) => parseFloat(top),\n left: (_bbox, { left }) => parseFloat(left),\n bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min),\n right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min),\n // Transform\n x: (_bbox, { transform }) => parseValueFromTransform(transform, \"x\"),\n y: (_bbox, { transform }) => parseValueFromTransform(transform, \"y\"),\n};\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x;\npositionalValues.translateY = positionalValues.y;\n\nexport { isNumOrPxType, positionalValues, removeNonTranslationalTransform };\n//# sourceMappingURL=unit-conversion.mjs.map\n","import { fillWildcards } from './utils/fill-wildcards.mjs';\nimport { removeNonTranslationalTransform } from './utils/unit-conversion.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst toResolve = new Set();\nlet isScheduled = false;\nlet anyNeedsMeasurement = false;\nlet isForced = false;\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement);\n const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element));\n const transformsToRestore = new Map();\n /**\n * Write pass\n * If we're measuring elements we want to remove bounding box-changing transforms.\n */\n elementsToMeasure.forEach((element) => {\n const removedTransforms = removeNonTranslationalTransform(element);\n if (!removedTransforms.length)\n return;\n transformsToRestore.set(element, removedTransforms);\n element.render();\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureInitialState());\n // Write\n elementsToMeasure.forEach((element) => {\n element.render();\n const restore = transformsToRestore.get(element);\n if (restore) {\n restore.forEach(([key, value]) => {\n element.getValue(key)?.set(value);\n });\n }\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureEndState());\n // Write\n resolversToMeasure.forEach((resolver) => {\n if (resolver.suspendedScrollY !== undefined) {\n window.scrollTo(0, resolver.suspendedScrollY);\n }\n });\n }\n anyNeedsMeasurement = false;\n isScheduled = false;\n toResolve.forEach((resolver) => resolver.complete(isForced));\n toResolve.clear();\n}\nfunction readAllKeyframes() {\n toResolve.forEach((resolver) => {\n resolver.readKeyframes();\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true;\n }\n });\n}\nfunction flushKeyframeResolvers() {\n isForced = true;\n readAllKeyframes();\n measureAllKeyframes();\n isForced = false;\n}\nclass KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) {\n this.state = \"pending\";\n /**\n * Track whether this resolver is async. If it is, it'll be added to the\n * resolver queue and flushed in the next frame. Resolvers that aren't going\n * to trigger read/write thrashing don't need to be async.\n */\n this.isAsync = false;\n /**\n * Track whether this resolver needs to perform a measurement\n * to resolve its keyframes.\n */\n this.needsMeasurement = false;\n this.unresolvedKeyframes = [...unresolvedKeyframes];\n this.onComplete = onComplete;\n this.name = name;\n this.motionValue = motionValue;\n this.element = element;\n this.isAsync = isAsync;\n }\n scheduleResolve() {\n this.state = \"scheduled\";\n if (this.isAsync) {\n toResolve.add(this);\n if (!isScheduled) {\n isScheduled = true;\n frame.read(readAllKeyframes);\n frame.resolveKeyframes(measureAllKeyframes);\n }\n }\n else {\n this.readKeyframes();\n this.complete();\n }\n }\n readKeyframes() {\n const { unresolvedKeyframes, name, element, motionValue } = this;\n // If initial keyframe is null we need to read it from the DOM\n if (unresolvedKeyframes[0] === null) {\n const currentValue = motionValue?.get();\n // TODO: This doesn't work if the final keyframe is a wildcard\n const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue;\n }\n else if (element && name) {\n const valueAsRead = element.readValue(name, finalKeyframe);\n if (valueAsRead !== undefined && valueAsRead !== null) {\n unresolvedKeyframes[0] = valueAsRead;\n }\n }\n if (unresolvedKeyframes[0] === undefined) {\n unresolvedKeyframes[0] = finalKeyframe;\n }\n if (motionValue && currentValue === undefined) {\n motionValue.set(unresolvedKeyframes[0]);\n }\n }\n fillWildcards(unresolvedKeyframes);\n }\n setFinalKeyframe() { }\n measureInitialState() { }\n renderEndStyles() { }\n measureEndState() { }\n complete(isForcedComplete = false) {\n this.state = \"complete\";\n this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete);\n toResolve.delete(this);\n }\n cancel() {\n if (this.state === \"scheduled\") {\n toResolve.delete(this);\n this.state = \"pending\";\n }\n }\n resume() {\n if (this.state === \"pending\")\n this.scheduleResolve();\n }\n}\n\nexport { KeyframeResolver, flushKeyframeResolvers };\n//# sourceMappingURL=KeyframesResolver.mjs.map\n","const isCSSVar = (name) => name.startsWith(\"--\");\n\nexport { isCSSVar };\n//# sourceMappingURL=is-css-var.mjs.map\n","import { isCSSVar } from './is-css-var.mjs';\n\nfunction setStyle(element, name, value) {\n isCSSVar(name)\n ? element.style.setProperty(name, value)\n : (element.style[name] = value);\n}\n\nexport { setStyle };\n//# sourceMappingURL=style-set.mjs.map\n","/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nconst supportsFlags = {};\n\nexport { supportsFlags };\n//# sourceMappingURL=flags.mjs.map\n","import { memo } from 'motion-utils';\nimport { supportsFlags } from './flags.mjs';\n\nfunction memoSupports(callback, supportsFlag) {\n const memoized = memo(callback);\n return () => supportsFlags[supportsFlag] ?? memoized();\n}\n\nexport { memoSupports };\n//# sourceMappingURL=memo.mjs.map\n","import { memoSupports } from './memo.mjs';\n\nconst supportsScrollTimeline = /* @__PURE__ */ memoSupports(() => window.ScrollTimeline !== undefined, \"scrollTimeline\");\nconst supportsViewTimeline = /* @__PURE__ */ memoSupports(() => window.ViewTimeline !== undefined, \"viewTimeline\");\n\nexport { supportsScrollTimeline, supportsViewTimeline };\n//# sourceMappingURL=scroll-timeline.mjs.map\n","import { memoSupports } from './memo.mjs';\n\nconst supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {\n try {\n document\n .createElement(\"div\")\n .animate({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n }\n catch (e) {\n return false;\n }\n return true;\n}, \"linearEasing\");\n\nexport { supportsLinearEasing };\n//# sourceMappingURL=linear-easing.mjs.map\n","const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\n\nexport { cubicBezierAsString };\n//# sourceMappingURL=cubic-bezier.mjs.map\n","import { cubicBezierAsString } from './cubic-bezier.mjs';\n\nconst supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\n\nexport { supportedWaapiEasing };\n//# sourceMappingURL=supported.mjs.map\n","import { isBezierDefinition } from 'motion-utils';\nimport { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { generateLinearEasing } from '../utils/linear.mjs';\nimport { cubicBezierAsString } from './cubic-bezier.mjs';\nimport { supportedWaapiEasing } from './supported.mjs';\n\nfunction mapEasingToNativeEasing(easing, duration) {\n if (!easing) {\n return undefined;\n }\n else if (typeof easing === \"function\") {\n return supportsLinearEasing()\n ? generateLinearEasing(easing, duration)\n : \"ease-out\";\n }\n else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing);\n }\n else if (Array.isArray(easing)) {\n return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) ||\n supportedWaapiEasing.easeOut);\n }\n else {\n return supportedWaapiEasing[easing];\n }\n}\n\nexport { mapEasingToNativeEasing };\n//# sourceMappingURL=map-easing.mjs.map\n","import { mapEasingToNativeEasing } from './easing/map-easing.mjs';\n\nfunction startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = \"loop\", ease = \"easeOut\", times, } = {}, pseudoElement = undefined) {\n const keyframeOptions = {\n [valueName]: keyframes,\n };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease, duration);\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n const options = {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n };\n if (pseudoElement)\n options.pseudoElement = pseudoElement;\n return element.animate(keyframeOptions, options);\n}\n\nexport { startWaapiAnimation };\n//# sourceMappingURL=start-waapi-animation.mjs.map\n","function isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\n//# sourceMappingURL=is-generator.mjs.map\n","import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { isGenerator } from '../../generators/utils/is-generator.mjs';\n\nfunction applyGeneratorOptions({ type, ...options }) {\n if (isGenerator(type) && supportsLinearEasing()) {\n return type.applyToOptions(options);\n }\n else {\n options.duration ?? (options.duration = 300);\n options.ease ?? (options.ease = \"easeOut\");\n }\n return options;\n}\n\nexport { applyGeneratorOptions };\n//# sourceMappingURL=apply-generator.mjs.map\n","import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n /**\n * Tracks a manually-set start time that takes precedence over WAAPI's\n * dynamic startTime. This is cleared when play() or time setter is called,\n * allowing WAAPI to take over timing.\n */\n this.manualStartTime = null;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `Mini animate() doesn't support \"type\" as a string.`, \"mini-spring\");\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n * We always do this, even when a motion value is present, to prevent\n * a visual flash in Firefox where the WAAPI animation's fill is removed\n * during cancel() before the scheduled render can apply the correct value.\n */\n setStyle(element, name, keyframe);\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n }\n play() {\n if (this.isStopped)\n return;\n this.manualStartTime = null;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n const element = this.options?.element;\n if (!this.isPseudoElement && element?.isConnected) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n const wasFinished = this.finishedTime !== null;\n this.manualStartTime = null;\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n if (wasFinished) {\n this.animation.pause();\n }\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return this.manualStartTime ?? Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.manualStartTime = this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n if (rangeStart)\n this.animation.rangeStart = rangeStart;\n if (rangeEnd)\n this.animation.rangeEnd = rangeEnd;\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n//# sourceMappingURL=NativeAnimation.mjs.map\n","import { circInOut, backInOut, anticipate } from 'motion-utils';\n\nconst unsupportedEasingFunctions = {\n anticipate,\n backInOut,\n circInOut,\n};\nfunction isUnsupportedEase(key) {\n return key in unsupportedEasingFunctions;\n}\nfunction replaceStringEasing(transition) {\n if (typeof transition.ease === \"string\" &&\n isUnsupportedEase(transition.ease)) {\n transition.ease = unsupportedEasingFunctions[transition.ease];\n }\n}\n\nexport { replaceStringEasing };\n//# sourceMappingURL=unsupported-easing.mjs.map\n","import { clamp } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { NativeAnimation } from './NativeAnimation.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { replaceStringEasing } from './waapi/utils/unsupported-easing.mjs';\n\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\nclass NativeAnimationExtended extends NativeAnimation {\n constructor(options) {\n /**\n * The base NativeAnimation function only supports a subset\n * of Motion easings, and WAAPI also only supports some\n * easing functions via string/cubic-bezier definitions.\n *\n * This function replaces those unsupported easing functions\n * with a JS easing function. This will later get compiled\n * to a linear() easing function.\n */\n replaceStringEasing(options);\n /**\n * Ensure we replace the transition type with a generator function\n * before passing to WAAPI.\n *\n * TODO: Does this have a better home? It could be shared with\n * JSAnimation.\n */\n replaceTransitionType(options);\n super(options);\n /**\n * Only set startTime when the animation should autoplay.\n * Setting startTime on a paused WAAPI animation unpauses it\n * (per the WAAPI spec), which breaks autoplay: false.\n */\n if (options.startTime !== undefined && options.autoplay !== false) {\n this.startTime = options.startTime;\n }\n this.options = options;\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read committed styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n updateMotionValue(value) {\n const { motionValue, onUpdate, onComplete, element, ...options } = this.options;\n if (!motionValue)\n return;\n if (value !== undefined) {\n motionValue.set(value);\n return;\n }\n const sampleAnimation = new JSAnimation({\n ...options,\n autoplay: false,\n });\n /**\n * Use wall-clock elapsed time for sampling.\n * Under CPU load, WAAPI's currentTime may not reflect actual\n * elapsed time, causing incorrect sampling and visual jumps.\n */\n const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);\n const delta = clamp(0, sampleDelta, sampleTime - sampleDelta);\n const current = sampleAnimation.sample(sampleTime).value;\n /**\n * Write the estimated value to inline style so it persists\n * after cancel(), covering the async gap before the next\n * animation starts.\n */\n const { name } = this.options;\n if (element && name)\n setStyle(element, name, current);\n motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta);\n sampleAnimation.stop();\n }\n}\n\nexport { NativeAnimationExtended };\n//# sourceMappingURL=NativeAnimationExtended.mjs.map\n","import { complex } from '../../value/types/complex/index.mjs';\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nconst isAnimatable = (value, name) => {\n // If the list of keys that might be non-animatable grows, replace with Set\n if (name === \"zIndex\")\n return false;\n // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n if (typeof value === \"number\" || Array.isArray(value))\n return true;\n if (typeof value === \"string\" && // It's animatable if we have a string\n (complex.test(value) || value === \"0\") && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true;\n }\n return false;\n};\n\nexport { isAnimatable };\n//# sourceMappingURL=is-animatable.mjs.map\n","import { warning } from 'motion-utils';\nimport { isGenerator } from '../generators/utils/is-generator.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\n\nfunction hasKeyframesChanged(keyframes) {\n const current = keyframes[0];\n if (keyframes.length === 1)\n return true;\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] !== current)\n return true;\n }\n}\nfunction canAnimate(keyframes, name, type, velocity) {\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0];\n if (originKeyframe === null) {\n return false;\n }\n /**\n * These aren't traditionally animatable but we do support them.\n * In future we could look into making this more generic or replacing\n * this function with mix() === mixImmediate\n */\n if (name === \"display\" || name === \"visibility\")\n return true;\n const targetKeyframe = keyframes[keyframes.length - 1];\n const isOriginAnimatable = isAnimatable(originKeyframe, name);\n const isTargetAnimatable = isAnimatable(targetKeyframe, name);\n warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". \"${isOriginAnimatable ? targetKeyframe : originKeyframe}\" is not an animatable value.`, \"value-not-animatable\");\n // Always skip if any of these are true\n if (!isOriginAnimatable || !isTargetAnimatable) {\n return false;\n }\n return (hasKeyframesChanged(keyframes) ||\n ((type === \"spring\" || isGenerator(type)) && velocity));\n}\n\nexport { canAnimate };\n//# sourceMappingURL=can-animate.mjs.map\n","function makeAnimationInstant(options) {\n options.duration = 0;\n options.type = \"keyframes\";\n}\n\nexport { makeAnimationInstant };\n//# sourceMappingURL=make-animation-instant.mjs.map\n","/**\n * A list of values that can be hardware-accelerated.\n */\nconst acceleratedValues = new Set([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\",\n \"backgroundColor\",\n]);\n\nexport { acceleratedValues };\n//# sourceMappingURL=accelerated-values.mjs.map\n","const browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\\(/;\nfunction hasBrowserOnlyColors(keyframes) {\n for (let i = 0; i < keyframes.length; i++) {\n if (typeof keyframes[i] === \"string\" &&\n browserColorFunctions.test(keyframes[i])) {\n return true;\n }\n }\n return false;\n}\n\nexport { hasBrowserOnlyColors };\n//# sourceMappingURL=is-browser-color.mjs.map\n","import { memo } from 'motion-utils';\nimport { acceleratedValues } from '../utils/accelerated-values.mjs';\nimport { hasBrowserOnlyColors } from '../utils/is-browser-color.mjs';\n\nconst colorProperties = new Set([\n \"color\",\n \"backgroundColor\",\n \"outlineColor\",\n \"fill\",\n \"stroke\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderRightColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n]);\nconst supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\nfunction supportsBrowserAnimation(options) {\n const { motionValue, name, repeatDelay, repeatType, damping, type, keyframes, } = options;\n const subject = motionValue?.owner?.current;\n /**\n * We use instanceof checks instead of isHTMLElement()/isSVGElement()\n * because we explicitly **don't** want elements in different timing\n * contexts (i.e. popups) to be accelerated, as it's not possible to sync\n * these animations properly with those driven from the main window\n * frameloop.\n */\n if (!(subject instanceof HTMLElement) &&\n !(subject instanceof SVGElement)) {\n return false;\n }\n const { onUpdate, transformTemplate } = motionValue.owner.getProps();\n return (supportsWaapi() &&\n name &&\n /**\n * Force WAAPI for color properties with browser-only color formats\n * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.\n */\n (acceleratedValues.has(name) ||\n (colorProperties.has(name) &&\n hasBrowserOnlyColors(keyframes))) &&\n (name !== \"transform\" || !transformTemplate) &&\n /**\n * If we're outputting values to onUpdate then we can't use WAAPI as there's\n * no way to read the value from WAAPI every frame.\n */\n !onUpdate &&\n !repeatDelay &&\n repeatType !== \"mirror\" &&\n damping !== 0 &&\n type !== \"inertia\");\n}\n\nexport { supportsBrowserAnimation };\n//# sourceMappingURL=waapi.mjs.map\n","import { MotionGlobalConfig, noop } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { KeyframeResolver, flushKeyframeResolvers } from './keyframes/KeyframesResolver.mjs';\nimport { NativeAnimationExtended } from './NativeAnimationExtended.mjs';\nimport { canAnimate } from './utils/can-animate.mjs';\nimport { makeAnimationInstant } from './utils/make-animation-instant.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { supportsBrowserAnimation } from './waapi/supports/waapi.mjs';\n\n/**\n * Maximum time allowed between an animation being created and it being\n * resolved for us to use the latter as the start time.\n *\n * This is to ensure that while we prefer to \"start\" an animation as soon\n * as it's triggered, we also want to avoid a visual jump if there's a big delay\n * between these two moments.\n */\nconst MAX_RESOLVE_DELAY = 40;\nclass AsyncMotionValueAnimation extends WithPromise {\n constructor({ autoplay = true, delay = 0, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", keyframes, name, motionValue, element, ...options }) {\n super();\n /**\n * Bound to support return animation.stop pattern\n */\n this.stop = () => {\n if (this._animation) {\n this._animation.stop();\n this.stopTimeline?.();\n }\n this.keyframeResolver?.cancel();\n };\n this.createdAt = time.now();\n const optionsWithDefaults = {\n autoplay,\n delay,\n type,\n repeat,\n repeatDelay,\n repeatType,\n name,\n motionValue,\n element,\n ...options,\n };\n const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;\n this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element);\n this.keyframeResolver?.scheduleResolve();\n }\n onKeyframesResolved(keyframes, finalKeyframe, options, sync) {\n this.keyframeResolver = undefined;\n const { name, type, velocity, delay, isHandoff, onUpdate } = options;\n this.resolvedAt = time.now();\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n let canAnimateValue = true;\n if (!canAnimate(keyframes, name, type, velocity)) {\n canAnimateValue = false;\n if (MotionGlobalConfig.instantAnimations || !delay) {\n onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe));\n }\n keyframes[0] = keyframes[keyframes.length - 1];\n makeAnimationInstant(options);\n options.repeat = 0;\n }\n /**\n * Resolve startTime for the animation.\n *\n * This method uses the createdAt and resolvedAt to calculate the\n * animation startTime. *Ideally*, we would use the createdAt time as t=0\n * as the following frame would then be the first frame of the animation in\n * progress, which would feel snappier.\n *\n * However, if there's a delay (main thread work) between the creation of\n * the animation and the first committed frame, we prefer to use resolvedAt\n * to avoid a sudden jump into the animation.\n */\n const startTime = sync\n ? !this.resolvedAt\n ? this.createdAt\n : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY\n ? this.resolvedAt\n : this.createdAt\n : undefined;\n const resolvedOptions = {\n startTime,\n finalKeyframe,\n ...options,\n keyframes,\n };\n /**\n * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n * optimised animation.\n *\n * Also skip WAAPI when keyframes aren't animatable, as the resolved\n * values may not be valid CSS and would trigger browser warnings.\n */\n const useWaapi = canAnimateValue &&\n !isHandoff &&\n supportsBrowserAnimation(resolvedOptions);\n const element = resolvedOptions.motionValue?.owner?.current;\n let animation;\n if (useWaapi) {\n try {\n animation = new NativeAnimationExtended({\n ...resolvedOptions,\n element,\n });\n }\n catch {\n animation = new JSAnimation(resolvedOptions);\n }\n }\n else {\n animation = new JSAnimation(resolvedOptions);\n }\n animation.finished.then(() => {\n this.notifyFinished();\n }).catch(noop);\n if (this.pendingTimeline) {\n this.stopTimeline = animation.attachTimeline(this.pendingTimeline);\n this.pendingTimeline = undefined;\n }\n this._animation = animation;\n }\n get finished() {\n if (!this._animation) {\n return this._finished;\n }\n else {\n return this.animation.finished;\n }\n }\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n get animation() {\n if (!this._animation) {\n this.keyframeResolver?.resume();\n flushKeyframeResolvers();\n }\n return this._animation;\n }\n get duration() {\n return this.animation.duration;\n }\n get iterationDuration() {\n return this.animation.iterationDuration;\n }\n get time() {\n return this.animation.time;\n }\n set time(newTime) {\n this.animation.time = newTime;\n }\n get speed() {\n return this.animation.speed;\n }\n get state() {\n return this.animation.state;\n }\n set speed(newSpeed) {\n this.animation.speed = newSpeed;\n }\n get startTime() {\n return this.animation.startTime;\n }\n attachTimeline(timeline) {\n if (this._animation) {\n this.stopTimeline = this.animation.attachTimeline(timeline);\n }\n else {\n this.pendingTimeline = timeline;\n }\n return () => this.stop();\n }\n play() {\n this.animation.play();\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.complete();\n }\n cancel() {\n if (this._animation) {\n this.animation.cancel();\n }\n this.keyframeResolver?.cancel();\n }\n}\n\nexport { AsyncMotionValueAnimation };\n//# sourceMappingURL=AsyncMotionValueAnimation.mjs.map\n","function calcChildStagger(children, child, delayChildren, staggerChildren = 0, staggerDirection = 1) {\n const index = Array.from(children)\n .sort((a, b) => a.sortNodePosition(b))\n .indexOf(child);\n const numChildren = children.size;\n const maxStaggerDuration = (numChildren - 1) * staggerChildren;\n const delayIsFunction = typeof delayChildren === \"function\";\n return delayIsFunction\n ? delayChildren(index, numChildren)\n : staggerDirection === 1\n ? index * staggerChildren\n : maxStaggerDuration - index * staggerChildren;\n}\n\nexport { calcChildStagger };\n//# sourceMappingURL=calc-child-stagger.mjs.map\n","import { warnOnce, SubscriptionManager, velocityPerSecond } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30;\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n */\n constructor(init, options = {}) {\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 = null;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v) => {\n const currentTime = time.now();\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue();\n }\n this.prev = this.current;\n this.setCurrent(v);\n // Update update subscribers\n if (this.current !== this.prev) {\n this.events.change?.notify(this.current);\n if (this.dependents) {\n for (const dependent of this.dependents) {\n dependent.dirty();\n }\n }\n }\n };\n this.hasAnimated = false;\n this.setCurrent(init);\n this.owner = options.owner;\n }\n setCurrent(current) {\n this.current = current;\n this.updatedAt = time.now();\n if (this.canTrackVelocity === null && current !== undefined) {\n this.canTrackVelocity = isFloat(this.current);\n }\n }\n setPrevFrameValue(prevFrameValue = this.current) {\n this.prevFrameValue = prevFrameValue;\n this.prevUpdatedAt = this.updatedAt;\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <motion.div style={{ x }} />\n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v) {\n if (!this.passiveEffect) {\n this.updateAndNotify(v);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = undefined;\n this.prevFrameValue = prev;\n this.prevUpdatedAt = this.updatedAt - delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v, endAnimation = true) {\n this.updateAndNotify(v);\n this.prev = v;\n this.prevUpdatedAt = this.prevFrameValue = undefined;\n endAnimation && this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n dirty() {\n this.events.change?.notify(this.current);\n }\n addDependent(dependent) {\n if (!this.dependents) {\n this.dependents = new Set();\n }\n this.dependents.add(dependent);\n }\n removeDependent(dependent) {\n if (this.dependents) {\n this.dependents.delete(dependent);\n }\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n const currentTime = time.now();\n if (!this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n return 0;\n }\n const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prevFrameValue), delta);\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 start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n delete this.animation;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.dependents?.clear();\n this.events.destroy?.notify();\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n//# sourceMappingURL=index.mjs.map\n","/**\n * If `transition` has `inherit: true`, shallow-merge it with\n * `parentTransition` (child keys win) and strip the `inherit` key.\n * Otherwise return `transition` unchanged.\n */\nfunction resolveTransition(transition, parentTransition) {\n if (transition?.inherit && parentTransition) {\n const { inherit: _, ...rest } = transition;\n return { ...parentTransition, ...rest };\n }\n return transition;\n}\n\nexport { resolveTransition };\n//# sourceMappingURL=resolve-transition.mjs.map\n","import { resolveTransition } from './resolve-transition.mjs';\n\nfunction getValueTransition(transition, key) {\n const valueTransition = transition?.[key] ??\n transition?.[\"default\"] ??\n transition;\n if (valueTransition !== transition) {\n return resolveTransition(valueTransition, transition);\n }\n return valueTransition;\n}\n\nexport { getValueTransition };\n//# sourceMappingURL=get-value-transition.mjs.map\n","import { transformProps } from '../../render/utils/keys-transform.mjs';\n\nconst underDampedSpring = {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n};\nconst criticallyDampedSpring = (target) => ({\n type: \"spring\",\n stiffness: 550,\n damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n});\nconst keyframesTransition = {\n type: \"keyframes\",\n duration: 0.8,\n};\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease = {\n type: \"keyframes\",\n ease: [0.25, 0.1, 0.35, 1],\n duration: 0.3,\n};\nconst getDefaultTransition = (valueKey, { keyframes }) => {\n if (keyframes.length > 2) {\n return keyframesTransition;\n }\n else if (transformProps.has(valueKey)) {\n return valueKey.startsWith(\"scale\")\n ? criticallyDampedSpring(keyframes[1])\n : underDampedSpring;\n }\n return ease;\n};\n\nexport { getDefaultTransition };\n//# sourceMappingURL=default-transitions.mjs.map\n","const orchestrationKeys = new Set([\n \"when\",\n \"delay\",\n \"delayChildren\",\n \"staggerChildren\",\n \"staggerDirection\",\n \"repeat\",\n \"repeatType\",\n \"repeatDelay\",\n \"from\",\n \"elapsed\",\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(transition) {\n for (const key in transition) {\n if (!orchestrationKeys.has(key))\n return true;\n }\n return false;\n}\n\nexport { isTransitionDefined };\n//# sourceMappingURL=is-transition-defined.mjs.map\n","import { secondsToMilliseconds, MotionGlobalConfig } from 'motion-utils';\nimport { AsyncMotionValueAnimation } from '../AsyncMotionValueAnimation.mjs';\nimport { JSAnimation } from '../JSAnimation.mjs';\nimport { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { makeAnimationInstant } from '../utils/make-animation-instant.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { getFinalKeyframe } from '../keyframes/get-final.mjs';\nimport { isTransitionDefined } from '../utils/is-transition-defined.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {\n const valueTransition = getValueTransition(transition, name) || {};\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0;\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition;\n elapsed = elapsed - secondsToMilliseconds(delay);\n const options = {\n keyframes: Array.isArray(target) ? target : [null, target],\n ease: \"easeOut\",\n velocity: value.getVelocity(),\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v);\n valueTransition.onUpdate && valueTransition.onUpdate(v);\n },\n onComplete: () => {\n onComplete();\n valueTransition.onComplete && valueTransition.onComplete();\n },\n name,\n motionValue: value,\n element: isHandoff ? undefined : element,\n };\n /**\n * If there's no transition defined for this value, we can generate\n * unique transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n Object.assign(options, getDefaultTransition(name, options));\n }\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n options.duration && (options.duration = secondsToMilliseconds(options.duration));\n options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));\n /**\n * Support deprecated way to set initial value. Prefer keyframe syntax.\n */\n if (options.from !== undefined) {\n options.keyframes[0] = options.from;\n }\n let shouldSkip = false;\n if (options.type === false ||\n (options.duration === 0 && !options.repeatDelay)) {\n makeAnimationInstant(options);\n if (options.delay === 0) {\n shouldSkip = true;\n }\n }\n if (MotionGlobalConfig.instantAnimations ||\n MotionGlobalConfig.skipAnimations ||\n element?.shouldSkipAnimations ||\n valueTransition.skipAnimations) {\n shouldSkip = true;\n makeAnimationInstant(options);\n options.delay = 0;\n }\n /**\n * If the transition type or easing has been explicitly set by the user\n * then we don't want to allow flattening the animation.\n */\n options.allowFlatten = !valueTransition.type && !valueTransition.ease;\n /**\n * If we can or must skip creating the animation, and apply only\n * the final keyframe, do so. We also check once keyframes are resolved but\n * this early check prevents the need to create an animation at all.\n */\n if (shouldSkip && !isHandoff && value.get() !== undefined) {\n const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);\n if (finalKeyframe !== undefined) {\n frame.update(() => {\n options.onUpdate(finalKeyframe);\n options.onComplete();\n });\n return;\n }\n }\n return valueTransition.isSync\n ? new JSAnimation(options)\n : new AsyncMotionValueAnimation(options);\n};\n\nexport { animateMotionValue };\n//# sourceMappingURL=motion-value.mjs.map\n","import { invariant, isNumericalString } from 'motion-utils';\nimport { isCSSVariableToken } from './is-css-variable.mjs';\n\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\nconst splitCSSVariableRegex = \n// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words\n/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;\nfunction parseCSSVariable(current) {\n const match = splitCSSVariableRegex.exec(current);\n if (!match)\n return [,];\n const [, token1, token2, fallback] = match;\n return [`--${token1 ?? token2}`, fallback];\n}\nconst maxDepth = 4;\nfunction getVariableValue(current, element, depth = 1) {\n invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`, \"max-css-var-depth\");\n const [token, fallback] = parseCSSVariable(current);\n // No CSS variable detected\n if (!token)\n return;\n // Attempt to read this CSS variable off the element\n const resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n const trimmed = resolved.trim();\n return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;\n }\n return isCSSVariableToken(fallback)\n ? getVariableValue(fallback, element, depth + 1)\n : fallback;\n}\n\nexport { getVariableValue, parseCSSVariable };\n//# sourceMappingURL=css-variables-conversion.mjs.map\n","function getValueState(visualElement) {\n const state = [{}, {}];\n visualElement?.values.forEach((value, key) => {\n state[0][key] = value.get();\n state[1][key] = value.getVelocity();\n });\n return state;\n}\nfunction resolveVariantFromProps(props, definition, custom, visualElement) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n return definition;\n}\n\nexport { resolveVariantFromProps };\n//# sourceMappingURL=resolve-variants.mjs.map\n","import { resolveVariantFromProps } from './resolve-variants.mjs';\n\nfunction resolveVariant(visualElement, definition, custom) {\n const props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, visualElement);\n}\n\nexport { resolveVariant };\n//# sourceMappingURL=resolve-dynamic-variants.mjs.map\n","import { transformPropOrder } from './keys-transform.mjs';\n\nconst positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n ...transformPropOrder,\n]);\n\nexport { positionalKeys };\n//# sourceMappingURL=keys-position.mjs.map\n","const isKeyframesTarget = (v) => {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n//# sourceMappingURL=is-keyframes-target.mjs.map\n","import { motionValue } from '../../value/index.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { isKeyframesTarget } from './is-keyframes-target.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 resolveFinalValueInKeyframes(v) {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n}\nfunction setTarget(visualElement, definition) {\n const resolved = resolveVariant(visualElement, definition);\n let { transitionEnd = {}, transition = {}, ...target } = resolved || {};\n target = { ...target, ...transitionEnd };\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\n\nexport { setTarget };\n//# sourceMappingURL=setters.mjs.map\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\n//# sourceMappingURL=is-motion-value.mjs.map\n","import { isMotionValue } from '../utils/is-motion-value.mjs';\n\nfunction isWillChangeMotionValue(value) {\n return Boolean(isMotionValue(value) && value.add);\n}\n\nexport { isWillChangeMotionValue };\n//# sourceMappingURL=is.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { isWillChangeMotionValue } from './is.mjs';\n\nfunction addValueToWillChange(visualElement, key) {\n const willChange = visualElement.getValue(\"willChange\");\n /**\n * It could be that a user has set willChange to a regular MotionValue,\n * in which case we can't add the value to it.\n */\n if (isWillChangeMotionValue(willChange)) {\n return willChange.add(key);\n }\n else if (!willChange && MotionGlobalConfig.WillChange) {\n const newWillChange = new MotionGlobalConfig.WillChange(\"auto\");\n visualElement.addValue(\"willChange\", newWillChange);\n newWillChange.add(key);\n }\n}\n\nexport { addValueToWillChange };\n//# sourceMappingURL=add-will-change.mjs.map\n","function camelToDash(str) {\n return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);\n}\n\nexport { camelToDash };\n//# sourceMappingURL=camel-to-dash.mjs.map\n","import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\n\nconst optimizedAppearDataId = \"framerAppearId\";\nconst optimizedAppearDataAttribute = \"data-\" + camelToDash(optimizedAppearDataId);\n\nexport { optimizedAppearDataAttribute, optimizedAppearDataId };\n//# sourceMappingURL=data-id.mjs.map\n","import { optimizedAppearDataAttribute } from './data-id.mjs';\n\nfunction getOptimisedAppearId(visualElement) {\n return visualElement.props[optimizedAppearDataAttribute];\n}\n\nexport { getOptimisedAppearId };\n//# sourceMappingURL=get-appear-id.mjs.map\n","import { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { resolveTransition } from '../utils/resolve-transition.mjs';\nimport { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { addValueToWillChange } from '../../value/will-change/add-will-change.mjs';\nimport { getOptimisedAppearId } from '../optimized-appear/get-appear-id.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {\n let { transition, transitionEnd, ...target } = targetAndTransition;\n const defaultTransition = visualElement.getDefaultTransition();\n transition = transition\n ? resolveTransition(transition, defaultTransition)\n : defaultTransition;\n const reduceMotion = transition?.reduceMotion;\n const skipAnimations = transition?.skipAnimations;\n if (transitionOverride)\n transition = transitionOverride;\n const animations = [];\n const animationTypeState = type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type];\n const path = transition?.path;\n if (path) {\n // path mutates `target` to claim x/y; loop below skips them.\n path.animateVisualElement(visualElement, target, transition, delay, animations);\n }\n for (const key in target) {\n const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);\n const valueTarget = target[key];\n if (valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n const valueTransition = {\n delay,\n ...getValueTransition(transition || {}, key),\n };\n if (skipAnimations)\n valueTransition.skipAnimations = true;\n /**\n * If the value is already at the defined target, skip the animation.\n * We still re-assert the value via frame.update to take precedence\n * over any stale transitionEnd callbacks from previous animations.\n */\n const currentValue = value.get();\n if (currentValue !== undefined &&\n !value.isAnimating() &&\n !Array.isArray(valueTarget) &&\n valueTarget === currentValue &&\n !valueTransition.velocity) {\n frame.update(() => value.set(valueTarget));\n continue;\n }\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n let isHandoff = false;\n if (window.MotionHandoffAnimation) {\n const appearId = getOptimisedAppearId(visualElement);\n if (appearId) {\n const startTime = window.MotionHandoffAnimation(appearId, key, frame);\n if (startTime !== null) {\n valueTransition.startTime = startTime;\n isHandoff = true;\n }\n }\n }\n addValueToWillChange(visualElement, key);\n const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion;\n value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key)\n ? { type: false }\n : valueTransition, visualElement, isHandoff));\n const animation = value.animation;\n if (animation) {\n animations.push(animation);\n }\n }\n if (transitionEnd) {\n const applyTransitionEnd = () => frame.update(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n if (animations.length) {\n Promise.all(animations).then(applyTransitionEnd);\n }\n else {\n applyTransitionEnd();\n }\n }\n return animations;\n}\n\nexport { animateTarget };\n//# sourceMappingURL=visual-element-target.mjs.map\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { calcChildStagger } from '../utils/calc-child-stagger.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n const resolved = resolveVariant(visualElement, variant, options.type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined);\n let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getAnimation = resolved\n ? () => Promise.all(animateTarget(visualElement, resolved, options))\n : () => Promise.resolve();\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size\n ? (forwardDelay = 0) => {\n const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;\n return animateChildren(visualElement, variant, forwardDelay, delayChildren, staggerChildren, staggerDirection, options);\n }\n : () => Promise.resolve();\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n const { when } = transition;\n if (when) {\n const [first, last] = when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation];\n return first().then(() => last());\n }\n else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\nfunction animateChildren(visualElement, variant, delay = 0, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {\n const animations = [];\n for (const child of visualElement.variantChildren) {\n child.notify(\"AnimationStart\", variant);\n animations.push(animateVariant(child, variant, {\n ...options,\n delay: delay +\n (typeof delayChildren === \"function\" ? 0 : delayChildren) +\n calcChildStagger(visualElement.variantChildren, child, delayChildren, staggerChildren, staggerDirection),\n }).then(() => child.notify(\"AnimationComplete\", variant)));\n }\n return Promise.all(animations);\n}\n\nexport { animateVariant };\n//# sourceMappingURL=visual-element-variant.mjs.map\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n let animation;\n if (Array.isArray(definition)) {\n const animations = definition.map((variant) => animateVariant(visualElement, variant, options));\n animation = Promise.all(animations);\n }\n else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n }\n else {\n const resolvedDefinition = typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition;\n animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));\n }\n return animation.then(() => {\n visualElement.notify(\"AnimationComplete\", definition);\n });\n}\n\nexport { animateVisualElement };\n//# sourceMappingURL=visual-element.mjs.map\n","/**\n * ValueType for \"auto\"\n */\nconst auto = {\n test: (v) => v === \"auto\",\n parse: (v) => v,\n};\n\nexport { auto };\n//# sourceMappingURL=auto.mjs.map\n","/**\n * Tests a provided value against a ValueType\n */\nconst testValueType = (v) => (type) => type.test(v);\n\nexport { testValueType };\n//# sourceMappingURL=test.mjs.map\n","import { auto } from './auto.mjs';\nimport { number } from './numbers/index.mjs';\nimport { px, percent, degrees, vw, vh } from './numbers/units.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nconst dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nconst findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));\n\nexport { dimensionValueTypes, findDimensionValueType };\n//# sourceMappingURL=dimensions.mjs.map\n","import { isZeroValueString } from 'motion-utils';\n\nfunction isNone(value) {\n if (typeof value === \"number\") {\n return value === 0;\n }\n else if (value !== null) {\n return value === \"none\" || value === \"0\" || isZeroValueString(value);\n }\n else {\n return true;\n }\n}\n\nexport { isNone };\n//# sourceMappingURL=is-none.mjs.map\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"]);\nfunction applyDefaultFilter(v) {\n const [name, value] = v.slice(0, -1).split(\"(\");\n if (name === \"drop-shadow\")\n return v;\n const [number] = value.match(floatRegex) || [];\n if (!number)\n return v;\n const unit = value.replace(number, \"\");\n let defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number !== value)\n defaultValue *= 100;\n return name + \"(\" + defaultValue + unit + \")\";\n}\nconst functionRegex = /\\b([a-z-]*)\\(.*?\\)/gu;\nconst filter = {\n ...complex,\n getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v;\n },\n};\n\nexport { filter };\n//# sourceMappingURL=filter.mjs.map\n","import { complex } from './index.mjs';\n\nconst mask = {\n ...complex,\n getAnimatableNone: (v) => {\n const parsed = complex.parse(v);\n const transformer = complex.createTransformer(v);\n return transformer(parsed.map((v) => typeof v === \"number\" ? 0 : typeof v === \"object\" ? { ...v, alpha: 1 } : v));\n },\n};\n\nexport { mask };\n//# sourceMappingURL=mask.mjs.map\n","import { number } from './numbers/index.mjs';\n\nconst int = {\n ...number,\n transform: Math.round,\n};\n\nexport { int };\n//# sourceMappingURL=int.mjs.map\n","import { alpha, scale } from '../numbers/index.mjs';\nimport { px, progressPercentage, degrees } from '../numbers/units.mjs';\n\nconst transformValueTypes = {\n rotate: degrees,\n /**\n * Internal channel for `transition.path` orientToPath. Composed onto\n * `rotate` at the transform-build sites so the user's `rotate` is\n * never read or overwritten. Not part of `transformPropOrder`.\n */\n pathRotation: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n};\n\nexport { transformValueTypes };\n//# sourceMappingURL=transform.mjs.map\n","import { int } from '../int.mjs';\nimport { alpha } from '../numbers/index.mjs';\nimport { px } from '../numbers/units.mjs';\nimport { transformValueTypes } from './transform.mjs';\n\nconst numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n 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 top: px,\n right: px,\n bottom: px,\n left: px,\n inset: px,\n insetBlock: px,\n insetBlockStart: px,\n insetBlockEnd: px,\n insetInline: px,\n insetInlineStart: px,\n insetInlineEnd: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n paddingBlock: px,\n paddingBlockStart: px,\n paddingBlockEnd: px,\n paddingInline: px,\n paddingInlineStart: px,\n paddingInlineEnd: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n marginBlock: px,\n marginBlockStart: px,\n marginBlockEnd: px,\n marginInline: px,\n marginInlineStart: px,\n marginInlineEnd: px,\n // Typography\n fontSize: px,\n // Misc\n backgroundPositionX: px,\n backgroundPositionY: px,\n ...transformValueTypes,\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n//# sourceMappingURL=number.mjs.map\n","import { color } from '../color/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { mask } from '../complex/mask.mjs';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nconst defaultValueTypes = {\n ...numberValueTypes,\n // Color props\n color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n filter,\n WebkitFilter: filter,\n mask,\n WebkitMask: mask,\n};\n/**\n * Gets the default ValueType for the provided value key\n */\nconst getDefaultValueType = (key) => defaultValueTypes[key];\n\nexport { defaultValueTypes, getDefaultValueType };\n//# sourceMappingURL=defaults.mjs.map\n","import { complex } from '../complex/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { mask } from '../complex/mask.mjs';\nimport { getDefaultValueType } from '../maps/defaults.mjs';\n\nconst customTypes = /*@__PURE__*/ new Set([filter, mask]);\nfunction getAnimatableNone(key, value) {\n let defaultValueType = getDefaultValueType(key);\n if (!customTypes.has(defaultValueType))\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined;\n}\n\nexport { getAnimatableNone };\n//# sourceMappingURL=animatable-none.mjs.map\n","import { analyseComplexValue } from '../../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../../../value/types/utils/animatable-none.mjs';\n\n/**\n * If we encounter keyframes like \"none\" or \"0\" and we also have keyframes like\n * \"#fff\" or \"200px 200px\" we want to find a keyframe to serve as a template for\n * the \"none\" keyframes. In this case \"#fff\" or \"200px 200px\" - then these get turned into\n * zero equivalents, i.e. \"#fff0\" or \"0px 0px\".\n */\nconst invalidTemplates = new Set([\"auto\", \"none\", \"0\"]);\nfunction makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {\n let i = 0;\n let animatableTemplate = undefined;\n while (i < unresolvedKeyframes.length && !animatableTemplate) {\n const keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\" &&\n !invalidTemplates.has(keyframe) &&\n analyseComplexValue(keyframe).values.length) {\n animatableTemplate = unresolvedKeyframes[i];\n }\n i++;\n }\n if (animatableTemplate && name) {\n for (const noneIndex of noneKeyframeIndexes) {\n unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);\n }\n }\n}\n\nexport { makeNoneKeyframesAnimatable };\n//# sourceMappingURL=make-none-animatable.mjs.map\n","import { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { findDimensionValueType } from '../../value/types/dimensions.mjs';\nimport { getVariableValue } from '../utils/css-variables-conversion.mjs';\nimport { isCSSVariableToken, containsCSSVariable } from '../utils/is-css-variable.mjs';\nimport { KeyframeResolver } from './KeyframesResolver.mjs';\nimport { isNone } from './utils/is-none.mjs';\nimport { makeNoneKeyframesAnimatable } from './utils/make-none-animatable.mjs';\nimport { positionalValues, isNumOrPxType } from './utils/unit-conversion.mjs';\n\nclass DOMKeyframesResolver extends KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {\n super(unresolvedKeyframes, onComplete, name, motionValue, element, true);\n }\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this;\n if (!element || !element.current)\n return;\n super.readKeyframes();\n /**\n * If any keyframe is a CSS variable, we need to find its value by sampling the element\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n let keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\") {\n keyframe = keyframe.trim();\n if (isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current);\n if (resolved !== undefined) {\n unresolvedKeyframes[i] = resolved;\n }\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe;\n }\n }\n }\n }\n /**\n * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n * have a far bigger performance impact.\n */\n this.resolveNoneKeyframes();\n /**\n * Check to see if unit type has changed. If so schedule jobs that will\n * temporarily set styles to the destination keyframes.\n * Skip if we have more than two keyframes or this isn't a positional value.\n * TODO: We can throw if there are multiple keyframes and the value type changes.\n */\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return;\n }\n const [origin, target] = unresolvedKeyframes;\n const originType = findDimensionValueType(origin);\n const targetType = findDimensionValueType(target);\n /**\n * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other\n * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.\n */\n const originHasVar = containsCSSVariable(origin);\n const targetHasVar = containsCSSVariable(target);\n if (originHasVar !== targetHasVar && positionalValues[name]) {\n this.needsMeasurement = true;\n return;\n }\n /**\n * Either we don't recognise these value types or we can animate between them.\n */\n if (originType === targetType)\n return;\n /**\n * If both values are numbers or pixels, we can animate between them by\n * converting them to numbers.\n */\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i];\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value);\n }\n }\n }\n else if (positionalValues[name]) {\n /**\n * Else, the only way to resolve this is by measuring the element.\n */\n this.needsMeasurement = true;\n }\n }\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (unresolvedKeyframes[i] === null ||\n isNone(unresolvedKeyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n }\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n }\n }\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this;\n if (!element || !element.current)\n return;\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset;\n }\n this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n unresolvedKeyframes[0] = this.measuredOrigin;\n // Set final key frame to measure after next render\n const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (measureKeyframe !== undefined) {\n element.getValue(name, measureKeyframe).jump(measureKeyframe, false);\n }\n }\n measureEndState() {\n const { element, name, unresolvedKeyframes } = this;\n if (!element || !element.current)\n return;\n const value = element.getValue(name);\n value && value.jump(this.measuredOrigin, false);\n const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n this.finalKeyframe = finalKeyframe;\n }\n // If we removed transform values, reapply them before the next render\n if (this.removedTransforms?.length) {\n this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {\n element\n .getValue(unsetTransformName)\n .set(unsetTransformValue);\n });\n }\n this.resolveNoneKeyframes();\n }\n}\n\nexport { DOMKeyframesResolver };\n//# sourceMappingURL=DOMKeyframesResolver.mjs.map\n","/**\n * The four corner-radius longhands. Shared so the projection mixer, scale\n * corrector, WAAPI px-value set and view-transition crop pass don't each carry\n * their own copy. Order is irrelevant - every consumer mixes/corrects/animates\n * each corner independently.\n */\nconst cornerRadiusProps = [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomRightRadius\",\n \"borderBottomLeftRadius\",\n];\n\nexport { cornerRadiusProps };\n//# sourceMappingURL=border-radius.mjs.map\n","function resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector == null) {\n return [];\n }\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n let root = document;\n if (scope) {\n root = scope.current;\n }\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector).filter((element) => element != null);\n}\n\nexport { resolveElements };\n//# sourceMappingURL=resolve-elements.mjs.map\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nconst getValueAsType = (value, type) => {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n\nexport { getValueAsType };\n//# sourceMappingURL=get-as-type.mjs.map\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an HTML element in a way\n * that works across iframes\n */\nfunction isHTMLElement(element) {\n return (isObject(element) &&\n \"offsetHeight\" in element &&\n !(\"ownerSVGElement\" in element));\n}\n\nexport { isHTMLElement };\n//# sourceMappingURL=is-html-element.mjs.map\n","import { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: microtask, cancel: cancelMicrotask } = \n/* @__PURE__ */ createRenderBatcher(queueMicrotask, false);\n\nexport { cancelMicrotask, microtask };\n//# sourceMappingURL=microtask.mjs.map\n","const isDragging = {\n x: false,\n y: false,\n};\nfunction isDragActive() {\n return isDragging.x || isDragging.y;\n}\n\nexport { isDragActive, isDragging };\n//# sourceMappingURL=is-active.mjs.map\n","import { isDragging } from './is-active.mjs';\n\nfunction setDragLock(axis) {\n if (axis === \"x\" || axis === \"y\") {\n if (isDragging[axis]) {\n return null;\n }\n else {\n isDragging[axis] = true;\n return () => {\n isDragging[axis] = false;\n };\n }\n }\n else {\n if (isDragging.x || isDragging.y) {\n return null;\n }\n else {\n isDragging.x = isDragging.y = true;\n return () => {\n isDragging.x = isDragging.y = false;\n };\n }\n }\n}\n\nexport { setDragLock };\n//# sourceMappingURL=set-active.mjs.map\n","import { resolveElements } from '../../utils/resolve-elements.mjs';\n\nfunction setupGesture(elementOrSelector, options) {\n const elements = resolveElements(elementOrSelector);\n const gestureAbortController = new AbortController();\n const eventOptions = {\n passive: true,\n ...options,\n signal: gestureAbortController.signal,\n };\n const cancel = () => gestureAbortController.abort();\n return [elements, eventOptions, cancel];\n}\n\nexport { setupGesture };\n//# sourceMappingURL=setup.mjs.map\n","import { isDragActive } from './drag/state/is-active.mjs';\nimport { setupGesture } from './utils/setup.mjs';\n\nfunction isValidHover(event) {\n return !(event.pointerType === \"touch\" || isDragActive());\n}\n/**\n * Create a hover gesture. hover() is different to .addEventListener(\"pointerenter\")\n * in that it has an easier syntax, filters out polyfilled touch events, interoperates\n * with drag gestures, and automatically removes the \"pointerennd\" event listener when the hover ends.\n *\n * @public\n */\nfunction hover(elementOrSelector, onHoverStart, options = {}) {\n const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options);\n elements.forEach((element) => {\n let isPressed = false;\n let deferredHoverEnd = false;\n let hoverEndCallback;\n const removePointerLeave = () => {\n element.removeEventListener(\"pointerleave\", onPointerLeave);\n };\n const endHover = (event) => {\n if (hoverEndCallback) {\n hoverEndCallback(event);\n hoverEndCallback = undefined;\n }\n removePointerLeave();\n };\n const onPointerUp = (event) => {\n isPressed = false;\n window.removeEventListener(\"pointerup\", onPointerUp);\n window.removeEventListener(\"pointercancel\", onPointerUp);\n if (deferredHoverEnd) {\n deferredHoverEnd = false;\n endHover(event);\n }\n };\n const onPointerDown = () => {\n isPressed = true;\n window.addEventListener(\"pointerup\", onPointerUp, eventOptions);\n window.addEventListener(\"pointercancel\", onPointerUp, eventOptions);\n };\n const onPointerLeave = (leaveEvent) => {\n if (leaveEvent.pointerType === \"touch\")\n return;\n if (isPressed) {\n deferredHoverEnd = true;\n return;\n }\n endHover(leaveEvent);\n };\n const onPointerEnter = (enterEvent) => {\n if (!isValidHover(enterEvent))\n return;\n deferredHoverEnd = false;\n const onHoverEnd = onHoverStart(element, enterEvent);\n if (typeof onHoverEnd !== \"function\")\n return;\n hoverEndCallback = onHoverEnd;\n element.addEventListener(\"pointerleave\", onPointerLeave, eventOptions);\n };\n element.addEventListener(\"pointerenter\", onPointerEnter, eventOptions);\n element.addEventListener(\"pointerdown\", onPointerDown, eventOptions);\n });\n return cancel;\n}\n\nexport { hover };\n//# sourceMappingURL=hover.mjs.map\n","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nconst isNodeOrChild = (parent, child) => {\n if (!child) {\n return false;\n }\n else if (parent === child) {\n return true;\n }\n else {\n return isNodeOrChild(parent, child.parentElement);\n }\n};\n\nexport { isNodeOrChild };\n//# sourceMappingURL=is-node-or-child.mjs.map\n","const isPrimaryPointer = (event) => {\n if (event.pointerType === \"mouse\") {\n return typeof event.button !== \"number\" || event.button <= 0;\n }\n else {\n /**\n * isPrimary is true for all mice buttons, whereas every touch point\n * is regarded as its own input. So subsequent concurrent touch points\n * will be false.\n *\n * Specifically match against false here as incomplete versions of\n * PointerEvents in very old browser might have it set as undefined.\n */\n return event.isPrimary !== false;\n }\n};\n\nexport { isPrimaryPointer };\n//# sourceMappingURL=is-primary-pointer.mjs.map\n","const keyboardAccessibleElements = new Set([\n \"BUTTON\",\n \"INPUT\",\n \"SELECT\",\n \"TEXTAREA\",\n \"A\",\n]);\n/**\n * Checks if an element is natively keyboard accessible (focusable).\n * Used by the press gesture to determine if we need to add tabIndex.\n */\nfunction isElementKeyboardAccessible(element) {\n return (keyboardAccessibleElements.has(element.tagName) ||\n element.isContentEditable === true);\n}\nconst textInputElements = new Set([\"INPUT\", \"SELECT\", \"TEXTAREA\"]);\n/**\n * Checks if an element has text selection or direct interaction behavior\n * that should block drag gestures from starting.\n *\n * This specifically targets form controls where the user might want to select\n * text or interact with the control (e.g., sliders, dropdowns).\n *\n * Buttons and links are NOT included because they don't have click-and-move\n * actions of their own - they only respond to click events, so dragging\n * should still work when initiated from these elements.\n */\nfunction isElementTextInput(element) {\n return (textInputElements.has(element.tagName) ||\n element.isContentEditable === true);\n}\n\nexport { isElementKeyboardAccessible, isElementTextInput };\n//# sourceMappingURL=is-keyboard-accessible.mjs.map\n","const isPressing = new WeakSet();\n\nexport { isPressing };\n//# sourceMappingURL=state.mjs.map\n","import { isPressing } from './state.mjs';\n\n/**\n * Filter out events that are not \"Enter\" keys.\n */\nfunction filterEvents(callback) {\n return (event) => {\n if (event.key !== \"Enter\")\n return;\n callback(event);\n };\n}\nfunction firePointerEvent(target, type) {\n target.dispatchEvent(new PointerEvent(\"pointer\" + type, { isPrimary: true, bubbles: true }));\n}\nconst enableKeyboardPress = (focusEvent, eventOptions) => {\n const element = focusEvent.currentTarget;\n if (!element)\n return;\n const handleKeydown = filterEvents(() => {\n if (isPressing.has(element))\n return;\n firePointerEvent(element, \"down\");\n const handleKeyup = filterEvents(() => {\n firePointerEvent(element, \"up\");\n });\n const handleBlur = () => firePointerEvent(element, \"cancel\");\n element.addEventListener(\"keyup\", handleKeyup, eventOptions);\n element.addEventListener(\"blur\", handleBlur, eventOptions);\n });\n element.addEventListener(\"keydown\", handleKeydown, eventOptions);\n /**\n * Add an event listener that fires on blur to remove the keydown events.\n */\n element.addEventListener(\"blur\", () => element.removeEventListener(\"keydown\", handleKeydown), eventOptions);\n};\n\nexport { enableKeyboardPress };\n//# sourceMappingURL=keyboard.mjs.map\n","import { isHTMLElement } from '../../utils/is-html-element.mjs';\nimport { isDragActive } from '../drag/state/is-active.mjs';\nimport { isNodeOrChild } from '../utils/is-node-or-child.mjs';\nimport { isPrimaryPointer } from '../utils/is-primary-pointer.mjs';\nimport { setupGesture } from '../utils/setup.mjs';\nimport { isElementKeyboardAccessible } from './utils/is-keyboard-accessible.mjs';\nimport { enableKeyboardPress } from './utils/keyboard.mjs';\nimport { isPressing } from './utils/state.mjs';\n\n/**\n * Filter out events that are not primary pointer events, or are triggering\n * while a Motion gesture is active.\n */\nfunction isValidPressEvent(event) {\n return isPrimaryPointer(event) && !isDragActive();\n}\nconst claimedPointerDownEvents = new WeakSet();\n/**\n * Create a press gesture.\n *\n * Press is different to `\"pointerdown\"`, `\"pointerup\"` in that it\n * automatically filters out secondary pointer events like right\n * click and multitouch.\n *\n * It also adds accessibility support for keyboards, where\n * an element with a press gesture will receive focus and\n * trigger on Enter `\"keydown\"` and `\"keyup\"` events.\n *\n * This is different to a browser's `\"click\"` event, which does\n * respond to keyboards but only for the `\"click\"` itself, rather\n * than the press start and end/cancel. The element also needs\n * to be focusable for this to work, whereas a press gesture will\n * make an element focusable by default.\n *\n * @public\n */\nfunction press(targetOrSelector, onPressStart, options = {}) {\n const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options);\n const startPress = (startEvent) => {\n const target = startEvent.currentTarget;\n if (!isValidPressEvent(startEvent))\n return;\n if (claimedPointerDownEvents.has(startEvent))\n return;\n isPressing.add(target);\n if (options.stopPropagation) {\n claimedPointerDownEvents.add(startEvent);\n }\n const onPressEnd = onPressStart(target, startEvent);\n /**\n * End listeners run in the capture phase so a descendant calling\n * stopPropagation() in its own pointerup handler can't prevent the\n * press gesture from ending. This also keeps the gesture-end\n * ordering consistent with the drag gesture. See #2794.\n */\n const endEventOptions = { ...eventOptions, capture: true };\n const onPointerEnd = (endEvent, success) => {\n window.removeEventListener(\"pointerup\", onPointerUp, endEventOptions);\n window.removeEventListener(\"pointercancel\", onPointerCancel, endEventOptions);\n if (isPressing.has(target)) {\n isPressing.delete(target);\n }\n if (!isValidPressEvent(endEvent)) {\n return;\n }\n if (typeof onPressEnd === \"function\") {\n onPressEnd(endEvent, { success });\n }\n };\n const onPointerUp = (upEvent) => {\n onPointerEnd(upEvent, target === window ||\n target === document ||\n options.useGlobalTarget ||\n isNodeOrChild(target, upEvent.target));\n };\n const onPointerCancel = (cancelEvent) => {\n onPointerEnd(cancelEvent, false);\n };\n window.addEventListener(\"pointerup\", onPointerUp, endEventOptions);\n window.addEventListener(\"pointercancel\", onPointerCancel, endEventOptions);\n };\n targets.forEach((target) => {\n const pointerDownTarget = options.useGlobalTarget ? window : target;\n pointerDownTarget.addEventListener(\"pointerdown\", startPress, eventOptions);\n if (isHTMLElement(target)) {\n target.addEventListener(\"focus\", (event) => enableKeyboardPress(event, eventOptions));\n if (!isElementKeyboardAccessible(target) &&\n !target.hasAttribute(\"tabindex\")) {\n target.tabIndex = 0;\n }\n }\n });\n return cancelEvents;\n}\n\nexport { press };\n//# sourceMappingURL=index.mjs.map\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an SVG element in a way\n * that works across iframes\n */\nfunction isSVGElement(element) {\n return isObject(element) && \"ownerSVGElement\" in element;\n}\n\nexport { isSVGElement };\n//# sourceMappingURL=is-svg-element.mjs.map\n","import { isSVGElement } from '../utils/is-svg-element.mjs';\nimport { resolveElements } from '../utils/resolve-elements.mjs';\n\nconst resizeHandlers = new WeakMap();\nlet observer;\nconst getSize = (borderBoxAxis, svgAxis, htmlAxis) => (target, borderBoxSize) => {\n if (borderBoxSize && borderBoxSize[0]) {\n return borderBoxSize[0][(borderBoxAxis + \"Size\")];\n }\n else if (isSVGElement(target) && \"getBBox\" in target) {\n return target.getBBox()[svgAxis];\n }\n else {\n return target[htmlAxis];\n }\n};\nconst getWidth = /*@__PURE__*/ getSize(\"inline\", \"width\", \"offsetWidth\");\nconst getHeight = /*@__PURE__*/ getSize(\"block\", \"height\", \"offsetHeight\");\nfunction notifyTarget({ target, borderBoxSize }) {\n resizeHandlers.get(target)?.forEach((handler) => {\n handler(target, {\n get width() {\n return getWidth(target, borderBoxSize);\n },\n get height() {\n return getHeight(target, borderBoxSize);\n },\n });\n });\n}\nfunction notifyAll(entries) {\n entries.forEach(notifyTarget);\n}\nfunction createResizeObserver() {\n if (typeof ResizeObserver === \"undefined\")\n return;\n observer = new ResizeObserver(notifyAll);\n}\nfunction resizeElement(target, handler) {\n if (!observer)\n createResizeObserver();\n const elements = resolveElements(target);\n elements.forEach((element) => {\n let elementHandlers = resizeHandlers.get(element);\n if (!elementHandlers) {\n elementHandlers = new Set();\n resizeHandlers.set(element, elementHandlers);\n }\n elementHandlers.add(handler);\n observer?.observe(element);\n });\n return () => {\n elements.forEach((element) => {\n const elementHandlers = resizeHandlers.get(element);\n elementHandlers?.delete(handler);\n if (!elementHandlers?.size) {\n observer?.unobserve(element);\n }\n });\n };\n}\n\nexport { resizeElement };\n//# sourceMappingURL=handle-element.mjs.map\n","const windowCallbacks = new Set();\nlet windowResizeHandler;\nfunction createWindowResizeHandler() {\n windowResizeHandler = () => {\n const info = {\n get width() {\n return window.innerWidth;\n },\n get height() {\n return window.innerHeight;\n },\n };\n windowCallbacks.forEach((callback) => callback(info));\n };\n window.addEventListener(\"resize\", windowResizeHandler);\n}\nfunction resizeWindow(callback) {\n windowCallbacks.add(callback);\n if (!windowResizeHandler)\n createWindowResizeHandler();\n return () => {\n windowCallbacks.delete(callback);\n if (!windowCallbacks.size &&\n typeof windowResizeHandler === \"function\") {\n window.removeEventListener(\"resize\", windowResizeHandler);\n windowResizeHandler = undefined;\n }\n };\n}\n\nexport { resizeWindow };\n//# sourceMappingURL=handle-window.mjs.map\n","import { resizeElement } from './handle-element.mjs';\nimport { resizeWindow } from './handle-window.mjs';\n\nfunction resize(a, b) {\n return typeof a === \"function\" ? resizeWindow(a) : resizeElement(a, b);\n}\n\nexport { resize };\n//# sourceMappingURL=index.mjs.map\n","import { isSVGElement } from './is-svg-element.mjs';\n\n/**\n * Checks if an element is specifically an SVGSVGElement (the root SVG element)\n * in a way that works across iframes\n */\nfunction isSVGSVGElement(element) {\n return isSVGElement(element) && element.tagName === \"svg\";\n}\n\nexport { isSVGSVGElement };\n//# sourceMappingURL=is-svg-svg-element.mjs.map\n","import { color } from '../color/index.mjs';\nimport { complex } from '../complex/index.mjs';\nimport { dimensionValueTypes } from '../dimensions.mjs';\nimport { testValueType } from '../test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex];\n/**\n * Tests a value against the list of ValueTypes\n */\nconst findValueType = (v) => valueTypes.find(testValueType(v));\n\nexport { findValueType };\n//# sourceMappingURL=find.mjs.map\n","const createAxisDelta = () => ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n});\nconst createDelta = () => ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n});\nconst createAxis = () => ({ min: 0, max: 0 });\nconst createBox = () => ({\n x: createAxis(),\n y: createAxis(),\n});\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n//# sourceMappingURL=models.mjs.map\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n//# sourceMappingURL=store.mjs.map\n","function isAnimationControls(v) {\n return (v !== null &&\n typeof v === \"object\" &&\n typeof v.start === \"function\");\n}\n\nexport { isAnimationControls };\n//# sourceMappingURL=is-animation-controls.mjs.map\n","/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || Array.isArray(v);\n}\n\nexport { isVariantLabel };\n//# sourceMappingURL=is-variant-label.mjs.map\n","const variantPriorityOrder = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\",\n];\nconst variantProps = [\"initial\", ...variantPriorityOrder];\n\nexport { variantPriorityOrder, variantProps };\n//# sourceMappingURL=variant-props.mjs.map\n","import { isAnimationControls } from './is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n return (isAnimationControls(props.animate) ||\n variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n//# sourceMappingURL=is-controlling-variants.mjs.map\n","import { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\n/**\n * Updates motion values from props changes.\n * Uses `any` type for element to avoid circular dependencies with VisualElement.\n */\nfunction updateMotionValuesFromProps(element, next, prev) {\n for (const key in next) {\n const nextValue = next[key];\n const prevValue = prev[key];\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue);\n }\n else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping from a motion value to a static value,\n * create a new motion value from that\n */\n element.addValue(key, motionValue(nextValue, { owner: element }));\n }\n else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n const existingValue = element.getValue(key);\n if (existingValue.liveStyle === true) {\n existingValue.jump(nextValue);\n }\n else if (!existingValue.hasAnimated) {\n existingValue.set(nextValue);\n }\n }\n else {\n const latestValue = element.getStaticValue(key);\n element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element }));\n }\n }\n }\n // Handle removed values\n for (const key in prev) {\n if (next[key] === undefined)\n element.removeValue(key);\n }\n return next;\n}\n\nexport { updateMotionValuesFromProps };\n//# sourceMappingURL=motion-values.mjs.map\n","// Does this device prefer reduced motion? Returns `null` server-side.\nconst prefersReducedMotion = { current: null };\nconst hasReducedMotionListener = { current: false };\n\nexport { hasReducedMotionListener, prefersReducedMotion };\n//# sourceMappingURL=state.mjs.map\n","import { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\nconst isBrowser = typeof window !== \"undefined\";\nfunction initPrefersReducedMotion() {\n hasReducedMotionListener.current = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);\n motionMediaQuery.addEventListener(\"change\", setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n\nexport { hasReducedMotionListener, initPrefersReducedMotion, prefersReducedMotion };\n//# sourceMappingURL=index.mjs.map\n","import { warnOnce, secondsToMilliseconds, isNumericalString, isZeroValueString, SubscriptionManager } from 'motion-utils';\nimport { KeyframeResolver } from '../animation/keyframes/KeyframesResolver.mjs';\nimport { NativeAnimation } from '../animation/NativeAnimation.mjs';\nimport { acceleratedValues } from '../animation/waapi/utils/accelerated-values.mjs';\nimport { microtask } from '../frameloop/microtask.mjs';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { motionValue } from '../value/index.mjs';\nimport { complex } from '../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../value/types/utils/animatable-none.mjs';\nimport { findValueType } from '../value/types/utils/find.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { transformProps } from './utils/keys-transform.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { initPrefersReducedMotion } from './utils/reduced-motion/index.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './utils/reduced-motion/state.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\n/**\n * Static feature definitions - can be injected by framework layer\n */\nlet featureDefinitions = {};\n/**\n * Set feature definitions for all VisualElements.\n * This should be called by the framework layer (e.g., framer-motion) during initialization.\n */\nfunction setFeatureDefinitions(definitions) {\n featureDefinitions = definitions;\n}\n/**\n * Get the current feature definitions\n */\nfunction getFeatureDefinitions() {\n return featureDefinitions;\n}\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {\n return {};\n }\n constructor({ parent, props, presenceContext, reducedMotionConfig, skipAnimations, blockInitialAnimation, visualState, }, options = {}) {\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\n /**\n * Decides whether animations should be skipped for this VisualElement.\n * Useful for E2E tests and visual regression testing.\n */\n this.shouldSkipAnimations = false;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n this.values = new Map();\n this.KeyframeResolver = KeyframeResolver;\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n this.prevMotionValues = {};\n /**\n * Track whether this element has been mounted before, to detect\n * remounts after Suspense unmount/remount cycles.\n */\n this.hasBeenMounted = false;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.renderScheduledAt = 0.0;\n this.scheduleRender = () => {\n const now = time.now();\n if (this.renderScheduledAt < now) {\n this.renderScheduledAt = now;\n frame.render(this.render, false, true);\n }\n };\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.skipAnimationsConfig = skipAnimations;\n this.options = options;\n this.blockInitialAnimation = Boolean(blockInitialAnimation);\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't necessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key]);\n }\n }\n }\n mount(instance) {\n /**\n * If this element has been mounted before (e.g. after a Suspense\n * unmount/remount), reset motion values to their initial state\n * so animations replay correctly from initial → animate.\n */\n if (this.hasBeenMounted) {\n for (const key in this.initialValues) {\n this.values.get(key)?.jump(this.initialValues[key]);\n this.latestValues[key] = this.initialValues[key];\n }\n }\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n /**\n * Determine reduced motion preference. Only initialize the matchMedia\n * listener if we actually need the dynamic value (i.e., when config\n * is neither \"never\" nor \"always\").\n */\n if (this.reducedMotionConfig === \"never\") {\n this.shouldReduceMotion = false;\n }\n else if (this.reducedMotionConfig === \"always\") {\n this.shouldReduceMotion = true;\n }\n else {\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion = prefersReducedMotion.current;\n }\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\", \"reduced-motion-disabled\");\n }\n /**\n * Set whether animations should be skipped based on the config.\n */\n this.shouldSkipAnimations = this.skipAnimationsConfig ?? false;\n this.parent?.addChild(this);\n this.update(this.props, this.presenceContext);\n this.hasBeenMounted = true;\n }\n unmount() {\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.valueSubscriptions.clear();\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent?.removeChild(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature) {\n feature.unmount();\n feature.isMounted = false;\n }\n }\n this.current = null;\n }\n addChild(child) {\n this.children.add(child);\n this.enteringChildren ?? (this.enteringChildren = new Set());\n this.enteringChildren.add(child);\n }\n removeChild(child) {\n this.children.delete(child);\n this.enteringChildren && this.enteringChildren.delete(child);\n }\n bindToMotionValue(key, value) {\n if (this.valueSubscriptions.has(key)) {\n this.valueSubscriptions.get(key)();\n }\n if (value.accelerate &&\n acceleratedValues.has(key) &&\n this.current instanceof HTMLElement) {\n const { factory, keyframes, times, ease, duration } = value.accelerate;\n const animation = new NativeAnimation({\n element: this.current,\n name: key,\n keyframes,\n times,\n ease,\n duration: secondsToMilliseconds(duration),\n });\n const cleanup = factory(animation);\n this.valueSubscriptions.set(key, () => {\n cleanup();\n animation.cancel();\n });\n return;\n }\n const valueIsTransform = transformProps.has(key);\n if (valueIsTransform && this.onBindTransform) {\n this.onBindTransform();\n }\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate && frame.preRender(this.notifyUpdate);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n this.scheduleRender();\n });\n let removeSyncCheck;\n if (typeof window !== \"undefined\" &&\n window.MotionCheckAppearSync) {\n removeSyncCheck = window.MotionCheckAppearSync(this, key, value);\n }\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n if (removeSyncCheck)\n removeSyncCheck();\n // Defer to MotionValue.on(\"change\") auto-stop so React 19 remounts\n // can resubscribe before the animation is cancelled (#3315).\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n updateFeatures() {\n let key = \"animation\";\n for (key in featureDefinitions) {\n const featureDefinition = featureDefinitions[key];\n if (!featureDefinition)\n continue;\n const { isEnabled, Feature: FeatureConstructor } = featureDefinition;\n /**\n * If this feature is enabled but not active, make a new instance.\n */\n if (!this.features[key] &&\n FeatureConstructor &&\n isEnabled(this.props)) {\n this.features[key] = new FeatureConstructor(this);\n }\n /**\n * If we have a feature, mount or update it.\n */\n if (this.features[key]) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.props);\n }\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\n }\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listenerName = (\"on\" + key);\n const listener = props[listenerName];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps || {}, this), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n const existingValue = this.values.get(key);\n if (value !== existingValue) {\n if (existingValue)\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key, target) {\n let value = this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : this.getBaseTargetFromProps(this.props, key) ??\n this.readValueFromInstance(this.current, key, this.options);\n if (value !== undefined && value !== null) {\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(target)) {\n value = getAnimatableNone(key, target);\n }\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);\n }\n return isMotionValue(value) ? value.get() : value;\n }\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n const { initial } = this.props;\n let valueFromInitial;\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom);\n if (variant) {\n valueFromInitial = variant[key];\n }\n }\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n scheduleRenderMicrotask() {\n microtask.render(this.render);\n }\n}\n\nexport { VisualElement, getFeatureDefinitions, setFeatureDefinitions };\n//# sourceMappingURL=VisualElement.mjs.map\n","import { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { DOMKeyframesResolver } from '../../animation/keyframes/DOMKeyframesResolver.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nclass DOMVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.KeyframeResolver = DOMKeyframesResolver;\n }\n sortInstanceNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n const style = props.style;\n return style ? style[key] : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current) {\n this.current.textContent = `${latest}`;\n }\n });\n }\n }\n}\n\nexport { DOMVisualElement };\n//# sourceMappingURL=DOMVisualElement.mjs.map\n","/**\n * Feature base class for extending VisualElement functionality.\n * Features are plugins that can be mounted/unmounted to add behavior\n * like gestures, animations, or layout tracking.\n */\nclass Feature {\n constructor(node) {\n this.isMounted = false;\n this.node = node;\n }\n update() { }\n}\n\nexport { Feature };\n//# sourceMappingURL=Feature.mjs.map\n","/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox({ top, left, right, bottom, }) {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox({ x, y }) {\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n if (!transformPoint)\n return point;\n const topLeft = transformPoint({ x: point.left, y: point.top });\n const bottomRight = transformPoint({ x: point.right, y: point.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n//# sourceMappingURL=conversion.mjs.map\n","function isIdentityScale(scale) {\n return scale === undefined || scale === 1;\n}\nfunction hasScale({ scale, scaleX, scaleY }) {\n return (!isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY));\n}\nfunction hasTransform(values) {\n return (hasScale(values) ||\n has2DTranslate(values) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY ||\n values.skewX ||\n values.skewY);\n}\nfunction has2DTranslate(values) {\n return is2DTranslate(values.x) || is2DTranslate(values.y);\n}\nfunction is2DTranslate(value) {\n return value && value !== \"0%\";\n}\n\nexport { has2DTranslate, hasScale, hasTransform };\n//# sourceMappingURL=has-transform.mjs.map\n","import { mixNumber } from '../../utils/mix/number.mjs';\nimport { hasTransform } from '../utils/has-transform.mjs';\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nfunction scalePoint(point, scale, originPoint) {\n const distanceFromOrigin = point - originPoint;\n const scaled = scale * distanceFromOrigin;\n return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint);\n }\n return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\nfunction applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {\n axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\nfunction applyBoxDelta(box, { x, y }) {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\nconst TREE_SCALE_SNAP_MIN = 0.999999999999;\nconst TREE_SCALE_SNAP_MAX = 1.0000000000001;\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {\n const treeLength = treePath.length;\n if (!treeLength)\n return;\n // Reset the treeScale\n treeScale.x = treeScale.y = 1;\n let node;\n let delta;\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const { visualElement } = node.options;\n if (visualElement &&\n visualElement.props.style &&\n visualElement.props.style.display === \"contents\") {\n continue;\n }\n if (isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n translateAxis(box.x, -node.scroll.offset.x);\n translateAxis(box.y, -node.scroll.offset.y);\n }\n if (delta) {\n // Incoporate each ancestor's scale into a cumulative 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, node.layout?.layoutBox);\n }\n }\n /**\n * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n * This will help reduce useless scales getting rendered.\n */\n if (treeScale.x < TREE_SCALE_SNAP_MAX &&\n treeScale.x > TREE_SCALE_SNAP_MIN) {\n treeScale.x = 1.0;\n }\n if (treeScale.y < TREE_SCALE_SNAP_MAX &&\n treeScale.y > TREE_SCALE_SNAP_MIN) {\n treeScale.y = 1.0;\n }\n}\nfunction translateAxis(axis, distance) {\n axis.min += distance;\n 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, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {\n const originPoint = mixNumber(axis.min, axis.max, axisOrigin);\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale);\n}\nfunction resolveAxisTranslate(value, axis) {\n if (typeof value === \"string\") {\n return (parseFloat(value) / 100) * (axis.max - axis.min);\n }\n return value;\n}\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nfunction transformBox(box, transform, sourceBox) {\n const resolveBox = sourceBox ?? box;\n transformAxis(box.x, resolveAxisTranslate(transform.x, resolveBox.x), transform.scaleX, transform.scale, transform.originX);\n transformAxis(box.y, resolveAxisTranslate(transform.y, resolveBox.y), transform.scaleY, transform.scale, transform.originY);\n}\n\nexport { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };\n//# sourceMappingURL=delta-apply.mjs.map\n","import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n const viewportBox = measureViewportBox(element, transformPagePoint);\n const { scroll } = rootProjectionNode;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x);\n translateAxis(viewportBox.y, scroll.offset.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n//# sourceMappingURL=measure.mjs.map\n","import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(latestValues, transform, transformTemplate) {\n // The transform string we're going to build into.\n let transformString = \"\";\n let transformIsDefault = true;\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n const value = latestValues[key];\n if (value === undefined)\n continue;\n let valueIsDefault = true;\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0);\n }\n else {\n const parsed = parseFloat(value);\n valueIsDefault = key.startsWith(\"scale\") ? parsed === 1 : parsed === 0;\n }\n if (!valueIsDefault || transformTemplate) {\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (!valueIsDefault) {\n transformIsDefault = false;\n const transformName = translateAlias[key] || key;\n transformString += `${transformName}(${valueAsType}) `;\n }\n if (transformTemplate) {\n transform[key] = valueAsType;\n }\n }\n }\n // `pathRotation` composes onto `rotate` as a separate additive term so\n // the user's `rotate` is never clobbered. Deliberately not a slot in\n // `transformPropOrder`.\n const pathRotation = latestValues.pathRotation;\n if (pathRotation) {\n transformIsDefault = false;\n transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `;\n }\n transformString = transformString.trim();\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n }\n else if (transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n\nexport { buildTransform };\n//# sourceMappingURL=build-transform.mjs.map\n","import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { transformProps } from '../../utils/keys-transform.mjs';\nimport { isCSSVariableName } from '../../../animation/utils/is-css-variable.mjs';\nimport { buildTransform } from './build-transform.mjs';\n\nfunction buildHTMLStyles(state, latestValues, transformTemplate) {\n const { style, vars, transformOrigin } = state;\n // Track whether we encounter any transform or transformOrigin values.\n let hasTransform = false;\n let hasTransformOrigin = false;\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 separately for further processing.\n */\n for (const key in latestValues) {\n const value = latestValues[key];\n if (transformProps.has(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n continue;\n }\n else if (isCSSVariableName(key)) {\n vars[key] = value;\n continue;\n }\n else {\n // Convert the value to its default value type, ie 0 -> \"0px\"\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (key.startsWith(\"origin\")) {\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n transformOrigin[key] =\n valueAsType;\n }\n else {\n style[key] = valueAsType;\n }\n }\n }\n if (!latestValues.transform) {\n if (hasTransform || transformTemplate) {\n style.transform = buildTransform(latestValues, state.transform, transformTemplate);\n }\n else if (style.transform) {\n /**\n * If we have previously created a transform but currently don't have any,\n * reset transform style to none.\n */\n style.transform = \"none\";\n }\n }\n /**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n if (hasTransformOrigin) {\n const { originX = \"50%\", originY = \"50%\", originZ = 0, } = transformOrigin;\n style.transformOrigin = `${originX} ${originY} ${originZ}`;\n }\n}\n\nexport { buildHTMLStyles };\n//# sourceMappingURL=build-styles.mjs.map\n","function renderHTML(element, { style, vars }, styleProp, projection) {\n const elementStyle = element.style;\n let key;\n for (key in style) {\n // CSSStyleDeclaration has [index: number]: string; in the types, so we use that as key type.\n elementStyle[key] = style[key];\n }\n // Write projection styles directly to element style\n projection?.applyProjectionStyles(elementStyle, styleProp);\n for (key in vars) {\n // Loop over any CSS variables and assign those.\n // They can only be assigned using `setProperty`.\n elementStyle.setProperty(key, vars[key]);\n }\n}\n\nexport { renderHTML };\n//# sourceMappingURL=render.mjs.map\n","import { px } from '../../value/types/numbers/units.mjs';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nconst correctBorderRadius = {\n correct: (latest, node) => {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n//# sourceMappingURL=scale-border-radius.mjs.map\n","import { complex } from '../../value/types/complex/index.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\n\nconst correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n const xScale = projectionDelta.x.scale * treeScale.x;\n const yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mixNumber(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n return template(shadow);\n },\n};\n\nexport { correctBoxShadow };\n//# sourceMappingURL=scale-box-shadow.mjs.map\n","import { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs';\nimport { cornerRadiusProps } from '../../utils/border-radius.mjs';\nimport { correctBorderRadius } from './scale-border-radius.mjs';\nimport { correctBoxShadow } from './scale-box-shadow.mjs';\n\nconst scaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [...cornerRadiusProps],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\nfunction addScaleCorrector(correctors) {\n for (const key in correctors) {\n scaleCorrectors[key] = correctors[key];\n if (isCSSVariableName(key)) {\n scaleCorrectors[key].isCSSVariable = true;\n }\n }\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n//# sourceMappingURL=scale-correction.mjs.map\n","import { transformProps } from './keys-transform.mjs';\nimport { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nexport { addScaleCorrector } from '../../projection/styles/scale-correction.mjs';\n\nfunction isForcedMotionValue(key, { layout, layoutId }) {\n return (transformProps.has(key) ||\n key.startsWith(\"origin\") ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue, scaleCorrectors };\n//# sourceMappingURL=is-forced-motion-value.mjs.map\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { isForcedMotionValue } from '../../utils/is-forced-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const style = props.style;\n const prevStyle = prevProps?.style;\n const newValues = {};\n if (!style)\n return newValues;\n for (const key in style) {\n if (isMotionValue(style[key]) ||\n (prevStyle && isMotionValue(prevStyle[key])) ||\n isForcedMotionValue(key, props) ||\n visualElement?.getValue(key)?.liveStyle !== undefined) {\n newValues[key] = style[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n//# sourceMappingURL=scrape-motion-values.mjs.map\n","import { invariant } from 'motion-utils';\nimport { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs';\nimport { transformProps } from '../utils/keys-transform.mjs';\nimport { defaultTransformValue, readTransformValue } from '../dom/parse-transform.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nclass HTMLVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"html\";\n this.renderInstance = renderHTML;\n }\n mount(instance) {\n /**\n * If a custom component forwards its ref to something other than a\n * HTML/SVG element (a class instance, an imperative handle) there's\n * nothing for Motion to style, measure or attach gestures to. #2777\n */\n invariant(Boolean(instance.style), \"motion.create() components must forward their ref to a HTML or SVG element\", \"custom-component-ref\");\n super.mount(instance);\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n return this.projection?.isProjecting\n ? defaultTransformValue(key)\n : readTransformValue(instance, key);\n }\n else {\n const computedStyle = getComputedStyle(instance);\n const value = (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0;\n return typeof value === \"string\" ? value.trim() : value;\n }\n }\n measureInstanceViewportBox(instance, { transformPagePoint }) {\n return measureViewportBox(instance, transformPagePoint);\n }\n build(renderState, latestValues, props) {\n buildHTMLStyles(renderState, latestValues, props.transformTemplate);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n}\n\nexport { HTMLVisualElement, getComputedStyle };\n//# sourceMappingURL=HTMLVisualElement.mjs.map\n","const dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nconst camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n *\n * Note: We use unitless values for stroke-dasharray and stroke-dashoffset\n * because Safari incorrectly scales px values when the page is zoomed.\n */\nfunction buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n const keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset (unitless to avoid Safari zoom bug)\n attrs[keys.offset] = `${-offset}`;\n // Build the dash array (unitless to avoid Safari zoom bug)\n attrs[keys.array] = `${length} ${spacing}`;\n}\n\nexport { buildSVGPath };\n//# sourceMappingURL=path.mjs.map\n","import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * CSS Motion Path properties that should remain as CSS styles on SVG elements.\n */\nconst cssMotionPathProperties = [\n \"offsetDistance\",\n \"offsetPath\",\n \"offsetRotate\",\n \"offsetAnchor\",\n];\n/**\n * Build SVG visual attributes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, isSVGTag, transformTemplate, styleProp) {\n buildHTMLStyles(state, latest, transformTemplate);\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox;\n }\n return;\n }\n state.attrs = state.style;\n state.style = {};\n const { attrs, style } = state;\n /**\n * However, we apply transforms as CSS transforms.\n * So if we detect a transform, transformOrigin we take it from attrs and copy it into style.\n */\n if (attrs.transform) {\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n if (style.transform || attrs.transformOrigin) {\n style.transformOrigin = attrs.transformOrigin ?? \"50% 50%\";\n delete attrs.transformOrigin;\n }\n if (style.transform) {\n /**\n * SVG's element transform-origin uses its own median as a reference.\n * Therefore, transformBox becomes a fill-box\n */\n style.transformBox = styleProp?.transformBox ?? \"fill-box\";\n delete attrs.transformBox;\n }\n for (const key of cssMotionPathProperties) {\n if (attrs[key] !== undefined) {\n style[key] = attrs[key];\n delete attrs[key];\n }\n }\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n if (attrScale !== undefined)\n attrs.scale = attrScale;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };\n//# sourceMappingURL=build-attrs.mjs.map\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nconst camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n \"startOffset\",\n \"textLength\",\n \"lengthAdjust\",\n]);\n\nexport { camelCaseAttributes };\n//# sourceMappingURL=camel-case-attrs.mjs.map\n","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\n//# sourceMappingURL=is-svg-tag.mjs.map\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState, _styleProp, projection) {\n renderHTML(element, renderState, undefined, projection);\n for (const key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\nexport { renderSVG };\n//# sourceMappingURL=render.mjs.map\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);\n for (const key in props) {\n if (isMotionValue(props[key]) ||\n isMotionValue(prevProps[key])) {\n const targetKey = transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n//# sourceMappingURL=scrape-motion-values.mjs.map\n","import { transformProps } from '../utils/keys-transform.mjs';\nimport { getDefaultValueType } from '../../value/types/maps/defaults.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nclass SVGVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"svg\";\n this.isSVGTag = false;\n this.measureInstanceViewportBox = createBox;\n }\n getBaseTargetFromProps(props, key) {\n return props[key];\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return instance.getAttribute(key);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n build(renderState, latestValues, props) {\n buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style);\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderSVG(instance, renderState, styleProp, projection);\n }\n mount(instance) {\n this.isSVGTag = isSVGTag(instance.tagName);\n super.mount(instance);\n }\n}\n\nexport { SVGVisualElement };\n//# sourceMappingURL=SVGVisualElement.mjs.map\n","import { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nconst numVariantProps = variantProps.length;\n/**\n * Get variant context from a visual element's parent chain.\n * Uses `any` type for visualElement to avoid circular dependencies.\n */\nfunction getVariantContext(visualElement) {\n if (!visualElement)\n return undefined;\n if (!visualElement.isControllingVariants) {\n const context = visualElement.parent\n ? getVariantContext(visualElement.parent) || {}\n : {};\n if (visualElement.props.initial !== undefined) {\n context.initial = visualElement.props.initial;\n }\n return context;\n }\n const context = {};\n for (let i = 0; i < numVariantProps; i++) {\n const name = variantProps[i];\n const prop = visualElement.props[name];\n if (isVariantLabel(prop) || prop === false) {\n context[name] = prop;\n }\n }\n return context;\n}\n\nexport { getVariantContext };\n//# sourceMappingURL=get-variant-context.mjs.map\n","function shallowCompare(next, prev) {\n if (!Array.isArray(prev))\n return false;\n const prevLength = prev.length;\n if (prevLength !== next.length)\n return false;\n for (let i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i])\n return false;\n }\n return true;\n}\n\nexport { shallowCompare };\n//# sourceMappingURL=shallow-compare.mjs.map\n","import { animateVisualElement } from '../../animation/interfaces/visual-element.mjs';\nimport { calcChildStagger } from '../../animation/utils/calc-child-stagger.mjs';\nimport { getVariantContext } from './get-variant-context.mjs';\nimport { isAnimationControls } from './is-animation-controls.mjs';\nimport { isKeyframesTarget } from './is-keyframes-target.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { shallowCompare } from './shallow-compare.mjs';\nimport { variantPriorityOrder } from './variant-props.mjs';\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse();\nconst numAnimationTypes = variantPriorityOrder.length;\nfunction createAnimateFunction(visualElement) {\n return (animations) => {\n return Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n };\n}\nfunction createAnimationState(visualElement) {\n let animate = createAnimateFunction(visualElement);\n let state = createState();\n let isInitialRender = true;\n /**\n * Track whether the animation state has been reset (e.g. via StrictMode\n * double-invocation or Suspense unmount/remount). On the first\n * animateChanges() call after a reset we need to behave like the initial\n * render for variant-inheritance checks, even though isInitialRender is\n * already false.\n */\n let wasReset = false;\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n const buildResolvedTypeValues = (type) => (acc, definition) => {\n const resolved = resolveVariant(visualElement, definition, type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n acc = { ...acc, ...target, ...transitionEnd };\n }\n return acc;\n };\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(makeAnimator) {\n animate = makeAnimator(visualElement);\n }\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(changedActiveType) {\n const { props } = visualElement;\n const context = getVariantContext(visualElement.parent) || {};\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n const animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n const removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n let encounteredKeys = {};\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n let removedVariantIndex = Infinity;\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (let i = 0; i < numAnimationTypes; i++) {\n const type = reversePriorityOrder[i];\n const typeState = state[type];\n const prop = props[type] !== undefined\n ? props[type]\n : context[type];\n const propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n const activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n let isInherited = prop === context[type] &&\n prop !== props[type] &&\n propIsVariant;\n if (isInherited &&\n (isInitialRender || wasReset) &&\n visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = { ...encounteredKeys };\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n continue;\n }\n /**\n * If exit is already active and wasn't just activated, skip\n * re-processing to prevent interrupting running exit animations.\n * Re-resolving exit with a changed custom value can start new\n * value animations that stop the originals, leaving the exit\n * animation promise unresolved and the component stuck in the DOM.\n */\n if (type === \"exit\" && typeState.isActive && activeDelta !== true) {\n if (typeState.prevResolvedValues) {\n encounteredKeys = {\n ...encounteredKeys,\n ...typeState.prevResolvedValues,\n };\n }\n continue;\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n let shouldAnimateType = variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant);\n let handledRemovedValues = false;\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n const definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {});\n if (activeDelta === false)\n resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n const { prevResolvedValues = {} } = typeState;\n const allKeys = {\n ...prevResolvedValues,\n ...resolvedValues,\n };\n const markToAnimate = (key) => {\n shouldAnimateType = true;\n if (removedKeys.has(key)) {\n handledRemovedValues = true;\n removedKeys.delete(key);\n }\n typeState.needsAnimating[key] = true;\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = false;\n };\n for (const key in allKeys) {\n const next = resolvedValues[key];\n const prev = prevResolvedValues[key];\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n /**\n * If the value has changed, we probably want to animate it.\n */\n let valueHasChanged = false;\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n valueHasChanged =\n !shallowCompare(next, prev) || variantDidChange;\n }\n else {\n valueHasChanged = next !== prev;\n }\n if (valueHasChanged) {\n if (next !== undefined && next !== null) {\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 if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues };\n }\n if ((isInitialRender || wasReset) &&\n visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n /**\n * If this is an inherited prop we want to skip this animation\n * unless the inherited variants haven't changed on this render.\n */\n const willAnimateViaParent = isInherited && variantDidChange;\n const needsAnimating = !willAnimateViaParent || handledRemovedValues;\n if (shouldAnimateType && needsAnimating) {\n animations.push(...definitionList.map((animation) => {\n const options = { type };\n /**\n * If we're performing the initial animation, but we're not\n * rendering at the same time as the variant-controlling parent,\n * we want to use the parent's transition to calculate the stagger.\n */\n if (typeof animation === \"string\" &&\n (isInitialRender || wasReset) &&\n !willAnimateViaParent &&\n visualElement.manuallyAnimateOnMount &&\n visualElement.parent) {\n const { parent } = visualElement;\n const parentVariant = resolveVariant(parent, animation);\n if (parent.enteringChildren && parentVariant) {\n const { delayChildren } = parentVariant.transition || {};\n options.delay = calcChildStagger(parent.enteringChildren, visualElement, delayChildren);\n }\n }\n return {\n animation: animation,\n options,\n };\n }));\n }\n }\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n const fallbackAnimation = {};\n /**\n * If the initial prop contains a transition we can use that, otherwise\n * allow the animation function to use the visual element's default.\n */\n if (typeof props.initial !== \"boolean\") {\n const initialTransition = resolveVariant(visualElement, Array.isArray(props.initial)\n ? props.initial[0]\n : props.initial);\n if (initialTransition && initialTransition.transition) {\n fallbackAnimation.transition = initialTransition.transition;\n }\n }\n removedKeys.forEach((key) => {\n const fallbackTarget = visualElement.getBaseTarget(key);\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = true;\n // @ts-expect-error - @mattgperry to figure if we should do something here\n fallbackAnimation[key] = fallbackTarget ?? null;\n });\n animations.push({ animation: fallbackAnimation });\n }\n let shouldAnimate = Boolean(animations.length);\n if (isInitialRender &&\n (props.initial === false || props.initial === props.animate) &&\n !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n wasReset = 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) {\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 visualElement.variantChildren?.forEach((child) => child.animationState?.setActive(type, isActive));\n state[type].isActive = isActive;\n const animations = animateChanges(type);\n for (const key in state) {\n state[key].protectedKeys = {};\n }\n return animations;\n }\n return {\n animateChanges,\n setActive,\n setAnimateFunction,\n getState: () => state,\n reset: () => {\n state = createState();\n wasReset = true;\n },\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n }\n else if (Array.isArray(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive = false) {\n return {\n isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n}\nfunction createState() {\n return {\n animate: createTypeState(true),\n whileInView: createTypeState(),\n whileHover: createTypeState(),\n whileTap: createTypeState(),\n whileDrag: createTypeState(),\n whileFocus: createTypeState(),\n exit: createTypeState(),\n };\n}\n\nexport { checkVariantsDidChange, createAnimationState };\n//# sourceMappingURL=animation-state.mjs.map\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/**\n * Reset a delta to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisDeltaInto(delta, originDelta) {\n delta.translate = originDelta.translate;\n delta.scale = originDelta.scale;\n delta.originPoint = originDelta.originPoint;\n delta.origin = originDelta.origin;\n}\n\nexport { copyAxisDeltaInto, copyAxisInto, copyBoxInto };\n//# sourceMappingURL=copy.mjs.map\n","import { mixNumber } from '../../utils/mix/number.mjs';\n\nconst SCALE_PRECISION = 0.0001;\nconst SCALE_MIN = 1 - SCALE_PRECISION;\nconst SCALE_MAX = 1 + SCALE_PRECISION;\nconst TRANSLATE_PRECISION = 0.01;\nconst TRANSLATE_MIN = 0 - TRANSLATE_PRECISION;\nconst TRANSLATE_MAX = 0 + TRANSLATE_PRECISION;\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target, maxDistance) {\n return Math.abs(value - target) <= maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin = 0.5) {\n delta.origin = origin;\n delta.originPoint = mixNumber(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n delta.translate =\n mixNumber(target.min, target.max, delta.origin) - delta.originPoint;\n if ((delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) ||\n isNaN(delta.scale)) {\n delta.scale = 1.0;\n }\n if ((delta.translate >= TRANSLATE_MIN &&\n delta.translate <= TRANSLATE_MAX) ||\n isNaN(delta.translate)) {\n delta.translate = 0.0;\n }\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined);\n calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined);\n}\nfunction calcRelativeAxis(target, relative, parent, anchor = 0) {\n const anchorPoint = anchor\n ? mixNumber(parent.min, parent.max, anchor)\n : parent.min;\n target.min = anchorPoint + relative.min;\n target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent, anchor) {\n calcRelativeAxis(target.x, relative.x, parent.x, anchor?.x);\n calcRelativeAxis(target.y, relative.y, parent.y, anchor?.y);\n}\nfunction calcRelativeAxisPosition(target, layout, parent, anchor = 0) {\n const anchorPoint = anchor\n ? mixNumber(parent.min, parent.max, anchor)\n : parent.min;\n target.min = layout.min - anchorPoint;\n target.max = target.min + calcLength(layout);\n}\nfunction calcRelativePosition(target, layout, parent, anchor) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x, anchor?.x);\n calcRelativeAxisPosition(target.y, layout.y, parent.y, anchor?.y);\n}\n\nexport { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };\n//# sourceMappingURL=delta-calc.mjs.map\n","import { mixNumber } from '../../utils/mix/number.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n let originPoint = mixNumber(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);\n removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n//# sourceMappingURL=delta-remove.mjs.map\n","import { calcLength } from './delta-calc.mjs';\n\nfunction isAxisDeltaZero(delta) {\n return delta.translate === 0 && delta.scale === 1;\n}\nfunction isDeltaZero(delta) {\n return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);\n}\nfunction axisEquals(a, b) {\n return a.min === b.min && a.max === b.max;\n}\nfunction boxEquals(a, b) {\n return axisEquals(a.x, b.x) && axisEquals(a.y, b.y);\n}\nfunction axisEqualsRounded(a, b) {\n return (Math.round(a.min) === Math.round(b.min) &&\n Math.round(a.max) === Math.round(b.max));\n}\nfunction boxEqualsRounded(a, b) {\n return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y);\n}\nfunction aspectRatio(box) {\n return calcLength(box.x) / calcLength(box.y);\n}\nfunction axisDeltaEquals(a, b) {\n return (a.translate === b.translate &&\n a.scale === b.scale &&\n a.originPoint === b.originPoint);\n}\n\nexport { aspectRatio, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, isDeltaZero };\n//# sourceMappingURL=utils.mjs.map\n","function eachAxis(callback) {\n return [callback(\"x\"), callback(\"y\")];\n}\n\nexport { eachAxis };\n//# sourceMappingURL=each-axis.mjs.map\n","function buildProjectionTransform(delta, treeScale, latestTransform) {\n let transform = \"\";\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n const xTranslate = delta.x.translate / treeScale.x;\n const yTranslate = delta.y.translate / treeScale.y;\n const zTranslate = latestTransform?.z || 0;\n if (xTranslate || yTranslate || zTranslate) {\n transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `;\n }\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;\n }\n if (latestTransform) {\n const { transformPerspective, rotate, pathRotation, rotateX, rotateY, skewX, skewY, } = latestTransform;\n if (transformPerspective)\n transform = `perspective(${transformPerspective}px) ${transform}`;\n if (rotate)\n transform += `rotate(${rotate}deg) `;\n // Additive `rotate()` so user `rotate` isn't clobbered.\n if (pathRotation)\n transform += `rotate(${pathRotation}deg) `;\n if (rotateX)\n transform += `rotateX(${rotateX}deg) `;\n if (rotateY)\n transform += `rotateY(${rotateY}deg) `;\n if (skewX)\n transform += `skewX(${skewX}deg) `;\n if (skewY)\n transform += `skewY(${skewY}deg) `;\n }\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n const elementScaleX = delta.x.scale * treeScale.x;\n const elementScaleY = delta.y.scale * treeScale.y;\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform += `scale(${elementScaleX}, ${elementScaleY})`;\n }\n return transform || \"none\";\n}\n\nexport { buildProjectionTransform };\n//# sourceMappingURL=transform.mjs.map\n","import { mixNumber } from '../../utils/mix/number.mjs';\nimport { percent, px } from '../../value/types/numbers/units.mjs';\nimport { progress, circOut, noop } from 'motion-utils';\nimport { cornerRadiusProps } from '../../utils/border-radius.mjs';\n\nconst numBorders = cornerRadiusProps.length;\nconst asNumber = (value) => typeof value === \"string\" ? parseFloat(value) : value;\nconst isPx = (value) => typeof value === \"number\" || px.test(value);\nfunction mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {\n if (shouldCrossfadeOpacity) {\n target.opacity = mixNumber(0, lead.opacity ?? 1, easeCrossfadeIn(progress));\n target.opacityExit = mixNumber(follow.opacity ?? 1, 0, easeCrossfadeOut(progress));\n }\n else if (isOnlyMember) {\n target.opacity = mixNumber(follow.opacity ?? 1, lead.opacity ?? 1, progress);\n }\n /**\n * Mix border radius\n */\n for (let i = 0; i < numBorders; i++) {\n const borderLabel = cornerRadiusProps[i];\n let followRadius = getRadius(follow, borderLabel);\n let leadRadius = getRadius(lead, borderLabel);\n if (followRadius === undefined && leadRadius === undefined)\n continue;\n followRadius || (followRadius = 0);\n leadRadius || (leadRadius = 0);\n const canMix = followRadius === 0 ||\n leadRadius === 0 ||\n isPx(followRadius) === isPx(leadRadius);\n if (canMix) {\n target[borderLabel] = Math.max(mixNumber(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 = mixNumber(follow.rotate || 0, lead.rotate || 0, progress);\n }\n}\nfunction getRadius(values, radiusName) {\n return values[radiusName] !== undefined\n ? values[radiusName]\n : values.borderRadius;\n}\nconst easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut);\nconst easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop);\nfunction compress(min, max, easing) {\n return (p) => {\n // Could replace ifs with clamp\n if (p < min)\n return 0;\n if (p > max)\n return 1;\n return easing(progress(min, max, p));\n };\n}\n\nexport { mixValues };\n//# sourceMappingURL=mix-values.mjs.map\n","import { animateMotionValue } from '../interfaces/motion-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction animateSingleValue(value, keyframes, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes, options));\n return motionValue$1.animation;\n}\n\nexport { animateSingleValue };\n//# sourceMappingURL=single-value.mjs.map\n","function addDomEvent(target, eventName, handler, options = { passive: true }) {\n target.addEventListener(eventName, handler, options);\n return () => target.removeEventListener(eventName, handler, options);\n}\n\nexport { addDomEvent };\n//# sourceMappingURL=add-dom-event.mjs.map\n","const compareByDepth = (a, b) => a.depth - b.depth;\n\nexport { compareByDepth };\n//# sourceMappingURL=compare-by-depth.mjs.map\n","import { addUniqueItem, removeItem } from 'motion-utils';\nimport { compareByDepth } from './compare-by-depth.mjs';\n\nclass FlatTree {\n constructor() {\n this.children = [];\n this.isDirty = false;\n }\n add(child) {\n addUniqueItem(this.children, child);\n this.isDirty = true;\n }\n remove(child) {\n removeItem(this.children, child);\n this.isDirty = true;\n }\n forEach(callback) {\n this.isDirty && this.children.sort(compareByDepth);\n this.isDirty = false;\n this.children.forEach(callback);\n }\n}\n\nexport { FlatTree };\n//# sourceMappingURL=flat-tree.mjs.map\n","import { time } from '../frameloop/sync-time.mjs';\nimport { secondsToMilliseconds } from 'motion-utils';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\n/**\n * Timeout defined in ms\n */\nfunction delay(callback, timeout) {\n const start = time.now();\n const checkElapsed = ({ timestamp }) => {\n const elapsed = timestamp - start;\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed);\n callback(elapsed - timeout);\n }\n };\n frame.setup(checkElapsed, true);\n return () => cancelFrame(checkElapsed);\n}\nfunction delayInSeconds(callback, timeout) {\n return delay(callback, secondsToMilliseconds(timeout));\n}\n\nexport { delay, delayInSeconds };\n//# sourceMappingURL=delay.mjs.map\n","import { 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 */\nfunction resolveMotionValue(value) {\n return isMotionValue(value) ? value.get() : value;\n}\n\nexport { resolveMotionValue };\n//# sourceMappingURL=resolve-motion-value.mjs.map\n","import { addUniqueItem, removeItem } from 'motion-utils';\n\nclass NodeStack {\n constructor() {\n this.members = [];\n }\n add(node) {\n addUniqueItem(this.members, node);\n for (let i = this.members.length - 1; i >= 0; i--) {\n const member = this.members[i];\n if (member === node || member === this.lead || member === this.prevLead)\n continue;\n const inst = member.instance;\n if ((!inst || inst.isConnected === false) && !member.snapshot) {\n removeItem(this.members, member);\n member.unmount();\n }\n }\n node.scheduleRender();\n }\n remove(node) {\n removeItem(this.members, node);\n if (node === this.prevLead)\n this.prevLead = undefined;\n if (node === this.lead) {\n const prevLead = this.members[this.members.length - 1];\n if (prevLead)\n this.promote(prevLead);\n }\n }\n relegate(node) {\n for (let i = this.members.indexOf(node) - 1; i >= 0; i--) {\n const member = this.members[i];\n if (member.isPresent !== false && member.instance?.isConnected !== false) {\n this.promote(member);\n return true;\n }\n }\n return false;\n }\n promote(node, preserveFollowOpacity) {\n const prevLead = this.lead;\n if (node === prevLead)\n return;\n this.prevLead = prevLead;\n this.lead = node;\n node.show();\n if (prevLead) {\n prevLead.updateSnapshot();\n node.scheduleRender();\n const { layoutDependency: prevDep } = prevLead.options;\n const { layoutDependency: nextDep } = node.options;\n if (prevDep === undefined || prevDep !== nextDep) {\n node.resumeFrom = prevLead;\n if (preserveFollowOpacity)\n prevLead.preserveOpacity = true;\n if (prevLead.snapshot) {\n node.snapshot = prevLead.snapshot;\n node.snapshot.latestValues =\n prevLead.animationValues || prevLead.latestValues;\n }\n if (node.root?.isUpdating)\n node.isLayoutDirty = true;\n }\n if (node.options.crossfade === false)\n prevLead.hide();\n }\n }\n exitAnimationComplete() {\n this.members.forEach((member) => {\n member.options.onExitComplete?.();\n member.resumingFrom?.options.onExitComplete?.();\n });\n }\n scheduleRender() {\n this.members.forEach((member) => member.instance && member.scheduleRender(false));\n }\n removeLeadSnapshot() {\n if (this.lead?.snapshot)\n this.lead.snapshot = undefined;\n }\n}\n\nexport { NodeStack };\n//# sourceMappingURL=stack.mjs.map\n","/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nconst globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false,\n};\n\nexport { globalProjectionState };\n//# sourceMappingURL=state.mjs.map\n","import { SubscriptionManager, clamp, noop } from 'motion-utils';\nimport { animateSingleValue } from '../../animation/animate/single-value.mjs';\nimport { getOptimisedAppearId } from '../../animation/optimized-appear/get-appear-id.mjs';\nimport { getValueTransition } from '../../animation/utils/get-value-transition.mjs';\nimport { microtask } from '../../frameloop/microtask.mjs';\nimport { time } from '../../frameloop/sync-time.mjs';\nimport { scaleCorrectors } from '../styles/scale-correction.mjs';\nimport { statsBuffer } from '../../stats/buffer.mjs';\nimport { delay } from '../../utils/delay.mjs';\nimport { isSVGElement } from '../../utils/is-svg-element.mjs';\nimport { isSVGSVGElement } from '../../utils/is-svg-svg-element.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { mixValues } from '../animation/mix-values.mjs';\nimport { copyBoxInto, copyAxisDeltaInto, copyAxisInto } from '../geometry/copy.mjs';\nimport { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from '../geometry/delta-apply.mjs';\nimport { calcLength, calcRelativeBox, calcRelativePosition, calcBoxDelta, isNear } from '../geometry/delta-calc.mjs';\nimport { removeBoxTransforms } from '../geometry/delta-remove.mjs';\nimport { createBox, createDelta } from '../geometry/models.mjs';\nimport { boxEqualsRounded, isDeltaZero, axisDeltaEquals, boxEquals, aspectRatio } from '../geometry/utils.mjs';\nimport { NodeStack } from '../shared/stack.mjs';\nimport { buildProjectionTransform } from '../styles/transform.mjs';\nimport { eachAxis } from '../utils/each-axis.mjs';\nimport { FlatTree } from '../utils/flat-tree.mjs';\nimport { hasTransform, hasScale, has2DTranslate } from '../utils/has-transform.mjs';\nimport { globalProjectionState } from './state.mjs';\nimport { frame, cancelFrame, frameData, frameSteps } from '../../frameloop/frame.mjs';\n\nconst metrics = {\n nodes: 0,\n calculatedTargetDeltas: 0,\n calculatedProjections: 0,\n};\nconst transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nconst animationTarget = 1000;\nlet id = 0;\nfunction resetDistortingTransform(key, visualElement, values, sharedAnimationValues) {\n const { latestValues } = visualElement;\n // Record the distorting transform and then temporarily set it to 0\n if (latestValues[key]) {\n values[key] = latestValues[key];\n visualElement.setStaticValue(key, 0);\n if (sharedAnimationValues) {\n sharedAnimationValues[key] = 0;\n }\n }\n}\nfunction cancelTreeOptimisedTransformAnimations(projectionNode) {\n projectionNode.hasCheckedOptimisedAppear = true;\n if (projectionNode.root === projectionNode)\n return;\n const { visualElement } = projectionNode.options;\n if (!visualElement)\n return;\n const appearId = getOptimisedAppearId(visualElement);\n if (window.MotionHasOptimisedAnimation(appearId, \"transform\")) {\n const { layout, layoutId } = projectionNode.options;\n window.MotionCancelOptimisedAnimation(appearId, \"transform\", frame, !(layout || layoutId));\n }\n const { parent } = projectionNode;\n if (parent && !parent.hasCheckedOptimisedAppear) {\n cancelTreeOptimisedTransformAnimations(parent);\n }\n}\nfunction createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) {\n return class ProjectionNode {\n constructor(latestValues = {}, parent = defaultParent?.()) {\n /**\n * A unique ID generated for every projection node.\n */\n this.id = id++;\n /**\n * An id that represents a unique session instigated by startUpdate.\n */\n this.animationId = 0;\n this.animationCommitId = 0;\n /**\n * A Set containing all this component's children. This is used to iterate\n * through the children.\n *\n * TODO: This could be faster to iterate as a flat array stored on the root node.\n */\n this.children = new Set();\n /**\n * Options for the node. We use this to configure what kind of layout animations\n * we should perform (if any).\n */\n this.options = {};\n /**\n * We use this to detect when its safe to shut down part of a projection tree.\n * We have to keep projecting children for scale correction and relative projection\n * until all their parents stop performing layout animations.\n */\n this.isTreeAnimating = false;\n this.isAnimationBlocked = false;\n /**\n * Flag to true if we think this layout has been changed. We can't always know this,\n * currently we set it to true every time a component renders, or if it has a layoutDependency\n * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n * and if one node is dirtied, they all are.\n */\n this.isLayoutDirty = false;\n /**\n * Flag to true if we think the projection calculations for this node needs\n * recalculating as a result of an updated transform or layout animation.\n */\n this.isProjectionDirty = false;\n /**\n * Flag to true if the layout *or* transform has changed. This then gets propagated\n * throughout the projection tree, forcing any element below to recalculate on the next frame.\n */\n this.isSharedProjectionDirty = false;\n /**\n * Flag transform dirty. This gets propagated throughout the whole tree but is only\n * respected by shared nodes.\n */\n this.isTransformDirty = false;\n /**\n * Block layout updates for instant layout transitions throughout the tree.\n */\n this.updateManuallyBlocked = false;\n this.updateBlockedByResize = false;\n /**\n * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n * call.\n */\n this.isUpdating = false;\n /**\n * If this is an SVG element we currently disable projection transforms\n */\n this.isSVG = false;\n /**\n * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n * its projection styles.\n */\n this.needsReset = false;\n /**\n * Flags whether this node should have its transform reset prior to measuring.\n */\n this.shouldResetTransform = false;\n /**\n * Store whether this node has been checked for optimised appear animations. As\n * effects fire bottom-up, and we want to look up the tree for appear animations,\n * this makes sure we only check each path once, stopping at nodes that\n * have already been checked.\n */\n this.hasCheckedOptimisedAppear = false;\n /**\n * An object representing the calculated contextual/accumulated/tree scale.\n * This will be used to scale calculcated projection transforms, as these are\n * calculated in screen-space but need to be scaled for elements to layoutly\n * make it to their calculated destinations.\n *\n * TODO: Lazy-init\n */\n this.treeScale = { x: 1, y: 1 };\n /**\n *\n */\n this.eventHandlers = new Map();\n this.hasTreeAnimated = false;\n this.layoutVersion = 0;\n // Note: Currently only running on root node\n this.updateScheduled = false;\n this.scheduleUpdate = () => this.update();\n this.projectionUpdateScheduled = false;\n this.checkUpdateFailed = () => {\n if (this.isUpdating) {\n this.isUpdating = false;\n this.clearAllSnapshots();\n }\n };\n /**\n * This is a multi-step process as shared nodes might be of different depths. Nodes\n * are sorted by depth order, so we need to resolve the entire tree before moving to\n * the next step.\n */\n this.updateProjection = () => {\n this.projectionUpdateScheduled = false;\n /**\n * Reset debug counts. Manually resetting rather than creating a new\n * object each frame.\n */\n if (statsBuffer.value) {\n metrics.nodes =\n metrics.calculatedTargetDeltas =\n metrics.calculatedProjections =\n 0;\n }\n this.nodes.forEach(propagateDirtyNodes);\n this.nodes.forEach(resolveTargetDelta);\n this.nodes.forEach(calcProjection);\n this.nodes.forEach(cleanDirtyNodes);\n if (statsBuffer.addProjectionMetrics) {\n statsBuffer.addProjectionMetrics(metrics);\n }\n };\n /**\n * Frame calculations\n */\n this.resolvedRelativeTargetAt = 0.0;\n this.linkedParentVersion = 0;\n this.hasProjected = false;\n this.isVisible = true;\n this.animationProgress = 0;\n /**\n * Shared layout\n */\n // TODO Only running on root node\n this.sharedNodes = new Map();\n this.latestValues = latestValues;\n this.root = parent ? parent.root || parent : this;\n this.path = parent ? [...parent.path, parent] : [];\n this.parent = parent;\n this.depth = parent ? parent.depth + 1 : 0;\n for (let i = 0; i < this.path.length; i++) {\n this.path[i].shouldResetTransform = true;\n }\n if (this.root === this)\n this.nodes = new FlatTree();\n }\n addEventListener(name, handler) {\n if (!this.eventHandlers.has(name)) {\n this.eventHandlers.set(name, new SubscriptionManager());\n }\n return this.eventHandlers.get(name).add(handler);\n }\n notifyListeners(name, ...args) {\n const subscriptionManager = this.eventHandlers.get(name);\n subscriptionManager && subscriptionManager.notify(...args);\n }\n hasListeners(name) {\n return this.eventHandlers.has(name);\n }\n /**\n * Lifecycles\n */\n mount(instance) {\n if (this.instance)\n return;\n this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance);\n this.instance = instance;\n const { layoutId, layout, visualElement } = this.options;\n if (visualElement && !visualElement.current) {\n visualElement.mount(instance);\n }\n this.root.nodes.add(this);\n this.parent && this.parent.children.add(this);\n if (this.root.hasTreeAnimated && (layout || layoutId)) {\n this.isLayoutDirty = true;\n }\n if (attachResizeListener) {\n let cancelDelay;\n let innerWidth = 0;\n const resizeUnblockUpdate = () => (this.root.updateBlockedByResize = false);\n // Set initial innerWidth in a frame.read callback to batch the read\n frame.read(() => {\n innerWidth = window.innerWidth;\n });\n attachResizeListener(instance, () => {\n const newInnerWidth = window.innerWidth;\n if (newInnerWidth === innerWidth)\n return;\n innerWidth = newInnerWidth;\n this.root.updateBlockedByResize = true;\n cancelDelay && cancelDelay();\n cancelDelay = delay(resizeUnblockUpdate, 250);\n if (globalProjectionState.hasAnimatedSinceResize) {\n globalProjectionState.hasAnimatedSinceResize = false;\n this.nodes.forEach(finishAnimation);\n }\n });\n }\n if (layoutId) {\n this.root.registerSharedNode(layoutId, this);\n }\n // Only register the handler if it requires layout animation\n if (this.options.animate !== false &&\n visualElement &&\n (layoutId || layout)) {\n this.addEventListener(\"didUpdate\", ({ delta, hasLayoutChanged, hasRelativeLayoutChanged, layout: newLayout, }) => {\n if (this.isTreeAnimationBlocked()) {\n this.target = undefined;\n this.relativeTarget = undefined;\n return;\n }\n // TODO: Check here if an animation exists\n const layoutTransition = this.options.transition ||\n visualElement.getDefaultTransition() ||\n defaultLayoutTransition;\n const { onLayoutAnimationStart, onLayoutAnimationComplete, } = visualElement.getProps();\n /**\n * The target layout of the element might stay the same,\n * but its position relative to its parent has changed.\n */\n const hasTargetChanged = !this.targetLayout ||\n !boxEqualsRounded(this.targetLayout, newLayout);\n /*\n * Note: Disabled to fix relative animations always triggering new\n * layout animations. If this causes further issues, we can try\n * a different approach to detecting relative target changes.\n */\n // || hasRelativeLayoutChanged\n /**\n * If the layout hasn't seemed to have changed, it might be that the\n * element is visually in the same place in the document but its position\n * relative to its parent has indeed changed. So here we check for that.\n */\n const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeLayoutChanged;\n if (this.options.layoutRoot ||\n this.resumeFrom ||\n hasOnlyRelativeTargetChanged ||\n (hasLayoutChanged &&\n (hasTargetChanged || !this.currentAnimation))) {\n if (this.resumeFrom) {\n this.resumingFrom = this.resumeFrom;\n this.resumingFrom.resumingFrom = undefined;\n }\n const animationOptions = {\n ...getValueTransition(layoutTransition, \"layout\"),\n onPlay: onLayoutAnimationStart,\n onComplete: onLayoutAnimationComplete,\n };\n if (visualElement.shouldReduceMotion ||\n this.options.layoutRoot) {\n animationOptions.delay = 0;\n animationOptions.type = false;\n }\n this.startAnimation(animationOptions);\n /**\n * Set animation origin after starting animation to avoid layout jump\n * caused by stopping previous layout animation\n */\n this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged, animationOptions\n .path);\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 committed to screen and look like a jumpy box.\n */\n if (!hasLayoutChanged) {\n finishAnimation(this);\n }\n if (this.isLead() && this.options.onExitComplete) {\n this.options.onExitComplete();\n }\n }\n this.targetLayout = newLayout;\n });\n }\n }\n unmount() {\n this.options.layoutId && this.willUpdate();\n this.root.nodes.remove(this);\n const stack = this.getStack();\n stack && stack.remove(this);\n this.parent && this.parent.children.delete(this);\n this.instance = undefined;\n this.eventHandlers.clear();\n cancelFrame(this.updateProjection);\n }\n // only on the root\n blockUpdate() {\n this.updateManuallyBlocked = true;\n }\n unblockUpdate() {\n this.updateManuallyBlocked = false;\n }\n isUpdateBlocked() {\n return this.updateManuallyBlocked || this.updateBlockedByResize;\n }\n isTreeAnimationBlocked() {\n return (this.isAnimationBlocked ||\n (this.parent && this.parent.isTreeAnimationBlocked()) ||\n false);\n }\n // Note: currently only running on root node\n startUpdate() {\n if (this.isUpdateBlocked())\n return;\n this.isUpdating = true;\n this.nodes && this.nodes.forEach(resetSkewAndRotation);\n this.animationId++;\n }\n getTransformTemplate() {\n const { visualElement } = this.options;\n return visualElement && visualElement.getProps().transformTemplate;\n }\n willUpdate(shouldNotifyListeners = true) {\n this.root.hasTreeAnimated = true;\n if (this.root.isUpdateBlocked()) {\n this.options.onExitComplete && this.options.onExitComplete();\n return;\n }\n /**\n * If we're running optimised appear animations then these must be\n * cancelled before measuring the DOM. This is so we can measure\n * the true layout of the element rather than the WAAPI animation\n * which will be unaffected by the resetSkewAndRotate step.\n *\n * Note: This is a DOM write. Worst case scenario is this is sandwiched\n * between other snapshot reads which will cause unnecessary style recalculations.\n * This has to happen here though, as we don't yet know which nodes will need\n * snapshots in startUpdate(), but we only want to cancel optimised animations\n * if a layout animation measurement is actually going to be affected by them.\n */\n if (window.MotionCancelOptimisedAnimation &&\n !this.hasCheckedOptimisedAppear) {\n cancelTreeOptimisedTransformAnimations(this);\n }\n !this.root.isUpdating && this.root.startUpdate();\n if (this.isLayoutDirty)\n return;\n this.isLayoutDirty = true;\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.shouldResetTransform = true;\n /**\n * Percentage translates resolve against layoutBox dimensions,\n * so ancestors with them must be re-measured after transform reset.\n */\n if (typeof node.latestValues.x === \"string\" ||\n typeof node.latestValues.y === \"string\") {\n node.isLayoutDirty = true;\n }\n node.updateScroll(\"snapshot\");\n if (node.options.layoutRoot) {\n node.willUpdate(false);\n }\n }\n const { layoutId, layout } = this.options;\n if (layoutId === undefined && !layout)\n return;\n const transformTemplate = this.getTransformTemplate();\n this.prevTransformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n this.updateSnapshot();\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\");\n }\n update() {\n this.updateScheduled = false;\n const updateWasBlocked = this.isUpdateBlocked();\n // When doing an instant transition, we skip the layout update,\n // but should still clean up the measurements so that the next\n // snapshot could be taken correctly.\n if (updateWasBlocked) {\n const wasBlockedByResize = this.updateBlockedByResize;\n this.unblockUpdate();\n this.updateBlockedByResize = false;\n this.clearAllSnapshots();\n /**\n * When blocked by resize, still measure layouts so\n * callbacks like onLayoutMeasure fire (e.g. Reorder).\n * Skip notifyLayoutUpdate to prevent animations.\n */\n if (wasBlockedByResize) {\n this.nodes.forEach(forceLayoutMeasure);\n }\n this.nodes.forEach(clearMeasurements);\n return;\n }\n /**\n * If this is a repeat of didUpdate then ignore the animation.\n */\n if (this.animationId <= this.animationCommitId) {\n this.nodes.forEach(clearIsLayoutDirty);\n return;\n }\n this.animationCommitId = this.animationId;\n if (!this.isUpdating) {\n this.nodes.forEach(clearIsLayoutDirty);\n }\n else {\n this.isUpdating = false;\n /**\n * Ensure animation-blocked nodes (e.g. during drag)\n * get measured even when memoized (willUpdate skipped).\n */\n this.nodes.forEach(ensureDraggedNodesSnapshotted);\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 }\n this.clearAllSnapshots();\n /**\n * Manually flush any pending updates. Ideally\n * we could leave this to the following requestAnimationFrame but this seems\n * to leave a flash of incorrectly styled content.\n */\n const now = time.now();\n frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp);\n frameData.timestamp = now;\n frameData.isProcessing = true;\n frameSteps.update.process(frameData);\n frameSteps.preRender.process(frameData);\n frameSteps.render.process(frameData);\n frameData.isProcessing = false;\n }\n didUpdate() {\n if (!this.updateScheduled) {\n this.updateScheduled = true;\n microtask.read(this.scheduleUpdate);\n }\n }\n clearAllSnapshots() {\n this.nodes.forEach(clearSnapshot);\n this.sharedNodes.forEach(removeLeadSnapshots);\n }\n scheduleUpdateProjection() {\n if (!this.projectionUpdateScheduled) {\n this.projectionUpdateScheduled = true;\n frame.preRender(this.updateProjection, false, true);\n }\n }\n scheduleCheckAfterUnmount() {\n /**\n * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n * we manually call didUpdate to give a chance to the siblings to animate.\n * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n */\n frame.postRender(() => {\n if (this.isLayoutDirty) {\n this.root.didUpdate();\n }\n else {\n this.root.checkUpdateFailed();\n }\n });\n }\n /**\n * Update measurements\n */\n updateSnapshot() {\n if (this.snapshot || !this.instance)\n return;\n this.snapshot = this.measure();\n if (this.snapshot &&\n !calcLength(this.snapshot.measuredBox.x) &&\n !calcLength(this.snapshot.measuredBox.y)) {\n this.snapshot = undefined;\n }\n }\n updateLayout() {\n if (!this.instance)\n return;\n this.updateScroll();\n if (!(this.options.alwaysMeasureLayout && this.isLead()) &&\n !this.isLayoutDirty) {\n return;\n }\n /**\n * When a node is mounted, it simply resumes from the prevLead's\n * snapshot instead of taking a new one, but the ancestors scroll\n * might have updated while the prevLead is unmounted. We need to\n * update the scroll again to make sure the layout we measure is\n * up to date.\n */\n if (this.resumeFrom && !this.resumeFrom.instance) {\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.updateScroll();\n }\n }\n const prevLayout = this.layout;\n this.layout = this.measure(false);\n this.layoutVersion++;\n if (!this.layoutCorrected)\n this.layoutCorrected = createBox();\n this.isLayoutDirty = false;\n this.projectionDelta = undefined;\n this.notifyListeners(\"measure\", this.layout.layoutBox);\n const { visualElement } = this.options;\n visualElement &&\n visualElement.notify(\"LayoutMeasure\", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined);\n }\n updateScroll(phase = \"measure\") {\n let needsMeasurement = Boolean(this.options.layoutScroll && this.instance);\n if (this.scroll &&\n this.scroll.animationId === this.root.animationId &&\n this.scroll.phase === phase) {\n needsMeasurement = false;\n }\n if (needsMeasurement && this.instance) {\n const isRoot = checkIsScrollRoot(this.instance);\n this.scroll = {\n animationId: this.root.animationId,\n phase,\n isRoot,\n offset: measureScroll(this.instance),\n wasRoot: this.scroll ? this.scroll.isRoot : isRoot,\n };\n }\n }\n resetTransform() {\n if (!resetTransform)\n return;\n const isResetRequested = this.isLayoutDirty ||\n this.shouldResetTransform ||\n this.options.alwaysMeasureLayout;\n const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);\n const transformTemplate = this.getTransformTemplate();\n const transformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;\n if (isResetRequested &&\n this.instance &&\n (hasProjection ||\n hasTransform(this.latestValues) ||\n transformTemplateHasChanged)) {\n resetTransform(this.instance, transformTemplateValue);\n this.shouldResetTransform = false;\n this.scheduleRender();\n }\n }\n measure(removeTransform = true) {\n const pageBox = this.measurePageBox();\n let layoutBox = this.removeElementScroll(pageBox);\n /**\n * Measurements taken during the pre-render stage\n * still have transforms applied so we remove them\n * via calculation.\n */\n if (removeTransform) {\n layoutBox = this.removeTransform(layoutBox);\n }\n roundBox(layoutBox);\n return {\n animationId: this.root.animationId,\n measuredBox: pageBox,\n layoutBox,\n latestValues: {},\n source: this.id,\n };\n }\n measurePageBox() {\n const { visualElement } = this.options;\n if (!visualElement)\n return createBox();\n const box = visualElement.measureViewportBox();\n const wasInScrollRoot = this.scroll?.wasRoot || this.path.some(checkNodeWasScrollRoot);\n if (!wasInScrollRoot) {\n // Remove viewport scroll to give page-relative coordinates\n const { scroll } = this.root;\n if (scroll) {\n translateAxis(box.x, scroll.offset.x);\n translateAxis(box.y, scroll.offset.y);\n }\n }\n return box;\n }\n removeElementScroll(box) {\n const boxWithoutScroll = createBox();\n copyBoxInto(boxWithoutScroll, box);\n if (this.scroll?.wasRoot) {\n return boxWithoutScroll;\n }\n /**\n * Performance TODO: Keep a cumulative scroll offset down the tree\n * rather than loop back up the path.\n */\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n const { scroll, options } = node;\n if (node !== this.root && scroll && options.layoutScroll) {\n /**\n * If this is a new scroll root, we want to remove all previous scrolls\n * from the viewport box.\n */\n if (scroll.wasRoot) {\n copyBoxInto(boxWithoutScroll, box);\n }\n translateAxis(boxWithoutScroll.x, scroll.offset.x);\n translateAxis(boxWithoutScroll.y, scroll.offset.y);\n }\n }\n return boxWithoutScroll;\n }\n applyTransform(box, transformOnly = false, output) {\n const withTransforms = output || createBox();\n copyBoxInto(withTransforms, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!transformOnly &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n translateAxis(withTransforms.x, -node.scroll.offset.x);\n translateAxis(withTransforms.y, -node.scroll.offset.y);\n }\n if (!hasTransform(node.latestValues))\n continue;\n transformBox(withTransforms, node.latestValues, node.layout?.layoutBox);\n }\n if (hasTransform(this.latestValues)) {\n transformBox(withTransforms, this.latestValues, this.layout?.layoutBox);\n }\n return withTransforms;\n }\n removeTransform(box) {\n const boxWithoutTransform = createBox();\n copyBoxInto(boxWithoutTransform, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!hasTransform(node.latestValues))\n continue;\n let sourceBox;\n if (node.instance) {\n hasScale(node.latestValues) && node.updateSnapshot();\n sourceBox = createBox();\n copyBoxInto(sourceBox, node.measurePageBox());\n }\n removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot?.layoutBox, sourceBox);\n }\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues);\n }\n return boxWithoutTransform;\n }\n setTargetDelta(delta) {\n this.targetDelta = delta;\n this.root.scheduleUpdateProjection();\n this.isProjectionDirty = true;\n }\n setOptions(options) {\n this.options = {\n ...this.options,\n ...options,\n crossfade: options.crossfade !== undefined ? options.crossfade : true,\n };\n }\n clearMeasurements() {\n this.scroll = undefined;\n this.layout = undefined;\n this.snapshot = undefined;\n this.prevTransformTemplateValue = undefined;\n this.targetDelta = undefined;\n this.target = undefined;\n this.isLayoutDirty = false;\n }\n forceRelativeParentToResolveTarget() {\n if (!this.relativeParent)\n return;\n /**\n * If the parent target isn't up-to-date, force it to update.\n * This is an unfortunate de-optimisation as it means any updating relative\n * projection will cause all the relative parents to recalculate back\n * up the tree.\n */\n if (this.relativeParent.resolvedRelativeTargetAt !==\n frameData.timestamp) {\n this.relativeParent.resolveTargetDelta(true);\n }\n }\n resolveTargetDelta(forceRecalculation = false) {\n /**\n * Once the dirty status of nodes has been spread through the tree, we also\n * need to check if we have a shared node of a different depth that has itself\n * been dirtied.\n */\n const lead = this.getLead();\n this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty);\n this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty);\n this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty);\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n /**\n * We don't use transform for this step of processing so we don't\n * need to check whether any nodes have changed transform.\n */\n const canSkip = !(forceRecalculation ||\n (isShared && this.isSharedProjectionDirty) ||\n this.isProjectionDirty ||\n this.parent?.isProjectionDirty ||\n this.attemptToResolveRelativeTarget ||\n this.root.updateBlockedByResize);\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If we have no layout, we can't perform projection, so early return\n */\n if (!this.layout || !(layout || layoutId))\n return;\n this.resolvedRelativeTargetAt = frameData.timestamp;\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n this.linkedParentVersion !== relativeParent.layoutVersion &&\n !relativeParent.options.layoutRoot) {\n this.removeRelativeTarget();\n }\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 if (!this.targetDelta && !this.relativeTarget) {\n if (this.options.layoutAnchor !== false &&\n relativeParent &&\n relativeParent.layout) {\n this.createRelativeTarget(relativeParent, this.layout.layoutBox, relativeParent.layout.layoutBox);\n }\n else {\n this.removeRelativeTarget();\n }\n }\n /**\n * If we have no relative target or no target delta our target isn't valid\n * for this frame.\n */\n if (!this.relativeTarget && !this.targetDelta)\n return;\n /**\n * Lazy-init target data structure\n */\n if (!this.target) {\n this.target = createBox();\n this.targetWithTransforms = createBox();\n }\n /**\n * If we've got a relative box for this component, resolve it into a target relative to the parent.\n */\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.relativeParent &&\n this.relativeParent.target) {\n this.forceRelativeParentToResolveTarget();\n calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || undefined);\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 this.applyTransform(this.layout.layoutBox, false, this.target);\n }\n else {\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n applyBoxDelta(this.target, this.targetDelta);\n }\n else {\n /**\n * If no target, use own layout as target\n */\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n /**\n * If we've been told to attempt to resolve a relative target, do so.\n */\n if (this.attemptToResolveRelativeTarget) {\n this.attemptToResolveRelativeTarget = false;\n if (this.options.layoutAnchor !== false &&\n relativeParent &&\n Boolean(relativeParent.resumingFrom) ===\n Boolean(this.resumingFrom) &&\n !relativeParent.options.layoutScroll &&\n relativeParent.target &&\n this.animationProgress !== 1) {\n this.createRelativeTarget(relativeParent, this.target, relativeParent.target);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\n }\n }\n /**\n * Increase debug counter for resolved target deltas\n */\n if (statsBuffer.value) {\n metrics.calculatedTargetDeltas++;\n }\n }\n getClosestProjectingParent() {\n if (!this.parent ||\n hasScale(this.parent.latestValues) ||\n has2DTranslate(this.parent.latestValues)) {\n return undefined;\n }\n if (this.parent.isProjecting()) {\n return this.parent;\n }\n else {\n return this.parent.getClosestProjectingParent();\n }\n }\n isProjecting() {\n return Boolean((this.relativeTarget ||\n this.targetDelta ||\n this.options.layoutRoot) &&\n this.layout);\n }\n createRelativeTarget(relativeParent, layout, parentLayout) {\n this.relativeParent = relativeParent;\n this.linkedParentVersion = relativeParent.layoutVersion;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, layout, parentLayout, this.options.layoutAnchor || undefined);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n removeRelativeTarget() {\n this.relativeParent = this.relativeTarget = undefined;\n }\n calcProjection() {\n const lead = this.getLead();\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n let canSkip = true;\n /**\n * If this is a normal layout animation and neither this node nor its nearest projecting\n * is dirty then we can't skip.\n */\n if (this.isProjectionDirty || this.parent?.isProjectionDirty) {\n canSkip = false;\n }\n /**\n * If this is a shared layout animation and this node's shared projection is dirty then\n * we can't skip.\n */\n if (isShared &&\n (this.isSharedProjectionDirty || this.isTransformDirty)) {\n canSkip = false;\n }\n /**\n * If we have resolved the target this frame we must recalculate the\n * projection to ensure it visually represents the internal calculations.\n */\n if (this.resolvedRelativeTargetAt === frameData.timestamp) {\n canSkip = false;\n }\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If this section of the tree isn't animating we can\n * delete our target sources for the following frame.\n */\n this.isTreeAnimating = Boolean((this.parent && this.parent.isTreeAnimating) ||\n this.currentAnimation ||\n this.pendingAnimation);\n if (!this.isTreeAnimating) {\n this.targetDelta = this.relativeTarget = undefined;\n }\n if (!this.layout || !(layout || layoutId))\n return;\n /**\n * Reset the corrected box with the latest values from box, as we're then going\n * to perform mutative operations on it.\n */\n copyBoxInto(this.layoutCorrected, this.layout.layoutBox);\n /**\n * Record previous tree scales before updating.\n */\n const prevTreeScaleX = this.treeScale.x;\n const prevTreeScaleY = this.treeScale.y;\n /**\n * Apply all the parent deltas to this box to produce the corrected box. This\n * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n */\n applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared);\n /**\n * If this layer needs to perform scale correction but doesn't have a target,\n * use the layout as the target.\n */\n if (lead.layout &&\n !lead.target &&\n (this.treeScale.x !== 1 || this.treeScale.y !== 1)) {\n lead.target = lead.layout.layoutBox;\n lead.targetWithTransforms = createBox();\n }\n const { target } = lead;\n if (!target) {\n /**\n * If we don't have a target to project into, but we were previously\n * projecting, we want to remove the stored transform and schedule\n * a render to ensure the elements reflect the removed transform.\n */\n if (this.prevProjectionDelta) {\n this.createProjectionDeltas();\n this.scheduleRender();\n }\n return;\n }\n if (!this.projectionDelta || !this.prevProjectionDelta) {\n this.createProjectionDeltas();\n }\n else {\n copyAxisDeltaInto(this.prevProjectionDelta.x, this.projectionDelta.x);\n copyAxisDeltaInto(this.prevProjectionDelta.y, this.projectionDelta.y);\n }\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 if (this.treeScale.x !== prevTreeScaleX ||\n this.treeScale.y !== prevTreeScaleY ||\n !axisDeltaEquals(this.projectionDelta.x, this.prevProjectionDelta.x) ||\n !axisDeltaEquals(this.projectionDelta.y, this.prevProjectionDelta.y)) {\n this.hasProjected = true;\n this.scheduleRender();\n this.notifyListeners(\"projectionUpdate\", target);\n }\n /**\n * Increase debug counter for recalculated projections\n */\n if (statsBuffer.value) {\n metrics.calculatedProjections++;\n }\n }\n hide() {\n this.isVisible = false;\n // TODO: Schedule render\n }\n show() {\n this.isVisible = true;\n // TODO: Schedule render\n }\n scheduleRender(notifyAll = true) {\n this.options.visualElement?.scheduleRender();\n if (notifyAll) {\n const stack = this.getStack();\n stack && stack.scheduleRender();\n }\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = undefined;\n }\n }\n createProjectionDeltas() {\n this.prevProjectionDelta = createDelta();\n this.projectionDelta = createDelta();\n this.projectionDeltaWithTransform = createDelta();\n }\n setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false, pathFn) {\n const snapshot = this.snapshot;\n const snapshotLatestValues = snapshot ? snapshot.latestValues : {};\n const mixedValues = { ...this.latestValues };\n const targetDelta = createDelta();\n if (!this.relativeParent ||\n !this.relativeParent.options.layoutRoot) {\n this.relativeTarget = this.relativeTargetOrigin = undefined;\n }\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;\n const relativeLayout = createBox();\n const snapshotSource = snapshot ? snapshot.source : undefined;\n const layoutSource = this.layout ? this.layout.source : undefined;\n const isSharedLayoutAnimation = snapshotSource !== layoutSource;\n const stack = this.getStack();\n const isOnlyMember = !stack || stack.members.length <= 1;\n const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation &&\n !isOnlyMember &&\n this.options.crossfade === true &&\n !this.path.some(hasOpacityCrossfade));\n this.animationProgress = 0;\n let prevRelativeTarget;\n // The path decides whether the layout shift is worth curving\n // (distance floor) and resolves the interpolator from the delta.\n const interpolate = pathFn?.interpolateProjection(delta);\n this.mixTargetDelta = (latest) => {\n const progress = latest / 1000;\n const point = interpolate?.(progress);\n if (point) {\n targetDelta.x.translate = point.x;\n targetDelta.x.scale = mixNumber(delta.x.scale, 1, progress);\n targetDelta.x.origin = delta.x.origin;\n targetDelta.x.originPoint = delta.x.originPoint;\n targetDelta.y.translate = point.y;\n targetDelta.y.scale = mixNumber(delta.y.scale, 1, progress);\n targetDelta.y.origin = delta.y.origin;\n targetDelta.y.originPoint = delta.y.originPoint;\n }\n else {\n mixAxisDeltaLinear(targetDelta.x, delta.x, progress);\n mixAxisDeltaLinear(targetDelta.y, delta.y, progress);\n }\n this.setTargetDelta(targetDelta);\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.layout &&\n this.relativeParent &&\n this.relativeParent.layout) {\n calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || undefined);\n mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress);\n /**\n * If this is an unchanged relative target we can consider the\n * projection not dirty.\n */\n if (prevRelativeTarget &&\n boxEquals(this.relativeTarget, prevRelativeTarget)) {\n this.isProjectionDirty = false;\n }\n if (!prevRelativeTarget)\n prevRelativeTarget = createBox();\n copyBoxInto(prevRelativeTarget, this.relativeTarget);\n }\n if (isSharedLayoutAnimation) {\n this.animationValues = mixedValues;\n mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);\n }\n if (point && point.rotate !== undefined) {\n // Dedicated `pathRotation` channel, not `rotate`, so an\n // animating `rotate` is composed with, never clobbered.\n if (!this.animationValues)\n this.animationValues = mixedValues;\n this.animationValues.pathRotation = point.rotate;\n }\n this.root.scheduleUpdateProjection();\n this.scheduleRender();\n this.animationProgress = progress;\n };\n this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0);\n }\n startAnimation(options) {\n this.notifyListeners(\"animationStart\");\n this.currentAnimation?.stop();\n this.resumingFrom?.currentAnimation?.stop();\n if (this.pendingAnimation) {\n cancelFrame(this.pendingAnimation);\n this.pendingAnimation = undefined;\n }\n /**\n * Start the animation in the next frame to have a frame with progress 0,\n * where the target is the same as when the animation started, so we can\n * calculate the relative positions correctly for instant transitions.\n */\n this.pendingAnimation = frame.update(() => {\n globalProjectionState.hasAnimatedSinceResize = true;\n this.motionValue || (this.motionValue = motionValue(0));\n this.motionValue.jump(0, false);\n this.currentAnimation = animateSingleValue(this.motionValue, [0, 1000], {\n ...options,\n velocity: 0,\n isSync: true,\n onUpdate: (latest) => {\n this.mixTargetDelta(latest);\n options.onUpdate && options.onUpdate(latest);\n },\n onComplete: () => {\n options.onComplete && options.onComplete();\n this.completeAnimation();\n },\n });\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = this.currentAnimation;\n }\n this.pendingAnimation = undefined;\n });\n }\n completeAnimation() {\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = undefined;\n this.resumingFrom.preserveOpacity = undefined;\n }\n const stack = this.getStack();\n stack && stack.exitAnimationComplete();\n this.resumingFrom =\n this.currentAnimation =\n this.animationValues =\n undefined;\n this.notifyListeners(\"animationComplete\");\n }\n finishAnimation() {\n if (this.currentAnimation) {\n this.mixTargetDelta && this.mixTargetDelta(animationTarget);\n this.currentAnimation.stop();\n }\n this.completeAnimation();\n }\n applyTransformsToTarget() {\n const lead = this.getLead();\n let { targetWithTransforms, target, layout, latestValues } = lead;\n if (!targetWithTransforms || !target || !layout)\n return;\n /**\n * If we're only animating position, and this element isn't the lead element,\n * then instead of projecting into the lead box we instead want to calculate\n * a new target that aligns the two boxes but maintains the layout shape.\n */\n if (this !== lead &&\n this.layout &&\n layout &&\n shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) {\n target = this.target || createBox();\n const xLength = calcLength(this.layout.layoutBox.x);\n target.x.min = lead.target.x.min;\n target.x.max = target.x.min + xLength;\n const yLength = calcLength(this.layout.layoutBox.y);\n target.y.min = lead.target.y.min;\n target.y.max = target.y.min + yLength;\n }\n copyBoxInto(targetWithTransforms, target);\n /**\n * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n * This is the final box that we will then project into by calculating a transform delta and\n * applying it to the corrected box.\n */\n transformBox(targetWithTransforms, latestValues);\n /**\n * Update the delta between the corrected box and the final target box, after\n * user-set transforms are applied to it. This will be used by the renderer to\n * create a transform style that will reproject the element from its layout layout\n * into the desired bounding box.\n */\n calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);\n }\n registerSharedNode(layoutId, node) {\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack());\n }\n const stack = this.sharedNodes.get(layoutId);\n stack.add(node);\n const config = node.options.initialPromotionConfig;\n node.promote({\n transition: config ? config.transition : undefined,\n preserveFollowOpacity: config && config.shouldPreserveFollowOpacity\n ? config.shouldPreserveFollowOpacity(node)\n : undefined,\n });\n }\n isLead() {\n const stack = this.getStack();\n return stack ? stack.lead === this : true;\n }\n getLead() {\n const { layoutId } = this.options;\n return layoutId ? this.getStack()?.lead || this : this;\n }\n getPrevLead() {\n const { layoutId } = this.options;\n return layoutId ? this.getStack()?.prevLead : undefined;\n }\n getStack() {\n const { layoutId } = this.options;\n if (layoutId)\n return this.root.sharedNodes.get(layoutId);\n }\n promote({ needsReset, transition, preserveFollowOpacity, } = {}) {\n const stack = this.getStack();\n if (stack)\n stack.promote(this, preserveFollowOpacity);\n if (needsReset) {\n this.projectionDelta = undefined;\n this.needsReset = true;\n }\n if (transition)\n this.setOptions({ transition });\n }\n relegate() {\n const stack = this.getStack();\n if (stack) {\n return stack.relegate(this);\n }\n else {\n return false;\n }\n }\n resetSkewAndRotation() {\n const { visualElement } = this.options;\n if (!visualElement)\n return;\n // If there's no detected skew or rotation values, we can early return without a forced render.\n let hasDistortingTransform = false;\n /**\n * An unrolled check for rotation values. Most elements don't have any rotation and\n * skipping the nested loop and new object creation is 50% faster.\n */\n const { latestValues } = visualElement;\n if (latestValues.z ||\n latestValues.rotate ||\n latestValues.rotateX ||\n latestValues.rotateY ||\n latestValues.rotateZ ||\n latestValues.skewX ||\n latestValues.skewY) {\n hasDistortingTransform = true;\n }\n // If there's no distorting values, we don't need to do any more.\n if (!hasDistortingTransform)\n return;\n const resetValues = {};\n if (latestValues.z) {\n resetDistortingTransform(\"z\", visualElement, resetValues, this.animationValues);\n }\n // Check the skew and rotate value of all axes and reset to 0\n for (let i = 0; i < transformAxes.length; i++) {\n resetDistortingTransform(`rotate${transformAxes[i]}`, visualElement, resetValues, this.animationValues);\n resetDistortingTransform(`skew${transformAxes[i]}`, visualElement, resetValues, this.animationValues);\n }\n // Force a render of this element to apply the transform with all skews and rotations\n // set to 0.\n visualElement.render();\n // Put back all the values we reset\n for (const key in resetValues) {\n visualElement.setStaticValue(key, resetValues[key]);\n if (this.animationValues) {\n this.animationValues[key] = resetValues[key];\n }\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 applyProjectionStyles(targetStyle, // CSSStyleDeclaration - doesn't allow numbers to be assigned to properties\n styleProp) {\n if (!this.instance || this.isSVG)\n return;\n if (!this.isVisible) {\n targetStyle.visibility = \"hidden\";\n return;\n }\n const transformTemplate = this.getTransformTemplate();\n if (this.needsReset) {\n this.needsReset = false;\n targetStyle.visibility = \"\";\n targetStyle.opacity = \"\";\n targetStyle.pointerEvents =\n resolveMotionValue(styleProp?.pointerEvents) || \"\";\n targetStyle.transform = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : \"none\";\n return;\n }\n const lead = this.getLead();\n if (!this.projectionDelta || !this.layout || !lead.target) {\n if (this.options.layoutId) {\n targetStyle.opacity =\n this.latestValues.opacity !== undefined\n ? this.latestValues.opacity\n : 1;\n targetStyle.pointerEvents =\n resolveMotionValue(styleProp?.pointerEvents) || \"\";\n }\n if (this.hasProjected && !hasTransform(this.latestValues)) {\n targetStyle.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n this.hasProjected = false;\n }\n return;\n }\n targetStyle.visibility = \"\";\n const valuesToRender = lead.animationValues || lead.latestValues;\n this.applyTransformsToTarget();\n let transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);\n if (transformTemplate) {\n transform = transformTemplate(valuesToRender, transform);\n }\n targetStyle.transform = transform;\n const { x, y } = this.projectionDelta;\n targetStyle.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;\n if (lead.animationValues) {\n /**\n * If the lead component is animating, assign this either the entering/leaving\n * opacity\n */\n targetStyle.opacity =\n lead === this\n ? valuesToRender.opacity ??\n this.latestValues.opacity ??\n 1\n : this.preserveOpacity\n ? this.latestValues.opacity\n : valuesToRender.opacityExit;\n }\n else {\n /**\n * Or we're not animating at all, set the lead component to its layout\n * opacity and other components to hidden.\n */\n targetStyle.opacity =\n lead === this\n ? valuesToRender.opacity !== undefined\n ? valuesToRender.opacity\n : \"\"\n : valuesToRender.opacityExit !== undefined\n ? valuesToRender.opacityExit\n : 0;\n }\n /**\n * Apply scale correction\n */\n for (const key in scaleCorrectors) {\n if (valuesToRender[key] === undefined)\n continue;\n const { correct, applyTo, isCSSVariable } = scaleCorrectors[key];\n /**\n * Only apply scale correction to the value if we have an\n * active projection transform. Otherwise these values become\n * vulnerable to distortion if the element changes size without\n * a corresponding layout animation.\n */\n const corrected = transform === \"none\"\n ? valuesToRender[key]\n : correct(valuesToRender[key], lead);\n if (applyTo) {\n const num = applyTo.length;\n for (let i = 0; i < num; i++) {\n targetStyle[applyTo[i]] = corrected;\n }\n }\n else {\n // If this is a CSS variable, set it directly on the instance.\n // Replacing this function from creating styles to setting them\n // would be a good place to remove per frame object creation\n if (isCSSVariable) {\n this.options.visualElement.renderState.vars[key] = corrected;\n }\n else {\n targetStyle[key] = corrected;\n }\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 targetStyle.pointerEvents =\n lead === this\n ? resolveMotionValue(styleProp?.pointerEvents) || \"\"\n : \"none\";\n }\n }\n clearSnapshot() {\n this.resumeFrom = this.snapshot = undefined;\n }\n // Only run on root\n resetTree() {\n this.root.nodes.forEach((node) => node.currentAnimation?.stop());\n this.root.nodes.forEach(clearMeasurements);\n this.root.sharedNodes.clear();\n }\n };\n}\nfunction updateLayout(node) {\n node.updateLayout();\n}\nfunction notifyLayoutUpdate(node) {\n const snapshot = node.resumeFrom?.snapshot || node.snapshot;\n if (node.isLead() &&\n node.layout &&\n snapshot &&\n node.hasListeners(\"didUpdate\")) {\n const { layoutBox: layout, measuredBox: measuredLayout } = node.layout;\n const { animationType } = node.options;\n const isShared = snapshot.source !== node.layout.source;\n // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n // animations for instance if layout=\"size\" and an element has only changed position\n if (animationType === \"size\") {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(axisSnapshot);\n axisSnapshot.min = layout[axis].min;\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n else if (animationType === \"x\" || animationType === \"y\") {\n const snapAxis = animationType === \"x\" ? \"y\" : \"x\";\n copyAxisInto(isShared\n ? snapshot.measuredBox[snapAxis]\n : snapshot.layoutBox[snapAxis], layout[snapAxis]);\n }\n else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(layout[axis]);\n axisSnapshot.max = axisSnapshot.min + length;\n /**\n * Ensure relative target gets resized and rerendererd\n */\n if (node.relativeTarget && !node.currentAnimation) {\n node.isProjectionDirty = true;\n node.relativeTarget[axis].max =\n node.relativeTarget[axis].min + length;\n }\n });\n }\n const layoutDelta = createDelta();\n calcBoxDelta(layoutDelta, layout, snapshot.layoutBox);\n const visualDelta = createDelta();\n if (isShared) {\n calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox);\n }\n else {\n calcBoxDelta(visualDelta, layout, snapshot.layoutBox);\n }\n const hasLayoutChanged = !isDeltaZero(layoutDelta);\n let hasRelativeLayoutChanged = false;\n if (!node.resumeFrom) {\n const relativeParent = node.getClosestProjectingParent();\n /**\n * If the relativeParent is itself resuming from a different element then\n * the relative snapshot is not relavent\n */\n if (relativeParent && !relativeParent.resumeFrom) {\n const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent;\n if (parentSnapshot && parentLayout) {\n const anchor = node.options.layoutAnchor || undefined;\n const relativeSnapshot = createBox();\n calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox, anchor);\n const relativeLayout = createBox();\n calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox, anchor);\n if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {\n hasRelativeLayoutChanged = true;\n }\n if (relativeParent.options.layoutRoot) {\n node.relativeTarget = relativeLayout;\n node.relativeTargetOrigin = relativeSnapshot;\n node.relativeParent = relativeParent;\n }\n }\n }\n }\n node.notifyListeners(\"didUpdate\", {\n layout,\n snapshot,\n delta: visualDelta,\n layoutDelta,\n hasLayoutChanged,\n hasRelativeLayoutChanged,\n });\n }\n else if (node.isLead()) {\n const { onExitComplete } = node.options;\n onExitComplete && onExitComplete();\n }\n /**\n * Clearing transition\n * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n * and why we need it at all\n */\n node.options.transition = undefined;\n}\nfunction propagateDirtyNodes(node) {\n /**\n * Increase debug counter for nodes encountered this frame\n */\n if (statsBuffer.value) {\n metrics.nodes++;\n }\n if (!node.parent)\n return;\n /**\n * If this node isn't projecting, propagate isProjectionDirty. It will have\n * no performance impact but it will allow the next child that *is* projecting\n * but *isn't* dirty to just check its parent to see if *any* ancestor needs\n * correcting.\n */\n if (!node.isProjecting()) {\n node.isProjectionDirty = node.parent.isProjectionDirty;\n }\n /**\n * Propagate isSharedProjectionDirty and isTransformDirty\n * throughout the whole tree. A future revision can take another look at\n * this but for safety we still recalcualte shared nodes.\n */\n node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty ||\n node.parent.isProjectionDirty ||\n node.parent.isSharedProjectionDirty));\n node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty);\n}\nfunction cleanDirtyNodes(node) {\n node.isProjectionDirty =\n node.isSharedProjectionDirty =\n node.isTransformDirty =\n false;\n}\nfunction clearSnapshot(node) {\n node.clearSnapshot();\n}\nfunction clearMeasurements(node) {\n node.clearMeasurements();\n}\nfunction forceLayoutMeasure(node) {\n node.isLayoutDirty = true;\n node.updateLayout();\n}\nfunction clearIsLayoutDirty(node) {\n node.isLayoutDirty = false;\n}\n/**\n * When a node is animation-blocked (e.g. during drag) and its component\n * didn't re-render (memoized), willUpdate() is never called so there's\n * no snapshot. Use the previous layout as a snapshot and mark dirty so\n * resetTransform/updateLayout/notifyLayoutUpdate process it normally.\n */\nfunction ensureDraggedNodesSnapshotted(node) {\n if (node.isAnimationBlocked && node.layout && !node.isLayoutDirty) {\n node.snapshot = node.layout;\n node.isLayoutDirty = true;\n }\n}\nfunction resetTransformStyle(node) {\n const { visualElement } = node.options;\n if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notify(\"BeforeLayoutMeasure\");\n }\n node.resetTransform();\n}\nfunction finishAnimation(node) {\n node.finishAnimation();\n node.targetDelta = node.relativeTarget = node.target = undefined;\n node.isProjectionDirty = true;\n}\nfunction resolveTargetDelta(node) {\n node.resolveTargetDelta();\n}\nfunction calcProjection(node) {\n node.calcProjection();\n}\nfunction resetSkewAndRotation(node) {\n node.resetSkewAndRotation();\n}\nfunction removeLeadSnapshots(stack) {\n stack.removeLeadSnapshot();\n}\nfunction mixAxisDeltaLinear(output, delta, p) {\n output.translate = mixNumber(delta.translate, 0, p);\n output.scale = mixNumber(delta.scale, 1, p);\n output.origin = delta.origin;\n output.originPoint = delta.originPoint;\n}\nfunction mixAxis(output, from, to, p) {\n output.min = mixNumber(from.min, to.min, p);\n output.max = mixNumber(from.max, to.max, p);\n}\nfunction mixBox(output, from, to, p) {\n mixAxis(output.x, from.x, to.x, p);\n mixAxis(output.y, from.y, to.y, p);\n}\nfunction hasOpacityCrossfade(node) {\n return (node.animationValues && node.animationValues.opacityExit !== undefined);\n}\nconst defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1],\n};\nconst userAgentContains = (string) => typeof navigator !== \"undefined\" &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().includes(string);\n/**\n * Measured bounding boxes must be rounded in Safari and\n * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements\n * can appear to jump.\n */\nconst roundPoint = userAgentContains(\"applewebkit/\") && !userAgentContains(\"chrome/\")\n ? Math.round\n : noop;\nfunction roundAxis(axis) {\n // Round to the nearest .5 pixels to support subpixel layouts\n axis.min = roundPoint(axis.min);\n axis.max = roundPoint(axis.max);\n}\nfunction roundBox(box) {\n roundAxis(box.x);\n roundAxis(box.y);\n}\nfunction shouldAnimatePositionOnly(animationType, snapshot, layout) {\n return (animationType === \"position\" ||\n (animationType === \"preserve-aspect\" &&\n !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2)));\n}\nfunction checkNodeWasScrollRoot(node) {\n return node !== node.root && node.scroll?.wasRoot;\n}\n\nexport { cleanDirtyNodes, createProjectionNode, mixAxis, mixBox, propagateDirtyNodes };\n//# sourceMappingURL=create-projection-node.mjs.map\n","import { addDomEvent } from '../../events/add-dom-event.mjs';\nimport { createProjectionNode } from './create-projection-node.mjs';\n\nconst DocumentProjectionNode = createProjectionNode({\n attachResizeListener: (ref, notify) => addDomEvent(ref, \"resize\", notify),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,\n y: document.documentElement.scrollTop || document.body?.scrollTop || 0,\n }),\n checkIsScrollRoot: () => true,\n});\n\nexport { DocumentProjectionNode };\n//# sourceMappingURL=DocumentProjectionNode.mjs.map\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { DocumentProjectionNode } from './DocumentProjectionNode.mjs';\n\nconst rootProjectionNode = {\n current: undefined,\n};\nconst HTMLProjectionNode = createProjectionNode({\n measureScroll: (instance) => ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }),\n defaultParent: () => {\n if (!rootProjectionNode.current) {\n const documentNode = new DocumentProjectionNode({});\n documentNode.mount(window);\n documentNode.setOptions({ layoutScroll: true });\n rootProjectionNode.current = documentNode;\n }\n return rootProjectionNode.current;\n },\n resetTransform: (instance, value) => {\n instance.style.transform = value !== undefined ? value : \"none\";\n },\n checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === \"fixed\"),\n});\n\nexport { HTMLProjectionNode, rootProjectionNode };\n//# sourceMappingURL=HTMLProjectionNode.mjs.map\n","\"use client\";\nimport { createContext } from 'react';\n\n/**\n * @public\n */\nconst MotionConfigContext = createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n//# sourceMappingURL=MotionConfigContext.mjs.map\n","import * as React from 'react';\n\n/**\n * Taken from https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/compose-refs.tsx\n */\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n }\n else if (ref !== null && ref !== undefined) {\n ref.current = value;\n }\n}\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup === \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n // React <19 will log an error to the console if a callback ref returns a\n // value. We don't use ref cleanups internally so this will only happen if a\n // user's ref callback returns a value, which we only expect if they are\n // using the cleanup functionality added in React 19.\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup === \"function\") {\n cleanup();\n }\n else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */\nfunction useComposedRefs(...refs) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(composeRefs(...refs), refs);\n}\n\nexport { useComposedRefs };\n//# sourceMappingURL=use-composed-ref.mjs.map\n","\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { isHTMLElement } from 'motion-dom';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { useComposedRefs } from '../../utils/use-composed-ref.mjs';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {\n const parent = element.offsetParent;\n const parentWidth = isHTMLElement(parent)\n ? parent.offsetWidth || 0\n : 0;\n const parentHeight = isHTMLElement(parent)\n ? parent.offsetHeight || 0\n : 0;\n const computedStyle = getComputedStyle(element);\n const size = this.props.sizeRef.current;\n size.height = parseFloat(computedStyle.height);\n size.width = parseFloat(computedStyle.width);\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n size.right = parentWidth - size.width - size.left;\n size.bottom = parentHeight - size.height - size.top;\n size.direction = computedStyle.direction;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent, anchorX, anchorY, root, pop }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n direction: \"ltr\",\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * In React 19, refs are passed via props.ref instead of element.ref.\n * We check props.ref first (React 19) and fall back to element.ref (React 18).\n *\n * The composed ref is only used when popping the child out (pop !== false),\n * so we avoid reading children.props.ref otherwise. In React 18.3 that read\n * triggers a spurious \"`ref` is not a prop\" warning getter (#3745).\n */\n const childRef = pop !== false\n ? (children.props?.ref ??\n children?.ref)\n : undefined;\n const composedRef = useComposedRefs(ref, childRef);\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left, right, bottom, direction } = size.current;\n if (isPresent || pop === false || !ref.current || !width || !height)\n return;\n const isRTL = direction === \"rtl\";\n const x = anchorX === \"left\"\n ? (isRTL ? `right: ${right}` : `left: ${left}`)\n : (isRTL ? `left: ${left}` : `right: ${right}`);\n const y = anchorY === \"bottom\" ? `bottom: ${bottom}` : `top: ${top}`;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n const parent = root ?? document.head;\n parent.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n ${x}px !important;\n ${y}px !important;\n }\n `);\n }\n return () => {\n ref.current?.removeAttribute(\"data-motion-pop-id\");\n if (parent.contains(style)) {\n parent.removeChild(style);\n }\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, pop: pop, children: pop === false\n ? children\n : React.cloneElement(children, { ref: composedRef }) }));\n}\n\nexport { PopChild };\n//# sourceMappingURL=PopChild.mjs.map\n","\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useRef, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n // Written in a layout effect (not render) so discarded concurrent\n // renders can't leave the refs pointing at uncommitted state.\n const isPresentRef = useRef(isPresent);\n const onExitCompleteRef = useRef(onExitComplete);\n useIsomorphicLayoutEffect(() => {\n isPresentRef.current = isPresent;\n onExitCompleteRef.current = onExitComplete;\n });\n let isReusedContext = true;\n let context = useMemo(() => {\n isReusedContext = false;\n return {\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => {\n presenceChildren.delete(childId);\n !isPresentRef.current &&\n !presenceChildren.size &&\n onExitCompleteRef.current?.();\n };\n },\n };\n }, [isPresent, presenceChildren, onExitComplete]);\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 if (presenceAffectsLayout && isReusedContext) {\n context = { ...context };\n }\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n children = (jsx(PopChild, { pop: mode === \"popLayout\", isPresent: isPresent, anchorX: anchorX, anchorY: anchorY, root: root, children: children }));\n return (jsx(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n//# sourceMappingURL=PresenceChild.mjs.map\n","\"use client\";\nimport { useContext, useId, useEffect, useCallback } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed from the tree,\n * but `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence(subscribe = true) {\n const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent, onExitComplete, register } = context;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n const id = useId();\n useEffect(() => {\n if (subscribe) {\n return register(id);\n }\n }, [subscribe]);\n const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id), [id, onExitComplete, subscribe]);\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//# sourceMappingURL=use-presence.mjs.map\n","import { Children, isValidElement } from 'react';\n\nconst getChildKey = (child) => child.key || \"\";\nfunction onlyElements(children) {\n const filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, (child) => {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n\nexport { getChildKey, onlyElements };\n//# sourceMappingURL=utils.mjs.map\n","\"use client\";\nimport { jsx, Fragment } from 'react/jsx-runtime';\nimport { useMemo, useRef, useState, useContext } from 'react';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { usePresence } from './use-presence.mjs';\nimport { onlyElements, getChildKey } from './utils.mjs';\n\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * <AnimatePresence>\n * {items.map(item => (\n * <motion.div\n * key={item.id}\n * initial={{ opacity: 0 }}\n * animate={{ opacity: 1 }}\n * exit={{ opacity: 0 }}\n * />\n * ))}\n * </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nconst AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = \"sync\", propagate = false, anchorX = \"left\", anchorY = \"top\", root }) => {\n const [isParentPresent, safeToRemove] = usePresence(propagate);\n /**\n * Filter any children that aren't ReactElements. We can only track components\n * between renders with a props.key.\n */\n const presentChildren = useMemo(() => onlyElements(children), [children]);\n /**\n * Track the keys of the currently rendered children. This is used to\n * determine which children are exiting.\n */\n const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);\n /**\n * If `initial={false}` we only want to pass this to components in the first render.\n */\n const isInitialRender = useRef(true);\n /**\n * A ref containing the currently present children. When all exit animations\n * are complete, we use this to re-render the component with the latest children\n * *committed* rather than the latest children *rendered*.\n */\n const pendingPresentChildren = useRef(presentChildren);\n /**\n * Track which exiting children have finished animating out.\n */\n const exitComplete = useConstant(() => new Map());\n /**\n * Track which components are currently processing exit to prevent duplicate processing.\n */\n const exitingComponents = useRef(new Set());\n /**\n * Save children to render as React state. To ensure this component is concurrent-safe,\n * we check for exiting children via an effect.\n */\n const [diffedChildren, setDiffedChildren] = useState(presentChildren);\n const [renderedChildren, setRenderedChildren] = useState(presentChildren);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n pendingPresentChildren.current = presentChildren;\n /**\n * Update complete status of exiting children.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const key = getChildKey(renderedChildren[i]);\n if (!presentKeys.includes(key)) {\n if (exitComplete.get(key) !== true) {\n exitComplete.set(key, false);\n }\n }\n else {\n exitComplete.delete(key);\n exitingComponents.current.delete(key);\n }\n }\n }, [renderedChildren, presentKeys.length, presentKeys.join(\"-\")]);\n const exitingChildren = [];\n if (presentChildren !== diffedChildren) {\n let nextChildren = [...presentChildren];\n /**\n * Loop through all the currently rendered components and decide which\n * are exiting.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const child = renderedChildren[i];\n const key = getChildKey(child);\n if (!presentKeys.includes(key)) {\n nextChildren.splice(i, 0, child);\n exitingChildren.push(child);\n }\n }\n /**\n * If we're in \"wait\" mode, and we have exiting children, we want to\n * only render these until they've all exited.\n */\n if (mode === \"wait\" && exitingChildren.length) {\n nextChildren = exitingChildren;\n }\n setRenderedChildren(onlyElements(nextChildren));\n setDiffedChildren(presentChildren);\n /**\n * Early return to ensure once we've set state with the latest diffed\n * children, we can immediately re-render.\n */\n return null;\n }\n if (process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n renderedChildren.length > 1) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n /**\n * If we've been provided a forceRender function by the LayoutGroupContext,\n * we can use it to force a re-render amongst all surrounding components once\n * all components have finished animating out.\n */\n const { forceRender } = useContext(LayoutGroupContext);\n return (jsx(Fragment, { children: renderedChildren.map((child) => {\n const key = getChildKey(child);\n const isPresent = propagate && !isParentPresent\n ? false\n : presentChildren === renderedChildren ||\n presentKeys.includes(key);\n const onExit = () => {\n if (exitingComponents.current.has(key)) {\n return;\n }\n if (exitComplete.has(key)) {\n exitingComponents.current.add(key);\n exitComplete.set(key, true);\n }\n else {\n return;\n }\n let isEveryExitComplete = true;\n exitComplete.forEach((isExitComplete) => {\n if (!isExitComplete)\n isEveryExitComplete = false;\n });\n if (isEveryExitComplete) {\n forceRender?.();\n setRenderedChildren(pendingPresentChildren.current);\n propagate && safeToRemove?.();\n onExitComplete && onExitComplete();\n }\n };\n return (jsx(PresenceChild, { isPresent: isPresent, initial: !isInitialRender.current || initial\n ? undefined\n : false, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, root: root, onExitComplete: isPresent ? undefined : onExit, anchorX: anchorX, anchorY: anchorY, children: child }, key));\n }) }));\n};\n\nexport { AnimatePresence };\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\nimport { createContext } from 'react';\n\nconst LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\n//# sourceMappingURL=LazyContext.mjs.map\n","import { getFeatureDefinitions, setFeatureDefinitions } from 'motion-dom';\n\nconst featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\",\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n};\nlet isInitialized = false;\n/**\n * Initialize feature definitions with isEnabled checks.\n * This must be called before any motion components are rendered.\n */\nfunction initFeatureDefinitions() {\n if (isInitialized)\n return;\n const initialFeatureDefinitions = {};\n for (const key in featureProps) {\n initialFeatureDefinitions[key] = {\n isEnabled: (props) => featureProps[key].some((name) => !!props[name]),\n };\n }\n setFeatureDefinitions(initialFeatureDefinitions);\n isInitialized = true;\n}\n/**\n * Get the current feature definitions, initializing if needed.\n */\nfunction getInitializedFeatureDefinitions() {\n initFeatureDefinitions();\n return getFeatureDefinitions();\n}\n\nexport { getInitializedFeatureDefinitions, initFeatureDefinitions };\n//# sourceMappingURL=definitions.mjs.map\n","import { setFeatureDefinitions } from 'motion-dom';\nimport { getInitializedFeatureDefinitions } from './definitions.mjs';\n\nfunction loadFeatures(features) {\n const featureDefinitions = getInitializedFeatureDefinitions();\n for (const key in features) {\n featureDefinitions[key] = {\n ...featureDefinitions[key],\n ...features[key],\n };\n }\n setFeatureDefinitions(featureDefinitions);\n}\n\nexport { loadFeatures };\n//# sourceMappingURL=load-features.mjs.map\n","/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nconst validMotionProps = new Set([\n \"animate\",\n \"exit\",\n \"variants\",\n \"initial\",\n \"style\",\n \"values\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"custom\",\n \"inherit\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"_dragX\",\n \"_dragY\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"globalTapTarget\",\n \"propagate\",\n \"ignoreStrict\",\n \"viewport\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nfunction isValidMotionProp(key) {\n return (key.startsWith(\"while\") ||\n (key.startsWith(\"drag\") && key !== \"draggable\") ||\n key.startsWith(\"layout\") ||\n key.startsWith(\"onTap\") ||\n key.startsWith(\"onPan\") ||\n key.startsWith(\"onLayout\") ||\n validMotionProps.has(key));\n}\n\nexport { isValidMotionProp };\n//# sourceMappingURL=valid-prop.mjs.map\n","import { isMotionValue } from 'motion-dom';\nimport { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nlet shouldForward = (key) => !isValidMotionProp(key);\nfunction loadExternalIsValidProp(isValidProp) {\n if (typeof isValidProp !== \"function\")\n return;\n // Explicitly filter our events\n shouldForward = (key) => key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n *\n * String concatenation prevents bundlers like webpack (e.g. Storybook)\n * from statically resolving this optional dependency at build time.\n */\n const emotionPkg = \"@emotion/is-prop-\" + \"valid\";\n loadExternalIsValidProp(require(emotionPkg).default);\n}\ncatch {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n const filteredProps = {};\n for (const key in props) {\n /**\n * values is considered a valid prop by Emotion, so if it's present\n * this will be rendered out to the DOM unless explicitly filtered.\n *\n * We check the type as it could be used with the `feColorMatrix`\n * element, which we support.\n */\n if (key === \"values\" && typeof props.values === \"object\")\n continue;\n if (isMotionValue(props[key]))\n continue;\n if (shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\"] &&\n key.startsWith(\"onDrag\"))) {\n filteredProps[key] =\n props[key];\n }\n }\n return filteredProps;\n}\n\nexport { filterProps, loadExternalIsValidProp };\n//# sourceMappingURL=filter-props.mjs.map\n","\"use client\";\nimport { createContext } from 'react';\n\nconst MotionContext = /* @__PURE__ */ createContext({});\n\nexport { MotionContext };\n//# sourceMappingURL=index.mjs.map\n","import { isControllingVariants, isVariantLabel } from 'motion-dom';\n\nfunction getCurrentTreeVariants(props, context) {\n if (isControllingVariants(props)) {\n const { initial, animate } = props;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n//# sourceMappingURL=utils.mjs.map\n","\"use client\";\nimport { useContext, useMemo } from 'react';\nimport { MotionContext } from './index.mjs';\nimport { getCurrentTreeVariants } from './utils.mjs';\n\nfunction useCreateMotionContext(props) {\n const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext));\n return useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n//# sourceMappingURL=create.mjs.map\n","const createHtmlRenderState = () => ({\n style: {},\n transform: {},\n transformOrigin: {},\n vars: {},\n});\n\nexport { createHtmlRenderState };\n//# sourceMappingURL=create-render-state.mjs.map\n","\"use client\";\nimport { isMotionValue, isForcedMotionValue, buildHTMLStyles } from 'motion-dom';\nimport { useMemo } from 'react';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nfunction copyRawValuesOnly(target, source, props) {\n for (const key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues({ transformTemplate }, visualState) {\n return useMemo(() => {\n const state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, transformTemplate);\n return Object.assign({}, state.vars, state.style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState) {\n const styleProp = props.style || {};\n const style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState));\n return style;\n}\nfunction useHTMLProps(props, visualState) {\n // The `any` isn't ideal but it is the type of createElement props argument\n const htmlProps = {};\n const style = useStyle(props, visualState);\n if (props.drag && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false;\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\";\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : `pan-${props.drag === \"x\" ? \"y\" : \"x\"}`;\n }\n if (props.tabIndex === undefined &&\n (props.onTap || props.onTapStart || props.whileTap)) {\n htmlProps.tabIndex = 0;\n }\n htmlProps.style = style;\n return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps };\n//# sourceMappingURL=use-props.mjs.map\n","import { createHtmlRenderState } from '../../html/utils/create-render-state.mjs';\n\nconst createSvgRenderState = () => ({\n ...createHtmlRenderState(),\n attrs: {},\n});\n\nexport { createSvgRenderState };\n//# sourceMappingURL=create-render-state.mjs.map\n","\"use client\";\nimport { buildSVGAttrs, isSVGTag } from 'motion-dom';\nimport { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\n\nfunction useSVGProps(props, visualState, _isStatic, Component) {\n const visualProps = useMemo(() => {\n const state = createSvgRenderState();\n buildSVGAttrs(state, visualState, isSVGTag(Component), props.transformTemplate, props.style);\n return {\n ...state.attrs,\n style: { ...state.style },\n };\n }, [visualState]);\n if (props.style) {\n const rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = { ...rawStyles, ...visualProps.style };\n }\n return visualProps;\n}\n\nexport { useSVGProps };\n//# sourceMappingURL=use-props.mjs.map\n","/**\n * We keep these listed separately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nconst lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"switch\",\n \"symbol\",\n \"svg\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n];\n\nexport { lowercaseSVGElements };\n//# sourceMappingURL=lowercase-elements.mjs.map\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]/u.test(Component)) {\n return true;\n }\n return false;\n}\n\nexport { isSVGComponent };\n//# sourceMappingURL=is-svg-component.mjs.map\n","\"use client\";\nimport { isMotionValue } from 'motion-dom';\nimport { Fragment, useMemo, createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.mjs';\nimport { useSVGProps } from '../svg/use-props.mjs';\nimport { filterProps } from './utils/filter-props.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nfunction useRender(Component, props, ref, { latestValues, }, isStatic, forwardMotionProps = false, isSVG) {\n const useVisualProps = (isSVG ?? isSVGComponent(Component)) ? useSVGProps : useHTMLProps;\n const visualProps = useVisualProps(props, latestValues, isStatic, Component);\n const filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n const elementProps = Component !== Fragment ? { ...filteredProps, ...visualProps, ref } : {};\n /**\n * If component has been handed a motion value as its child,\n * memoise its initial value and render that. Subsequent updates\n * will be handled by the onChange handler\n */\n const { children } = props;\n const renderedChildren = useMemo(() => (isMotionValue(children) ? children.get() : children), [children]);\n return createElement(Component, {\n ...elementProps,\n children: renderedChildren,\n });\n}\n\nexport { useRender };\n//# sourceMappingURL=use-render.mjs.map\n","\"use client\";\nimport { resolveMotionValue, isControllingVariants, isVariantNode, isAnimationControls, resolveVariantFromProps } from 'motion-dom';\nimport { useContext } from 'react';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\n\nfunction makeState({ scrapeMotionValuesFromProps, createRenderState, }, props, context, presenceContext) {\n const state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n return state;\n}\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n const values = {};\n const motionValues = scrapeMotionValues(props, {});\n for (const key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n let { initial, animate } = props;\n const isControllingVariants$1 = isControllingVariants(props);\n const isVariantNode$1 = isVariantNode(props);\n if (context &&\n isVariantNode$1 &&\n !isControllingVariants$1 &&\n props.inherit !== false) {\n if (initial === undefined)\n initial = context.initial;\n if (animate === undefined)\n animate = context.animate;\n }\n let isInitialAnimationBlocked = presenceContext\n ? presenceContext.initial === false\n : false;\n isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;\n const variantToSet = isInitialAnimationBlocked ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n for (let i = 0; i < list.length; i++) {\n const resolved = resolveVariantFromProps(props, list[i]);\n if (resolved) {\n const { transitionEnd, transition, ...target } = resolved;\n for (const key in target) {\n let valueTarget = target[key];\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n const index = isInitialAnimationBlocked\n ? valueTarget.length - 1\n : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (const key in transitionEnd) {\n values[key] = transitionEnd[key];\n }\n }\n }\n }\n return values;\n}\nconst makeUseVisualState = (config) => (props, isStatic) => {\n const context = useContext(MotionContext);\n const presenceContext = useContext(PresenceContext);\n const make = () => makeState(config, props, context, presenceContext);\n return isStatic ? make() : useConstant(make);\n};\n\nexport { makeUseVisualState };\n//# sourceMappingURL=use-visual-state.mjs.map\n","\"use client\";\nimport { scrapeHTMLMotionValuesFromProps } from 'motion-dom';\nimport { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nconst useHTMLVisualState = /*@__PURE__*/ makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeHTMLMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n});\n\nexport { useHTMLVisualState };\n//# sourceMappingURL=use-html-visual-state.mjs.map\n","\"use client\";\nimport { scrapeSVGMotionValuesFromProps } from 'motion-dom';\nimport { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\n\nconst useSVGVisualState = /*@__PURE__*/ makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeSVGMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n});\n\nexport { useSVGVisualState };\n//# sourceMappingURL=use-svg-visual-state.mjs.map\n","const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\");\n\nexport { motionComponentSymbol };\n//# sourceMappingURL=symbol.mjs.map\n","\"use client\";\nimport { useRef, useInsertionEffect, useCallback } from 'react';\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 /**\n * Store externalRef in a ref to avoid including it in the useCallback\n * dependency array. Including externalRef in dependencies causes issues\n * with libraries like Radix UI that create new callback refs on each render\n * when using asChild - this would cause the callback to be recreated,\n * triggering element remounts and breaking AnimatePresence exit animations.\n */\n const externalRefContainer = useRef(externalRef);\n useInsertionEffect(() => {\n externalRefContainer.current = externalRef;\n });\n // Store cleanup function returned by callback refs (React 19 feature)\n const refCleanup = useRef(null);\n return useCallback((instance) => {\n if (instance) {\n visualState.onMount?.(instance);\n }\n if (visualElement) {\n instance ? visualElement.mount(instance) : visualElement.unmount();\n }\n const ref = externalRefContainer.current;\n if (typeof ref === \"function\") {\n if (instance) {\n const cleanup = ref(instance);\n if (typeof cleanup === \"function\") {\n refCleanup.current = cleanup;\n }\n }\n else if (refCleanup.current) {\n refCleanup.current();\n refCleanup.current = null;\n }\n else {\n ref(instance);\n }\n }\n else if (ref) {\n ref.current = instance;\n }\n }, [visualElement]);\n}\n\nexport { useMotionRef };\n//# sourceMappingURL=use-motion-ref.mjs.map\n","\"use client\";\nimport { createContext } from 'react';\n\n/**\n * Internal, exported only for usage in Framer\n */\nconst SwitchLayoutGroupContext = createContext({});\n\nexport { SwitchLayoutGroupContext };\n//# sourceMappingURL=SwitchLayoutGroupContext.mjs.map\n","function isRefObject(ref) {\n return (ref &&\n typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n\nexport { isRefObject };\n//# sourceMappingURL=is-ref-object.mjs.map\n","\"use client\";\nimport { optimizedAppearDataAttribute } from 'motion-dom';\nimport { useContext, useRef, useInsertionEffect, useEffect } from 'react';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../context/SwitchLayoutGroupContext.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\n\nfunction useVisualElement(Component, visualState, props, createVisualElement, ProjectionNodeConstructor, isSVG) {\n const { visualElement: parent } = useContext(MotionContext);\n const lazyContext = useContext(LazyContext);\n const presenceContext = useContext(PresenceContext);\n const motionConfig = useContext(MotionConfigContext);\n const reducedMotionConfig = motionConfig.reducedMotion;\n const skipAnimations = motionConfig.skipAnimations;\n const visualElementRef = useRef(null);\n /**\n * Track whether the component has been through React's commit phase.\n * Used to detect when LazyMotion features load after the component has mounted.\n */\n const hasMountedOnce = useRef(false);\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n createVisualElement =\n createVisualElement ||\n lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState,\n parent,\n props,\n presenceContext,\n blockInitialAnimation: presenceContext\n ? presenceContext.initial === false\n : false,\n reducedMotionConfig,\n skipAnimations,\n isSVG,\n });\n /**\n * If the component has already mounted before features loaded (e.g. via\n * LazyMotion with async feature loading), we need to force the initial\n * animation to run. Otherwise state changes that occurred before features\n * loaded will be lost and the element will snap to its final state.\n */\n if (hasMountedOnce.current && visualElementRef.current) {\n visualElementRef.current.manuallyAnimateOnMount = true;\n }\n }\n const visualElement = visualElementRef.current;\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext);\n if (visualElement &&\n !visualElement.projection &&\n ProjectionNodeConstructor &&\n (visualElement.type === \"html\" || visualElement.type === \"svg\")) {\n createProjectionNode(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig);\n }\n const isMounted = useRef(false);\n useInsertionEffect(() => {\n /**\n * Check the component has already mounted before calling\n * `update` unnecessarily. This ensures we skip the initial update.\n */\n if (visualElement && isMounted.current) {\n visualElement.update(props, presenceContext);\n }\n });\n /**\n * Cache this value as we want to know whether HandoffAppearAnimations\n * was present on initial render - it will be deleted after this.\n */\n const optimisedAppearId = props[optimizedAppearDataAttribute];\n const wantsHandoff = useRef(Boolean(optimisedAppearId) &&\n typeof window !== \"undefined\" &&\n !window.MotionHandoffIsComplete?.(optimisedAppearId) &&\n window.MotionHasOptimisedAnimation?.(optimisedAppearId));\n useIsomorphicLayoutEffect(() => {\n /**\n * Track that this component has mounted. This is used to detect when\n * LazyMotion features load after the component has already committed.\n */\n hasMountedOnce.current = true;\n if (!visualElement)\n return;\n isMounted.current = true;\n window.MotionIsMounted = true;\n visualElement.updateFeatures();\n visualElement.scheduleRenderMicrotask();\n /**\n * Ideally this function would always run in a useEffect.\n *\n * However, if we have optimised appear animations to handoff from,\n * it needs to happen synchronously to ensure there's no flash of\n * incorrect styles in the event of a hydration error.\n *\n * So if we detect a situtation where optimised appear animations\n * are running, we use useLayoutEffect to trigger animations.\n */\n if (wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n });\n useEffect(() => {\n if (!visualElement)\n return;\n if (!wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n if (wantsHandoff.current) {\n // This ensures all future calls to animateChanges() in this component will run in useEffect\n queueMicrotask(() => {\n window.MotionHandoffMarkAsComplete?.(optimisedAppearId);\n });\n wantsHandoff.current = false;\n }\n /**\n * Now we've finished triggering animations for this element we\n * can wipe the enteringChildren set for the next render.\n */\n visualElement.enteringChildren = undefined;\n });\n return visualElement;\n}\nfunction createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {\n const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutAnchor, layoutCrossfade, } = props;\n visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props[\"data-framer-portal-id\"]\n ? undefined\n : getClosestProjectingNode(visualElement.parent));\n visualElement.projection.setOptions({\n layoutId,\n layout,\n alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n visualElement,\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,\n crossfade: layoutCrossfade,\n layoutScroll,\n layoutRoot,\n layoutAnchor,\n });\n}\nfunction getClosestProjectingNode(visualElement) {\n if (!visualElement)\n return undefined;\n return visualElement.options.allowProjection !== false\n ? visualElement.projection\n : getClosestProjectingNode(visualElement.parent);\n}\n\nexport { useVisualElement };\n//# sourceMappingURL=use-visual-element.mjs.map\n","\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { warning, invariant } from 'motion-utils';\nimport { forwardRef, useContext } from 'react';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { LazyContext } from '../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { useRender } from '../render/dom/use-render.mjs';\nimport { isSVGComponent } from '../render/dom/utils/is-svg-component.mjs';\nimport { useHTMLVisualState } from '../render/html/use-html-visual-state.mjs';\nimport { useSVGVisualState } from '../render/svg/use-svg-visual-state.mjs';\nimport { getInitializedFeatureDefinitions } from './features/definitions.mjs';\nimport { loadFeatures } from './features/load-features.mjs';\nimport { motionComponentSymbol } from './utils/symbol.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nfunction createMotionComponent(Component, { forwardMotionProps = false, type } = {}, preloadedFeatures, createVisualElement) {\n preloadedFeatures && loadFeatures(preloadedFeatures);\n /**\n * Determine whether to use SVG or HTML rendering based on:\n * 1. Explicit `type` option (highest priority)\n * 2. Auto-detection via `isSVGComponent`\n */\n const isSVG = type ? type === \"svg\" : isSVGComponent(Component);\n const useVisualState = isSVG ? useSVGVisualState : useHTMLVisualState;\n function MotionDOMComponent(props, externalRef) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout;\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n };\n const { isStatic } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState(props, isStatic);\n if (!isStatic && typeof window !== \"undefined\") {\n useStrictMode(configAndProps, preloadedFeatures);\n const layoutProjection = getProjectionFunctionality(configAndProps);\n MeasureLayout = layoutProjection.MeasureLayout;\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode, isSVG);\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 (jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, forwardMotionProps, isSVG)] }));\n }\n MotionDOMComponent.displayName = `motion.${typeof Component === \"string\"\n ? Component\n : `create(${Component.displayName ?? Component.name ?? \"\"})`}`;\n const ForwardRefMotionComponent = forwardRef(MotionDOMComponent);\n ForwardRefMotionComponent[motionComponentSymbol] = Component;\n return ForwardRefMotionComponent;\n}\nfunction useLayoutId({ layoutId }) {\n const layoutGroupId = useContext(LayoutGroupContext).id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\nfunction useStrictMode(configAndProps, preloadedFeatures) {\n const isStrict = useContext(LazyContext).strict;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict) {\n const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n configAndProps.ignoreStrict\n ? warning(false, strictMessage, \"lazy-strict-mode\")\n : invariant(false, strictMessage, \"lazy-strict-mode\");\n }\n}\nfunction getProjectionFunctionality(props) {\n const featureDefinitions = getInitializedFeatureDefinitions();\n const { drag, layout } = featureDefinitions;\n if (!drag && !layout)\n return {};\n const combined = { ...drag, ...layout };\n return {\n MeasureLayout: drag?.isEnabled(props) || layout?.isEnabled(props)\n ? combined.MeasureLayout\n : undefined,\n ProjectionNode: combined.ProjectionNode,\n };\n}\n\nexport { createMotionComponent };\n//# sourceMappingURL=index.mjs.map\n","import { warnOnce } from 'motion-utils';\nimport { createMotionComponent } from '../../motion/index.mjs';\n\nfunction createMotionProxy(preloadedFeatures, createVisualElement) {\n if (typeof Proxy === \"undefined\") {\n return createMotionComponent;\n }\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n const componentCache = new Map();\n const factory = (Component, options) => {\n return createMotionComponent(Component, options, preloadedFeatures, createVisualElement);\n };\n /**\n * Support for deprecated`motion(Component)` pattern\n */\n const deprecatedFactoryFunction = (Component, options) => {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, \"motion() is deprecated. Use motion.create() instead.\");\n }\n return factory(Component, options);\n };\n return new Proxy(deprecatedFactoryFunction, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: (_target, key) => {\n if (key === \"create\")\n return factory;\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, createMotionComponent(key, undefined, preloadedFeatures, createVisualElement));\n }\n return componentCache.get(key);\n },\n });\n}\n\nexport { createMotionProxy };\n//# sourceMappingURL=create-proxy.mjs.map\n","import { SVGVisualElement, HTMLVisualElement } from 'motion-dom';\nimport { Fragment } from 'react';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nconst createDomVisualElement = (Component, options) => {\n /**\n * Use explicit isSVG override if provided, otherwise auto-detect\n */\n const isSVG = options.isSVG ?? isSVGComponent(Component);\n return isSVG\n ? new SVGVisualElement(options)\n : new HTMLVisualElement(options, {\n allowProjection: Component !== Fragment,\n });\n};\n\nexport { createDomVisualElement };\n//# sourceMappingURL=create-visual-element.mjs.map\n","import { Feature, createAnimationState, isAnimationControls } from 'motion-dom';\n\nclass AnimationFeature extends Feature {\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n constructor(node) {\n super(node);\n node.animationState || (node.animationState = createAnimationState(node));\n }\n updateAnimationControlsSubscription() {\n const { animate } = this.node.getProps();\n if (isAnimationControls(animate)) {\n this.unmountControls = animate.subscribe(this.node);\n }\n }\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription();\n }\n update() {\n const { animate } = this.node.getProps();\n const { animate: prevAnimate } = this.node.prevProps || {};\n if (animate !== prevAnimate) {\n this.updateAnimationControlsSubscription();\n }\n }\n unmount() {\n this.node.animationState.reset();\n this.unmountControls?.();\n }\n}\n\nexport { AnimationFeature };\n//# sourceMappingURL=index.mjs.map\n","import { Feature, resolveVariant } from 'motion-dom';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n this.isExitComplete = false;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent, onExitComplete } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return;\n }\n if (isPresent && prevIsPresent === false) {\n /**\n * When re-entering, if the exit animation already completed\n * (element is at rest), reset to initial values so the enter\n * animation replays from the correct position.\n */\n if (this.isExitComplete) {\n const { initial, custom } = this.node.getProps();\n if (typeof initial === \"string\" ||\n (typeof initial === \"object\" &&\n initial !== null &&\n !Array.isArray(initial))) {\n const resolved = resolveVariant(this.node, initial, custom);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n for (const key in target) {\n this.node\n .getValue(key)\n ?.jump(target[key]);\n }\n }\n }\n this.node.animationState.reset();\n this.node.animationState.animateChanges();\n }\n else {\n this.node.animationState.setActive(\"exit\", false);\n }\n this.isExitComplete = false;\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent);\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => {\n this.isExitComplete = true;\n onExitComplete(this.id);\n });\n }\n }\n mount() {\n const { register, onExitComplete } = this.node.presenceContext || {};\n if (onExitComplete) {\n onExitComplete(this.id);\n }\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() { }\n}\n\nexport { ExitAnimationFeature };\n//# sourceMappingURL=exit.mjs.map\n","import { AnimationFeature } from './animation/index.mjs';\nimport { ExitAnimationFeature } from './animation/exit.mjs';\n\nconst animations = {\n animation: {\n Feature: AnimationFeature,\n },\n exit: {\n Feature: ExitAnimationFeature,\n },\n};\n\nexport { animations };\n//# sourceMappingURL=animations.mjs.map\n","import { isPrimaryPointer } from 'motion-dom';\n\nfunction extractEventInfo(event) {\n return {\n point: {\n x: event.pageX,\n y: event.pageY,\n },\n };\n}\nconst addPointerInfo = (handler) => (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event));\n\nexport { addPointerInfo, extractEventInfo };\n//# sourceMappingURL=event-info.mjs.map\n","import { addDomEvent } from 'motion-dom';\nimport { addPointerInfo } from './event-info.mjs';\n\nfunction addPointerEvent(target, eventName, handler, options) {\n return addDomEvent(target, eventName, addPointerInfo(handler), options);\n}\n\nexport { addPointerEvent };\n//# sourceMappingURL=add-pointer-event.mjs.map\n","// Fixes https://github.com/motiondivision/motion/issues/2270\nconst getContextWindow = ({ current }) => {\n return current ? current.ownerDocument.defaultView : null;\n};\n\nexport { getContextWindow };\n//# sourceMappingURL=get-context-window.mjs.map\n","const distance = (a, b) => Math.abs(a - b);\nfunction distance2D(a, b) {\n // Multi-dimensional\n const xDelta = distance(a.x, b.x);\n const yDelta = distance(a.y, b.y);\n return Math.sqrt(xDelta ** 2 + yDelta ** 2);\n}\n\nexport { distance, distance2D };\n//# sourceMappingURL=distance.mjs.map\n","import { frameData, frame, isPrimaryPointer, cancelFrame } from 'motion-dom';\nimport { pipe, secondsToMilliseconds, millisecondsToSeconds } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { distance2D } from '../../utils/distance.mjs';\n\nconst overflowStyles = /*#__PURE__*/ new Set([\"auto\", \"scroll\"]);\n/**\n * @internal\n */\nclass PanSession {\n constructor(event, handlers, { transformPagePoint, contextWindow = window, dragSnapToOrigin = false, distanceThreshold = 3, element, } = {}) {\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 * Raw (untransformed) event info, re-transformed each frame\n * so transformPagePoint sees the current parent matrix.\n * @internal\n */\n this.lastRawMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n /**\n * @internal\n */\n this.contextWindow = window;\n /**\n * Scroll positions of scrollable ancestors and window.\n * @internal\n */\n this.scrollPositions = new Map();\n /**\n * Cleanup function for scroll listeners.\n * @internal\n */\n this.removeScrollListeners = null;\n this.onElementScroll = (event) => {\n this.handleScroll(event.target);\n };\n this.onWindowScroll = () => {\n this.handleScroll(window);\n };\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n // Re-transform raw point through current transformPagePoint so\n // animated parent transforms (e.g. rotation) are picked up each frame\n if (this.lastRawMoveEventInfo) {\n this.lastMoveEventInfo = transformPoint(this.lastRawMoveEventInfo, this.transformPagePoint);\n }\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursor.\n const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= this.distanceThreshold;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info);\n };\n this.handlePointerMove = (event, info) => {\n this.lastMoveEvent = event;\n this.lastRawMoveEventInfo = info;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;\n // Resume animation if dragSnapToOrigin is set OR if no drag started (user just clicked)\n // This ensures constraint animations continue when interrupted by a click\n if (this.dragSnapToOrigin || !this.startEvent) {\n resumeAnimation && resumeAnimation();\n }\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event))\n return;\n this.dragSnapToOrigin = dragSnapToOrigin;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n this.distanceThreshold = distanceThreshold;\n this.contextWindow = contextWindow || window;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n // Listen in the capture phase so a descendant calling\n // stopPropagation() (e.g. in its own pointerup handler) can't\n // prevent the gesture from ending. See #2794.\n const eventOptions = { passive: true, capture: true };\n this.removeListeners = pipe(addPointerEvent(this.contextWindow, \"pointermove\", this.handlePointerMove, eventOptions), addPointerEvent(this.contextWindow, \"pointerup\", this.handlePointerUp, eventOptions), addPointerEvent(this.contextWindow, \"pointercancel\", this.handlePointerUp, eventOptions));\n // Start scroll tracking if element provided\n if (element) {\n this.startScrollTracking(element);\n }\n }\n /**\n * Start tracking scroll on ancestors and window.\n */\n startScrollTracking(element) {\n // Store initial scroll positions for scrollable ancestors\n let current = element.parentElement;\n while (current) {\n const style = getComputedStyle(current);\n if (overflowStyles.has(style.overflowX) ||\n overflowStyles.has(style.overflowY)) {\n this.scrollPositions.set(current, {\n x: current.scrollLeft,\n y: current.scrollTop,\n });\n }\n current = current.parentElement;\n }\n // Track window scroll\n this.scrollPositions.set(window, {\n x: window.scrollX,\n y: window.scrollY,\n });\n // Capture listener catches element scroll events as they bubble\n window.addEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n });\n // Direct window scroll listener (window scroll doesn't bubble)\n window.addEventListener(\"scroll\", this.onWindowScroll);\n this.removeScrollListeners = () => {\n window.removeEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n });\n window.removeEventListener(\"scroll\", this.onWindowScroll);\n };\n }\n /**\n * Handle scroll compensation during drag.\n *\n * For element scroll: adjusts history origin since pageX/pageY doesn't change.\n * For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change.\n */\n handleScroll(target) {\n const initial = this.scrollPositions.get(target);\n if (!initial)\n return;\n const isWindow = target === window;\n const current = isWindow\n ? { x: window.scrollX, y: window.scrollY }\n : {\n x: target.scrollLeft,\n y: target.scrollTop,\n };\n const delta = { x: current.x - initial.x, y: current.y - initial.y };\n if (delta.x === 0 && delta.y === 0)\n return;\n if (isWindow) {\n // Window scroll: pageX/pageY changes, so update lastMoveEventInfo\n if (this.lastMoveEventInfo) {\n this.lastMoveEventInfo.point.x += delta.x;\n this.lastMoveEventInfo.point.y += delta.y;\n }\n }\n else {\n // Element scroll: pageX/pageY unchanged, so adjust history origin\n if (this.history.length > 0) {\n this.history[0].x -= delta.x;\n this.history[0].y -= delta.y;\n }\n }\n this.scrollPositions.set(target, current);\n frame.update(this.updatePoint, true);\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n this.removeScrollListeners && this.removeScrollListeners();\n this.scrollPositions.clear();\n cancelFrame(this.updatePoint);\n }\n}\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point }, history) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n /**\n * If the selected point is the pointer-down origin (history[0]),\n * there are better movement points available, and the time gap\n * is suspiciously large (>2x timeDelta), use the next point instead.\n * This prevents stale pointer-down points from diluting velocity\n * in hold-then-flick gestures.\n */\n if (timestampedPoint === history[0] &&\n history.length > 2 &&\n lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta) * 2) {\n timestampedPoint = history[1];\n }\n const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n//# sourceMappingURL=PanSession.mjs.map\n","import { mixNumber, calcLength } from 'motion-dom';\nimport { progress, clamp } from 'motion-utils';\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nfunction applyConstraints(point, { min, max }, elastic) {\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(min, point, elastic.min)\n : 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\n ? mixNumber(max, point, elastic.max)\n : Math.min(point, max);\n }\n return point;\n}\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nfunction calcRelativeAxisConstraints(axis, min, max) {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max: max !== undefined\n ? axis.max + max - (axis.max - axis.min)\n : undefined,\n };\n}\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nfunction calcRelativeConstraints(layoutBox, { top, left, bottom, right }) {\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nfunction calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n let min = constraintsAxis.min - layoutAxis.min;\n let max = constraintsAxis.max - layoutAxis.max;\n // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n if (constraintsAxis.max - constraintsAxis.min <\n layoutAxis.max - layoutAxis.min) {\n [min, max] = [max, min];\n }\n return { min, max };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nfunction calcViewportConstraints(layoutBox, constraintsBox) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n };\n}\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nfunction calcOrigin(source, target) {\n let origin = 0.5;\n const sourceLength = calcLength(source);\n const targetLength = calcLength(target);\n if (targetLength > sourceLength) {\n origin = progress(target.min, target.max - sourceLength, source.min);\n }\n else if (sourceLength > targetLength) {\n origin = progress(source.min, source.max - targetLength, target.min);\n }\n return clamp(0, 1, origin);\n}\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nfunction rebaseAxisConstraints(layout, constraints) {\n const relativeConstraints = {};\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min;\n }\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min;\n }\n return relativeConstraints;\n}\nconst defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nfunction resolveDragElastic(dragElastic = defaultElastic) {\n if (dragElastic === false) {\n dragElastic = 0;\n }\n else if (dragElastic === true) {\n dragElastic = defaultElastic;\n }\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n };\n}\nfunction resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel),\n };\n}\nfunction resolvePointElastic(dragElastic, label) {\n return typeof dragElastic === \"number\"\n ? dragElastic\n : dragElastic[label] || 0;\n}\n\nexport { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };\n//# sourceMappingURL=constraints.mjs.map\n","import { createBox, frame, eachAxis, measurePageBox, convertBoxToBoundingBox, convertBoundingBoxToBox, addValueToWillChange, animateMotionValue, mixNumber, addDomEvent, setDragLock, percent, calcLength, resize, isElementTextInput } from 'motion-dom';\nimport { invariant } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\n\nconst elementDragControls = new WeakMap();\nclass VisualElementDragControls {\n constructor(visualElement) {\n this.openDragLock = 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 /**\n * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPointerEvent = null;\n /**\n * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPanInfo = null;\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false, distanceThreshold } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point);\n }\n this.stopAnimation();\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openDragLock)\n this.openDragLock();\n this.openDragLock = setDragLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock)\n return;\n }\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\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 and pointer offset\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.update(() => onDragStart(event, info), false, true);\n }\n addValueToWillChange(this.visualElement, \"transform\");\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openDragLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n if (onDrag) {\n frame.update(() => onDrag(event, info), false, true);\n }\n };\n const onSessionEnd = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n this.stop(event, info);\n this.latestPointerEvent = null;\n this.latestPanInfo = null;\n };\n const resumeAnimation = () => {\n const { dragSnapToOrigin: snap } = this.getProps();\n if (snap || this.constraints) {\n this.startAnimation({ x: 0, y: 0 });\n }\n };\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n distanceThreshold,\n contextWindow: getContextWindow(this.visualElement),\n element: this.visualElement.current,\n });\n }\n /**\n * @internal\n */\n stop(event, panInfo) {\n const finalEvent = event || this.latestPointerEvent;\n const finalPanInfo = panInfo || this.latestPanInfo;\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging || !finalPanInfo || !finalEvent)\n return;\n const { velocity } = finalPanInfo;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(finalEvent, finalPanInfo));\n }\n }\n /**\n * @internal\n */\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.endPanSession();\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openDragLock) {\n this.openDragLock();\n this.openDragLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n /**\n * Clean up the pan session without modifying other drag state.\n * This is used during unmount to ensure event listeners are removed\n * without affecting projection animations or drag locks.\n * @internal\n */\n endPanSession() {\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps();\n const layout = this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : this.visualElement.projection?.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative. This only applies to relative (non-ref)\n * constraints, as ref-based constraints from calcViewportConstraints are already in the\n * correct coordinate space for the motion value transform offset.\n */\n if (prevConstraints !== this.constraints &&\n !isRefObject(dragConstraints) &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false &&\n this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\", \"drag-constraints-ref\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n /**\n * Refresh the root scroll offset so the constraint's viewport box\n * translates to correct page coordinates. The scroll captured at\n * drag mount can be stale if the document was scrolled afterwards —\n * e.g. via the browser restoring scroll on refresh, or an ancestor\n * layout effect running after this element's mount (#2829).\n *\n * Clear the cached scroll first so `updateScroll` bypasses its\n * per-animationId cache and re-reads the live value.\n */\n if (projection.root) {\n projection.root.scroll = undefined;\n projection.root.updateScroll();\n }\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin === true ||\n dragSnapToOrigin === axis)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n addValueToWillChange(this.visualElement, axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n /**\n * The layout measurement includes the current transform value,\n * so we need to add it back to get the correct snap position.\n * This fixes an issue where elements with initial coordinates\n * would snap to the wrong position on the first drag.\n */\n const current = axisValue.get() || 0;\n axisValue.set(point[axis] - mixNumber(min, max, 0.5) + current);\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n /**\n * Reset constraints so resolveConstraints() will recalculate them\n * with the freshly measured layout rather than returning the cached value.\n */\n this.constraints = false;\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n /**\n * Flush the updated transform to the DOM synchronously to prevent\n * a visual flash at the element's CSS layout position (0,0) when\n * the transform was stripped for measurement.\n */\n this.visualElement.render();\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n const target = event.target;\n /**\n * Only block drag if clicking on a text input child element\n * (input, textarea, select, contenteditable) where users might\n * want to select text or interact with the control.\n *\n * Buttons and links don't block drag since they don't have\n * click-and-move actions of their own.\n */\n const isClickingTextInputChild = target !== element && isElementTextInput(target);\n if (drag && dragListener && !isClickingTextInputChild) {\n this.start(event);\n }\n });\n /**\n * If using ref-based constraints, observe both the draggable element\n * and the constraint container for size changes via ResizeObserver.\n * Setup is deferred because dragConstraints.current is null when\n * addListeners first runs (React hasn't committed the ref yet).\n */\n let stopResizeObservers;\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints();\n if (!stopResizeObservers) {\n stopResizeObservers = startResizeObservers(element, dragConstraints.current, () => this.scalePositionWithinConstraints());\n }\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n frame.read(measureDragConstraints);\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n stopResizeObservers && stopResizeObservers();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction skipFirstCall(callback) {\n let isFirst = true;\n return () => {\n if (isFirst) {\n isFirst = false;\n return;\n }\n callback();\n };\n}\nfunction startResizeObservers(element, constraintsElement, onResize) {\n const stopElement = resize(element, skipFirstCall(onResize));\n const stopContainer = resize(constraintsElement, skipFirstCall(onResize));\n return () => {\n stopElement();\n stopContainer();\n };\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n//# sourceMappingURL=VisualElementDragControls.mjs.map\n","import { Feature } from 'motion-dom';\nimport { noop } from 'motion-utils';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\n\nclass DragGesture extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n update() {\n const { dragControls } = this.node.getProps();\n const { dragControls: prevDragControls } = this.node.prevProps || {};\n if (dragControls !== prevDragControls) {\n this.removeGroupControls();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n }\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n /**\n * In React 19, during list reorder reconciliation, components may\n * briefly unmount and remount while the drag is still active. If we're\n * actively dragging, we should NOT end the pan session - it will\n * continue tracking pointer events via its window-level listeners.\n *\n * The pan session will be properly cleaned up when:\n * 1. The drag ends naturally (pointerup/pointercancel)\n * 2. The component is truly removed from the DOM\n */\n if (!this.controls.isDragging) {\n this.controls.endPanSession();\n }\n }\n}\n\nexport { DragGesture };\n//# sourceMappingURL=index.mjs.map\n","import { Feature, frame } from 'motion-dom';\nimport { noop } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { PanSession } from './PanSession.mjs';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.update(() => handler(event, info), false, true);\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node),\n });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: asyncHandler(onPan),\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n\nexport { PanGesture };\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { globalProjectionState, frame, microtask } from 'motion-dom';\nimport { useContext, Component } from 'react';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';\nimport { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';\n\n/**\n * Track whether we've taken any snapshots yet. If not,\n * we can safely skip notification of didUpdate.\n *\n * Difficult to capture in a test but to prevent flickering\n * we must set this to true either on update or unmount.\n * Running `next-env/layout-id` in Safari will show this behaviour if broken.\n */\nlet hasTakenAnySnapshot = false;\nclass MeasureLayoutWithContext extends Component {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;\n const { projection } = visualElement;\n if (projection) {\n if (layoutGroup.group)\n layoutGroup.group.add(projection);\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection);\n }\n if (hasTakenAnySnapshot) {\n projection.root.didUpdate();\n }\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove();\n });\n projection.setOptions({\n ...projection.options,\n layoutDependency: this.props.layoutDependency,\n onExitComplete: () => this.safeToRemove(),\n });\n }\n globalProjectionState.hasEverUpdated = true;\n }\n getSnapshotBeforeUpdate(prevProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props;\n const { projection } = visualElement;\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 (prevProps.layoutDependency !== layoutDependency) {\n projection.setOptions({\n ...projection.options,\n layoutDependency,\n });\n }\n hasTakenAnySnapshot = true;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined ||\n prevProps.isPresent !== isPresent) {\n projection.willUpdate();\n }\n else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote();\n }\n else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n frame.postRender(() => {\n const stack = projection.getStack();\n if (!stack || !stack.members.length) {\n this.safeToRemove();\n }\n });\n }\n }\n return null;\n }\n componentDidUpdate() {\n const { visualElement, layoutAnchor } = this.props;\n const { projection } = visualElement;\n if (projection) {\n projection.options.layoutAnchor = layoutAnchor;\n projection.root.didUpdate();\n microtask.postRender(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n });\n }\n }\n componentWillUnmount() {\n const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props;\n const { projection } = visualElement;\n hasTakenAnySnapshot = true;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n }\n safeToRemove() {\n const { safeToRemove } = this.props;\n safeToRemove && safeToRemove();\n }\n render() {\n return null;\n }\n}\nfunction MeasureLayout(props) {\n const [isPresent, safeToRemove] = usePresence();\n const layoutGroup = useContext(LayoutGroupContext);\n return (jsx(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove }));\n}\n\nexport { MeasureLayout };\n//# sourceMappingURL=MeasureLayout.mjs.map\n","import { DragGesture } from '../../gestures/drag/index.mjs';\nimport { PanGesture } from '../../gestures/pan/index.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\nimport { HTMLProjectionNode } from 'motion-dom';\n\nconst drag = {\n pan: {\n Feature: PanGesture,\n },\n drag: {\n Feature: DragGesture,\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { drag };\n//# sourceMappingURL=drag.mjs.map\n","import { Feature, hover, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\n\nfunction handleHoverEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", lifecycle === \"Start\");\n }\n const eventName = (\"onHover\" + lifecycle);\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass HoverGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.unmount = hover(current, (_element, startEvent) => {\n handleHoverEvent(this.node, startEvent, \"Start\");\n return (endEvent) => handleHoverEvent(this.node, endEvent, \"End\");\n });\n }\n unmount() { }\n}\n\nexport { HoverGesture };\n//# sourceMappingURL=hover.mjs.map\n","import { Feature, addDomEvent } from 'motion-dom';\nimport { pipe } from 'motion-utils';\n\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n\nexport { FocusGesture };\n//# sourceMappingURL=focus.mjs.map\n","import { Feature, press, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\n\nfunction handlePressEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.current instanceof HTMLButtonElement && node.current.disabled) {\n return;\n }\n if (node.animationState && props.whileTap) {\n node.animationState.setActive(\"whileTap\", lifecycle === \"Start\");\n }\n const eventName = (\"onTap\" + (lifecycle === \"End\" ? \"\" : lifecycle));\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass PressGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n const { globalTapTarget, propagate } = this.node.props;\n this.unmount = press(current, (_element, startEvent) => {\n handlePressEvent(this.node, startEvent, \"Start\");\n return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? \"End\" : \"Cancel\");\n }, {\n useGlobalTarget: globalTapTarget,\n stopPropagation: propagate?.tap === false,\n });\n }\n unmount() { }\n}\n\nexport { PressGesture };\n//# sourceMappingURL=press.mjs.map\n","/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap();\nconst fireObserverCallback = (entry) => {\n const callback = observerCallbacks.get(entry.target);\n callback && callback(entry);\n};\nconst fireAllObserverCallbacks = (entries) => {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver({ root, ...options }) {\n const lookupRoot = root || document;\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n const rootObservers = observers.get(lookupRoot);\n const key = JSON.stringify(options);\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n const rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return () => {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\nexport { observeIntersection };\n//# sourceMappingURL=observers.mjs.map\n","import { Feature } from 'motion-dom';\nimport { observeIntersection } from './observers.mjs';\n\nconst thresholdNames = {\n some: 0,\n all: 1,\n};\nclass InViewFeature extends Feature {\n constructor() {\n super(...arguments);\n this.hasEnteredView = false;\n this.isInView = false;\n }\n startObserver() {\n this.stopObserver?.();\n const { viewport = {} } = this.node.getProps();\n const { root, margin: rootMargin, amount = \"some\", once } = viewport;\n const options = {\n root: root ? root.current : undefined,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n const onIntersectionUpdate = (entry) => {\n const { isIntersecting } = entry;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (this.isInView === isIntersecting)\n return;\n this.isInView = isIntersecting;\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && this.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n this.hasEnteredView = true;\n }\n if (this.node.animationState) {\n this.node.animationState.setActive(\"whileInView\", isIntersecting);\n }\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n const { onViewportEnter, onViewportLeave } = this.node.getProps();\n const callback = isIntersecting ? onViewportEnter : onViewportLeave;\n callback && callback(entry);\n };\n this.stopObserver = observeIntersection(this.node.current, options, onIntersectionUpdate);\n }\n mount() {\n this.startObserver();\n }\n update() {\n if (typeof IntersectionObserver === \"undefined\")\n return;\n const { props, prevProps } = this.node;\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(hasViewportOptionChanged(props, prevProps));\n if (hasOptionsChanged) {\n this.startObserver();\n }\n }\n unmount() {\n this.stopObserver?.();\n this.hasEnteredView = false;\n this.isInView = false;\n }\n}\nfunction hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {\n return (name) => viewport[name] !== prevViewport[name];\n}\n\nexport { InViewFeature };\n//# sourceMappingURL=index.mjs.map\n","import { HoverGesture } from '../../gestures/hover.mjs';\nimport { FocusGesture } from '../../gestures/focus.mjs';\nimport { PressGesture } from '../../gestures/press.mjs';\nimport { InViewFeature } from './viewport/index.mjs';\n\nconst gestureAnimations = {\n inView: {\n Feature: InViewFeature,\n },\n tap: {\n Feature: PressGesture,\n },\n focus: {\n Feature: FocusGesture,\n },\n hover: {\n Feature: HoverGesture,\n },\n};\n\nexport { gestureAnimations };\n//# sourceMappingURL=gestures.mjs.map\n","import { HTMLProjectionNode } from 'motion-dom';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\n\nconst layout = {\n layout: {\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { layout };\n//# sourceMappingURL=layout.mjs.map\n","import { animations } from '../../../motion/features/animations.mjs';\nimport { drag } from '../../../motion/features/drag.mjs';\nimport { gestureAnimations } from '../../../motion/features/gestures.mjs';\nimport { layout } from '../../../motion/features/layout.mjs';\n\nconst featureBundle = {\n ...animations,\n ...gestureAnimations,\n ...drag,\n ...layout,\n};\n\nexport { featureBundle };\n//# sourceMappingURL=feature-bundle.mjs.map\n","import { createDomVisualElement } from '../../dom/create-visual-element.mjs';\nimport { createMotionProxy } from '../create-proxy.mjs';\nimport { featureBundle } from './feature-bundle.mjs';\n\nconst motion = /*@__PURE__*/ createMotionProxy(featureBundle, createDomVisualElement);\n\nexport { motion };\n//# sourceMappingURL=proxy.mjs.map\n","import * as fm from 'framer-motion';\nexport * from 'framer-motion';\n\n// Re-export everything from framer-motion.\n//\n// `motion` and `m` are aliased through local bindings so the module has\n// explicit named exports for IDE auto-import (see #3432). The previous\n// `export { motion, m } from \"framer-motion\"` line — sitting alongside\n// `export * from \"framer-motion\"` — was a duplicate-source re-export pattern\n// that caused Next.js Turbopack to OOM during module-graph analysis (#3741).\n// Local declarations shadow the wildcard re-export per the ES spec, so\n// `motion` and `m` come from the explicit bindings below and the rest from\n// `export *`.\nconst motion = fm.motion;\nconst m = fm.m;\n\nexport { m, motion };\n","var resizeObservers = [];\nexport { resizeObservers };\n","import { resizeObservers } from '../utils/resizeObservers';\nvar hasActiveObservations = function () {\n return resizeObservers.some(function (ro) { return ro.activeTargets.length > 0; });\n};\nexport { hasActiveObservations };\n","import { resizeObservers } from '../utils/resizeObservers';\nvar hasSkippedObservations = function () {\n return resizeObservers.some(function (ro) { return ro.skippedTargets.length > 0; });\n};\nexport { hasSkippedObservations };\n","var msg = 'ResizeObserver loop completed with undelivered notifications.';\nvar deliverResizeLoopError = function () {\n var event;\n if (typeof ErrorEvent === 'function') {\n event = new ErrorEvent('error', {\n message: msg\n });\n }\n else {\n event = document.createEvent('Event');\n event.initEvent('error', false, false);\n event.message = msg;\n }\n window.dispatchEvent(event);\n};\nexport { deliverResizeLoopError };\n","var ResizeObserverBoxOptions;\n(function (ResizeObserverBoxOptions) {\n ResizeObserverBoxOptions[\"BORDER_BOX\"] = \"border-box\";\n ResizeObserverBoxOptions[\"CONTENT_BOX\"] = \"content-box\";\n ResizeObserverBoxOptions[\"DEVICE_PIXEL_CONTENT_BOX\"] = \"device-pixel-content-box\";\n})(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));\nexport { ResizeObserverBoxOptions };\n","export var freeze = function (obj) { return Object.freeze(obj); };\n","import { freeze } from './utils/freeze';\nvar ResizeObserverSize = (function () {\n function ResizeObserverSize(inlineSize, blockSize) {\n this.inlineSize = inlineSize;\n this.blockSize = blockSize;\n freeze(this);\n }\n return ResizeObserverSize;\n}());\nexport { ResizeObserverSize };\n","import { freeze } from './utils/freeze';\nvar DOMRectReadOnly = (function () {\n function DOMRectReadOnly(x, y, width, height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.top = this.y;\n this.left = this.x;\n this.bottom = this.top + this.height;\n this.right = this.left + this.width;\n return freeze(this);\n }\n DOMRectReadOnly.prototype.toJSON = function () {\n var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;\n return { x: x, y: y, top: top, right: right, bottom: bottom, left: left, width: width, height: height };\n };\n DOMRectReadOnly.fromRect = function (rectangle) {\n return new DOMRectReadOnly(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n };\n return DOMRectReadOnly;\n}());\nexport { DOMRectReadOnly };\n","var isSVG = function (target) { return target instanceof SVGElement && 'getBBox' in target; };\nvar isHidden = function (target) {\n if (isSVG(target)) {\n var _a = target.getBBox(), width = _a.width, height = _a.height;\n return !width && !height;\n }\n var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight;\n return !(offsetWidth || offsetHeight || target.getClientRects().length);\n};\nvar isElement = function (obj) {\n var _a;\n if (obj instanceof Element) {\n return true;\n }\n var scope = (_a = obj === null || obj === void 0 ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;\n return !!(scope && obj instanceof scope.Element);\n};\nvar isReplacedElement = function (target) {\n switch (target.tagName) {\n case 'INPUT':\n if (target.type !== 'image') {\n break;\n }\n case 'VIDEO':\n case 'AUDIO':\n case 'EMBED':\n case 'OBJECT':\n case 'CANVAS':\n case 'IFRAME':\n case 'IMG':\n return true;\n }\n return false;\n};\nexport { isSVG, isHidden, isElement, isReplacedElement };\n","export var global = typeof window !== 'undefined' ? window : {};\n","import { ResizeObserverBoxOptions } from '../ResizeObserverBoxOptions';\nimport { ResizeObserverSize } from '../ResizeObserverSize';\nimport { DOMRectReadOnly } from '../DOMRectReadOnly';\nimport { isSVG, isHidden } from '../utils/element';\nimport { freeze } from '../utils/freeze';\nimport { global } from '../utils/global';\nvar cache = new WeakMap();\nvar scrollRegexp = /auto|scroll/;\nvar verticalRegexp = /^tb|vertical/;\nvar IE = (/msie|trident/i).test(global.navigator && global.navigator.userAgent);\nvar parseDimension = function (pixel) { return parseFloat(pixel || '0'); };\nvar size = function (inlineSize, blockSize, switchSizes) {\n if (inlineSize === void 0) { inlineSize = 0; }\n if (blockSize === void 0) { blockSize = 0; }\n if (switchSizes === void 0) { switchSizes = false; }\n return new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);\n};\nvar zeroBoxes = freeze({\n devicePixelContentBoxSize: size(),\n borderBoxSize: size(),\n contentBoxSize: size(),\n contentRect: new DOMRectReadOnly(0, 0, 0, 0)\n});\nvar calculateBoxSizes = function (target, forceRecalculation) {\n if (forceRecalculation === void 0) { forceRecalculation = false; }\n if (cache.has(target) && !forceRecalculation) {\n return cache.get(target);\n }\n if (isHidden(target)) {\n cache.set(target, zeroBoxes);\n return zeroBoxes;\n }\n var cs = getComputedStyle(target);\n var svg = isSVG(target) && target.ownerSVGElement && target.getBBox();\n var removePadding = !IE && cs.boxSizing === 'border-box';\n var switchSizes = verticalRegexp.test(cs.writingMode || '');\n var canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || '');\n var canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || '');\n var paddingTop = svg ? 0 : parseDimension(cs.paddingTop);\n var paddingRight = svg ? 0 : parseDimension(cs.paddingRight);\n var paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom);\n var paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft);\n var borderTop = svg ? 0 : parseDimension(cs.borderTopWidth);\n var borderRight = svg ? 0 : parseDimension(cs.borderRightWidth);\n var borderBottom = svg ? 0 : parseDimension(cs.borderBottomWidth);\n var borderLeft = svg ? 0 : parseDimension(cs.borderLeftWidth);\n var horizontalPadding = paddingLeft + paddingRight;\n var verticalPadding = paddingTop + paddingBottom;\n var horizontalBorderArea = borderLeft + borderRight;\n var verticalBorderArea = borderTop + borderBottom;\n var horizontalScrollbarThickness = !canScrollHorizontally ? 0 : target.offsetHeight - verticalBorderArea - target.clientHeight;\n var verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth;\n var widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0;\n var heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;\n var contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness;\n var contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness;\n var borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea;\n var borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea;\n var boxes = freeze({\n devicePixelContentBoxSize: size(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),\n borderBoxSize: size(borderBoxWidth, borderBoxHeight, switchSizes),\n contentBoxSize: size(contentWidth, contentHeight, switchSizes),\n contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)\n });\n cache.set(target, boxes);\n return boxes;\n};\nvar calculateBoxSize = function (target, observedBox, forceRecalculation) {\n var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;\n switch (observedBox) {\n case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:\n return devicePixelContentBoxSize;\n case ResizeObserverBoxOptions.BORDER_BOX:\n return borderBoxSize;\n default:\n return contentBoxSize;\n }\n};\nexport { calculateBoxSize, calculateBoxSizes };\n","import { calculateBoxSizes } from './algorithms/calculateBoxSize';\nimport { freeze } from './utils/freeze';\nvar ResizeObserverEntry = (function () {\n function ResizeObserverEntry(target) {\n var boxes = calculateBoxSizes(target);\n this.target = target;\n this.contentRect = boxes.contentRect;\n this.borderBoxSize = freeze([boxes.borderBoxSize]);\n this.contentBoxSize = freeze([boxes.contentBoxSize]);\n this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);\n }\n return ResizeObserverEntry;\n}());\nexport { ResizeObserverEntry };\n","import { isHidden } from '../utils/element';\nvar calculateDepthForNode = function (node) {\n if (isHidden(node)) {\n return Infinity;\n }\n var depth = 0;\n var parent = node.parentNode;\n while (parent) {\n depth += 1;\n parent = parent.parentNode;\n }\n return depth;\n};\nexport { calculateDepthForNode };\n","import { resizeObservers } from '../utils/resizeObservers';\nimport { ResizeObserverEntry } from '../ResizeObserverEntry';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nimport { calculateBoxSize } from './calculateBoxSize';\nvar broadcastActiveObservations = function () {\n var shallowestDepth = Infinity;\n var callbacks = [];\n resizeObservers.forEach(function processObserver(ro) {\n if (ro.activeTargets.length === 0) {\n return;\n }\n var entries = [];\n ro.activeTargets.forEach(function processTarget(ot) {\n var entry = new ResizeObserverEntry(ot.target);\n var targetDepth = calculateDepthForNode(ot.target);\n entries.push(entry);\n ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox);\n if (targetDepth < shallowestDepth) {\n shallowestDepth = targetDepth;\n }\n });\n callbacks.push(function resizeObserverCallback() {\n ro.callback.call(ro.observer, entries, ro.observer);\n });\n ro.activeTargets.splice(0, ro.activeTargets.length);\n });\n for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {\n var callback = callbacks_1[_i];\n callback();\n }\n return shallowestDepth;\n};\nexport { broadcastActiveObservations };\n","import { resizeObservers } from '../utils/resizeObservers';\nimport { calculateDepthForNode } from './calculateDepthForNode';\nvar gatherActiveObservationsAtDepth = function (depth) {\n resizeObservers.forEach(function processObserver(ro) {\n ro.activeTargets.splice(0, ro.activeTargets.length);\n ro.skippedTargets.splice(0, ro.skippedTargets.length);\n ro.observationTargets.forEach(function processTarget(ot) {\n if (ot.isActive()) {\n if (calculateDepthForNode(ot.target) > depth) {\n ro.activeTargets.push(ot);\n }\n else {\n ro.skippedTargets.push(ot);\n }\n }\n });\n });\n};\nexport { gatherActiveObservationsAtDepth };\n","import { hasActiveObservations } from '../algorithms/hasActiveObservations';\nimport { hasSkippedObservations } from '../algorithms/hasSkippedObservations';\nimport { deliverResizeLoopError } from '../algorithms/deliverResizeLoopError';\nimport { broadcastActiveObservations } from '../algorithms/broadcastActiveObservations';\nimport { gatherActiveObservationsAtDepth } from '../algorithms/gatherActiveObservationsAtDepth';\nvar process = function () {\n var depth = 0;\n gatherActiveObservationsAtDepth(depth);\n while (hasActiveObservations()) {\n depth = broadcastActiveObservations();\n gatherActiveObservationsAtDepth(depth);\n }\n if (hasSkippedObservations()) {\n deliverResizeLoopError();\n }\n return depth > 0;\n};\nexport { process };\n","var trigger;\nvar callbacks = [];\nvar notify = function () { return callbacks.splice(0).forEach(function (cb) { return cb(); }); };\nvar queueMicroTask = function (callback) {\n if (!trigger) {\n var toggle_1 = 0;\n var el_1 = document.createTextNode('');\n var config = { characterData: true };\n new MutationObserver(function () { return notify(); }).observe(el_1, config);\n trigger = function () { el_1.textContent = \"\".concat(toggle_1 ? toggle_1-- : toggle_1++); };\n }\n callbacks.push(callback);\n trigger();\n};\nexport { queueMicroTask };\n","import { queueMicroTask } from './queueMicroTask';\nvar queueResizeObserver = function (cb) {\n queueMicroTask(function ResizeObserver() {\n requestAnimationFrame(cb);\n });\n};\nexport { queueResizeObserver };\n","import { process } from './process';\nimport { global } from './global';\nimport { queueResizeObserver } from './queueResizeObserver';\nvar watching = 0;\nvar isWatching = function () { return !!watching; };\nvar CATCH_PERIOD = 250;\nvar observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };\nvar events = [\n 'resize',\n 'load',\n 'transitionend',\n 'animationend',\n 'animationstart',\n 'animationiteration',\n 'keyup',\n 'keydown',\n 'mouseup',\n 'mousedown',\n 'mouseover',\n 'mouseout',\n 'blur',\n 'focus'\n];\nvar time = function (timeout) {\n if (timeout === void 0) { timeout = 0; }\n return Date.now() + timeout;\n};\nvar scheduled = false;\nvar Scheduler = (function () {\n function Scheduler() {\n var _this = this;\n this.stopped = true;\n this.listener = function () { return _this.schedule(); };\n }\n Scheduler.prototype.run = function (timeout) {\n var _this = this;\n if (timeout === void 0) { timeout = CATCH_PERIOD; }\n if (scheduled) {\n return;\n }\n scheduled = true;\n var until = time(timeout);\n queueResizeObserver(function () {\n var elementsHaveResized = false;\n try {\n elementsHaveResized = process();\n }\n finally {\n scheduled = false;\n timeout = until - time();\n if (!isWatching()) {\n return;\n }\n if (elementsHaveResized) {\n _this.run(1000);\n }\n else if (timeout > 0) {\n _this.run(timeout);\n }\n else {\n _this.start();\n }\n }\n });\n };\n Scheduler.prototype.schedule = function () {\n this.stop();\n this.run();\n };\n Scheduler.prototype.observe = function () {\n var _this = this;\n var cb = function () { return _this.observer && _this.observer.observe(document.body, observerConfig); };\n document.body ? cb() : global.addEventListener('DOMContentLoaded', cb);\n };\n Scheduler.prototype.start = function () {\n var _this = this;\n if (this.stopped) {\n this.stopped = false;\n this.observer = new MutationObserver(this.listener);\n this.observe();\n events.forEach(function (name) { return global.addEventListener(name, _this.listener, true); });\n }\n };\n Scheduler.prototype.stop = function () {\n var _this = this;\n if (!this.stopped) {\n this.observer && this.observer.disconnect();\n events.forEach(function (name) { return global.removeEventListener(name, _this.listener, true); });\n this.stopped = true;\n }\n };\n return Scheduler;\n}());\nvar scheduler = new Scheduler();\nvar updateCount = function (n) {\n !watching && n > 0 && scheduler.start();\n watching += n;\n !watching && scheduler.stop();\n};\nexport { scheduler, updateCount };\n","import { ResizeObserverBoxOptions } from './ResizeObserverBoxOptions';\nimport { calculateBoxSize } from './algorithms/calculateBoxSize';\nimport { isSVG, isReplacedElement } from './utils/element';\nvar skipNotifyOnElement = function (target) {\n return !isSVG(target)\n && !isReplacedElement(target)\n && getComputedStyle(target).display === 'inline';\n};\nvar ResizeObservation = (function () {\n function ResizeObservation(target, observedBox) {\n this.target = target;\n this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX;\n this.lastReportedSize = {\n inlineSize: 0,\n blockSize: 0\n };\n }\n ResizeObservation.prototype.isActive = function () {\n var size = calculateBoxSize(this.target, this.observedBox, true);\n if (skipNotifyOnElement(this.target)) {\n this.lastReportedSize = size;\n }\n if (this.lastReportedSize.inlineSize !== size.inlineSize\n || this.lastReportedSize.blockSize !== size.blockSize) {\n return true;\n }\n return false;\n };\n return ResizeObservation;\n}());\nexport { ResizeObservation };\n","var ResizeObserverDetail = (function () {\n function ResizeObserverDetail(resizeObserver, callback) {\n this.activeTargets = [];\n this.skippedTargets = [];\n this.observationTargets = [];\n this.observer = resizeObserver;\n this.callback = callback;\n }\n return ResizeObserverDetail;\n}());\nexport { ResizeObserverDetail };\n","import { scheduler, updateCount } from './utils/scheduler';\nimport { ResizeObservation } from './ResizeObservation';\nimport { ResizeObserverDetail } from './ResizeObserverDetail';\nimport { resizeObservers } from './utils/resizeObservers';\nvar observerMap = new WeakMap();\nvar getObservationIndex = function (observationTargets, target) {\n for (var i = 0; i < observationTargets.length; i += 1) {\n if (observationTargets[i].target === target) {\n return i;\n }\n }\n return -1;\n};\nvar ResizeObserverController = (function () {\n function ResizeObserverController() {\n }\n ResizeObserverController.connect = function (resizeObserver, callback) {\n var detail = new ResizeObserverDetail(resizeObserver, callback);\n observerMap.set(resizeObserver, detail);\n };\n ResizeObserverController.observe = function (resizeObserver, target, options) {\n var detail = observerMap.get(resizeObserver);\n var firstObservation = detail.observationTargets.length === 0;\n if (getObservationIndex(detail.observationTargets, target) < 0) {\n firstObservation && resizeObservers.push(detail);\n detail.observationTargets.push(new ResizeObservation(target, options && options.box));\n updateCount(1);\n scheduler.schedule();\n }\n };\n ResizeObserverController.unobserve = function (resizeObserver, target) {\n var detail = observerMap.get(resizeObserver);\n var index = getObservationIndex(detail.observationTargets, target);\n var lastObservation = detail.observationTargets.length === 1;\n if (index >= 0) {\n lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1);\n detail.observationTargets.splice(index, 1);\n updateCount(-1);\n }\n };\n ResizeObserverController.disconnect = function (resizeObserver) {\n var _this = this;\n var detail = observerMap.get(resizeObserver);\n detail.observationTargets.slice().forEach(function (ot) { return _this.unobserve(resizeObserver, ot.target); });\n detail.activeTargets.splice(0, detail.activeTargets.length);\n };\n return ResizeObserverController;\n}());\nexport { ResizeObserverController };\n","import { ResizeObserverController } from './ResizeObserverController';\nimport { isElement } from './utils/element';\nvar ResizeObserver = (function () {\n function ResizeObserver(callback) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (typeof callback !== 'function') {\n throw new TypeError(\"Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.\");\n }\n ResizeObserverController.connect(this, callback);\n }\n ResizeObserver.prototype.observe = function (target, options) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (!isElement(target)) {\n throw new TypeError(\"Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n }\n ResizeObserverController.observe(this, target, options);\n };\n ResizeObserver.prototype.unobserve = function (target) {\n if (arguments.length === 0) {\n throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.\");\n }\n if (!isElement(target)) {\n throw new TypeError(\"Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element\");\n }\n ResizeObserverController.unobserve(this, target);\n };\n ResizeObserver.prototype.disconnect = function () {\n ResizeObserverController.disconnect(this);\n };\n ResizeObserver.toString = function () {\n return 'function ResizeObserver () { [polyfill code] }';\n };\n return ResizeObserver;\n}());\nexport { ResizeObserver };\n","import React from \"react\";\nconst context = React.createContext(!0);\nfunction forbiddenInRender() {\n throw new Error(\"A function wrapped in useEffectEvent can't be called during rendering.\");\n}\nconst isInvalidExecutionContextForEventFunction = \"use\" in React ? () => {\n try {\n return React.use(context);\n } catch {\n return !1;\n }\n} : () => !1;\nfunction useEffectEvent(fn) {\n const ref = React.useRef(forbiddenInRender);\n return React.useInsertionEffect(() => {\n ref.current = fn;\n }, [fn]), (...args) => {\n isInvalidExecutionContextForEventFunction() && forbiddenInRender();\n const latestFn = ref.current;\n return latestFn(...args);\n };\n}\nexport {\n useEffectEvent\n};\n//# sourceMappingURL=index.js.map\n","import { a as createColorTheme$1, c as multiply$1, d as hexToRgb$1, f as hslToRgb$1, i as getTheme_v2, l as rgba$1, m as rgbToHsl$1, o as buildTheme, p as rgbToHex$1, s as screen$1, t as getScopedTheme, u as parseColor$1 } from \"./getScopedTheme.js\";\nimport { c } from \"react-compiler-runtime\";\nimport { Children, cloneElement, createContext, forwardRef, isValidElement, useContext, useDebugValue, useEffect, useId, useImperativeHandle, useLayoutEffect, useRef, useState, useSyncExternalStore } from \"react\";\nimport { ThemeProvider, css, keyframes, styled, useTheme } from \"styled-components\";\nimport { Fragment as Fragment$1, jsx, jsxs } from \"react/jsx-runtime\";\nimport { isValidElementType } from \"react-is\";\nimport { SpinnerIcon } from \"@sanity/icons/Spinner\";\nimport { arrow, autoPlacement, autoUpdate, detectOverflow, flip, hide, offset, shift, useFloating } from \"@floating-ui/react-dom\";\nimport { AnimatePresence, motion } from \"motion/react\";\nimport { ResizeObserver } from \"@juggle/resize-observer\";\nimport { createPortal } from \"react-dom\";\nimport { CloseIcon } from \"@sanity/icons/Close\";\nimport { useEffectEvent } from \"use-effect-event\";\nimport { ChevronRightIcon } from \"@sanity/icons/ChevronRight\";\n/**\n* @public\n* @deprecated Use `createColorTheme` from `@sanity/ui/theme` instead.\n*/\nconst createColorTheme = createColorTheme$1, hexToRgb = hexToRgb$1, hslToRgb = hslToRgb$1, multiply = multiply$1, parseColor = parseColor$1, rgbToHex = rgbToHex$1, rgbToHsl = rgbToHsl$1, rgba = rgba$1, screen = screen$1, studioTheme = buildTheme(), EMPTY_ARRAY = [], EMPTY_RECORD = {}, POPOVER_MOTION_DURATION = .2, POPOVER_MOTION_PROPS = {\n\tcard: {\n\t\tinitial: {\n\t\t\tscale: .97,\n\t\t\twillChange: \"transform\"\n\t\t},\n\t\thidden: { opacity: 0 },\n\t\tvisible: {\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\twhen: \"beforeChildren\",\n\t\t\t\tduration: POPOVER_MOTION_DURATION / 2\n\t\t\t}\n\t\t},\n\t\tscaleIn: { scale: 1 },\n\t\tscaleOut: { scale: .97 }\n\t},\n\tchildren: {\n\t\thidden: { opacity: 0 },\n\t\tvisible: { opacity: 1 }\n\t},\n\ttransition: {\n\t\ttype: \"spring\",\n\t\tvisualDuration: POPOVER_MOTION_DURATION,\n\t\tbounce: .25\n\t}\n};\n/**\n* @internal\n*/\nfunction _isEnterToClickElement(element) {\n\treturn isHTMLAnchorElement(element) || isHTMLButtonElement(element);\n}\n/**\n* @internal\n*/\nfunction isHTMLElement(node) {\n\treturn node instanceof Node && node.nodeType === Node.ELEMENT_NODE;\n}\n/**\n* @internal\n*/\nfunction isHTMLAnchorElement(element) {\n\treturn isHTMLElement(element) && element.nodeName === \"A\";\n}\n/**\n* @internal\n*/\nfunction isHTMLInputElement(element) {\n\treturn isHTMLElement(element) && element.nodeName === \"INPUT\";\n}\n/**\n* @internal\n*/\nfunction isHTMLButtonElement(element) {\n\treturn isHTMLElement(element) && element.nodeName === \"BUTTON\";\n}\n/**\n* @internal\n*/\nfunction isHTMLSelectElement(element) {\n\treturn isHTMLElement(element) && element.nodeName === \"SELECT\";\n}\n/**\n* @internal\n*/\nfunction isHTMLTextAreaElement(element) {\n\treturn isHTMLElement(element) && element.nodeName === \"TEXTAREA\";\n}\n/**\n* @internal\n*/\nfunction containsOrEqualsElement(element, node) {\n\treturn element.contains(node) || element === node;\n}\n/**\n* @internal\n*/\nfunction _fillCSSObject(keys, value) {\n\treturn keys.reduce((style, key) => (style[key] = value, style), {});\n}\n/**\n* @public\n*/\nfunction rem(pixelValue) {\n\treturn pixelValue === 0 ? 0 : `${pixelValue / 16}rem`;\n}\n/**\n* @internal\n*/\nfunction _responsive(media, values, callback) {\n\treturn (values?.map(callback) || []).map((statement, mediaIndex) => mediaIndex === 0 ? statement : { [`@media screen and (min-width: ${media[mediaIndex - 1]}px)`]: statement });\n}\n/**\n* @internal\n*/\nfunction _getArrayProp(val, defaultVal) {\n\treturn val === void 0 ? defaultVal || EMPTY_ARRAY : Array.isArray(val) ? val : [val];\n}\n/**\n* @internal\n*/\nfunction _getResponsiveSpace(theme, props, spaceIndexes = EMPTY_ARRAY) {\n\tif (!Array.isArray(spaceIndexes)) throw Error(\"the property must be array of numbers\");\n\tif (spaceIndexes.length === 0) return null;\n\tlet { media, space } = getTheme_v2(theme);\n\treturn _responsive(media, spaceIndexes, (spaceIndex) => _fillCSSObject(props, rem(space[spaceIndex])));\n}\nconst BASE_STYLE$3 = { \"&[data-as=\\\"ul\\\"],&[data-as=\\\"ol\\\"]\": { listStyle: \"none\" } }, BOX_SIZING = {\n\tcontent: \"content-box\",\n\tborder: \"border-box\"\n}, BOX_HEIGHT = {\n\tstretch: \"stretch\",\n\tfill: \"100%\"\n};\nfunction boxStyle() {\n\treturn BASE_STYLE$3;\n}\nfunction responsiveBoxStyle() {\n\treturn [\n\t\tresponsiveBoxSizingStyle,\n\t\tresponsiveBoxHeightStyle,\n\t\tresponsiveBoxOverflowStyle,\n\t\tresponsiveBoxDisplayStyle\n\t];\n}\nfunction responsiveBoxDisplayStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$display, (display) => ({ \"&:not([hidden])\": { display } }));\n}\nfunction responsiveBoxSizingStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$sizing, (sizing) => ({ boxSizing: BOX_SIZING[sizing] }));\n}\nfunction responsiveBoxHeightStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$height, (height) => ({ height: BOX_HEIGHT[height] }));\n}\nfunction responsiveBoxOverflowStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$overflow, (overflow) => ({ overflow }));\n}\nconst BASE_STYLE$2 = {\n\tminWidth: 0,\n\tminHeight: 0\n};\nfunction flexItemStyle() {\n\treturn [BASE_STYLE$2, responsiveFlexItemStyle];\n}\nfunction responsiveFlexItemStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn props.$flex ? _responsive(media, props.$flex, (flex) => ({ flex: `${flex}` })) : EMPTY_ARRAY;\n}\nfunction responsiveGridItemStyle() {\n\treturn [\n\t\tresponsiveGridItemRowStyle,\n\t\tresponsiveGridItemRowStartStyle,\n\t\tresponsiveGridItemRowEndStyle,\n\t\tresponsiveGridItemColumnStyle,\n\t\tresponsiveGridItemColumnStartStyle,\n\t\tresponsiveGridItemColumnEndStyle\n\t];\n}\nconst GRID_ITEM_ROW = {\n\tauto: \"auto\",\n\tfull: \"1 / -1\"\n}, GRID_ITEM_COLUMN = {\n\tauto: \"auto\",\n\tfull: \"1 / -1\"\n};\nfunction responsiveGridItemRowStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$row, (row) => typeof row == \"number\" ? { gridRow: `span ${row} / span ${row}` } : { gridRow: GRID_ITEM_ROW[row] });\n}\nfunction responsiveGridItemRowStartStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$rowStart, (rowStart) => ({ gridRowStart: `${rowStart}` }));\n}\nfunction responsiveGridItemRowEndStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$rowEnd, (rowEnd) => ({ gridRowEnd: `${rowEnd}` }));\n}\nfunction responsiveGridItemColumnStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$column, (column) => typeof column == \"number\" ? { gridColumn: `span ${column} / span ${column}` } : { gridColumn: GRID_ITEM_COLUMN[column] });\n}\nfunction responsiveGridItemColumnStartStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$columnStart, (columnStart) => ({ gridColumnStart: `${columnStart}` }));\n}\nfunction responsiveGridItemColumnEndStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$columnEnd, (columnEnd) => ({ gridColumnEnd: `${columnEnd}` }));\n}\nfunction responsiveMarginStyle(props) {\n\tlet { theme } = props;\n\treturn [\n\t\t_getResponsiveSpace(theme, [\"margin\"], props.$margin),\n\t\t_getResponsiveSpace(theme, [\"marginLeft\", \"marginRight\"], props.$marginX),\n\t\t_getResponsiveSpace(theme, [\"marginTop\", \"marginBottom\"], props.$marginY),\n\t\t_getResponsiveSpace(theme, [\"marginTop\"], props.$marginTop),\n\t\t_getResponsiveSpace(theme, [\"marginRight\"], props.$marginRight),\n\t\t_getResponsiveSpace(theme, [\"marginBottom\"], props.$marginBottom),\n\t\t_getResponsiveSpace(theme, [\"marginLeft\"], props.$marginLeft)\n\t].filter(Boolean);\n}\nfunction responsivePaddingStyle(props) {\n\tlet { theme } = props;\n\treturn [\n\t\t_getResponsiveSpace(theme, [\"padding\"], props.$padding),\n\t\t_getResponsiveSpace(theme, [\"paddingLeft\", \"paddingRight\"], props.$paddingX),\n\t\t_getResponsiveSpace(theme, [\"paddingTop\", \"paddingBottom\"], props.$paddingY),\n\t\t_getResponsiveSpace(theme, [\"paddingTop\"], props.$paddingTop),\n\t\t_getResponsiveSpace(theme, [\"paddingRight\"], props.$paddingRight),\n\t\t_getResponsiveSpace(theme, [\"paddingBottom\"], props.$paddingBottom),\n\t\t_getResponsiveSpace(theme, [\"paddingLeft\"], props.$paddingLeft)\n\t].filter(Boolean);\n}\nconst StyledBox = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"StyledBox\",\n\tcomponentId: \"sc-p4sc7t-0\"\n})(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box = forwardRef(function Box(props, ref) {\n\tlet $ = c(115), deprecated_column, deprecated_columnEnd, deprecated_columnStart, deprecated_row, deprecated_rowEnd, deprecated_rowStart, flex, gridColumn, gridColumnEnd, gridColumnStart, gridRow, gridRowEnd, gridRowStart, height, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, overflow, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, restProps, sizing, t0, t1, t2, t3;\n\t$[0] === props ? (deprecated_column = $[1], deprecated_columnEnd = $[2], deprecated_columnStart = $[3], deprecated_row = $[4], deprecated_rowEnd = $[5], deprecated_rowStart = $[6], flex = $[7], gridColumn = $[8], gridColumnEnd = $[9], gridColumnStart = $[10], gridRow = $[11], gridRowEnd = $[12], gridRowStart = $[13], height = $[14], marginBottom = $[15], marginLeft = $[16], marginRight = $[17], marginTop = $[18], marginX = $[19], marginY = $[20], overflow = $[21], paddingBottom = $[22], paddingLeft = $[23], paddingRight = $[24], paddingTop = $[25], paddingX = $[26], paddingY = $[27], restProps = $[28], sizing = $[29], t0 = $[30], t1 = $[31], t2 = $[32], t3 = $[33]) : ({as: t0, gridColumn, column: deprecated_column, gridColumnStart, columnStart: deprecated_columnStart, gridColumnEnd, columnEnd: deprecated_columnEnd, display: t1, flex, height, margin: t2, marginX, marginY, marginTop, marginRight, marginBottom, marginLeft, overflow, padding: t3, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft, gridRow, row: deprecated_row, gridRowStart, rowStart: deprecated_rowStart, gridRowEnd, rowEnd: deprecated_rowEnd, sizing, ...restProps} = props, $[0] = props, $[1] = deprecated_column, $[2] = deprecated_columnEnd, $[3] = deprecated_columnStart, $[4] = deprecated_row, $[5] = deprecated_rowEnd, $[6] = deprecated_rowStart, $[7] = flex, $[8] = gridColumn, $[9] = gridColumnEnd, $[10] = gridColumnStart, $[11] = gridRow, $[12] = gridRowEnd, $[13] = gridRowStart, $[14] = height, $[15] = marginBottom, $[16] = marginLeft, $[17] = marginRight, $[18] = marginTop, $[19] = marginX, $[20] = marginY, $[21] = overflow, $[22] = paddingBottom, $[23] = paddingLeft, $[24] = paddingRight, $[25] = paddingTop, $[26] = paddingX, $[27] = paddingY, $[28] = restProps, $[29] = sizing, $[30] = t0, $[31] = t1, $[32] = t2, $[33] = t3);\n\tlet asProp = t0 === void 0 ? \"div\" : t0, display = t1 === void 0 ? \"block\" : t1, margin = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 0 : t3, column = gridColumn === void 0 ? deprecated_column : gridColumn, columnStart = gridColumnStart === void 0 ? deprecated_columnStart : gridColumnStart, columnEnd = gridColumnEnd === void 0 ? deprecated_columnEnd : gridColumnEnd, row = gridRow === void 0 ? deprecated_row : gridRow, rowStart = gridRowStart === void 0 ? deprecated_rowStart : gridRowStart, rowEnd = gridRowEnd === void 0 ? deprecated_rowEnd : gridRowEnd, t4 = typeof asProp == \"string\" ? asProp : void 0, t5;\n\t$[34] === column ? t5 = $[35] : (t5 = _getArrayProp(column), $[34] = column, $[35] = t5);\n\tlet t6;\n\t$[36] === columnStart ? t6 = $[37] : (t6 = _getArrayProp(columnStart), $[36] = columnStart, $[37] = t6);\n\tlet t7;\n\t$[38] === columnEnd ? t7 = $[39] : (t7 = _getArrayProp(columnEnd), $[38] = columnEnd, $[39] = t7);\n\tlet t8;\n\t$[40] === display ? t8 = $[41] : (t8 = _getArrayProp(display), $[40] = display, $[41] = t8);\n\tlet t9;\n\t$[42] === flex ? t9 = $[43] : (t9 = _getArrayProp(flex), $[42] = flex, $[43] = t9);\n\tlet t10;\n\t$[44] === height ? t10 = $[45] : (t10 = _getArrayProp(height), $[44] = height, $[45] = t10);\n\tlet t11;\n\t$[46] === margin ? t11 = $[47] : (t11 = _getArrayProp(margin), $[46] = margin, $[47] = t11);\n\tlet t12;\n\t$[48] === marginX ? t12 = $[49] : (t12 = _getArrayProp(marginX), $[48] = marginX, $[49] = t12);\n\tlet t13;\n\t$[50] === marginY ? t13 = $[51] : (t13 = _getArrayProp(marginY), $[50] = marginY, $[51] = t13);\n\tlet t14;\n\t$[52] === marginTop ? t14 = $[53] : (t14 = _getArrayProp(marginTop), $[52] = marginTop, $[53] = t14);\n\tlet t15;\n\t$[54] === marginRight ? t15 = $[55] : (t15 = _getArrayProp(marginRight), $[54] = marginRight, $[55] = t15);\n\tlet t16;\n\t$[56] === marginBottom ? t16 = $[57] : (t16 = _getArrayProp(marginBottom), $[56] = marginBottom, $[57] = t16);\n\tlet t17;\n\t$[58] === marginLeft ? t17 = $[59] : (t17 = _getArrayProp(marginLeft), $[58] = marginLeft, $[59] = t17);\n\tlet t18;\n\t$[60] === overflow ? t18 = $[61] : (t18 = _getArrayProp(overflow), $[60] = overflow, $[61] = t18);\n\tlet t19;\n\t$[62] === padding ? t19 = $[63] : (t19 = _getArrayProp(padding), $[62] = padding, $[63] = t19);\n\tlet t20;\n\t$[64] === paddingX ? t20 = $[65] : (t20 = _getArrayProp(paddingX), $[64] = paddingX, $[65] = t20);\n\tlet t21;\n\t$[66] === paddingY ? t21 = $[67] : (t21 = _getArrayProp(paddingY), $[66] = paddingY, $[67] = t21);\n\tlet t22;\n\t$[68] === paddingTop ? t22 = $[69] : (t22 = _getArrayProp(paddingTop), $[68] = paddingTop, $[69] = t22);\n\tlet t23;\n\t$[70] === paddingRight ? t23 = $[71] : (t23 = _getArrayProp(paddingRight), $[70] = paddingRight, $[71] = t23);\n\tlet t24;\n\t$[72] === paddingBottom ? t24 = $[73] : (t24 = _getArrayProp(paddingBottom), $[72] = paddingBottom, $[73] = t24);\n\tlet t25;\n\t$[74] === paddingLeft ? t25 = $[75] : (t25 = _getArrayProp(paddingLeft), $[74] = paddingLeft, $[75] = t25);\n\tlet t26;\n\t$[76] === row ? t26 = $[77] : (t26 = _getArrayProp(row), $[76] = row, $[77] = t26);\n\tlet t27;\n\t$[78] === rowStart ? t27 = $[79] : (t27 = _getArrayProp(rowStart), $[78] = rowStart, $[79] = t27);\n\tlet t28;\n\t$[80] === rowEnd ? t28 = $[81] : (t28 = _getArrayProp(rowEnd), $[80] = rowEnd, $[81] = t28);\n\tlet t29;\n\t$[82] === sizing ? t29 = $[83] : (t29 = _getArrayProp(sizing), $[82] = sizing, $[83] = t29);\n\tlet t30;\n\treturn $[84] !== asProp || $[85] !== props.children || $[86] !== ref || $[87] !== restProps || $[88] !== t10 || $[89] !== t11 || $[90] !== t12 || $[91] !== t13 || $[92] !== t14 || $[93] !== t15 || $[94] !== t16 || $[95] !== t17 || $[96] !== t18 || $[97] !== t19 || $[98] !== t20 || $[99] !== t21 || $[100] !== t22 || $[101] !== t23 || $[102] !== t24 || $[103] !== t25 || $[104] !== t26 || $[105] !== t27 || $[106] !== t28 || $[107] !== t29 || $[108] !== t4 || $[109] !== t5 || $[110] !== t6 || $[111] !== t7 || $[112] !== t8 || $[113] !== t9 ? (t30 = /* @__PURE__ */ jsx(StyledBox, {\n\t\t\"data-as\": t4,\n\t\t\"data-ui\": \"Box\",\n\t\t...restProps,\n\t\t$column: t5,\n\t\t$columnStart: t6,\n\t\t$columnEnd: t7,\n\t\t$display: t8,\n\t\t$flex: t9,\n\t\t$height: t10,\n\t\t$margin: t11,\n\t\t$marginX: t12,\n\t\t$marginY: t13,\n\t\t$marginTop: t14,\n\t\t$marginRight: t15,\n\t\t$marginBottom: t16,\n\t\t$marginLeft: t17,\n\t\t$overflow: t18,\n\t\t$padding: t19,\n\t\t$paddingX: t20,\n\t\t$paddingY: t21,\n\t\t$paddingTop: t22,\n\t\t$paddingRight: t23,\n\t\t$paddingBottom: t24,\n\t\t$paddingLeft: t25,\n\t\t$row: t26,\n\t\t$rowStart: t27,\n\t\t$rowEnd: t28,\n\t\t$sizing: t29,\n\t\tas: asProp,\n\t\tref,\n\t\tchildren: props.children\n\t}), $[84] = asProp, $[85] = props.children, $[86] = ref, $[87] = restProps, $[88] = t10, $[89] = t11, $[90] = t12, $[91] = t13, $[92] = t14, $[93] = t15, $[94] = t16, $[95] = t17, $[96] = t18, $[97] = t19, $[98] = t20, $[99] = t21, $[100] = t22, $[101] = t23, $[102] = t24, $[103] = t25, $[104] = t26, $[105] = t27, $[106] = t28, $[107] = t29, $[108] = t4, $[109] = t5, $[110] = t6, $[111] = t7, $[112] = t8, $[113] = t9, $[114] = t30) : t30 = $[114], t30;\n});\nfunction responsiveRadiusStyle(props) {\n\tlet { media, radius } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$radius, (value) => {\n\t\tlet borderRadius = 0;\n\t\treturn typeof value == \"number\" && (borderRadius = rem(radius[value])), value === \"full\" && (borderRadius = \"9999px\"), { borderRadius };\n\t});\n}\n/**\n* @public\n*/\nfunction useTheme$1() {\n\treturn useTheme();\n}\n/**\n* @public\n*/\nfunction useTheme_v2() {\n\tlet $ = c(2), t0 = useTheme(), t1;\n\treturn $[0] === t0 ? t1 = $[1] : (t1 = getTheme_v2(t0), $[0] = t0, $[1] = t1), t1;\n}\nconst BASE_STYLE$1 = { \"&&:not([hidden])\": { display: \"flex\" } };\nfunction responsiveFlexStyle() {\n\treturn [\n\t\tBASE_STYLE$1,\n\t\tresponsiveFlexAlignStyle,\n\t\tresponsiveFlexGapStyle,\n\t\tresponsiveFlexWrapStyle,\n\t\tresponsiveFlexJustifyStyle,\n\t\tresponsiveFlexDirectionStyle\n\t];\n}\nfunction responsiveFlexAlignStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$align, (align) => ({ alignItems: align }));\n}\nfunction responsiveFlexGapStyle(props) {\n\tlet { media, space } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$gap, (gap) => ({ gap: gap ? rem(space[gap]) : void 0 }));\n}\nfunction responsiveFlexWrapStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$wrap, (wrap) => ({ flexWrap: wrap }));\n}\nfunction responsiveFlexJustifyStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$justify, (justify) => ({ justifyContent: justify }));\n}\nfunction responsiveFlexDirectionStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$direction, (direction) => ({ flexDirection: direction }));\n}\nconst StyledFlex = /* @__PURE__ */ styled(Box).withConfig({\n\tdisplayName: \"StyledFlex\",\n\tcomponentId: \"sc-5lzqa2-0\"\n})(flexItemStyle, responsiveFlexStyle), Flex = forwardRef(function Flex(props, ref) {\n\tlet $ = c(27), align, as, gap, justify, restProps, t0, wrap;\n\t$[0] === props ? (align = $[1], as = $[2], gap = $[3], justify = $[4], restProps = $[5], t0 = $[6], wrap = $[7]) : ({align, as, direction: t0, gap, justify, wrap, ...restProps} = props, $[0] = props, $[1] = align, $[2] = as, $[3] = gap, $[4] = justify, $[5] = restProps, $[6] = t0, $[7] = wrap);\n\tlet direction = t0 === void 0 ? \"row\" : t0, t1;\n\t$[8] === align ? t1 = $[9] : (t1 = _getArrayProp(align), $[8] = align, $[9] = t1);\n\tlet t2;\n\t$[10] === direction ? t2 = $[11] : (t2 = _getArrayProp(direction), $[10] = direction, $[11] = t2);\n\tlet t3;\n\t$[12] === gap ? t3 = $[13] : (t3 = _getArrayProp(gap), $[12] = gap, $[13] = t3);\n\tlet t4;\n\t$[14] === justify ? t4 = $[15] : (t4 = _getArrayProp(justify), $[14] = justify, $[15] = t4);\n\tlet t5;\n\t$[16] === wrap ? t5 = $[17] : (t5 = _getArrayProp(wrap), $[16] = wrap, $[17] = t5);\n\tlet t6;\n\treturn $[18] !== as || $[19] !== ref || $[20] !== restProps || $[21] !== t1 || $[22] !== t2 || $[23] !== t3 || $[24] !== t4 || $[25] !== t5 ? (t6 = /* @__PURE__ */ jsx(StyledFlex, {\n\t\t\"data-ui\": \"Flex\",\n\t\t...restProps,\n\t\t$align: t1,\n\t\t$direction: t2,\n\t\t$gap: t3,\n\t\t$justify: t4,\n\t\t$wrap: t5,\n\t\tforwardedAs: as,\n\t\tref\n\t}), $[18] = as, $[19] = ref, $[20] = restProps, $[21] = t1, $[22] = t2, $[23] = t3, $[24] = t4, $[25] = t5, $[26] = t6) : t6 = $[26], t6;\n});\n/**\n* Get responsive text align styles.\n* @internal\n*/\nfunction responsiveTextAlignStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$align, (textAlign) => ({ textAlign }));\n}\n/**\n* A utility function getting responsive font styles.\n* @internal\n*/\nfunction responsiveFont(fontKey, props) {\n\tlet { $size, $weight } = props, { font, media } = getTheme_v2(props.theme), { family, sizes, weights } = font[fontKey], fontWeight = $weight && weights[$weight] || weights.regular, defaultSize = sizes[2], base = {\n\t\tposition: \"relative\",\n\t\tfontFamily: family,\n\t\tfontWeight: `${fontWeight}`,\n\t\tpadding: \"1px 0\",\n\t\tmargin: 0,\n\t\t\"&:before\": {\n\t\t\tcontent: \"\\\"\\\"\",\n\t\t\tdisplay: \"block\",\n\t\t\theight: 0\n\t\t},\n\t\t\"&:after\": {\n\t\t\tcontent: \"\\\"\\\"\",\n\t\t\tdisplay: \"block\",\n\t\t\theight: 0\n\t\t},\n\t\t\"& > code, & > span\": { display: \"block\" },\n\t\t\"&:not([hidden])\": { display: \"block\" }\n\t};\n\treturn $size ? [base, ..._responsive(media, $size, (sizeIndex) => fontSize(sizes[sizeIndex] || defaultSize))] : (responsiveFont.warned ||= (console.warn(\"No size specified for responsive font\", {\n\t\tfontKey,\n\t\t$size,\n\t\tprops,\n\t\tbase\n\t}), !0), [base]);\n}\nfunction fontSize(size) {\n\tlet { ascenderHeight, descenderHeight, fontSize, iconSize, letterSpacing, lineHeight } = size, negHeight = ascenderHeight + descenderHeight, capHeight = lineHeight - negHeight, iconOffset = (capHeight - iconSize) / 2, customIconSize = Math.floor(fontSize * 1.125 / 2) * 2 + 1, customIconOffset = (capHeight - customIconSize) / 2;\n\treturn {\n\t\tfontSize: rem(fontSize),\n\t\tlineHeight: `calc(${lineHeight} / ${fontSize})`,\n\t\tletterSpacing: rem(letterSpacing),\n\t\ttransform: `translateY(${rem(descenderHeight)})`,\n\t\t\"&:before\": { marginTop: `calc(${rem(0 - negHeight)} - 1px)` },\n\t\t\"&:after\": { marginBottom: \"-1px\" },\n\t\t\"& svg:not([data-sanity-icon])\": {\n\t\t\tfontSize: `calc(${customIconSize} / 16 * 1rem)`,\n\t\t\tmargin: rem(customIconOffset)\n\t\t},\n\t\t\"& [data-sanity-icon]\": {\n\t\t\tfontSize: `calc(${iconSize} / 16 * 1rem)`,\n\t\t\tmargin: rem(iconOffset)\n\t\t}\n\t};\n}\n/**\n* Get responsive CSS for the `text` font style.\n* @internal\n*/\nfunction responsiveTextFont(props) {\n\treturn responsiveFont(\"text\", props);\n}\n/** @internal */\nconst SpanWithTextOverflow = styled.span.withConfig({\n\tdisplayName: \"SpanWithTextOverflow\",\n\tcomponentId: \"sc-xkyu3h-0\"\n})`display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;overflow:clip;`;\nfunction textBaseStyle(props) {\n\tlet { $accent, $muted } = props, { font } = getTheme_v2(props.theme);\n\treturn css`color:var(--card-fg-color);${$accent && css`color:var(--card-accent-fg-color);`} ${$muted && css`color:var(--card-muted-fg-color);`} & code{font-family:${font.code.family};border-radius:1px;background-color:var(--card-code-bg-color);color:var(--card-code-fg-color);}& a{text-decoration:none;border-radius:1px;color:var(--card-link-color);outline:none;@media (hover:hover){&:hover{text-decoration:underline;}}&:focus{box-shadow:0 0 0 1px var(--card-bg-color),0 0 0 3px var(--card-focus-ring-color);}&:focus:not(:focus-visible){box-shadow:none;}}& strong{font-weight:${font.text.weights.bold};}& svg{display:inline;}& [data-sanity-icon]{vertical-align:baseline;color:var(--card-icon-color);& path{vector-effect:non-scaling-stroke !important;}}`;\n}\nconst StyledText = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"StyledText\",\n\tcomponentId: \"sc-m7q2yn-0\"\n})(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle), Text = forwardRef(function Text(props, ref) {\n\tlet $ = c(26), align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;\n\t$[0] === props ? (align = $[1], childrenProp = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], textOverflow = $[7], weight = $[8]) : ({accent: t0, align, children: childrenProp, muted: t1, size: t2, textOverflow, weight, ...restProps} = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = textOverflow, $[8] = weight);\n\tlet accent = t0 !== void 0 && t0, muted = t1 !== void 0 && t1, size = t2 === void 0 ? 2 : t2, children = childrenProp;\n\tif (textOverflow === \"ellipsis\") {\n\t\tlet t3;\n\t\t$[9] === children ? t3 = $[10] : (t3 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[9] = children, $[10] = t3), children = t3;\n\t}\n\tlet t3;\n\t$[11] === align ? t3 = $[12] : (t3 = _getArrayProp(align), $[11] = align, $[12] = t3);\n\tlet t4;\n\t$[13] === size ? t4 = $[14] : (t4 = _getArrayProp(size), $[13] = size, $[14] = t4);\n\tlet t5;\n\t$[15] === children ? t5 = $[16] : (t5 = /* @__PURE__ */ jsx(\"span\", { children }), $[15] = children, $[16] = t5);\n\tlet t6;\n\treturn $[17] !== accent || $[18] !== muted || $[19] !== ref || $[20] !== restProps || $[21] !== t3 || $[22] !== t4 || $[23] !== t5 || $[24] !== weight ? (t6 = /* @__PURE__ */ jsx(StyledText, {\n\t\t\"data-ui\": \"Text\",\n\t\t...restProps,\n\t\t$accent: accent,\n\t\t$align: t3,\n\t\t$muted: muted,\n\t\tref,\n\t\t$size: t4,\n\t\t$weight: weight,\n\t\tchildren: t5\n\t}), $[17] = accent, $[18] = muted, $[19] = ref, $[20] = restProps, $[21] = t3, $[22] = t4, $[23] = t5, $[24] = weight, $[25] = t6) : t6 = $[25], t6;\n}), rotate = keyframes`from{transform:rotate(0deg);}to{transform:rotate(360deg);}`, StyledSpinner = styled(Text).withConfig({\n\tdisplayName: \"StyledSpinner\",\n\tcomponentId: \"sc-k51eu1-0\"\n})`& > span > svg{animation:${rotate} 500ms linear infinite;}`, Spinner = forwardRef(function Spinner(props, ref) {\n\tlet $ = c(4), t0;\n\t$[0] === Symbol.for(\"react.memo_cache_sentinel\") ? (t0 = /* @__PURE__ */ jsx(SpinnerIcon, {}), $[0] = t0) : t0 = $[0];\n\tlet t1;\n\treturn $[1] !== props || $[2] !== ref ? (t1 = /* @__PURE__ */ jsx(StyledSpinner, {\n\t\t\"data-ui\": \"Spinner\",\n\t\t...props,\n\t\tref,\n\t\tchildren: t0\n\t}), $[1] = props, $[2] = ref, $[3] = t1) : t1 = $[3], t1;\n});\n/**\n* @internal\n*/\nfunction _cardColorStyle(base, color, checkered = !1) {\n\treturn {\n\t\t\"--card-backdrop-color\": base.backdrop,\n\t\t\"--card-focus-ring-color\": base.focusRing,\n\t\t\"--card-shadow-outline-color\": base.shadow.outline,\n\t\t\"--card-shadow-umbra-color\": base.shadow.umbra,\n\t\t\"--card-shadow-penumbra-color\": base.shadow.penumbra,\n\t\t\"--card-shadow-ambient-color\": base.shadow.ambient,\n\t\t\"--card-accent-fg-color\": color.accent.fg,\n\t\t\"--card-avatar-gray-bg-color\": color.avatar.gray.bg,\n\t\t\"--card-avatar-gray-fg-color\": color.avatar.gray.fg,\n\t\t\"--card-avatar-blue-bg-color\": color.avatar.blue.bg,\n\t\t\"--card-avatar-blue-fg-color\": color.avatar.blue.fg,\n\t\t\"--card-avatar-purple-bg-color\": color.avatar.purple.bg,\n\t\t\"--card-avatar-purple-fg-color\": color.avatar.purple.fg,\n\t\t\"--card-avatar-magenta-bg-color\": color.avatar.magenta.bg,\n\t\t\"--card-avatar-magenta-fg-color\": color.avatar.magenta.fg,\n\t\t\"--card-avatar-red-bg-color\": color.avatar.red.bg,\n\t\t\"--card-avatar-red-fg-color\": color.avatar.red.fg,\n\t\t\"--card-avatar-orange-bg-color\": color.avatar.orange.bg,\n\t\t\"--card-avatar-orange-fg-color\": color.avatar.orange.fg,\n\t\t\"--card-avatar-yellow-bg-color\": color.avatar.yellow.bg,\n\t\t\"--card-avatar-yellow-fg-color\": color.avatar.yellow.fg,\n\t\t\"--card-avatar-green-bg-color\": color.avatar.green.bg,\n\t\t\"--card-avatar-green-fg-color\": color.avatar.green.fg,\n\t\t\"--card-avatar-cyan-bg-color\": color.avatar.cyan.bg,\n\t\t\"--card-avatar-cyan-fg-color\": color.avatar.cyan.fg,\n\t\t\"--card-bg-color\": color.bg,\n\t\t\"--card-bg-image\": checkered ? `repeating-conic-gradient(${color.bg} 0% 25%, ${color.muted.bg} 0% 50%)` : void 0,\n\t\t\"--card-border-color\": color.border,\n\t\t\"--card-badge-default-bg-color\": color.badge.default.bg,\n\t\t\"--card-badge-default-dot-color\": color.badge.default.dot,\n\t\t\"--card-badge-default-fg-color\": color.badge.default.fg,\n\t\t\"--card-badge-default-icon-color\": color.badge.default.icon,\n\t\t\"--card-badge-neutral-bg-color\": color.badge.neutral?.bg,\n\t\t\"--card-badge-neutral-dot-color\": color.badge.neutral?.dot,\n\t\t\"--card-badge-neutral-fg-color\": color.badge.neutral?.fg,\n\t\t\"--card-badge-neutral-icon-color\": color.badge.neutral?.icon,\n\t\t\"--card-badge-primary-bg-color\": color.badge.primary.bg,\n\t\t\"--card-badge-primary-dot-color\": color.badge.primary.dot,\n\t\t\"--card-badge-primary-fg-color\": color.badge.primary.fg,\n\t\t\"--card-badge-primary-icon-color\": color.badge.primary.icon,\n\t\t\"--card-badge-suggest-bg-color\": color.badge.suggest?.bg,\n\t\t\"--card-badge-suggest-dot-color\": color.badge.suggest?.dot,\n\t\t\"--card-badge-suggest-fg-color\": color.badge.suggest?.fg,\n\t\t\"--card-badge-suggest-icon-color\": color.badge.suggest?.icon,\n\t\t\"--card-badge-positive-bg-color\": color.badge.positive.bg,\n\t\t\"--card-badge-positive-dot-color\": color.badge.positive.dot,\n\t\t\"--card-badge-positive-fg-color\": color.badge.positive.fg,\n\t\t\"--card-badge-positive-icon-color\": color.badge.positive.icon,\n\t\t\"--card-badge-caution-bg-color\": color.badge.caution.bg,\n\t\t\"--card-badge-caution-dot-color\": color.badge.caution.dot,\n\t\t\"--card-badge-caution-fg-color\": color.badge.caution.fg,\n\t\t\"--card-badge-caution-icon-color\": color.badge.caution.icon,\n\t\t\"--card-badge-critical-bg-color\": color.badge.critical.bg,\n\t\t\"--card-badge-critical-dot-color\": color.badge.critical.dot,\n\t\t\"--card-badge-critical-fg-color\": color.badge.critical.fg,\n\t\t\"--card-badge-critical-icon-color\": color.badge.critical.icon,\n\t\t\"--card-code-bg-color\": color.code.bg,\n\t\t\"--card-code-fg-color\": color.code.fg,\n\t\t\"--card-fg-color\": color.fg,\n\t\t\"--card-icon-color\": color.icon,\n\t\t\"--card-kbd-bg-color\": color.kbd.bg,\n\t\t\"--card-kbd-border-color\": color.kbd.border,\n\t\t\"--card-kbd-fg-color\": color.kbd.fg,\n\t\t\"--card-link-fg-color\": color.link.fg,\n\t\t\"--card-muted-bg-color\": color.muted.bg,\n\t\t\"--card-muted-fg-color\": color.muted.fg,\n\t\t\"--card-skeleton-color-from\": color.skeleton.from,\n\t\t\"--card-skeleton-color-to\": color.skeleton.to,\n\t\t\"--card-bg2-color\": color.muted.bg,\n\t\t\"--card-link-color\": color.link.fg,\n\t\t\"--card-hairline-soft-color\": color.border,\n\t\t\"--card-hairline-hard-color\": color.border\n\t};\n}\nfunction focusRingBorderStyle(border) {\n\treturn `inset 0 0 0 ${border.width}px ${border.color}`;\n}\nfunction focusRingStyle(opts) {\n\tlet { base, border, focusRing } = opts, focusRingOutsetWidth = focusRing.offset + focusRing.width, focusRingInsetWidth = 0 - focusRing.offset, bgColor = base ? base.bg : \"var(--card-bg-color)\";\n\treturn [\n\t\tfocusRingInsetWidth > 0 && `inset 0 0 0 ${focusRingInsetWidth}px var(--card-focus-ring-color)`,\n\t\tborder && focusRingBorderStyle(border),\n\t\tfocusRingInsetWidth < 0 && `0 0 0 ${0 - focusRingInsetWidth}px ${bgColor}`,\n\t\tfocusRingOutsetWidth > 0 && `0 0 0 ${focusRingOutsetWidth}px var(--card-focus-ring-color)`\n\t].filter(Boolean).join(\",\");\n}\n/**\n* @internal\n*/\nfunction buttonBaseStyles(props) {\n\tlet { $width } = props, { style } = getTheme_v2(props.theme);\n\treturn css`${style?.button};-webkit-font-smoothing:inherit;appearance:none;display:inline-flex;align-items:center;font:inherit;border:0;outline:none;user-select:none;text-decoration:none;border:0;box-sizing:border-box;padding:0;margin:0;white-space:nowrap;text-align:left;position:relative;vertical-align:top;${$width === \"fill\" && css`width:-moz-available;width:-webkit-fill-available;width:stretch;`} & > span{display:block;flex:1;min-width:0;border-radius:inherit;}&::-moz-focus-inner{border:0;padding:0;}`;\n}\nfunction combineBoxShadow(...boxShadows) {\n\treturn boxShadows.filter(Boolean).join(\",\");\n}\n/**\n* @internal\n*/\nfunction buttonColorStyles(props) {\n\tlet { $mode } = props, { button, color: baseColor, style } = getTheme_v2(props.theme);\n\tprops.$mode;\n\tlet mode = baseColor.button[$mode] || baseColor.button.default, color = mode[props.$tone] || mode.default, border = {\n\t\twidth: button.border.width,\n\t\tcolor: \"var(--card-border-color)\"\n\t};\n\treturn [\n\t\t_cardColorStyle(baseColor, color.enabled),\n\t\t{\n\t\t\tbackgroundColor: \"var(--card-bg-color)\",\n\t\t\tcolor: \"var(--card-fg-color)\",\n\t\t\tboxShadow: focusRingBorderStyle(border),\n\t\t\t\"&:disabled, &[data-disabled=\\\"true\\\"]\": _cardColorStyle(baseColor, color.disabled),\n\t\t\t\"&:not([data-disabled='true'])\": {\n\t\t\t\tboxShadow: combineBoxShadow(focusRingBorderStyle(border), void 0),\n\t\t\t\t\"&:focus\": { boxShadow: focusRingStyle({\n\t\t\t\t\tbase: baseColor,\n\t\t\t\t\tborder: {\n\t\t\t\t\t\twidth: 2,\n\t\t\t\t\t\tcolor: baseColor.bg\n\t\t\t\t\t},\n\t\t\t\t\tfocusRing: button.focusRing\n\t\t\t\t}) },\n\t\t\t\t\"&:focus:not(:focus-visible)\": { boxShadow: combineBoxShadow(focusRingBorderStyle(border), void 0) },\n\t\t\t\t\"@media (hover: hover)\": {\n\t\t\t\t\t\"&:hover\": _cardColorStyle(baseColor, color.hovered),\n\t\t\t\t\t\"&:active\": _cardColorStyle(baseColor, color.pressed),\n\t\t\t\t\t\"&[data-hovered]\": _cardColorStyle(baseColor, color.hovered)\n\t\t\t\t},\n\t\t\t\t\"&[data-selected]\": _cardColorStyle(baseColor, color.pressed)\n\t\t\t}\n\t\t},\n\t\tstyle?.button?.root\n\t].filter(Boolean);\n}\nconst StyledButton = /* @__PURE__ */ styled.button.withConfig({\n\tdisplayName: \"StyledButton\",\n\tcomponentId: \"sc-5eghxe-0\"\n})(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles), LoadingBox = styled.div.withConfig({\n\tdisplayName: \"LoadingBox\",\n\tcomponentId: \"sc-5eghxe-1\"\n})`position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background-color:var(--card-bg-color);border-radius:inherit;z-index:1;box-shadow:inherit;`, Button = forwardRef(function Button(props, ref) {\n\tlet $ = c(87), IconComponent, IconRightComponent, children, disabled, gap, loading, paddingBottomProp, paddingLeftProp, paddingRightProp, paddingTopProp, paddingXProp, paddingYProp, restProps, selected, t0, t1, t2, t3, t4, t5, t6, t7, t8, text, textAlign, textWeight, width;\n\t$[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], gap = $[5], loading = $[6], paddingBottomProp = $[7], paddingLeftProp = $[8], paddingRightProp = $[9], paddingTopProp = $[10], paddingXProp = $[11], paddingYProp = $[12], restProps = $[13], selected = $[14], t0 = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21], t7 = $[22], t8 = $[23], text = $[24], textAlign = $[25], textWeight = $[26], width = $[27]) : ({children, disabled, fontSize: t0, icon: IconComponent, iconRight: IconRightComponent, justify: t1, loading, mode: t2, padding: t3, paddingX: paddingXProp, paddingY: paddingYProp, paddingTop: paddingTopProp, paddingBottom: paddingBottomProp, paddingLeft: paddingLeftProp, paddingRight: paddingRightProp, radius: t4, selected, gap, space: t5, text, textAlign, textWeight, tone: t6, type: t7, muted: t8, width, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = gap, $[6] = loading, $[7] = paddingBottomProp, $[8] = paddingLeftProp, $[9] = paddingRightProp, $[10] = paddingTopProp, $[11] = paddingXProp, $[12] = paddingYProp, $[13] = restProps, $[14] = selected, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6, $[22] = t7, $[23] = t8, $[24] = text, $[25] = textAlign, $[26] = textWeight, $[27] = width);\n\tlet fontSize = t0 === void 0 ? 1 : t0, justifyProp = t1 === void 0 ? \"center\" : t1, mode = t2 === void 0 ? \"default\" : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, deprecated_space = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? \"default\" : t6, type = t7 === void 0 ? \"button\" : t7, muted = t8 !== void 0 && t8, { button } = useTheme_v2(), t9;\n\t$[28] === justifyProp ? t9 = $[29] : (t9 = _getArrayProp(justifyProp), $[28] = justifyProp, $[29] = t9);\n\tlet justify = t9, t10;\n\t$[30] === paddingProp ? t10 = $[31] : (t10 = _getArrayProp(paddingProp), $[30] = paddingProp, $[31] = t10);\n\tlet padding = t10, t11;\n\t$[32] === paddingXProp ? t11 = $[33] : (t11 = _getArrayProp(paddingXProp), $[32] = paddingXProp, $[33] = t11);\n\tlet paddingX = t11, t12;\n\t$[34] === paddingYProp ? t12 = $[35] : (t12 = _getArrayProp(paddingYProp), $[34] = paddingYProp, $[35] = t12);\n\tlet paddingY = t12, t13;\n\t$[36] === paddingTopProp ? t13 = $[37] : (t13 = _getArrayProp(paddingTopProp), $[36] = paddingTopProp, $[37] = t13);\n\tlet paddingTop = t13, t14;\n\t$[38] === paddingBottomProp ? t14 = $[39] : (t14 = _getArrayProp(paddingBottomProp), $[38] = paddingBottomProp, $[39] = t14);\n\tlet paddingBottom = t14, t15;\n\t$[40] === paddingLeftProp ? t15 = $[41] : (t15 = _getArrayProp(paddingLeftProp), $[40] = paddingLeftProp, $[41] = t15);\n\tlet paddingLeft = t15, t16;\n\t$[42] === paddingRightProp ? t16 = $[43] : (t16 = _getArrayProp(paddingRightProp), $[42] = paddingRightProp, $[43] = t16);\n\tlet paddingRight = t16, t17;\n\t$[44] === radiusProp ? t17 = $[45] : (t17 = _getArrayProp(radiusProp), $[44] = radiusProp, $[45] = t17);\n\tlet radius = t17, t18 = gap === void 0 ? deprecated_space : gap, t19;\n\t$[46] === t18 ? t19 = $[47] : (t19 = _getArrayProp(t18), $[46] = t18, $[47] = t19);\n\tlet spacing = t19, t20;\n\t$[48] !== padding || $[49] !== paddingBottom || $[50] !== paddingLeft || $[51] !== paddingRight || $[52] !== paddingTop || $[53] !== paddingX || $[54] !== paddingY ? (t20 = {\n\t\tpadding,\n\t\tpaddingX,\n\t\tpaddingY,\n\t\tpaddingTop,\n\t\tpaddingBottom,\n\t\tpaddingLeft,\n\t\tpaddingRight\n\t}, $[48] = padding, $[49] = paddingBottom, $[50] = paddingLeft, $[51] = paddingRight, $[52] = paddingTop, $[53] = paddingX, $[54] = paddingY, $[55] = t20) : t20 = $[55];\n\tlet boxProps = t20, t21 = !!(loading || disabled), t22 = selected ? \"\" : void 0, t23 = !!(loading || disabled), t24;\n\t$[56] === loading ? t24 = $[57] : (t24 = !!loading && /* @__PURE__ */ jsx(LoadingBox, { children: /* @__PURE__ */ jsx(Spinner, {}) }), $[56] = loading, $[57] = t24);\n\tlet t25;\n\t$[58] !== IconComponent || $[59] !== IconRightComponent || $[60] !== boxProps || $[61] !== button || $[62] !== fontSize || $[63] !== justify || $[64] !== muted || $[65] !== spacing || $[66] !== text || $[67] !== textAlign || $[68] !== textWeight ? (t25 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsx(Box, {\n\t\tas: \"span\",\n\t\t...boxProps,\n\t\tchildren: /* @__PURE__ */ jsxs(Flex, {\n\t\t\tas: \"span\",\n\t\t\tjustify,\n\t\t\tgap: spacing,\n\t\t\tchildren: [\n\t\t\t\tIconComponent && /* @__PURE__ */ jsxs(Text, {\n\t\t\t\t\tsize: fontSize,\n\t\t\t\t\tchildren: [isValidElement(IconComponent) && IconComponent, isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})]\n\t\t\t\t}),\n\t\t\t\ttext && /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, {\n\t\t\t\t\tmuted,\n\t\t\t\t\talign: textAlign,\n\t\t\t\t\tsize: fontSize,\n\t\t\t\t\ttextOverflow: \"ellipsis\",\n\t\t\t\t\tweight: textWeight ?? button.textWeight,\n\t\t\t\t\tchildren: text\n\t\t\t\t}) }),\n\t\t\t\tIconRightComponent && /* @__PURE__ */ jsxs(Text, {\n\t\t\t\t\tsize: fontSize,\n\t\t\t\t\tchildren: [isValidElement(IconRightComponent) && IconRightComponent, isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})]\n\t\t\t\t})\n\t\t\t]\n\t\t})\n\t}), $[58] = IconComponent, $[59] = IconRightComponent, $[60] = boxProps, $[61] = button, $[62] = fontSize, $[63] = justify, $[64] = muted, $[65] = spacing, $[66] = text, $[67] = textAlign, $[68] = textWeight, $[69] = t25) : t25 = $[69];\n\tlet t26;\n\t$[70] !== boxProps || $[71] !== children ? (t26 = children && /* @__PURE__ */ jsx(Box, {\n\t\tas: \"span\",\n\t\t...boxProps,\n\t\tchildren\n\t}), $[70] = boxProps, $[71] = children, $[72] = t26) : t26 = $[72];\n\tlet t27;\n\treturn $[73] !== mode || $[74] !== radius || $[75] !== ref || $[76] !== restProps || $[77] !== t21 || $[78] !== t22 || $[79] !== t23 || $[80] !== t24 || $[81] !== t25 || $[82] !== t26 || $[83] !== tone || $[84] !== type || $[85] !== width ? (t27 = /* @__PURE__ */ jsxs(StyledButton, {\n\t\t\"data-ui\": \"Button\",\n\t\t...restProps,\n\t\t$mode: mode,\n\t\t$radius: radius,\n\t\t$tone: tone,\n\t\t\"data-disabled\": t21,\n\t\t\"data-selected\": t22,\n\t\tdisabled: t23,\n\t\tref,\n\t\ttype,\n\t\t$width: width,\n\t\tchildren: [\n\t\t\tt24,\n\t\t\tt25,\n\t\t\tt26\n\t\t]\n\t}), $[73] = mode, $[74] = radius, $[75] = ref, $[76] = restProps, $[77] = t21, $[78] = t22, $[79] = t23, $[80] = t24, $[81] = t25, $[82] = t26, $[83] = tone, $[84] = type, $[85] = width, $[86] = t27) : t27 = $[86], t27;\n});\nfunction responsiveBorderStyle() {\n\treturn [\n\t\tborder,\n\t\tborderTop,\n\t\tborderRight,\n\t\tborderBottom,\n\t\tborderLeft\n\t];\n}\nfunction border(props) {\n\tlet { card, media } = getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;\n\treturn _responsive(media, props.$border, (value) => value ? { \"&&\": { border: borderStyle } } : { \"&&\": { border: 0 } });\n}\nfunction borderTop(props) {\n\tlet { card, media } = getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;\n\treturn _responsive(media, props.$borderTop, (value) => value ? { \"&&\": { borderTop: borderStyle } } : { \"&&\": { borderTop: 0 } });\n}\nfunction borderRight(props) {\n\tlet { card, media } = getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;\n\treturn _responsive(media, props.$borderRight, (value) => value ? { \"&&\": { borderRight: borderStyle } } : { \"&&\": { borderRight: 0 } });\n}\nfunction borderBottom(props) {\n\tlet { card, media } = getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;\n\treturn _responsive(media, props.$borderBottom, (value) => value ? { \"&&\": { borderBottom: borderStyle } } : { \"&&\": { borderBottom: 0 } });\n}\nfunction borderLeft(props) {\n\tlet { card, media } = getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;\n\treturn _responsive(media, props.$borderLeft, (value) => value ? { \"&&\": { borderLeft: borderStyle } } : { \"&&\": { borderLeft: 0 } });\n}\nfunction toBoxShadow(shadow, color) {\n\treturn `${shadow.map(rem).join(\" \")} ${color}`;\n}\nfunction shadowStyle(shadow, outlineWidth = 1) {\n\treturn shadow ? { boxShadow: `${`0 0 0 ${rem(outlineWidth)} var(--card-shadow-outline-color)`}, ${toBoxShadow(shadow.umbra, \"var(--card-shadow-umbra-color)\")}, ${toBoxShadow(shadow.penumbra, \"var(--card-shadow-penumbra-color)\")}, ${toBoxShadow(shadow.ambient, \"var(--card-shadow-ambient-color)\")}` } : EMPTY_RECORD;\n}\nfunction responsiveShadowStyle(props) {\n\tlet { card, media, shadow } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$shadow, (index) => shadowStyle(shadow[index], card.shadow.outline));\n}\n/**\n* Gets the global scope instance in a given environment.\n*\n* The strategy is to return the most modern, and if not, the most common:\n* - The `globalThis` variable is the modern approach to accessing the global scope\n* - The `window` variable is the global scope in a web browser\n* - The `self` variable is the global scope in workers and others\n* - The `global` variable is the global scope in Node.js\n*/\nfunction getGlobalScope() {\n\tif (typeof globalThis < \"u\") return globalThis;\n\tif (typeof window < \"u\") return window;\n\tif (typeof self < \"u\") return self;\n\tif (typeof global < \"u\") return global;\n\tthrow Error(\"@sanity/ui: could not locate global scope\");\n}\nconst globalScope = getGlobalScope();\n/**\n* As `@sanity/ui` is declared as a dependency, and may be duplicated, sometimes across major versions\n* it's critical that vital react contexts are shared even when there is a duplicate.\n* If we used a model similar to `sanity` itself, or `styled-components`, this would be unnecessary as\n* those libraries enforce single instances.\n* Since we don't enforce it we have to support a sanity plugin being able to call hooks like `useToast`, and then\n* read the context setup by `sanity`, which calls `ToastProvider`, even if the provider and hook are different instances in memory.\n* It's also why it's vital that all changes to globally scoped providers remain fully backwards compatible to v1.\n*/\nfunction createGlobalScopedContext(key, defaultValue) {\n\tlet symbol = Symbol.for(key);\n\t/**\n\t* Prevent errors about re-renders on React SSR on Next.js App Router\n\t*/\n\tif (typeof document > \"u\") {\n\t\tlet context = createContext(defaultValue);\n\t\treturn context.displayName = key, context;\n\t}\n\treturn globalScope[symbol] = globalScope[symbol] || createContext(defaultValue), globalScope[symbol];\n}\n/**\n* @internal\n*/\nconst ThemeContext = createGlobalScopedContext(\"@sanity/ui/context/theme\", null);\n/**\n* @public\n*/\nfunction ThemeProvider$1(props) {\n\tlet $ = c(15), parentTheme = useContext(ThemeContext), { children } = props, scheme = props.scheme ?? (parentTheme?.scheme || \"light\"), rootTheme = props.theme ?? (parentTheme?.theme || null), tone = props.tone ?? (parentTheme?.tone || \"default\"), t0;\n\tbb0: {\n\t\tif (!rootTheme) {\n\t\t\tt0 = null;\n\t\t\tbreak bb0;\n\t\t}\n\t\tlet t1;\n\t\t$[0] !== rootTheme || $[1] !== scheme || $[2] !== tone ? (t1 = {\n\t\t\tversion: 0,\n\t\t\ttheme: rootTheme,\n\t\t\tscheme,\n\t\t\ttone\n\t\t}, $[0] = rootTheme, $[1] = scheme, $[2] = tone, $[3] = t1) : t1 = $[3], t0 = t1;\n\t}\n\tlet themeContext = t0, t1;\n\tbb1: {\n\t\tif (!rootTheme) {\n\t\t\tt1 = null;\n\t\t\tbreak bb1;\n\t\t}\n\t\tlet t2;\n\t\t$[4] !== rootTheme || $[5] !== scheme || $[6] !== tone ? (t2 = getScopedTheme(rootTheme, scheme, tone), $[4] = rootTheme, $[5] = scheme, $[6] = tone, $[7] = t2) : t2 = $[7], t1 = t2;\n\t}\n\tlet theme = t1;\n\tif (!theme) {\n\t\tlet t2;\n\t\treturn $[8] === Symbol.for(\"react.memo_cache_sentinel\") ? (t2 = /* @__PURE__ */ jsx(\"pre\", { children: \"ThemeProvider: no \\\"theme\\\" property provided\" }), $[8] = t2) : t2 = $[8], t2;\n\t}\n\tlet t2;\n\t$[9] !== children || $[10] !== theme ? (t2 = /* @__PURE__ */ jsx(ThemeProvider, {\n\t\ttheme,\n\t\tchildren\n\t}), $[9] = children, $[10] = theme, $[11] = t2) : t2 = $[11];\n\tlet t3;\n\treturn $[12] !== t2 || $[13] !== themeContext ? (t3 = /* @__PURE__ */ jsx(ThemeContext.Provider, {\n\t\tvalue: themeContext,\n\t\tchildren: t2\n\t}), $[12] = t2, $[13] = themeContext, $[14] = t3) : t3 = $[14], t3;\n}\n/**\n* @public\n*/\nfunction useRootTheme() {\n\tlet value = useContext(ThemeContext);\n\tif (!value) throw Error(\"useRootTheme(): missing context value\");\n\treturn value;\n}\n/**\n* @public\n*/\nfunction ThemeColorProvider(props) {\n\tlet $ = c(5), { children, scheme, tone } = props, root = useRootTheme(), t0 = scheme || root.scheme, t1;\n\treturn $[0] !== children || $[1] !== root.theme || $[2] !== t0 || $[3] !== tone ? (t1 = /* @__PURE__ */ jsx(ThemeProvider$1, {\n\t\tscheme: t0,\n\t\ttheme: root.theme,\n\t\ttone,\n\t\tchildren\n\t}), $[0] = children, $[1] = root.theme, $[2] = t0, $[3] = tone, $[4] = t1) : t1 = $[4], t1;\n}\nfunction cardStyle(props) {\n\treturn [cardBaseStyle(props), cardColorStyle(props)];\n}\nfunction cardBaseStyle(props) {\n\tlet { $checkered } = props, { space } = getTheme_v2(props.theme);\n\treturn css`${$checkered && css`background-size:${space[3]}px ${space[3]}px;background-position:50% 50%;background-image:var(--card-bg-image);`} &[data-as='button']{-webkit-font-smoothing:inherit;appearance:none;outline:none;font:inherit;text-align:inherit;border:0;width:-moz-available;width:-webkit-fill-available;width:stretch;}&[data-as='a']{outline:none;text-decoration:none;}&[data-as='pre']{font:inherit;}`;\n}\nfunction cardColorStyle(props) {\n\tlet { $checkered, $focusRing, $muted } = props, { card, color, style } = getTheme_v2(props.theme), border = {\n\t\twidth: card.border.width,\n\t\tcolor: \"var(--card-border-color)\"\n\t};\n\treturn css`color-scheme:${color._dark ? \"dark\" : \"light\"};${_cardColorStyle(color, color, $checkered)} background-color:${$muted ? \"var(--card-muted-bg-color)\" : \"var(--card-bg-color)\"};color:var(--card-fg-color);&[data-as='button']{--card-focus-ring-box-shadow:none;cursor:default;box-shadow:var(--card-focus-ring-box-shadow);&:disabled{${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}}&:not(:disabled){&[data-pressed]{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}&[data-selected]{${_cardColorStyle(color, color.selectable.default.selected, $checkered)}}@media (hover:hover){&:not([data-pressed]):not([data-selected]){&[data-hovered],&:hover{${_cardColorStyle(color, color.selectable.default.hovered, $checkered)}}&:active{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}}}&:focus-visible{--card-focus-ring-box-shadow:${$focusRing ? focusRingStyle({\n\t\tbase: color,\n\t\tborder,\n\t\tfocusRing: card.focusRing\n\t}) : void 0};}}}&[data-as='a']{cursor:pointer;box-shadow:var(--card-focus-ring-box-shadow);&[data-disabled]{${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}}&:not([data-disabled]){&[data-pressed]{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}&[data-selected]{${_cardColorStyle(color, color.selectable.default.selected, $checkered)}}@media (hover:hover){&:not([data-pressed]):not([data-selected]){&[data-hovered],&:hover{${_cardColorStyle(color, color.selectable.default.hovered, $checkered)}}&:active{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}}}&:focus-visible{--card-focus-ring-box-shadow:${$focusRing ? focusRingStyle({\n\t\tbase: color,\n\t\tborder,\n\t\tfocusRing: card.focusRing\n\t}) : void 0};}}}${style?.card?.root}`;\n}\nconst StyledCard = /* @__PURE__ */ styled(Box).withConfig({\n\tdisplayName: \"StyledCard\",\n\tcomponentId: \"sc-2ikw89-0\"\n})(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = forwardRef(function Card(props, ref) {\n\tlet $ = c(56), asProp, border, borderBottom, borderLeft, borderRight, borderTop, muted, pressed, restProps, scheme, selected, shadow, t0, t1, t2, t3;\n\t$[0] === props ? (asProp = $[1], border = $[2], borderBottom = $[3], borderLeft = $[4], borderRight = $[5], borderTop = $[6], muted = $[7], pressed = $[8], restProps = $[9], scheme = $[10], selected = $[11], shadow = $[12], t0 = $[13], t1 = $[14], t2 = $[15], t3 = $[16]) : ({__unstable_checkered: t0, __unstable_focusRing: t1, as: asProp, border, borderTop, borderRight, borderBottom, borderLeft, muted, pressed, radius: t2, scheme, selected, shadow, tone: t3, ...restProps} = props, $[0] = props, $[1] = asProp, $[2] = border, $[3] = borderBottom, $[4] = borderLeft, $[5] = borderRight, $[6] = borderTop, $[7] = muted, $[8] = pressed, $[9] = restProps, $[10] = scheme, $[11] = selected, $[12] = shadow, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3);\n\tlet checkered = t0 !== void 0 && t0, focusRing = t1 !== void 0 && t1, radius = t2 === void 0 ? 0 : t2, toneProp = t3 === void 0 ? \"default\" : t3, as = isValidElementType(asProp) ? asProp : \"div\", rootTheme = useRootTheme(), tone = toneProp === \"inherit\" ? rootTheme.tone : toneProp, t4 = typeof as == \"string\" ? as : void 0, t5 = rootTheme.scheme, t6;\n\t$[17] === border ? t6 = $[18] : (t6 = _getArrayProp(border), $[17] = border, $[18] = t6);\n\tlet t7;\n\t$[19] === borderTop ? t7 = $[20] : (t7 = _getArrayProp(borderTop), $[19] = borderTop, $[20] = t7);\n\tlet t8;\n\t$[21] === borderRight ? t8 = $[22] : (t8 = _getArrayProp(borderRight), $[21] = borderRight, $[22] = t8);\n\tlet t9;\n\t$[23] === borderBottom ? t9 = $[24] : (t9 = _getArrayProp(borderBottom), $[23] = borderBottom, $[24] = t9);\n\tlet t10;\n\t$[25] === borderLeft ? t10 = $[26] : (t10 = _getArrayProp(borderLeft), $[25] = borderLeft, $[26] = t10);\n\tlet t11;\n\t$[27] === radius ? t11 = $[28] : (t11 = _getArrayProp(radius), $[27] = radius, $[28] = t11);\n\tlet t12;\n\t$[29] === shadow ? t12 = $[30] : (t12 = _getArrayProp(shadow), $[29] = shadow, $[30] = t12);\n\tlet t13 = checkered ? \"\" : void 0, t14 = pressed ? \"\" : void 0, t15 = selected ? \"\" : void 0, t16;\n\t$[31] !== as || $[32] !== checkered || $[33] !== focusRing || $[34] !== muted || $[35] !== ref || $[36] !== restProps || $[37] !== rootTheme.scheme || $[38] !== selected || $[39] !== t10 || $[40] !== t11 || $[41] !== t12 || $[42] !== t13 || $[43] !== t14 || $[44] !== t15 || $[45] !== t4 || $[46] !== t6 || $[47] !== t7 || $[48] !== t8 || $[49] !== t9 || $[50] !== tone ? (t16 = /* @__PURE__ */ jsx(StyledCard, {\n\t\t\"data-as\": t4,\n\t\t\"data-scheme\": t5,\n\t\t\"data-ui\": \"Card\",\n\t\t\"data-tone\": tone,\n\t\t...restProps,\n\t\t$border: t6,\n\t\t$borderTop: t7,\n\t\t$borderRight: t8,\n\t\t$borderBottom: t9,\n\t\t$borderLeft: t10,\n\t\t$checkered: checkered,\n\t\t$focusRing: focusRing,\n\t\t$muted: muted,\n\t\t$radius: t11,\n\t\t$shadow: t12,\n\t\t$tone: tone,\n\t\t\"data-checkered\": t13,\n\t\t\"data-pressed\": t14,\n\t\t\"data-selected\": t15,\n\t\tforwardedAs: as,\n\t\tref,\n\t\tselected\n\t}), $[31] = as, $[32] = checkered, $[33] = focusRing, $[34] = muted, $[35] = ref, $[36] = restProps, $[37] = rootTheme.scheme, $[38] = selected, $[39] = t10, $[40] = t11, $[41] = t12, $[42] = t13, $[43] = t14, $[44] = t15, $[45] = t4, $[46] = t6, $[47] = t7, $[48] = t8, $[49] = t9, $[50] = tone, $[51] = t16) : t16 = $[51];\n\tlet t17;\n\treturn $[52] !== scheme || $[53] !== t16 || $[54] !== tone ? (t17 = /* @__PURE__ */ jsx(ThemeColorProvider, {\n\t\tscheme,\n\t\ttone,\n\t\tchildren: t16\n\t}), $[52] = scheme, $[53] = t16, $[54] = tone, $[55] = t17) : t17 = $[55], t17;\n}), _ResizeObserver = typeof document < \"u\" && typeof window < \"u\" && window.ResizeObserver ? window.ResizeObserver : ResizeObserver, _elementSizeObserver = _createElementSizeObserver();\nfunction _createElementRectValueListener() {\n\treturn { subscribe(element, subscriber) {\n\t\tlet resizeObserver = new _ResizeObserver(([entry]) => {\n\t\t\tsubscriber({\n\t\t\t\t_contentRect: entry.contentRect,\n\t\t\t\tborder: {\n\t\t\t\t\twidth: entry.borderBoxSize[0].inlineSize,\n\t\t\t\t\theight: entry.borderBoxSize[0].blockSize\n\t\t\t\t},\n\t\t\t\tcontent: {\n\t\t\t\t\twidth: entry.contentRect.width,\n\t\t\t\t\theight: entry.contentRect.height\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn resizeObserver.observe(element), () => {\n\t\t\tresizeObserver.unobserve(element), resizeObserver.disconnect();\n\t\t};\n\t} };\n}\nfunction _createElementSizeObserver() {\n\tlet disposeCache = /* @__PURE__ */ new WeakMap(), subscribersCache = /* @__PURE__ */ new WeakMap();\n\treturn { subscribe(element, subscriber) {\n\t\tlet subscribers = subscribersCache.get(element) || [], dispose = disposeCache.get(element);\n\t\treturn subscribersCache.has(element) || (subscribersCache.set(element, subscribers), dispose = _createElementRectValueListener().subscribe(element, (elementRect) => {\n\t\t\tfor (let sub of subscribers) sub(elementRect);\n\t\t})), subscribers.push(subscriber), () => {\n\t\t\tlet idx = subscribers.indexOf(subscriber);\n\t\t\tidx > -1 && subscribers.splice(idx, 1), subscribers.length === 0 && dispose && dispose();\n\t\t};\n\t} };\n}\n/**\n* Subscribe to the size of a DOM element.\n* @beta\n*/\nfunction useElementSize(element) {\n\tlet $ = c(3), [size, setSize] = useState(null), t0, t1;\n\treturn $[0] === element ? (t0 = $[1], t1 = $[2]) : (t0 = () => {\n\t\tif (element) return _elementSizeObserver.subscribe(element, setSize);\n\t}, t1 = [element], $[0] = element, $[1] = t0, $[2] = t1), useEffect(t0, t1), size;\n}\nfunction _getMediaQuery(media, index) {\n\treturn index === 0 ? `screen and (max-width: ${media[index] - 1}px)` : index === media.length ? `screen and (min-width: ${media[index - 1]}px)` : `screen and (min-width: ${media[index - 1]}px) and (max-width: ${media[index] - 1}px)`;\n}\nfunction _createMediaStore(media) {\n\tlet mediaLen = media.length, sizes, getSizes = () => {\n\t\tif (!sizes) {\n\t\t\tsizes = [];\n\t\t\tfor (let index = mediaLen; index > -1; --index) {\n\t\t\t\tlet mediaQuery = _getMediaQuery(media, index);\n\t\t\t\tsizes.push({\n\t\t\t\t\tindex,\n\t\t\t\t\tmq: window.matchMedia(mediaQuery)\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn sizes;\n\t}, getSnapshot = () => {\n\t\tfor (let { index, mq } of getSizes()) if (mq.matches) return index;\n\t\treturn 0;\n\t}, subscribe = (onStoreChange) => {\n\t\tlet disposeFns = [];\n\t\tfor (let { mq } of getSizes()) {\n\t\t\tlet handleChange = () => {\n\t\t\t\tmq.matches && onStoreChange();\n\t\t\t};\n\t\t\tmq.addEventListener(\"change\", handleChange), disposeFns.push(() => mq.removeEventListener(\"change\", handleChange));\n\t\t}\n\t\treturn () => {\n\t\t\tfor (let disposeFn of disposeFns) disposeFn();\n\t\t};\n\t};\n\treturn {\n\t\tgetSnapshot,\n\t\tsubscribe\n\t};\n}\n/**\n* Only called during server-side rendering, and hydration if using hydrateRoot\n* Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query\n* and we assume `(prefers-color-scheme: light)` since it's the most common scheme\n*\n* @link https://beta.reactjs.org/apis/react/useSyncExternalStore#adding-support-for-server-rendering\n*/\nfunction getServerSnapshot() {\n\treturn 0;\n}\n/**\n* This API might change. DO NOT USE IN PRODUCTION.\n* @beta\n*/\nfunction useMediaIndex() {\n\tlet $ = c(2), { media } = useTheme_v2(), t0;\n\t$[0] === media ? t0 = $[1] : (t0 = _createMediaStore(media), $[0] = media, $[1] = t0);\n\tlet store = t0;\n\treturn useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot);\n}\n/**\n* Efficiently subscribes to `window.matchMedia` queries\n*\n* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)\n*\n* @public\n*/\nfunction useMatchMedia(mediaQueryString, getServerSnapshot) {\n\tlet $ = c(4);\n\tuseDebugValue(mediaQueryString);\n\tlet t0;\n\t$[0] === mediaQueryString ? t0 = $[1] : (t0 = (onStoreChange) => {\n\t\tlet media = window.matchMedia(mediaQueryString);\n\t\treturn media.addEventListener(\"change\", onStoreChange), () => media.removeEventListener(\"change\", onStoreChange);\n\t}, $[0] = mediaQueryString, $[1] = t0);\n\tlet t1;\n\treturn $[2] === mediaQueryString ? t1 = $[3] : (t1 = () => window.matchMedia(mediaQueryString).matches, $[2] = mediaQueryString, $[3] = t1), useSyncExternalStore(t0, t1, getServerSnapshot);\n}\n/**\n* Returns true if motion should be reduced\n*\n* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-reduced-motion: no-preference)` since it's the most common scheme (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)\n*\n* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.\n* Chrome supports reading the `prefers-reduced-motion` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Reduced-Motion\n* @example https://gist.github.com/stipsan/0c0f839a27842249cada893e9fb7767b\n*\n* @public\n*/\nfunction usePrefersReducedMotion(t0) {\n\treturn useMatchMedia(\"(prefers-reduced-motion: reduce)\", t0 === void 0 ? _temp$8 : t0);\n}\nfunction _temp$8() {\n\treturn !1;\n}\n/**\n* Custom floating-ui middleware which calculates transform-origin X + Y offsets\n* based on the current floating rect's dimensions and shift offset.\n*\n* Scaling popovers with these transform-origin offsets will give the effect of\n* popvers slightly 'growing' from the origin/reference element.\n*\n* This middleware must be applied after both `@sanity/ui/size` and `shift` middlewares.\n*/\nconst origin = {\n\tname: \"@sanity/ui/origin\",\n\tfn({ middlewareData, placement, rects }) {\n\t\tlet [side] = placement.split(\"-\"), floatingWidth = rects.floating.width, floatingHeight = rects.floating.height, shiftX = middlewareData.shift?.x || 0, shiftY = middlewareData.shift?.y || 0;\n\t\tif (floatingWidth <= 0 || floatingHeight <= 0) return {};\n\t\tlet { originX, originY } = [\"bottom\", \"top\"].includes(side) ? {\n\t\t\toriginX: clamp(.5 - shiftX / floatingWidth, 0, 1),\n\t\t\toriginY: side === \"bottom\" ? 0 : 1\n\t\t} : {\n\t\t\toriginX: +(side === \"left\"),\n\t\t\toriginY: clamp(.5 - shiftY / floatingHeight, 0, 1)\n\t\t};\n\t\treturn { data: {\n\t\t\toriginX,\n\t\t\toriginY\n\t\t} };\n\t}\n};\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(num, min), max);\n}\nfunction isRecord(value) {\n\treturn !!(value && typeof value == \"object\" && !Array.isArray(value));\n}\nconst BoundaryElementContext = createGlobalScopedContext(\"@sanity/ui/context/boundaryElement\", null), DEFAULT_VALUE = {\n\tversion: 0,\n\telement: null\n};\n/**\n* @public\n*/\nfunction useBoundaryElement() {\n\tlet value = useContext(BoundaryElementContext);\n\tif (value && (!isRecord(value) || value.version !== 0)) throw Error(\"useBoundaryElement(): the context value is not compatible\");\n\treturn value || DEFAULT_VALUE;\n}\nfunction getElementRef(element) {\n\tlet getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get, mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n\treturn mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get, mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);\n}\nfunction getLayerContext(contextValue) {\n\tif (!isRecord(contextValue) || contextValue.version !== 0) throw Error(\"the context value is not compatible\");\n\tif (!contextValue) throw Error(\"components using `useLayer()` should be wrapped in a <LayerProvider>.\");\n\tif (contextValue.version === 0) return contextValue;\n\tthrow Error(\"could not get layer context\");\n}\nconst LayerContext = createGlobalScopedContext(\"@sanity/ui/context/layer\", null);\n/**\n* @public\n*/\nfunction LayerProvider(props) {\n\tlet $ = c(21), { children, zOffset: t0 } = props, zOffsetProp = t0 === void 0 ? 0 : t0, parentContextValue = useContext(LayerContext), t1;\n\t$[0] === parentContextValue ? t1 = $[1] : (t1 = parentContextValue && getLayerContext(parentContextValue), $[0] = parentContextValue, $[1] = t1);\n\tlet parent = t1, parentRegisterChild = parent?.registerChild, level = (parent?.level ?? 0) + 1, t2;\n\t$[2] === zOffsetProp ? t2 = $[3] : (t2 = _getArrayProp(zOffsetProp), $[2] = zOffsetProp, $[3] = t2);\n\tlet zOffset = t2, maxMediaIndex = zOffset.length - 1, mediaIndex = Math.min(useMediaIndex(), maxMediaIndex), zIndex = parent ? parent.zIndex + zOffset[mediaIndex] : zOffset[mediaIndex], t3;\n\t$[4] === Symbol.for(\"react.memo_cache_sentinel\") ? (t3 = {}, $[4] = t3) : t3 = $[4];\n\tlet [, setChildLayers] = useState(t3), [size, setSize] = useState(0), isTopLayer = size === 0, t4;\n\t$[5] !== parentRegisterChild || $[6] !== setChildLayers ? (t4 = (childLevel) => {\n\t\tlet parentDispose = parentRegisterChild?.(childLevel);\n\t\treturn childLevel === void 0 ? setSize(_temp$7) : setChildLayers((state) => {\n\t\t\tlet prevLen = state[childLevel] ?? 0, nextState = {\n\t\t\t\t...state,\n\t\t\t\t[childLevel]: prevLen + 1\n\t\t\t};\n\t\t\treturn setSize(Object.keys(nextState).length), nextState;\n\t\t}), () => {\n\t\t\tchildLevel === void 0 ? setSize(_temp2$2) : setChildLayers((state_0) => {\n\t\t\t\tlet nextState_0 = { ...state_0 };\n\t\t\t\treturn nextState_0[childLevel] === 1 ? (delete nextState_0[childLevel], setSize(Object.keys(nextState_0).length)) : nextState_0[childLevel] = nextState_0[childLevel] - 1, nextState_0;\n\t\t\t}), parentDispose?.();\n\t\t};\n\t}, $[5] = parentRegisterChild, $[6] = setChildLayers, $[7] = t4) : t4 = $[7];\n\tlet registerChild = t4, t5, t6;\n\t$[8] !== level || $[9] !== parentRegisterChild ? (t5 = () => parentRegisterChild?.(level), t6 = [level, parentRegisterChild], $[8] = level, $[9] = parentRegisterChild, $[10] = t5, $[11] = t6) : (t5 = $[10], t6 = $[11]), useEffect(t5, t6);\n\tlet t7;\n\t$[12] !== isTopLayer || $[13] !== level || $[14] !== registerChild || $[15] !== size || $[16] !== zIndex ? (t7 = {\n\t\tversion: 0,\n\t\tisTopLayer,\n\t\tlevel,\n\t\tregisterChild,\n\t\tsize,\n\t\tzIndex\n\t}, $[12] = isTopLayer, $[13] = level, $[14] = registerChild, $[15] = size, $[16] = zIndex, $[17] = t7) : t7 = $[17];\n\tlet value = t7, t8;\n\treturn $[18] !== children || $[19] !== value ? (t8 = /* @__PURE__ */ jsx(LayerContext.Provider, {\n\t\tvalue,\n\t\tchildren\n\t}), $[18] = children, $[19] = value, $[20] = t8) : t8 = $[20], t8;\n}\nfunction _temp2$2(v_0) {\n\treturn v_0 - 1;\n}\nfunction _temp$7(v) {\n\treturn v + 1;\n}\n/**\n* @public\n*/\nfunction useLayer() {\n\tlet $ = c(2), value = useContext(LayerContext);\n\tif (!value) throw Error(\"useLayer(): missing context value\");\n\ttry {\n\t\tlet t1;\n\t\treturn $[0] === value ? t1 = $[1] : (t1 = getLayerContext(value), $[0] = value, $[1] = t1), t1;\n\t} catch (t0) {\n\t\tlet err = t0;\n\t\tthrow err instanceof Error ? Error(`useLayer(): ${err.message}`) : Error(`useLayer(): ${err}`);\n\t}\n}\nconst key = \"@sanity/ui/context/portal\", elementKey = Symbol.for(`${key}/element`);\nglobalScope[elementKey] = null;\nconst PortalContext = createGlobalScopedContext(key, {\n\tversion: 0,\n\tboundaryElement: null,\n\tget element() {\n\t\treturn typeof document > \"u\" ? null : globalScope[elementKey] ? globalScope[elementKey] : (globalScope[elementKey] = document.createElement(\"div\"), globalScope[elementKey].setAttribute(\"data-portal\", \"\"), document.body.appendChild(globalScope[elementKey]), globalScope[elementKey]);\n\t}\n});\n/**\n* @public\n*/\nfunction usePortal() {\n\tlet value = useContext(PortalContext);\n\tif (!value) throw Error(\"usePortal(): missing context value\");\n\tif (!isRecord(value) || value.version !== 0) throw Error(\"usePortal(): the context value is not compatible\");\n\treturn value;\n}\n/**\n* @public\n*/\nfunction Portal(props) {\n\tlet $ = c(3), { children, __unstable_name: name } = props, portal = usePortal(), portalElement = (name ? portal.elements && portal.elements[name] : portal.element) || portal.elements?.default;\n\tif (!portalElement) return null;\n\tlet t0;\n\treturn $[0] !== children || $[1] !== portalElement ? (t0 = createPortal(children, portalElement), $[0] = children, $[1] = portalElement, $[2] = t0) : t0 = $[2], t0;\n}\nconst DEFAULT_POPOVER_MARGINS = [\n\t0,\n\t0,\n\t0,\n\t0\n], DEFAULT_FALLBACK_PLACEMENTS$1 = {\n\ttop: [\n\t\t\"bottom\",\n\t\t\"left\",\n\t\t\"right\"\n\t],\n\t\"top-start\": [\n\t\t\"bottom-start\",\n\t\t\"left-start\",\n\t\t\"right-start\"\n\t],\n\t\"top-end\": [\n\t\t\"bottom-end\",\n\t\t\"left-end\",\n\t\t\"right-end\"\n\t],\n\tbottom: [\n\t\t\"top\",\n\t\t\"left\",\n\t\t\"right\"\n\t],\n\t\"bottom-start\": [\n\t\t\"top-start\",\n\t\t\"left-start\",\n\t\t\"right-start\"\n\t],\n\t\"bottom-end\": [\n\t\t\"top-end\",\n\t\t\"left-end\",\n\t\t\"right-end\"\n\t],\n\tleft: [\n\t\t\"right\",\n\t\t\"top\",\n\t\t\"bottom\"\n\t],\n\t\"left-start\": [\n\t\t\"right-start\",\n\t\t\"top-start\",\n\t\t\"bottom-start\"\n\t],\n\t\"left-end\": [\n\t\t\"right-end\",\n\t\t\"top-end\",\n\t\t\"bottom-end\"\n\t],\n\tright: [\n\t\t\"left\",\n\t\t\"top\",\n\t\t\"bottom\"\n\t],\n\t\"right-start\": [\n\t\t\"left-start\",\n\t\t\"top-start\",\n\t\t\"bottom-start\"\n\t],\n\t\"right-end\": [\n\t\t\"left-end\",\n\t\t\"top-end\",\n\t\t\"bottom-end\"\n\t]\n};\nfunction size(options) {\n\tlet { constrainSize, margins, matchReferenceWidth, maxWidthRef, padding = 0, referenceWidthRef, setReferenceWidth, widthRef } = options;\n\treturn {\n\t\tname: \"@sanity/ui/size\",\n\t\tasync fn(args) {\n\t\t\tlet { elements, placement, platform, rects } = args, { floating, reference } = rects, overflow = await detectOverflow(args, {\n\t\t\t\taltBoundary: !0,\n\t\t\t\tboundary: options.boundaryElement || void 0,\n\t\t\t\telementContext: \"floating\",\n\t\t\t\tpadding,\n\t\t\t\trootBoundary: \"viewport\"\n\t\t\t}), maxWidth = Infinity, maxHeight = Infinity, floatingW = floating.width, floatingH = floating.height;\n\t\t\tplacement.includes(\"top\") && (maxWidth = floatingW - (overflow.left + overflow.right), maxHeight = floatingH - overflow.top), placement.includes(\"right\") && (maxWidth = floatingW - overflow.right, maxHeight = floatingH - (overflow.top + overflow.bottom)), placement.includes(\"bottom\") && (maxWidth = floatingW - (overflow.left + overflow.right), maxHeight = floatingH - overflow.bottom), placement.includes(\"left\") && (maxWidth = floatingW - overflow.left, maxHeight = floatingH - (overflow.top + overflow.bottom));\n\t\t\tlet availableWidth = maxWidth - margins[1] - margins[3], availableHeight = maxHeight - margins[0] - margins[2], referenceWidth = reference.width - margins[1] - margins[3];\n\t\t\treferenceWidthRef.current = referenceWidth, setReferenceWidth(referenceWidth), matchReferenceWidth ? elements.floating.style.width = `${referenceWidth}px` : widthRef.current !== void 0 && (elements.floating.style.width = `${widthRef.current}px`), constrainSize && (elements.floating.style.maxWidth = `${Math.min(availableWidth, maxWidthRef.current ?? Infinity)}px`, elements.floating.style.maxHeight = `${availableHeight}px`);\n\t\t\tlet nextDimensions = await platform.getDimensions(elements.floating), targetH = nextDimensions.height;\n\t\t\treturn floatingW !== nextDimensions.width || floatingH !== targetH ? { reset: { rects: !0 } } : {};\n\t\t}\n\t};\n}\nfunction calcCurrentWidth(params) {\n\tlet { container, mediaIndex, width } = params, w = width[mediaIndex], currentWidth = w === void 0 ? width[width.length - 1] : w;\n\treturn typeof currentWidth == \"number\" ? container[currentWidth] : void 0;\n}\nfunction calcMaxWidth(params) {\n\tlet { boundaryWidth, currentWidth } = params;\n\tif (currentWidth !== void 0 || boundaryWidth !== void 0) return Math.min(currentWidth ?? Infinity, (boundaryWidth || Infinity) - 8);\n}\nfunction moveTowardsLength(movingPoint, targetPoint, amount) {\n\tlet width = targetPoint.x - movingPoint.x, height = targetPoint.y - movingPoint.y, distance = Math.sqrt(width * width + height * height);\n\treturn moveTowardsFractional(movingPoint, targetPoint, Math.min(1, amount / distance));\n}\nfunction moveTowardsFractional(movingPoint, targetPoint, fraction) {\n\treturn {\n\t\tx: movingPoint.x + (targetPoint.x - movingPoint.x) * fraction,\n\t\ty: movingPoint.y + (targetPoint.y - movingPoint.y) * fraction\n\t};\n}\nfunction getRoundedCommands(points) {\n\tlet len = points.length, cmds = [];\n\tfor (let i = 0; i < len; i += 1) {\n\t\tlet point = points[i], prevPoint = points[i - 1], nextPoint = points[i + 1];\n\t\tif (prevPoint && point.radius) {\n\t\t\tlet curveStart = moveTowardsLength(point, prevPoint, point.radius), curveEnd = moveTowardsLength(point, nextPoint, point.radius), startControl = moveTowardsFractional(curveStart, point, .5), endControl = moveTowardsFractional(point, curveEnd, .5);\n\t\t\tcmds.push({\n\t\t\t\ttype: \"point\",\n\t\t\t\t...curveStart\n\t\t\t}), cmds.push({\n\t\t\t\ttype: \"curve\",\n\t\t\t\tcurveEnd,\n\t\t\t\tstartControl,\n\t\t\t\tendControl\n\t\t\t});\n\t\t} else cmds.push({\n\t\t\ttype: \"point\",\n\t\t\t...point\n\t\t});\n\t}\n\treturn cmds;\n}\nfunction compileCommands(cmds) {\n\treturn cmds.map((n, idx) => n.type === \"point\" ? `${idx === 0 ? \"M\" : \"L\"} ${n.x} ${n.y}` : n.type === \"curve\" ? `C ${n.startControl.x} ${n.startControl.y} ${n.endControl.x} ${n.endControl.y} ${n.curveEnd.x} ${n.curveEnd.y}` : \"\").join(\" \");\n}\nconst StyledArrow = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"StyledArrow\",\n\tcomponentId: \"sc-ivw6of-0\"\n})(({ $w: w }) => css`position:absolute;width:${w}px;height:${w}px;:empty + &{display:none;}& > svg{display:block;line-height:0;transform-origin:${w / 2}px ${w / 2}px;}[data-placement^='top'] > &{bottom:-${w}px;& > svg{transform:rotate(0);}}[data-placement^='right'] > &{left:-${w}px;& > svg{transform:rotate(90deg);}}[data-placement^='left'] > &{right:-${w}px;& > svg{transform:rotate(-90deg);}}[data-placement^='bottom'] > &{top:-${w}px;& > svg{transform:rotate(180deg);}}`), StrokePath = styled.path.withConfig({\n\tdisplayName: \"StrokePath\",\n\tcomponentId: \"sc-ivw6of-1\"\n})`stroke:var(--card-shadow-outline-color);`, ShapePath = styled.path.withConfig({\n\tdisplayName: \"ShapePath\",\n\tcomponentId: \"sc-ivw6of-2\"\n})`fill:var(--card-bg-color);`, Arrow = forwardRef(function Arrow(props, ref) {\n\tlet $ = c(29), h, restProps, t0, w;\n\t$[0] === props ? (h = $[1], restProps = $[2], t0 = $[3], w = $[4]) : ({width: w, height: h, radius: t0, ...restProps} = props, $[0] = props, $[1] = h, $[2] = restProps, $[3] = t0, $[4] = w);\n\tlet radius = t0 === void 0 ? 0 : t0, { card } = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2, t1;\n\t$[5] !== center || $[6] !== h || $[7] !== radius || $[8] !== w ? (t1 = compileCommands(getRoundedCommands([\n\t\t{\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t},\n\t\t{\n\t\t\tx: radius,\n\t\t\ty: 0,\n\t\t\tradius\n\t\t},\n\t\t{\n\t\t\tx: center,\n\t\t\ty: h - 1,\n\t\t\tradius\n\t\t},\n\t\t{\n\t\t\tx: w - radius,\n\t\t\ty: 0,\n\t\t\tradius\n\t\t},\n\t\t{\n\t\t\tx: w,\n\t\t\ty: 0\n\t\t}\n\t])), $[5] = center, $[6] = h, $[7] = radius, $[8] = w, $[9] = t1) : t1 = $[9];\n\tlet path = t1, strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`, t2 = `0 0 ${w} ${w}`, t3;\n\t$[10] !== strokeWidth || $[11] !== w ? (t3 = /* @__PURE__ */ jsx(\"mask\", {\n\t\tid: \"stroke-mask\",\n\t\tchildren: /* @__PURE__ */ jsx(\"rect\", {\n\t\t\tx: 0,\n\t\t\ty: strokeWidth,\n\t\t\twidth: w,\n\t\t\theight: w,\n\t\t\tfill: \"white\"\n\t\t})\n\t}), $[10] = strokeWidth, $[11] = w, $[12] = t3) : t3 = $[12];\n\tlet t4 = strokeWidth * 2, t5;\n\t$[13] !== strokePath || $[14] !== t4 ? (t5 = /* @__PURE__ */ jsx(StrokePath, {\n\t\td: strokePath,\n\t\tmask: \"url(#stroke-mask)\",\n\t\tstrokeWidth: t4\n\t}), $[13] = strokePath, $[14] = t4, $[15] = t5) : t5 = $[15];\n\tlet t6;\n\t$[16] === fillPath ? t6 = $[17] : (t6 = /* @__PURE__ */ jsx(ShapePath, { d: fillPath }), $[16] = fillPath, $[17] = t6);\n\tlet t7;\n\t$[18] !== t2 || $[19] !== t3 || $[20] !== t5 || $[21] !== t6 || $[22] !== w ? (t7 = /* @__PURE__ */ jsxs(\"svg\", {\n\t\twidth: w,\n\t\theight: w,\n\t\tviewBox: t2,\n\t\tchildren: [\n\t\t\tt3,\n\t\t\tt5,\n\t\t\tt6\n\t\t]\n\t}), $[18] = t2, $[19] = t3, $[20] = t5, $[21] = t6, $[22] = w, $[23] = t7) : t7 = $[23];\n\tlet t8;\n\treturn $[24] !== ref || $[25] !== restProps || $[26] !== t7 || $[27] !== w ? (t8 = /* @__PURE__ */ jsx(StyledArrow, {\n\t\t...restProps,\n\t\t$w: w,\n\t\tref,\n\t\tchildren: t7\n\t}), $[24] = ref, $[25] = restProps, $[26] = t7, $[27] = w, $[28] = t8) : t8 = $[28], t8;\n}), MotionCard$1 = styled(motion.create(Card)).withConfig({\n\tdisplayName: \"MotionCard\",\n\tcomponentId: \"sc-tq6s8o-0\"\n})`&:not([hidden]){display:flex;}flex-direction:column;width:max-content;min-width:min-content;will-change:transform;`, MotionFlex = styled(motion.create(Flex)).withConfig({\n\tdisplayName: \"MotionFlex\",\n\tcomponentId: \"sc-tq6s8o-1\"\n})`will-change:opacity;`, PopoverCard = forwardRef(function PopoverCard(props, ref) {\n\tlet $ = c(66), animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, originX, originY, overflow, padding, placement, radius, restProps, scheme, shadow, strategy, style, tone, width, xProp, yProp;\n\t$[0] === props ? (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], originX = $[8], originY = $[9], overflow = $[10], padding = $[11], placement = $[12], radius = $[13], restProps = $[14], scheme = $[15], shadow = $[16], strategy = $[17], style = $[18], tone = $[19], width = $[20], xProp = $[21], yProp = $[22]) : ({__unstable_margins: marginsProp, animate, arrow, arrowRef, arrowX, arrowY, children, padding, placement, originX, originY, overflow, radius, scheme, shadow, strategy, style, tone, width, x: xProp, y: yProp, ...restProps} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = originX, $[9] = originY, $[10] = overflow, $[11] = padding, $[12] = placement, $[13] = radius, $[14] = restProps, $[15] = scheme, $[16] = shadow, $[17] = strategy, $[18] = style, $[19] = tone, $[20] = width, $[21] = xProp, $[22] = yProp);\n\tlet { zIndex } = useLayer(), margins = marginsProp || DEFAULT_POPOVER_MARGINS, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0], t0 = animate ? \"transform\" : void 0, t1;\n\t$[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t0 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t1 = {\n\t\tleft: x,\n\t\toriginX,\n\t\toriginY,\n\t\tposition: strategy,\n\t\ttop: y,\n\t\twidth,\n\t\tzIndex,\n\t\twillChange: t0,\n\t\t...style\n\t}, $[23] = originX, $[24] = originY, $[25] = strategy, $[26] = style, $[27] = t0, $[28] = width, $[29] = x, $[30] = y, $[31] = zIndex, $[32] = t1) : t1 = $[32];\n\tlet rootStyle = t1, t2 = arrowX === null ? void 0 : arrowX, t3 = arrowY === null ? void 0 : arrowY, t4;\n\t$[33] !== t2 || $[34] !== t3 ? (t4 = {\n\t\tleft: t2,\n\t\ttop: t3,\n\t\tright: void 0,\n\t\tbottom: void 0\n\t}, $[33] = t2, $[34] = t3, $[35] = t4) : t4 = $[35];\n\tlet arrowStyle = t4, t5 = restProps, t6;\n\t$[36] === animate ? t6 = $[37] : (t6 = animate ? [\"hidden\", \"initial\"] : void 0, $[36] = animate, $[37] = t6);\n\tlet t7;\n\t$[38] === animate ? t7 = $[39] : (t7 = animate ? [\"visible\", \"scaleIn\"] : void 0, $[38] = animate, $[39] = t7);\n\tlet t8;\n\t$[40] === animate ? t8 = $[41] : (t8 = animate ? [\"hidden\", \"scaleOut\"] : void 0, $[40] = animate, $[41] = t8);\n\tlet t9;\n\t$[42] !== children || $[43] !== padding ? (t9 = /* @__PURE__ */ jsx(Flex, {\n\t\tdirection: \"column\",\n\t\tflex: 1,\n\t\tpadding,\n\t\tchildren\n\t}), $[42] = children, $[43] = padding, $[44] = t9) : t9 = $[44];\n\tlet t10;\n\t$[45] !== overflow || $[46] !== t9 ? (t10 = /* @__PURE__ */ jsx(MotionFlex, {\n\t\t\"data-ui\": \"Popover__wrapper\",\n\t\tdirection: \"column\",\n\t\tflex: 1,\n\t\toverflow,\n\t\tvariants: POPOVER_MOTION_PROPS.children,\n\t\ttransition: POPOVER_MOTION_PROPS.transition,\n\t\tchildren: t9\n\t}), $[45] = overflow, $[46] = t9, $[47] = t10) : t10 = $[47];\n\tlet t11;\n\t$[48] !== arrow || $[49] !== arrowRef || $[50] !== arrowStyle ? (t11 = arrow && /* @__PURE__ */ jsx(Arrow, {\n\t\tref: arrowRef,\n\t\tstyle: arrowStyle,\n\t\twidth: 19,\n\t\theight: 8,\n\t\tradius: 2\n\t}), $[48] = arrow, $[49] = arrowRef, $[50] = arrowStyle, $[51] = t11) : t11 = $[51];\n\tlet t12;\n\treturn $[52] !== placement || $[53] !== radius || $[54] !== ref || $[55] !== rootStyle || $[56] !== scheme || $[57] !== shadow || $[58] !== t10 || $[59] !== t11 || $[60] !== t5 || $[61] !== t6 || $[62] !== t7 || $[63] !== t8 || $[64] !== tone ? (t12 = /* @__PURE__ */ jsxs(MotionCard$1, {\n\t\t\"data-ui\": \"Popover\",\n\t\t...t5,\n\t\t\"data-placement\": placement,\n\t\tradius,\n\t\tref,\n\t\tscheme,\n\t\tshadow,\n\t\tsizing: \"border\",\n\t\tstyle: rootStyle,\n\t\ttone,\n\t\tvariants: POPOVER_MOTION_PROPS.card,\n\t\ttransition: POPOVER_MOTION_PROPS.transition,\n\t\tinitial: t6,\n\t\tanimate: t7,\n\t\texit: t8,\n\t\tchildren: [t10, t11]\n\t}), $[52] = placement, $[53] = radius, $[54] = ref, $[55] = rootStyle, $[56] = scheme, $[57] = shadow, $[58] = t10, $[59] = t11, $[60] = t5, $[61] = t6, $[62] = t7, $[63] = t8, $[64] = tone, $[65] = t12) : t12 = $[65], t12;\n}), ViewportOverlay = () => {\n\tlet $ = c(2), { zIndex } = useLayer(), t0;\n\treturn $[0] === zIndex ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx(\"div\", { style: {\n\t\theight: \"100vh\",\n\t\tinset: 0,\n\t\tposition: \"fixed\",\n\t\twidth: \"100vw\",\n\t\tzIndex\n\t} }), $[0] = zIndex, $[1] = t0), t0;\n}, Popover = forwardRef(function Popover(props, forwardedRef) {\n\tlet $ = c(126), { container, layer } = useTheme_v2(), boundaryElementContext = useBoundaryElement(), _boundaryElement, _fallbackPlacements, _floatingBoundary, _referenceBoundary, _zOffsetProp, childProp, content, disabled, matchReferenceWidth, modal, open, paddingProp, portal, referenceElement, restProps, scheme, t0, t1, t10, t11, t2, t3, t4, t5, t6, t7, t8, t9, updateRef;\n\tif ($[0] !== props) {\n\t\tlet { __unstable_margins: t12, animate: t13, arrow: t14, boundaryElement: t15, children: t16, constrainSize: t17, content: t18, disabled: t19, fallbackPlacements: t20, matchReferenceWidth: t21, floatingBoundary: t22, modal: t23, onActivate, open: t24, overflow: t25, padding: t26, placement: t27, placementStrategy: t28, portal: t29, preventOverflow: t30, radius: t31, referenceBoundary: t32, referenceElement: t33, scheme: t34, shadow: t35, tone: t36, width: t37, zOffset: t38, updateRef: t39, ...t40 } = props;\n\t\tt0 = t12, t1 = t13, t2 = t14, _boundaryElement = t15, childProp = t16, t3 = t17, content = t18, disabled = t19, _fallbackPlacements = t20, matchReferenceWidth = t21, _floatingBoundary = t22, modal = t23, open = t24, t4 = t25, paddingProp = t26, t5 = t27, t6 = t28, portal = t29, t7 = t30, t8 = t31, _referenceBoundary = t32, referenceElement = t33, scheme = t34, t9 = t35, t10 = t36, t11 = t37, _zOffsetProp = t38, updateRef = t39, restProps = t40, $[0] = props, $[1] = _boundaryElement, $[2] = _fallbackPlacements, $[3] = _floatingBoundary, $[4] = _referenceBoundary, $[5] = _zOffsetProp, $[6] = childProp, $[7] = content, $[8] = disabled, $[9] = matchReferenceWidth, $[10] = modal, $[11] = open, $[12] = paddingProp, $[13] = portal, $[14] = referenceElement, $[15] = restProps, $[16] = scheme, $[17] = t0, $[18] = t1, $[19] = t10, $[20] = t11, $[21] = t2, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = t6, $[26] = t7, $[27] = t8, $[28] = t9, $[29] = updateRef;\n\t} else _boundaryElement = $[1], _fallbackPlacements = $[2], _floatingBoundary = $[3], _referenceBoundary = $[4], _zOffsetProp = $[5], childProp = $[6], content = $[7], disabled = $[8], matchReferenceWidth = $[9], modal = $[10], open = $[11], paddingProp = $[12], portal = $[13], referenceElement = $[14], restProps = $[15], scheme = $[16], t0 = $[17], t1 = $[18], t10 = $[19], t11 = $[20], t2 = $[21], t3 = $[22], t4 = $[23], t5 = $[24], t6 = $[25], t7 = $[26], t8 = $[27], t9 = $[28], updateRef = $[29];\n\tlet margins = t0 === void 0 ? DEFAULT_POPOVER_MARGINS : t0, _animate = t1 !== void 0 && t1, arrowProp = t2 !== void 0 && t2, constrainSize = t3 !== void 0 && t3, overflow = t4 === void 0 ? \"hidden\" : t4, placementProp = t5 === void 0 ? \"bottom\" : t5, placementStrategy = t6 === void 0 ? \"flip\" : t6, preventOverflow = t7 === void 0 || t7, radiusProp = t8 === void 0 ? 3 : t8, shadowProp = t9 === void 0 ? 3 : t9, tone = t10 === void 0 ? \"inherit\" : t10, widthProp = t11 === void 0 ? \"auto\" : t11, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacements = _fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? \"bottom\"], floatingBoundary = _floatingBoundary ?? props.boundaryElement ?? boundaryElementContext.element, referenceBoundary = _referenceBoundary ?? props.boundaryElement ?? boundaryElementContext.element, zOffsetProp = _zOffsetProp ?? layer.popover.zOffset, animate = !usePrefersReducedMotion() && _animate, boundarySize = useElementSize(boundaryElement)?.border, t12;\n\t$[30] === paddingProp ? t12 = $[31] : (t12 = _getArrayProp(paddingProp), $[30] = paddingProp, $[31] = t12);\n\tlet padding = t12, t13;\n\t$[32] === radiusProp ? t13 = $[33] : (t13 = _getArrayProp(radiusProp), $[32] = radiusProp, $[33] = t13);\n\tlet radius = t13, t14;\n\t$[34] === shadowProp ? t14 = $[35] : (t14 = _getArrayProp(shadowProp), $[34] = shadowProp, $[35] = t14);\n\tlet shadow = t14, widthArrayProp = _getArrayProp(widthProp), t15;\n\t$[36] === zOffsetProp ? t15 = $[37] : (t15 = _getArrayProp(zOffsetProp), $[36] = zOffsetProp, $[37] = t15);\n\tlet zOffset = t15, ref = useRef(null), arrowRef = useRef(null), t16;\n\t$[38] === Symbol.for(\"react.memo_cache_sentinel\") ? (t16 = () => ref.current, $[38] = t16) : t16 = $[38], useImperativeHandle(forwardedRef, t16);\n\tlet mediaIndex = useMediaIndex(), boundaryWidth = constrainSize || preventOverflow ? boundarySize?.width : void 0, width = calcCurrentWidth({\n\t\tcontainer,\n\t\tmediaIndex,\n\t\twidth: widthArrayProp\n\t}), widthRef = useRef(width), t17, t18;\n\t$[39] === width ? (t17 = $[40], t18 = $[41]) : (t17 = () => {\n\t\twidthRef.current = width;\n\t}, t18 = [width], $[39] = width, $[40] = t17, $[41] = t18), useEffect(t17, t18);\n\tlet t19;\n\t$[42] !== boundaryWidth || $[43] !== width ? (t19 = calcMaxWidth({\n\t\tboundaryWidth,\n\t\tcurrentWidth: width\n\t}), $[42] = boundaryWidth, $[43] = width, $[44] = t19) : t19 = $[44];\n\tlet maxWidth = t19, maxWidthRef = useRef(maxWidth), t20, t21;\n\t$[45] === maxWidth ? (t20 = $[46], t21 = $[47]) : (t20 = () => {\n\t\tmaxWidthRef.current = maxWidth;\n\t}, t21 = [maxWidth], $[45] = maxWidth, $[46] = t20, $[47] = t21), useEffect(t20, t21);\n\tlet referenceWidthRef = useRef(void 0), t22, t23;\n\t$[48] !== matchReferenceWidth || $[49] !== maxWidth || $[50] !== open || $[51] !== width ? (t22 = () => {\n\t\tlet floatingElement = ref.current;\n\t\tif (!open || !floatingElement) return;\n\t\tlet referenceWidth = referenceWidthRef.current;\n\t\tmatchReferenceWidth ? referenceWidth !== void 0 && (floatingElement.style.width = `${referenceWidth}px`) : width !== void 0 && (floatingElement.style.width = `${width}px`), typeof maxWidth == \"number\" && (floatingElement.style.maxWidth = `${maxWidth}px`);\n\t}, t23 = [\n\t\twidth,\n\t\tmatchReferenceWidth,\n\t\tmaxWidth,\n\t\topen\n\t], $[48] = matchReferenceWidth, $[49] = maxWidth, $[50] = open, $[51] = width, $[52] = t22, $[53] = t23) : (t22 = $[52], t23 = $[53]), useEffect(t22, t23);\n\tlet [referenceWidth_0, setReferenceWidth] = useState(void 0), t24;\n\t$[54] !== animate || $[55] !== arrowProp || $[56] !== constrainSize || $[57] !== fallbackPlacements || $[58] !== floatingBoundary || $[59] !== margins || $[60] !== matchReferenceWidth || $[61] !== placementProp || $[62] !== placementStrategy || $[63] !== preventOverflow || $[64] !== referenceBoundary ? (t24 = {\n\t\tanimate,\n\t\tarrowProp,\n\t\tarrowRef,\n\t\tconstrainSize,\n\t\tfallbackPlacements,\n\t\tfloatingBoundary,\n\t\tmargins,\n\t\tmatchReferenceWidth,\n\t\tmaxWidthRef,\n\t\tplacementProp,\n\t\tplacementStrategy,\n\t\tpreventOverflow,\n\t\treferenceBoundary,\n\t\treferenceWidthRef,\n\t\trootBoundary: \"viewport\",\n\t\tsetReferenceWidth,\n\t\twidthRef\n\t}, $[54] = animate, $[55] = arrowProp, $[56] = constrainSize, $[57] = fallbackPlacements, $[58] = floatingBoundary, $[59] = margins, $[60] = matchReferenceWidth, $[61] = placementProp, $[62] = placementStrategy, $[63] = preventOverflow, $[64] = referenceBoundary, $[65] = t24) : t24 = $[65];\n\tlet middleware = useMiddleware$1(t24), t25;\n\t$[66] === referenceElement ? t25 = $[67] : (t25 = referenceElement ? { reference: referenceElement } : void 0, $[66] = referenceElement, $[67] = t25);\n\tlet t26;\n\t$[68] !== middleware || $[69] !== placementProp || $[70] !== t25 ? (t26 = {\n\t\tmiddleware,\n\t\tplacement: placementProp,\n\t\twhileElementsMounted: autoUpdate,\n\t\telements: t25\n\t}, $[68] = middleware, $[69] = placementProp, $[70] = t25, $[71] = t26) : t26 = $[71];\n\tlet { x, y, middlewareData, placement, refs, strategy, update } = useFloating(t26), referenceHidden = middlewareData.hide?.referenceHidden, arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData[\"@sanity/ui/origin\"]?.originX, originY = middlewareData[\"@sanity/ui/origin\"]?.originY, t27;\n\t$[72] === Symbol.for(\"react.memo_cache_sentinel\") ? (t27 = (arrowEl) => {\n\t\tarrowRef.current = arrowEl;\n\t}, $[72] = t27) : t27 = $[72];\n\tlet setArrow = t27, t28;\n\t$[73] === refs ? t28 = $[74] : (t28 = (node) => {\n\t\tref.current = node, refs.setFloating(node);\n\t}, $[73] = refs, $[74] = t28);\n\tlet setFloating = t28, t29;\n\t$[75] === childProp ? t29 = $[76] : (t29 = childProp ? getElementRef(childProp) : null, $[75] = childProp, $[76] = t29);\n\tlet t30;\n\t$[77] === refs.reference.current ? t30 = $[78] : (t30 = () => refs.reference.current, $[77] = refs.reference.current, $[78] = t30), useImperativeHandle(t29, t30);\n\tlet t31;\n\tbb0: {\n\t\tif (referenceElement) {\n\t\t\tt31 = childProp;\n\t\t\tbreak bb0;\n\t\t}\n\t\tif (!childProp) {\n\t\t\tt31 = null;\n\t\t\tbreak bb0;\n\t\t}\n\t\tlet t32;\n\t\t$[79] !== childProp || $[80] !== refs.setReference ? (t32 = cloneElement(childProp, { ref: refs.setReference }), $[79] = childProp, $[80] = refs.setReference, $[81] = t32) : t32 = $[81], t31 = t32;\n\t}\n\tlet child = t31, t32, t33;\n\tif ($[82] === update ? (t32 = $[83], t33 = $[84]) : (t32 = () => update, t33 = [update], $[82] = update, $[83] = t32, $[84] = t33), useImperativeHandle(updateRef, t32, t33), disabled) {\n\t\tlet t34;\n\t\treturn $[85] === childProp ? t34 = $[86] : (t34 = childProp || /* @__PURE__ */ jsx(Fragment$1, {}), $[85] = childProp, $[86] = t34), t34;\n\t}\n\tlet t34;\n\t$[87] === modal ? t34 = $[88] : (t34 = modal && /* @__PURE__ */ jsx(ViewportOverlay, {}), $[87] = modal, $[88] = t34);\n\tlet t35 = matchReferenceWidth ? referenceWidth_0 : width, t36;\n\t$[89] !== animate || $[90] !== arrowProp || $[91] !== arrowX || $[92] !== arrowY || $[93] !== content || $[94] !== margins || $[95] !== originX || $[96] !== originY || $[97] !== overflow || $[98] !== padding || $[99] !== placement || $[100] !== radius || $[101] !== referenceHidden || $[102] !== restProps || $[103] !== scheme || $[104] !== setFloating || $[105] !== shadow || $[106] !== strategy || $[107] !== t35 || $[108] !== tone || $[109] !== x || $[110] !== y ? (t36 = /* @__PURE__ */ jsx(PopoverCard, {\n\t\t...restProps,\n\t\t__unstable_margins: margins,\n\t\tanimate,\n\t\tarrow: arrowProp,\n\t\tarrowRef: setArrow,\n\t\tarrowX,\n\t\tarrowY,\n\t\thidden: referenceHidden,\n\t\toverflow,\n\t\tpadding,\n\t\tplacement,\n\t\tradius,\n\t\tref: setFloating,\n\t\tscheme,\n\t\tshadow,\n\t\toriginX,\n\t\toriginY,\n\t\tstrategy,\n\t\ttone,\n\t\twidth: t35,\n\t\tx,\n\t\ty,\n\t\tchildren: content\n\t}), $[89] = animate, $[90] = arrowProp, $[91] = arrowX, $[92] = arrowY, $[93] = content, $[94] = margins, $[95] = originX, $[96] = originY, $[97] = overflow, $[98] = padding, $[99] = placement, $[100] = radius, $[101] = referenceHidden, $[102] = restProps, $[103] = scheme, $[104] = setFloating, $[105] = shadow, $[106] = strategy, $[107] = t35, $[108] = tone, $[109] = x, $[110] = y, $[111] = t36) : t36 = $[111];\n\tlet t37;\n\t$[112] !== t34 || $[113] !== t36 || $[114] !== zOffset ? (t37 = /* @__PURE__ */ jsxs(LayerProvider, {\n\t\tzOffset,\n\t\tchildren: [t34, t36]\n\t}), $[112] = t34, $[113] = t36, $[114] = zOffset, $[115] = t37) : t37 = $[115];\n\tlet popover = t37, t38;\n\t$[116] !== open || $[117] !== popover || $[118] !== portal ? (t38 = open && (portal ? /* @__PURE__ */ jsx(Portal, {\n\t\t__unstable_name: typeof portal == \"string\" ? portal : void 0,\n\t\tchildren: popover\n\t}) : popover), $[116] = open, $[117] = popover, $[118] = portal, $[119] = t38) : t38 = $[119];\n\tlet children = t38, t39;\n\t$[120] !== animate || $[121] !== children ? (t39 = animate ? /* @__PURE__ */ jsx(AnimatePresence, { children }) : children, $[120] = animate, $[121] = children, $[122] = t39) : t39 = $[122];\n\tlet t40;\n\treturn $[123] !== child || $[124] !== t39 ? (t40 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t39, child] }), $[123] = child, $[124] = t39, $[125] = t40) : t40 = $[125], t40;\n});\nfunction useMiddleware$1(t0) {\n\tlet $ = c(42), { animate, arrowProp, arrowRef, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, maxWidthRef, placementProp, placementStrategy, preventOverflow, referenceBoundary, referenceWidthRef, rootBoundary, setReferenceWidth, widthRef } = t0, ret;\n\tif ($[0] !== animate || $[1] !== arrowProp || $[2] !== arrowRef || $[3] !== constrainSize || $[4] !== fallbackPlacements || $[5] !== floatingBoundary || $[6] !== margins || $[7] !== matchReferenceWidth || $[8] !== maxWidthRef || $[9] !== placementProp || $[10] !== placementStrategy || $[11] !== preventOverflow || $[12] !== referenceBoundary || $[13] !== referenceWidthRef || $[14] !== rootBoundary || $[15] !== setReferenceWidth || $[16] !== widthRef) {\n\t\tif (ret = [], constrainSize || preventOverflow) if (placementStrategy === \"autoPlacement\") {\n\t\t\tlet t1;\n\t\t\t$[18] !== fallbackPlacements || $[19] !== placementProp ? (t1 = autoPlacement({ allowedPlacements: [placementProp].concat(fallbackPlacements) }), $[18] = fallbackPlacements, $[19] = placementProp, $[20] = t1) : t1 = $[20], ret.push(t1);\n\t\t} else {\n\t\t\tlet t1 = floatingBoundary || void 0, t2;\n\t\t\t$[21] !== fallbackPlacements || $[22] !== rootBoundary || $[23] !== t1 ? (t2 = flip({\n\t\t\t\tboundary: t1,\n\t\t\t\tfallbackPlacements,\n\t\t\t\tpadding: 4,\n\t\t\t\trootBoundary\n\t\t\t}), $[21] = fallbackPlacements, $[22] = rootBoundary, $[23] = t1, $[24] = t2) : t2 = $[24], ret.push(t2);\n\t\t}\n\t\tlet t1;\n\t\tif ($[25] === Symbol.for(\"react.memo_cache_sentinel\") ? (t1 = offset({ mainAxis: 4 }), $[25] = t1) : t1 = $[25], ret.push(t1), constrainSize || matchReferenceWidth) {\n\t\t\tlet t2 = floatingBoundary || void 0, t3;\n\t\t\t$[26] !== constrainSize || $[27] !== margins || $[28] !== matchReferenceWidth || $[29] !== maxWidthRef || $[30] !== referenceWidthRef || $[31] !== setReferenceWidth || $[32] !== t2 || $[33] !== widthRef ? (t3 = size({\n\t\t\t\tboundaryElement: t2,\n\t\t\t\tconstrainSize,\n\t\t\t\tmargins,\n\t\t\t\tmatchReferenceWidth,\n\t\t\t\tmaxWidthRef,\n\t\t\t\tpadding: 4,\n\t\t\t\treferenceWidthRef,\n\t\t\t\tsetReferenceWidth,\n\t\t\t\twidthRef\n\t\t\t}), $[26] = constrainSize, $[27] = margins, $[28] = matchReferenceWidth, $[29] = maxWidthRef, $[30] = referenceWidthRef, $[31] = setReferenceWidth, $[32] = t2, $[33] = widthRef, $[34] = t3) : t3 = $[34], ret.push(t3);\n\t\t}\n\t\tif (preventOverflow) {\n\t\t\tlet t2 = floatingBoundary || void 0, t3;\n\t\t\t$[35] !== rootBoundary || $[36] !== t2 ? (t3 = shift({\n\t\t\t\tboundary: t2,\n\t\t\t\trootBoundary,\n\t\t\t\tpadding: 4\n\t\t\t}), $[35] = rootBoundary, $[36] = t2, $[37] = t3) : t3 = $[37], ret.push(t3);\n\t\t}\n\t\tif (arrowProp) {\n\t\t\tlet t2;\n\t\t\t$[38] === arrowRef ? t2 = $[39] : (t2 = arrow({\n\t\t\t\telement: arrowRef,\n\t\t\t\tpadding: 4\n\t\t\t}), $[38] = arrowRef, $[39] = t2), ret.push(t2);\n\t\t}\n\t\tanimate && ret.push(origin);\n\t\tlet t2 = referenceBoundary || void 0, t3;\n\t\t$[40] === t2 ? t3 = $[41] : (t3 = hide({\n\t\t\tboundary: t2,\n\t\t\tpadding: 4,\n\t\t\tstrategy: \"referenceHidden\"\n\t\t}), $[40] = t2, $[41] = t3), ret.push(t3), $[0] = animate, $[1] = arrowProp, $[2] = arrowRef, $[3] = constrainSize, $[4] = fallbackPlacements, $[5] = floatingBoundary, $[6] = margins, $[7] = matchReferenceWidth, $[8] = maxWidthRef, $[9] = placementProp, $[10] = placementStrategy, $[11] = preventOverflow, $[12] = referenceBoundary, $[13] = referenceWidthRef, $[14] = rootBoundary, $[15] = setReferenceWidth, $[16] = widthRef, $[17] = ret;\n\t} else ret = $[17];\n\treturn ret;\n}\nconst BASE_STYLE = {\n\t\"&&:not([hidden])\": { display: \"grid\" },\n\t\"&[data-as=\\\"ul\\\"],&[data-as=\\\"ol\\\"]\": { listStyle: \"none\" },\n\tgridTemplateColumns: \"minmax(0, 1fr)\",\n\tgridAutoRows: \"min-content\"\n};\nfunction stackBaseStyle() {\n\treturn BASE_STYLE;\n}\nfunction responsiveStackSpaceStyle(props) {\n\tlet { media, space } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$space, (spaceIndex) => ({ gridGap: rem(space[spaceIndex]) }));\n}\nconst StyledStack = /* @__PURE__ */ styled(Box).withConfig({\n\tdisplayName: \"StyledStack\",\n\tcomponentId: \"sc-ux0lrj-0\"\n})(stackBaseStyle, responsiveStackSpaceStyle), Stack = forwardRef(function Stack(props, ref) {\n\tlet $ = c(13), as, deprecated_space, gap, restProps;\n\t$[0] === props ? (as = $[1], deprecated_space = $[2], gap = $[3], restProps = $[4]) : ({as, gap, space: deprecated_space, ...restProps} = props, $[0] = props, $[1] = as, $[2] = deprecated_space, $[3] = gap, $[4] = restProps);\n\tlet spacing = gap === void 0 ? deprecated_space : gap, t0 = typeof as == \"string\" ? as : void 0, t1;\n\t$[5] === spacing ? t1 = $[6] : (t1 = _getArrayProp(spacing), $[5] = spacing, $[6] = t1);\n\tlet t2;\n\treturn $[7] !== as || $[8] !== ref || $[9] !== restProps || $[10] !== t0 || $[11] !== t1 ? (t2 = /* @__PURE__ */ jsx(StyledStack, {\n\t\t\"data-as\": t0,\n\t\t\"data-ui\": \"Stack\",\n\t\t...restProps,\n\t\t$space: t1,\n\t\tforwardedAs: as,\n\t\tref\n\t}), $[7] = as, $[8] = ref, $[9] = restProps, $[10] = t0, $[11] = t1, $[12] = t2) : t2 = $[12], t2;\n});\n/**\n* @beta\n*/\nfunction useCustomValidity(ref, customValidity) {\n\tlet $ = c(4), t0, t1;\n\t$[0] !== customValidity || $[1] !== ref ? (t0 = () => {\n\t\tref.current?.setCustomValidity(customValidity || \"\");\n\t}, t1 = [customValidity, ref], $[0] = customValidity, $[1] = ref, $[2] = t0, $[3] = t1) : (t0 = $[2], t1 = $[3]), useEffect(t0, t1);\n}\nfunction responsiveInputPaddingStyle(props) {\n\tlet { $fontSize, $iconLeft, $iconRight, $padding, $space } = props, { font, media, space } = getTheme_v2(props.theme), len = Math.max($padding.length, $space.length, $fontSize.length), _padding = [], _space = [], _fontSize = [];\n\tfor (let i = 0; i < len; i += 1) _fontSize[i] = $fontSize[i] === void 0 ? _fontSize[i - 1] : $fontSize[i], _padding[i] = $padding[i] === void 0 ? _padding[i - 1] : $padding[i], _space[i] = $space[i] === void 0 ? _space[i - 1] : $space[i];\n\treturn _responsive(media, _padding, (_, i) => {\n\t\tlet size = font.text.sizes[_fontSize[i]] || font.text.sizes[2], emSize = size.lineHeight - size.ascenderHeight - size.descenderHeight, p = space[_padding[i]], s = space[_space[i]], styles = {\n\t\t\tpaddingTop: rem(p - size.ascenderHeight),\n\t\t\tpaddingRight: rem(p),\n\t\t\tpaddingBottom: rem(p - size.descenderHeight),\n\t\t\tpaddingLeft: rem(p)\n\t\t};\n\t\treturn $iconRight && (styles.paddingRight = rem(p + emSize + s)), $iconLeft && (styles.paddingLeft = rem(p + emSize + s)), styles;\n\t});\n}\nfunction responsiveInputPaddingIconRightStyle(props) {\n\treturn responsiveInputPaddingStyle({\n\t\t...props,\n\t\t$iconRight: !0\n\t});\n}\nconst ROOT_STYLE = css`&:not([hidden]){display:flex;}align-items:center;`;\nfunction textInputRootStyle() {\n\treturn ROOT_STYLE;\n}\nfunction textInputBaseStyle(props) {\n\tlet { $scheme, $tone, $weight } = props, { color, font } = getTheme_v2(props.theme);\n\treturn css`appearance:none;background:none;border:0;border-radius:0;outline:none;width:100%;box-sizing:border-box;font-family:${font.text.family};font-weight:${$weight && font.text.weights[$weight] || font.text.weights.regular};margin:0;position:relative;z-index:1;display:block;&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-text-fill-color:var(--input-fg-color) !important;transition:background-color 5000s;transition-delay:86400s;}&[data-as='textarea']{resize:none;}color:var(--input-fg-color);&::placeholder{color:var(--input-placeholder-color);}&[data-scheme='${$scheme}'][data-tone='${$tone}']{--input-fg-color:${color.input.default.enabled.fg};--input-placeholder-color:${color.input.default.enabled.placeholder};&:not(:invalid):not(:disabled):not(:read-only){--input-fg-color:${color.input.default.enabled.fg};--input-placeholder-color:${color.input.default.enabled.placeholder};}&:not(:invalid):disabled{--input-fg-color:${color.input.default.disabled.fg};--input-placeholder-color:${color.input.default.disabled.placeholder};}&:invalid{--input-fg-color:${color.input.invalid.enabled.fg};--input-placeholder-color:${color.input.invalid.enabled.placeholder};}&:read-only{--input-fg-color:${color.input.default.readOnly.fg};--input-placeholder-color:${color.input.default.readOnly.placeholder};}}`;\n}\nfunction textInputFontSizeStyle(props) {\n\tlet { font, media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$fontSize, (sizeIndex) => {\n\t\tlet size = font.text.sizes[sizeIndex] || font.text.sizes[2];\n\t\treturn {\n\t\t\tfontSize: rem(size.fontSize),\n\t\t\tlineHeight: `${size.lineHeight / size.fontSize}`\n\t\t};\n\t});\n}\nfunction textInputRepresentationStyle(props) {\n\tlet { $hasPrefix, $hasSuffix, $scheme, $tone, $unstableDisableFocusRing } = props, { color, input } = getTheme_v2(props.theme);\n\treturn css`--input-box-shadow:none;position:absolute;top:0;left:0;right:0;bottom:0;display:block;pointer-events:none;z-index:0;background-color:var(--card-bg-color);box-shadow:var(--input-box-shadow);border-top-left-radius:${$hasPrefix ? 0 : void 0};border-bottom-left-radius:${$hasPrefix ? 0 : void 0};border-top-right-radius:${$hasSuffix ? 0 : void 0};border-bottom-right-radius:${$hasSuffix ? 0 : void 0};&[data-scheme='${$scheme}'][data-tone='${$tone}']{--card-bg-color:${color.input.default.enabled.bg};--card-fg-color:${color.input.default.enabled.fg};*:not(:disabled) + &[data-border]{--input-box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.default.enabled.border,\n\t\twidth: input.border.width\n\t})};}*:not(:disabled):invalid + &{--card-bg-color:${color.input.invalid.enabled.bg};--card-fg-color:${color.input.invalid.enabled.fg};&[data-border]{--input-box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.invalid.enabled.border,\n\t\twidth: input.border.width\n\t})};}}*:not(:disabled):focus + &{&[data-border]{--input-box-shadow:${$unstableDisableFocusRing ? void 0 : focusRingStyle({\n\t\tborder: {\n\t\t\tcolor: color.input.default.enabled.border,\n\t\t\twidth: input.border.width\n\t\t},\n\t\tfocusRing: input.text.focusRing\n\t})};}&:not([data-border]){--input-box-shadow:${$unstableDisableFocusRing ? void 0 : focusRingStyle({ focusRing: input.text.focusRing })};}}*:not(:invalid):disabled + &{--card-bg-color:${color.input.default.disabled.bg} !important;--card-fg-color:${color.input.default.disabled.fg} !important;--card-icon-color:${color.input.default.disabled.fg} !important;&[data-border]{--input-box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.default.disabled.border,\n\t\twidth: input.border.width\n\t})};}}*:invalid:disabled + &{--card-bg-color:${color.input.invalid.disabled.bg} !important;--card-fg-color:${color.input.invalid.disabled.fg} !important;--card-icon-color:${color.input.invalid.disabled.fg} !important;&[data-border]{--input-box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.invalid.disabled.border,\n\t\twidth: input.border.width\n\t})};}}*:not(:invalid):read-only + &{--card-bg-color:${color.input.default.readOnly.bg} !important;--card-fg-color:${color.input.default.readOnly.fg} !important;}*:invalid:read-only + &{--card-bg-color:${color.input.invalid.readOnly.bg} !important;--card-fg-color:${color.input.invalid.readOnly.fg} !important;}@media (hover:hover){*:not(:disabled):not(:read-only):not(:invalid):hover + &{--card-bg-color:${color.input.default.hovered.bg};--card-fg-color:${color.input.default.hovered.fg};}*:invalid:not(:disabled):not(:read-only):hover + &{--card-bg-color:${color.input.invalid.hovered.bg};--card-fg-color:${color.input.invalid.hovered.fg};}*:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border]{--input-box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.default.hovered.border,\n\t\twidth: input.border.width\n\t})};}*:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border]{--input-box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.invalid.hovered.border,\n\t\twidth: input.border.width\n\t})};}}}`;\n}\nconst CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, StyledTextInput = /* @__PURE__ */ styled(Card).attrs({ forwardedAs: \"span\" }).withConfig({\n\tdisplayName: \"StyledTextInput\",\n\tcomponentId: \"sc-7gzsyi-0\"\n})(textInputRootStyle), InputRoot = styled.span.withConfig({\n\tdisplayName: \"InputRoot\",\n\tcomponentId: \"sc-7gzsyi-1\"\n})`flex:1;min-width:0;display:block;position:relative;`, Prefix = styled(Card).attrs({ forwardedAs: \"span\" }).withConfig({\n\tdisplayName: \"Prefix\",\n\tcomponentId: \"sc-7gzsyi-2\"\n})`border-top-right-radius:0;border-bottom-right-radius:0;& > span{display:block;margin:-1px;}`, Suffix = styled(Card).attrs({ forwardedAs: \"span\" }).withConfig({\n\tdisplayName: \"Suffix\",\n\tcomponentId: \"sc-7gzsyi-3\"\n})`border-top-left-radius:0;border-bottom-left-radius:0;& > span{display:block;margin:-1px;}`, Input = /* @__PURE__ */ styled.input.withConfig({\n\tdisplayName: \"Input\",\n\tcomponentId: \"sc-7gzsyi-4\"\n})(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation = /* @__PURE__ */ styled.span.withConfig({\n\tdisplayName: \"Presentation\",\n\tcomponentId: \"sc-7gzsyi-5\"\n})(responsiveRadiusStyle, textInputRepresentationStyle), LeftBox = styled(Box).withConfig({\n\tdisplayName: \"LeftBox\",\n\tcomponentId: \"sc-7gzsyi-6\"\n})`position:absolute;top:0;left:0;`, RightBox = styled(Box).withConfig({\n\tdisplayName: \"RightBox\",\n\tcomponentId: \"sc-7gzsyi-7\"\n})`position:absolute;top:0;right:0;`, RightCard = styled(Card).withConfig({\n\tdisplayName: \"RightCard\",\n\tcomponentId: \"sc-7gzsyi-8\"\n})`background-color:transparent;position:absolute;top:0;right:0;`, TextInputClearButton = /* @__PURE__ */ styled(Button).withConfig({\n\tdisplayName: \"TextInputClearButton\",\n\tcomponentId: \"sc-7gzsyi-9\"\n})({ \"&:not([hidden])\": { display: \"block\" } }), TextInput = forwardRef(function TextInput(props, forwardedRef) {\n\tlet $ = c(93), IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, gap, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;\n\t$[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], clearButton = $[4], customValidity = $[5], gap = $[6], onClear = $[7], prefix = $[8], readOnly = $[9], restProps = $[10], suffix = $[11], t0 = $[12], t1 = $[13], t2 = $[14], t3 = $[15], t4 = $[16], t5 = $[17], t6 = $[18], weight = $[19]) : ({__unstable_disableFocusRing, border: t0, clearButton, disabled: t1, fontSize: t2, gap, icon: IconComponent, iconRight: IconRightComponent, onClear, padding: t3, prefix, radius: t4, readOnly, space: t5, suffix, customValidity, type: t6, weight, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = clearButton, $[5] = customValidity, $[6] = gap, $[7] = onClear, $[8] = prefix, $[9] = readOnly, $[10] = restProps, $[11] = suffix, $[12] = t0, $[13] = t1, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = weight);\n\tlet border = t0 === void 0 || t0, disabled = t1 !== void 0 && t1, fontSizeProp = t2 === void 0 ? 2 : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, deprecated_space = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? \"text\" : t6, ref = useRef(null), rootTheme = useRootTheme(), t7;\n\t$[20] === fontSizeProp ? t7 = $[21] : (t7 = _getArrayProp(fontSizeProp), $[20] = fontSizeProp, $[21] = t7);\n\tlet fontSize = t7, t8;\n\t$[22] === paddingProp ? t8 = $[23] : (t8 = _getArrayProp(paddingProp), $[22] = paddingProp, $[23] = t8);\n\tlet padding = t8, t9;\n\t$[24] === radiusProp ? t9 = $[25] : (t9 = _getArrayProp(radiusProp), $[24] = radiusProp, $[25] = t9);\n\tlet radius = t9, t10 = gap === void 0 ? deprecated_space : gap, t11;\n\t$[26] === t10 ? t11 = $[27] : (t11 = _getArrayProp(t10), $[26] = t10, $[27] = t11);\n\tlet space = t11, $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix, t12;\n\t$[28] === Symbol.for(\"react.memo_cache_sentinel\") ? (t12 = () => ref.current, $[28] = t12) : t12 = $[28], useImperativeHandle(forwardedRef, t12), useCustomValidity(ref, customValidity);\n\tlet handleClearMouseDown = _temp$6, t13;\n\t$[29] === onClear ? t13 = $[30] : (t13 = (event_0) => {\n\t\tevent_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();\n\t}, $[29] = onClear, $[30] = t13);\n\tlet handleClearClick = t13, t14;\n\t$[31] !== prefix || $[32] !== radius ? (t14 = prefix && /* @__PURE__ */ jsx(Prefix, {\n\t\tborderTop: !0,\n\t\tborderLeft: !0,\n\t\tborderBottom: !0,\n\t\tradius,\n\t\tsizing: \"border\",\n\t\ttone: \"inherit\",\n\t\tchildren: /* @__PURE__ */ jsx(\"span\", { children: prefix })\n\t}), $[31] = prefix, $[32] = radius, $[33] = t14) : t14 = $[33];\n\tlet prefixNode = t14, t15 = border ? \"\" : void 0, t16;\n\t$[34] !== IconComponent || $[35] !== fontSize || $[36] !== padding ? (t16 = IconComponent && /* @__PURE__ */ jsx(LeftBox, {\n\t\tpadding,\n\t\tchildren: /* @__PURE__ */ jsxs(Text, {\n\t\t\tsize: fontSize,\n\t\t\tchildren: [isValidElement(IconComponent) && IconComponent, isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})]\n\t\t})\n\t}), $[34] = IconComponent, $[35] = fontSize, $[36] = padding, $[37] = t16) : t16 = $[37];\n\tlet t17;\n\t$[38] !== $hasClearButton || $[39] !== IconRightComponent || $[40] !== fontSize || $[41] !== padding ? (t17 = !$hasClearButton && IconRightComponent && /* @__PURE__ */ jsx(RightBox, {\n\t\tpadding,\n\t\tchildren: /* @__PURE__ */ jsxs(Text, {\n\t\t\tsize: fontSize,\n\t\t\tchildren: [isValidElement(IconRightComponent) && IconRightComponent, isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})]\n\t\t})\n\t}), $[38] = $hasClearButton, $[39] = IconRightComponent, $[40] = fontSize, $[41] = padding, $[42] = t17) : t17 = $[42];\n\tlet t18;\n\t$[43] !== $hasPrefix || $[44] !== $hasSuffix || $[45] !== __unstable_disableFocusRing || $[46] !== radius || $[47] !== rootTheme.scheme || $[48] !== rootTheme.tone || $[49] !== t15 || $[50] !== t16 || $[51] !== t17 ? (t18 = /* @__PURE__ */ jsxs(Presentation, {\n\t\t$hasPrefix,\n\t\t$unstableDisableFocusRing: __unstable_disableFocusRing,\n\t\t$hasSuffix,\n\t\t$radius: radius,\n\t\t$scheme: rootTheme.scheme,\n\t\t$tone: rootTheme.tone,\n\t\t\"data-border\": t15,\n\t\t\"data-scheme\": rootTheme.scheme,\n\t\t\"data-tone\": rootTheme.tone,\n\t\tchildren: [t16, t17]\n\t}), $[43] = $hasPrefix, $[44] = $hasSuffix, $[45] = __unstable_disableFocusRing, $[46] = radius, $[47] = rootTheme.scheme, $[48] = rootTheme.tone, $[49] = t15, $[50] = t16, $[51] = t17, $[52] = t18) : t18 = $[52];\n\tlet presentationNode = t18, t19;\n\t$[53] === padding ? t19 = $[54] : (t19 = padding.map(_temp2$1), $[53] = padding, $[54] = t19);\n\tlet clearButtonBoxPadding = t19, t20;\n\t$[55] === padding ? t20 = $[56] : (t20 = padding.map(_temp3), $[55] = padding, $[56] = t20);\n\tlet clearButtonPadding = t20, clearButtonProps = typeof clearButton == \"object\" ? clearButton : EMPTY_RECORD, t21;\n\t$[57] !== clearButton || $[58] !== clearButtonBoxPadding || $[59] !== clearButtonPadding || $[60] !== clearButtonProps || $[61] !== customValidity || $[62] !== disabled || $[63] !== fontSize || $[64] !== handleClearClick || $[65] !== radius || $[66] !== readOnly ? (t21 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(RightCard, {\n\t\tforwardedAs: \"span\",\n\t\tpadding: clearButtonBoxPadding,\n\t\tstyle: CLEAR_BUTTON_BOX_STYLE,\n\t\ttone: customValidity ? \"critical\" : \"inherit\",\n\t\tchildren: /* @__PURE__ */ jsx(TextInputClearButton, {\n\t\t\t\"aria-label\": \"Clear\",\n\t\t\t\"data-qa\": \"clear-button\",\n\t\t\tfontSize,\n\t\t\ticon: CloseIcon,\n\t\t\tmode: \"bleed\",\n\t\t\tpadding: clearButtonPadding,\n\t\t\tradius,\n\t\t\t...clearButtonProps,\n\t\t\tonClick: handleClearClick,\n\t\t\tonMouseDown: handleClearMouseDown\n\t\t})\n\t}), $[57] = clearButton, $[58] = clearButtonBoxPadding, $[59] = clearButtonPadding, $[60] = clearButtonProps, $[61] = customValidity, $[62] = disabled, $[63] = fontSize, $[64] = handleClearClick, $[65] = radius, $[66] = readOnly, $[67] = t21) : t21 = $[67];\n\tlet clearButtonNode = t21, t22;\n\t$[68] !== radius || $[69] !== suffix ? (t22 = suffix && /* @__PURE__ */ jsx(Suffix, {\n\t\tborderTop: !0,\n\t\tborderRight: !0,\n\t\tborderBottom: !0,\n\t\tradius,\n\t\tsizing: \"border\",\n\t\ttone: \"inherit\",\n\t\tchildren: /* @__PURE__ */ jsx(\"span\", { children: suffix })\n\t}), $[68] = radius, $[69] = suffix, $[70] = t22) : t22 = $[70];\n\tlet suffixNode = t22, t23 = $hasIconRight || $hasClearButton, t24;\n\t$[71] !== $hasIcon || $[72] !== disabled || $[73] !== fontSize || $[74] !== padding || $[75] !== readOnly || $[76] !== restProps || $[77] !== rootTheme.scheme || $[78] !== rootTheme.tone || $[79] !== space || $[80] !== t23 || $[81] !== type || $[82] !== weight ? (t24 = /* @__PURE__ */ jsx(Input, {\n\t\t\"data-as\": \"input\",\n\t\t\"data-scheme\": rootTheme.scheme,\n\t\t\"data-tone\": rootTheme.tone,\n\t\t...restProps,\n\t\t$fontSize: fontSize,\n\t\t$iconLeft: $hasIcon,\n\t\t$iconRight: t23,\n\t\t$padding: padding,\n\t\t$scheme: rootTheme.scheme,\n\t\t$space: space,\n\t\t$tone: rootTheme.tone,\n\t\t$weight: weight,\n\t\tdisabled,\n\t\treadOnly,\n\t\tref,\n\t\ttype\n\t}), $[71] = $hasIcon, $[72] = disabled, $[73] = fontSize, $[74] = padding, $[75] = readOnly, $[76] = restProps, $[77] = rootTheme.scheme, $[78] = rootTheme.tone, $[79] = space, $[80] = t23, $[81] = type, $[82] = weight, $[83] = t24) : t24 = $[83];\n\tlet t25;\n\t$[84] !== clearButtonNode || $[85] !== presentationNode || $[86] !== t24 ? (t25 = /* @__PURE__ */ jsxs(InputRoot, { children: [\n\t\tt24,\n\t\tpresentationNode,\n\t\tclearButtonNode\n\t] }), $[84] = clearButtonNode, $[85] = presentationNode, $[86] = t24, $[87] = t25) : t25 = $[87];\n\tlet t26;\n\treturn $[88] !== prefixNode || $[89] !== rootTheme.tone || $[90] !== suffixNode || $[91] !== t25 ? (t26 = /* @__PURE__ */ jsxs(StyledTextInput, {\n\t\t\"data-ui\": \"TextInput\",\n\t\ttone: rootTheme.tone,\n\t\tchildren: [\n\t\t\tprefixNode,\n\t\t\tt25,\n\t\t\tsuffixNode\n\t\t]\n\t}), $[88] = prefixNode, $[89] = rootTheme.tone, $[90] = suffixNode, $[91] = t25, $[92] = t26) : t26 = $[92], t26;\n});\nfunction _temp$6(event) {\n\tevent.preventDefault(), event.stopPropagation();\n}\nfunction _temp2$1(v) {\n\treturn v === 0 ? 0 : v === 1 || v === 2 ? 1 : v - 2;\n}\nfunction _temp3(v_0) {\n\treturn v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : v_0 - 1;\n}\n/**\n* @public\n*/\nfunction useClickOutsideEvent(listener, t0, boundaryElement) {\n\tlet $ = c(9), elementsArg = t0 === void 0 ? _temp$5 : t0, t1;\n\t$[0] !== boundaryElement || $[1] !== elementsArg || $[2] !== listener ? (t1 = (evt) => {\n\t\tif (!listener) return;\n\t\tlet target = evt.target;\n\t\tif (!(target instanceof Node)) return;\n\t\tlet resolvedBoundaryElement = boundaryElement?.();\n\t\tif (resolvedBoundaryElement && !resolvedBoundaryElement.contains(target)) return;\n\t\tlet elements = elementsArg().flat();\n\t\tfor (let el of elements) if (el && (target === el || el.contains(target))) return;\n\t\tlistener(evt);\n\t}, $[0] = boundaryElement, $[1] = elementsArg, $[2] = listener, $[3] = t1) : t1 = $[3];\n\tlet onEvent = useEffectEvent(t1), hasListener = !!listener, t2;\n\t$[4] !== hasListener || $[5] !== onEvent ? (t2 = () => {\n\t\tif (!hasListener) return;\n\t\tlet handleEvent = (evt_0) => onEvent(evt_0);\n\t\treturn document.addEventListener(\"mousedown\", handleEvent), () => {\n\t\t\tdocument.removeEventListener(\"mousedown\", handleEvent);\n\t\t};\n\t}, $[4] = hasListener, $[5] = onEvent, $[6] = t2) : t2 = $[6];\n\tlet t3;\n\t$[7] === hasListener ? t3 = $[8] : (t3 = [hasListener], $[7] = hasListener, $[8] = t3), useEffect(t2, t3), useDebugValue(listener ? \"MouseDown On\" : \"MouseDown Off\");\n}\nfunction _temp$5() {\n\treturn EMPTY_ARRAY;\n}\n/**\n* Adds global keydown event listener to the window.\n*\n* @param onKeyDown - The function to call when a keydown event is triggered.\n* @param options - The options to pass to the addEventListener function (example, capture: true)\n* @beta\n*/\nfunction useGlobalKeyDown(onKeyDown, options) {\n\tlet $ = c(7), t0;\n\t$[0] === onKeyDown ? t0 = $[1] : (t0 = (event) => onKeyDown(event), $[0] = onKeyDown, $[1] = t0);\n\tlet handleKeyDown = useEffectEvent(t0), t1;\n\t$[2] !== handleKeyDown || $[3] !== options ? (t1 = () => {\n\t\tlet handler = (event_0) => handleKeyDown(event_0);\n\t\treturn window.addEventListener(\"keydown\", handler, options), () => window.removeEventListener(\"keydown\", handler, options);\n\t}, $[2] = handleKeyDown, $[3] = options, $[4] = t1) : t1 = $[4];\n\tlet t2;\n\t$[5] === options ? t2 = $[6] : (t2 = [options], $[5] = options, $[6] = t2), useEffect(t1, t2);\n}\nconst StyledLayer = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"StyledLayer\",\n\tcomponentId: \"sc-c59p9w-0\"\n})({ position: \"relative\" }), LayerChildren = forwardRef(function LayerChildren(props, forwardedRef) {\n\tlet $ = c(22), children, onActivate, onFocus, restProps, t0;\n\t$[0] === props ? (children = $[1], onActivate = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]) : ({children, onActivate, onFocus, style: t0, ...restProps} = props, $[0] = props, $[1] = children, $[2] = onActivate, $[3] = onFocus, $[4] = restProps, $[5] = t0);\n\tlet style = t0 === void 0 ? EMPTY_RECORD : t0, { zIndex, isTopLayer } = useLayer(), lastFocusedRef = useRef(null), ref = useRef(null), isTopLayerRef = useRef(isTopLayer), t1;\n\t$[6] === Symbol.for(\"react.memo_cache_sentinel\") ? (t1 = () => ref.current, $[6] = t1) : t1 = $[6], useImperativeHandle(forwardedRef, t1);\n\tlet t2, t3;\n\t$[7] !== isTopLayer || $[8] !== onActivate ? (t2 = () => {\n\t\tisTopLayerRef.current !== isTopLayer && isTopLayer && onActivate?.({ activeElement: lastFocusedRef.current }), isTopLayerRef.current = isTopLayer;\n\t}, t3 = [isTopLayer, onActivate], $[7] = isTopLayer, $[8] = onActivate, $[9] = t2, $[10] = t3) : (t2 = $[9], t3 = $[10]), useEffect(t2, t3);\n\tlet t4;\n\t$[11] !== isTopLayer || $[12] !== onFocus ? (t4 = (event) => {\n\t\tonFocus?.(event);\n\t\tlet rootElement = ref.current, target = document.activeElement;\n\t\t!isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);\n\t}, $[11] = isTopLayer, $[12] = onFocus, $[13] = t4) : t4 = $[13];\n\tlet handleFocus = t4, t5;\n\t$[14] !== style || $[15] !== zIndex ? (t5 = {\n\t\t...style,\n\t\tzIndex\n\t}, $[14] = style, $[15] = zIndex, $[16] = t5) : t5 = $[16];\n\tlet t6;\n\treturn $[17] !== children || $[18] !== handleFocus || $[19] !== restProps || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsx(StyledLayer, {\n\t\t...restProps,\n\t\t\"data-ui\": \"Layer\",\n\t\tonFocus: handleFocus,\n\t\tref,\n\t\tstyle: t5,\n\t\tchildren\n\t}), $[17] = children, $[18] = handleFocus, $[19] = restProps, $[20] = t5, $[21] = t6) : t6 = $[21], t6;\n}), Layer = forwardRef(function Layer(props, ref) {\n\tlet $ = c(11), children, restProps, t0;\n\t$[0] === props ? (children = $[1], restProps = $[2], t0 = $[3]) : ({children, zOffset: t0, ...restProps} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0);\n\tlet zOffset = t0 === void 0 ? 1 : t0, t1;\n\t$[4] !== children || $[5] !== ref || $[6] !== restProps ? (t1 = /* @__PURE__ */ jsx(LayerChildren, {\n\t\t...restProps,\n\t\tref,\n\t\tchildren\n\t}), $[4] = children, $[5] = ref, $[6] = restProps, $[7] = t1) : t1 = $[7];\n\tlet t2;\n\treturn $[8] !== t1 || $[9] !== zOffset ? (t2 = /* @__PURE__ */ jsx(LayerProvider, {\n\t\tzOffset,\n\t\tchildren: t1\n\t}), $[8] = t1, $[9] = zOffset, $[10] = t2) : t2 = $[10], t2;\n});\nfunction inlineBaseStyle() {\n\treturn {\n\t\tlineHeight: \"0\",\n\t\t\"&&:not([hidden])\": { display: \"block\" },\n\t\t\"& > div\": {\n\t\t\tdisplay: \"inline-block\",\n\t\t\tverticalAlign: \"middle\"\n\t\t}\n\t};\n}\nfunction inlineSpaceStyle(props) {\n\tlet { media, space } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$space, (spaceIndex) => {\n\t\tlet _space = rem(spaceIndex === .5 ? space[1] / 2 : space[spaceIndex]);\n\t\treturn {\n\t\t\tmargin: `-${_space} 0 0 -${_space}`,\n\t\t\t\"& > div\": { padding: `${_space} 0 0 ${_space}` }\n\t\t};\n\t});\n}\nconst StyledInline = /* @__PURE__ */ styled(Box).withConfig({\n\tdisplayName: \"StyledInline\",\n\tcomponentId: \"sc-zsbqh7-0\"\n})(inlineBaseStyle, inlineSpaceStyle), Inline = forwardRef(function Inline(props, ref) {\n\tlet $ = c(16), as, childrenProp, deprecated_space, gap, restProps;\n\t$[0] === props ? (as = $[1], childrenProp = $[2], deprecated_space = $[3], gap = $[4], restProps = $[5]) : ({as, children: childrenProp, gap, space: deprecated_space, ...restProps} = props, $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = deprecated_space, $[4] = gap, $[5] = restProps);\n\tlet spacing = gap === void 0 ? deprecated_space : gap, t0;\n\t$[6] === childrenProp ? t0 = $[7] : (t0 = Children.map(childrenProp, _temp$4), $[6] = childrenProp, $[7] = t0);\n\tlet children = t0, t1;\n\t$[8] === spacing ? t1 = $[9] : (t1 = _getArrayProp(spacing), $[8] = spacing, $[9] = t1);\n\tlet t2 = ref, t3;\n\treturn $[10] !== as || $[11] !== children || $[12] !== restProps || $[13] !== t1 || $[14] !== t2 ? (t3 = /* @__PURE__ */ jsx(StyledInline, {\n\t\t\"data-ui\": \"Inline\",\n\t\t...restProps,\n\t\t$space: t1,\n\t\tforwardedAs: as,\n\t\tref: t2,\n\t\tchildren\n\t}), $[10] = as, $[11] = children, $[12] = restProps, $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15], t3;\n});\nfunction _temp$4(child) {\n\treturn child && /* @__PURE__ */ jsx(\"div\", { children: child });\n}\nfunction kbdStyle() {\n\treturn css`--card-bg-color:var(--card-kbd-bg-color);--card-border-color:var(--card-kbd-border-color);--card-fg-color:var(--card-kbd-fg-color);box-shadow:inset 0 0 0 1px var(--card-border-color);background:var(--card-bg-color);font:inherit;vertical-align:top;&:not([hidden]){display:inline-block;}`;\n}\nconst StyledKBD = /* @__PURE__ */ styled.kbd.withConfig({\n\tdisplayName: \"StyledKBD\",\n\tcomponentId: \"sc-xzhxcv-0\"\n})(responsiveRadiusStyle, kbdStyle), KBD = forwardRef(function KBD(props, ref) {\n\tlet $ = c(19), children, restProps, t0, t1, t2;\n\t$[0] === props ? (children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5]) : ({children, fontSize: t0, padding: t1, radius: t2, ...restProps} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2);\n\tlet fontSize = t0 === void 0 ? 0 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? 2 : t2, t3;\n\t$[6] === radius ? t3 = $[7] : (t3 = _getArrayProp(radius), $[6] = radius, $[7] = t3);\n\tlet t4;\n\t$[8] !== children || $[9] !== fontSize ? (t4 = /* @__PURE__ */ jsx(Text, {\n\t\tas: \"span\",\n\t\tsize: fontSize,\n\t\tweight: \"semibold\",\n\t\tchildren\n\t}), $[8] = children, $[9] = fontSize, $[10] = t4) : t4 = $[10];\n\tlet t5;\n\t$[11] !== padding || $[12] !== t4 ? (t5 = /* @__PURE__ */ jsx(Box, {\n\t\tas: \"span\",\n\t\tpadding,\n\t\tchildren: t4\n\t}), $[11] = padding, $[12] = t4, $[13] = t5) : t5 = $[13];\n\tlet t6;\n\treturn $[14] !== ref || $[15] !== restProps || $[16] !== t3 || $[17] !== t5 ? (t6 = /* @__PURE__ */ jsx(StyledKBD, {\n\t\t\"data-ui\": \"KBD\",\n\t\t...restProps,\n\t\t$radius: t3,\n\t\tref,\n\t\tchildren: t5\n\t}), $[14] = ref, $[15] = restProps, $[16] = t3, $[17] = t5, $[18] = t6) : t6 = $[18], t6;\n}), StyledHotkeys = styled.kbd.withConfig({\n\tdisplayName: \"StyledHotkeys\",\n\tcomponentId: \"sc-1soubc-0\"\n})`font:inherit;padding:1px;&:not([hidden]){display:block;}`, Key = styled(KBD).withConfig({\n\tdisplayName: \"Key\",\n\tcomponentId: \"sc-1soubc-1\"\n})`&:not([hidden]){display:block;}`, Hotkeys = forwardRef(function Hotkeys(props, ref) {\n\tlet $ = c(27), fontSize, gap, keys, padding, radius, restProps, t0;\n\t$[0] === props ? (fontSize = $[1], gap = $[2], keys = $[3], padding = $[4], radius = $[5], restProps = $[6], t0 = $[7]) : ({fontSize, gap, keys, padding, radius, space: t0, ...restProps} = props, $[0] = props, $[1] = fontSize, $[2] = gap, $[3] = keys, $[4] = padding, $[5] = radius, $[6] = restProps, $[7] = t0);\n\tlet t1 = gap === void 0 ? t0 === void 0 ? .5 : t0 : gap, t2;\n\t$[8] === t1 ? t2 = $[9] : (t2 = _getArrayProp(t1), $[8] = t1, $[9] = t2);\n\tlet spacing = t2;\n\tif (!keys || keys.length === 0) {\n\t\tlet t3;\n\t\treturn $[10] === Symbol.for(\"react.memo_cache_sentinel\") ? (t3 = /* @__PURE__ */ jsx(Fragment$1, {}), $[10] = t3) : t3 = $[10], t3;\n\t}\n\tlet t3;\n\tif ($[11] !== fontSize || $[12] !== keys || $[13] !== padding || $[14] !== radius) {\n\t\tlet t4;\n\t\t$[16] !== fontSize || $[17] !== padding || $[18] !== radius ? (t4 = (key, i) => /* @__PURE__ */ jsx(Key, {\n\t\t\tfontSize,\n\t\t\tpadding,\n\t\t\tradius,\n\t\t\tchildren: key\n\t\t}, i), $[16] = fontSize, $[17] = padding, $[18] = radius, $[19] = t4) : t4 = $[19], t3 = keys.map(t4), $[11] = fontSize, $[12] = keys, $[13] = padding, $[14] = radius, $[15] = t3;\n\t} else t3 = $[15];\n\tlet t4;\n\t$[20] !== spacing || $[21] !== t3 ? (t4 = /* @__PURE__ */ jsx(Inline, {\n\t\tas: \"span\",\n\t\tgap: spacing,\n\t\tchildren: t3\n\t}), $[20] = spacing, $[21] = t3, $[22] = t4) : t4 = $[22];\n\tlet t5;\n\treturn $[23] !== ref || $[24] !== restProps || $[25] !== t4 ? (t5 = /* @__PURE__ */ jsx(StyledHotkeys, {\n\t\t\"data-ui\": \"Hotkeys\",\n\t\t...restProps,\n\t\tref,\n\t\tchildren: t4\n\t}), $[23] = ref, $[24] = restProps, $[25] = t4, $[26] = t5) : t5 = $[26], t5;\n}), MenuContext = createGlobalScopedContext(\"@sanity/ui/context/menu\", null);\n/**\n* @internal\n*/\nfunction _isFocusable(element) {\n\treturn isHTMLAnchorElement(element) && element.getAttribute(\"data-disabled\") !== \"true\" || isHTMLButtonElement(element) && !element.disabled;\n}\n/**\n* @internal\n*/\nfunction _getFocusableElements(elements) {\n\treturn elements.filter(_isFocusable);\n}\nfunction _getDOMPath(rootElement, el) {\n\tlet path = [], e = el;\n\tfor (; e !== rootElement;) {\n\t\tlet parentElement = e.parentElement;\n\t\tif (!parentElement) return path;\n\t\tlet index = Array.from(parentElement.childNodes).indexOf(e);\n\t\tif (path.unshift(index), parentElement === rootElement) return path;\n\t\te = parentElement;\n\t}\n\treturn path;\n}\nconst EMPTY_PATH = [];\n/**\n* @internal\n*/\nfunction _sortElements(rootElement, elements) {\n\tif (!rootElement) return;\n\tlet map = /* @__PURE__ */ new WeakMap();\n\tfor (let el of elements) map.set(el, _getDOMPath(rootElement, el));\n\tlet _sort = (a, b) => {\n\t\tlet _a = map.get(a) || EMPTY_PATH, _b = map.get(b) || EMPTY_PATH, len = Math.max(_a.length, _b.length);\n\t\tfor (let i = 0; i < len; i += 1) {\n\t\t\tlet aIndex = _a[i] || -1, bIndex = _b[i] || -1;\n\t\t\tif (aIndex !== bIndex) return aIndex - bIndex;\n\t\t}\n\t\treturn 0;\n\t};\n\telements.sort(_sort);\n}\n/**\n* This controller is responsible for controlling UI menu state.\n*\n* @internal\n*/\nfunction useMenuController(props) {\n\tlet $ = c(21), { onKeyDown, originElement, shouldFocus, rootElementRef } = props, t0;\n\t$[0] === Symbol.for(\"react.memo_cache_sentinel\") ? (t0 = [], $[0] = t0) : t0 = $[0];\n\tlet elementsRef = useRef(t0), [activeIndex, _setActiveIndex] = useState(-1), activeIndexRef = useRef(activeIndex), [activeElement, setActiveElement] = useState(null), t1;\n\t$[1] === Symbol.for(\"react.memo_cache_sentinel\") ? (t1 = (nextActiveIndex) => {\n\t\t_setActiveIndex(nextActiveIndex), activeIndexRef.current = nextActiveIndex, setActiveElement(elementsRef.current[nextActiveIndex] || null);\n\t}, $[1] = t1) : t1 = $[1];\n\tlet setActiveIndex = t1, t2;\n\t$[2] === rootElementRef ? t2 = $[3] : (t2 = (element, selected) => {\n\t\tif (!element) return _temp$3;\n\t\tif (elementsRef.current.indexOf(element) === -1 && (elementsRef.current.push(element), _sortElements(rootElementRef.current, elementsRef.current)), selected) {\n\t\t\tlet selectedIndex = elementsRef.current.indexOf(element);\n\t\t\tsetActiveIndex(selectedIndex);\n\t\t}\n\t\treturn () => {\n\t\t\tlet idx = elementsRef.current.indexOf(element);\n\t\t\tidx > -1 && elementsRef.current.splice(idx, 1);\n\t\t};\n\t}, $[2] = rootElementRef, $[3] = t2);\n\tlet mount = t2, t3;\n\t$[4] !== onKeyDown || $[5] !== originElement ? (t3 = (event) => {\n\t\tif (event.key === \"Tab\") {\n\t\t\toriginElement && originElement.focus();\n\t\t\treturn;\n\t\t}\n\t\tif (event.key === \"Home\") {\n\t\t\tevent.preventDefault(), event.stopPropagation();\n\t\t\tlet el = _getFocusableElements(elementsRef.current)[0];\n\t\t\tif (!el) return;\n\t\t\tlet currentIndex = elementsRef.current.indexOf(el);\n\t\t\tsetActiveIndex(currentIndex);\n\t\t\treturn;\n\t\t}\n\t\tif (event.key === \"End\") {\n\t\t\tevent.preventDefault(), event.stopPropagation();\n\t\t\tlet focusableElements_0 = _getFocusableElements(elementsRef.current), el_0 = focusableElements_0[focusableElements_0.length - 1];\n\t\t\tif (!el_0) return;\n\t\t\tlet currentIndex_0 = elementsRef.current.indexOf(el_0);\n\t\t\tsetActiveIndex(currentIndex_0);\n\t\t\treturn;\n\t\t}\n\t\tif (event.key === \"ArrowUp\") {\n\t\t\tevent.preventDefault(), event.stopPropagation();\n\t\t\tlet focusableElements_1 = _getFocusableElements(elementsRef.current), focusableLen = focusableElements_1.length;\n\t\t\tif (focusableLen === 0) return;\n\t\t\tlet focusedElement = elementsRef.current[activeIndexRef.current], focusedIndex = focusableElements_1.indexOf(focusedElement);\n\t\t\tfocusedIndex = (focusedIndex - 1 + focusableLen) % focusableLen;\n\t\t\tlet el_1 = focusableElements_1[focusedIndex], currentIndex_1 = elementsRef.current.indexOf(el_1);\n\t\t\tsetActiveIndex(currentIndex_1);\n\t\t\treturn;\n\t\t}\n\t\tif (event.key === \"ArrowDown\") {\n\t\t\tevent.preventDefault(), event.stopPropagation();\n\t\t\tlet focusableElements_2 = _getFocusableElements(elementsRef.current), focusableLen_0 = focusableElements_2.length;\n\t\t\tif (focusableLen_0 === 0) return;\n\t\t\tlet focusedElement_0 = elementsRef.current[activeIndexRef.current], focusedIndex_0 = focusableElements_2.indexOf(focusedElement_0);\n\t\t\tfocusedIndex_0 = (focusedIndex_0 + 1) % focusableLen_0;\n\t\t\tlet el_2 = focusableElements_2[focusedIndex_0], currentIndex_2 = elementsRef.current.indexOf(el_2);\n\t\t\tsetActiveIndex(currentIndex_2);\n\t\t\treturn;\n\t\t}\n\t\tonKeyDown && onKeyDown(event);\n\t}, $[4] = onKeyDown, $[5] = originElement, $[6] = t3) : t3 = $[6];\n\tlet handleKeyDown = t3, t4;\n\t$[7] === Symbol.for(\"react.memo_cache_sentinel\") ? (t4 = (event_0) => {\n\t\tlet element_0 = event_0.currentTarget, currentIndex_3 = elementsRef.current.indexOf(element_0);\n\t\tsetActiveIndex(currentIndex_3);\n\t}, $[7] = t4) : t4 = $[7];\n\tlet handleItemMouseEnter = t4, t5;\n\t$[8] === rootElementRef ? t5 = $[9] : (t5 = () => {\n\t\tsetActiveIndex(-2), rootElementRef.current?.focus();\n\t}, $[8] = rootElementRef, $[9] = t5);\n\tlet handleItemMouseLeave = t5, t6, t7;\n\t$[10] !== activeIndex || $[11] !== rootElementRef || $[12] !== shouldFocus ? (t6 = () => {\n\t\tif (!rootElementRef.current) return;\n\t\tlet rafId = requestAnimationFrame(() => {\n\t\t\tif (activeIndex === -1) {\n\t\t\t\tif (shouldFocus === \"first\") {\n\t\t\t\t\tlet el_3 = _getFocusableElements(elementsRef.current)[0];\n\t\t\t\t\tif (el_3) {\n\t\t\t\t\t\tlet currentIndex_4 = elementsRef.current.indexOf(el_3);\n\t\t\t\t\t\tsetActiveIndex(currentIndex_4);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (shouldFocus === \"last\") {\n\t\t\t\t\tlet focusableElements_4 = _getFocusableElements(elementsRef.current), el_4 = focusableElements_4[focusableElements_4.length - 1];\n\t\t\t\t\tif (el_4) {\n\t\t\t\t\t\tlet currentIndex_5 = elementsRef.current.indexOf(el_4);\n\t\t\t\t\t\tsetActiveIndex(currentIndex_5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t(elementsRef.current[activeIndex] || null)?.focus();\n\t\t});\n\t\treturn () => cancelAnimationFrame(rafId);\n\t}, t7 = [\n\t\tactiveIndex,\n\t\trootElementRef,\n\t\tsetActiveIndex,\n\t\tshouldFocus\n\t], $[10] = activeIndex, $[11] = rootElementRef, $[12] = shouldFocus, $[13] = t6, $[14] = t7) : (t6 = $[13], t7 = $[14]), useEffect(t6, t7);\n\tlet t8;\n\treturn $[15] !== activeElement || $[16] !== activeIndex || $[17] !== handleItemMouseLeave || $[18] !== handleKeyDown || $[19] !== mount ? (t8 = {\n\t\tactiveElement,\n\t\tactiveIndex,\n\t\thandleItemMouseEnter,\n\t\thandleItemMouseLeave,\n\t\thandleKeyDown,\n\t\tmount\n\t}, $[15] = activeElement, $[16] = activeIndex, $[17] = handleItemMouseLeave, $[18] = handleKeyDown, $[19] = mount, $[20] = t8) : t8 = $[20], t8;\n}\nfunction _temp$3() {}\nconst StyledMenu = styled(Box).withConfig({\n\tdisplayName: \"StyledMenu\",\n\tcomponentId: \"sc-xvs9y5-0\"\n})`outline:none;overflow:auto;`, Menu = forwardRef(function Menu(props, forwardedRef) {\n\tlet $ = c(50), _shouldFocus, children, gap, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, restProps, t0, t1;\n\tif ($[0] !== props) {\n\t\tlet { children: t2, focusFirst, focusLast, onClickOutside: t3, onEscape: t4, onItemClick: t5, onItemSelect: t6, onKeyDown: t7, originElement: t8, padding: t9, registerElement: t10, shouldFocus: t11, gap: t12, space: t13, ...t14 } = props;\n\t\tchildren = t2, onClickOutside = t3, onEscape = t4, onItemClick = t5, onItemSelect = t6, onKeyDown = t7, originElement = t8, t0 = t9, registerElement = t10, _shouldFocus = t11, gap = t12, t1 = t13, restProps = t14, $[0] = props, $[1] = _shouldFocus, $[2] = children, $[3] = gap, $[4] = onClickOutside, $[5] = onEscape, $[6] = onItemClick, $[7] = onItemSelect, $[8] = onKeyDown, $[9] = originElement, $[10] = registerElement, $[11] = restProps, $[12] = t0, $[13] = t1;\n\t} else _shouldFocus = $[1], children = $[2], gap = $[3], onClickOutside = $[4], onEscape = $[5], onItemClick = $[6], onItemSelect = $[7], onKeyDown = $[8], originElement = $[9], registerElement = $[10], restProps = $[11], t0 = $[12], t1 = $[13];\n\tlet padding = t0 === void 0 ? 1 : t0, spacing = gap === void 0 ? t1 === void 0 ? 1 : t1 : gap, shouldFocus = _shouldFocus ?? (props.focusFirst && \"first\" || props.focusLast && \"last\" || null), ref = useRef(null), t2;\n\t$[14] === Symbol.for(\"react.memo_cache_sentinel\") ? (t2 = () => ref.current, $[14] = t2) : t2 = $[14], useImperativeHandle(forwardedRef, t2);\n\tlet { isTopLayer } = useLayer(), t3;\n\t$[15] !== onKeyDown || $[16] !== originElement || $[17] !== shouldFocus ? (t3 = {\n\t\tonKeyDown,\n\t\toriginElement,\n\t\tshouldFocus,\n\t\trootElementRef: ref\n\t}, $[15] = onKeyDown, $[16] = originElement, $[17] = shouldFocus, $[18] = t3) : t3 = $[18];\n\tlet { activeElement, activeIndex, handleItemMouseEnter, handleItemMouseLeave, handleKeyDown, mount } = useMenuController(t3), unregisterElementRef = useRef(null), t4;\n\t$[19] === registerElement ? t4 = $[20] : (t4 = (el) => {\n\t\tunregisterElementRef.current &&= (unregisterElementRef.current(), null), ref.current = el, ref.current && registerElement && (unregisterElementRef.current = registerElement(ref.current));\n\t}, $[19] = registerElement, $[20] = t4);\n\tlet handleRefChange = t4, t5, t6;\n\t$[21] !== activeIndex || $[22] !== onItemSelect ? (t5 = () => {\n\t\tonItemSelect && onItemSelect(activeIndex);\n\t}, t6 = [activeIndex, onItemSelect], $[21] = activeIndex, $[22] = onItemSelect, $[23] = t5, $[24] = t6) : (t5 = $[23], t6 = $[24]), useEffect(t5, t6);\n\tlet t7;\n\t$[25] === Symbol.for(\"react.memo_cache_sentinel\") ? (t7 = () => [ref.current], $[25] = t7) : t7 = $[25], useClickOutsideEvent(isTopLayer && onClickOutside, t7);\n\tlet t8;\n\t$[26] !== isTopLayer || $[27] !== onEscape ? (t8 = (event) => {\n\t\tisTopLayer && event.key === \"Escape\" && (event.stopPropagation(), onEscape && onEscape());\n\t}, $[26] = isTopLayer, $[27] = onEscape, $[28] = t8) : t8 = $[28], useGlobalKeyDown(t8);\n\tlet t9;\n\t$[29] !== activeElement || $[30] !== handleItemMouseEnter || $[31] !== handleItemMouseLeave || $[32] !== mount || $[33] !== onClickOutside || $[34] !== onEscape || $[35] !== onItemClick || $[36] !== registerElement ? (t9 = {\n\t\tversion: 2,\n\t\tactiveElement,\n\t\tmount,\n\t\tonClickOutside,\n\t\tonEscape,\n\t\tonItemClick,\n\t\tonItemMouseEnter: handleItemMouseEnter,\n\t\tonItemMouseLeave: handleItemMouseLeave,\n\t\tregisterElement\n\t}, $[29] = activeElement, $[30] = handleItemMouseEnter, $[31] = handleItemMouseLeave, $[32] = mount, $[33] = onClickOutside, $[34] = onEscape, $[35] = onItemClick, $[36] = registerElement, $[37] = t9) : t9 = $[37];\n\tlet value = t9, t10;\n\t$[38] !== children || $[39] !== spacing ? (t10 = /* @__PURE__ */ jsx(Stack, {\n\t\tgap: spacing,\n\t\tchildren\n\t}), $[38] = children, $[39] = spacing, $[40] = t10) : t10 = $[40];\n\tlet t11;\n\t$[41] !== handleKeyDown || $[42] !== handleRefChange || $[43] !== padding || $[44] !== restProps || $[45] !== t10 ? (t11 = /* @__PURE__ */ jsx(StyledMenu, {\n\t\t\"data-ui\": \"Menu\",\n\t\t...restProps,\n\t\tonKeyDown: handleKeyDown,\n\t\tpadding,\n\t\tref: handleRefChange,\n\t\trole: \"menu\",\n\t\ttabIndex: -1,\n\t\tchildren: t10\n\t}), $[41] = handleKeyDown, $[42] = handleRefChange, $[43] = padding, $[44] = restProps, $[45] = t10, $[46] = t11) : t11 = $[46];\n\tlet t12;\n\treturn $[47] !== t11 || $[48] !== value ? (t12 = /* @__PURE__ */ jsx(MenuContext.Provider, {\n\t\tvalue,\n\t\tchildren: t11\n\t}), $[47] = t11, $[48] = value, $[49] = t12) : t12 = $[49], t12;\n}), MenuDivider = styled.hr.withConfig({\n\tdisplayName: \"MenuDivider\",\n\tcomponentId: \"sc-sxuath-0\"\n})`height:1px;border:0;background:var(--card-hairline-soft-color);margin:0;`;\nfunction selectableBaseStyle() {\n\treturn css`background-color:inherit;color:inherit;&[data-as='button']{-webkit-font-smoothing:inherit;appearance:none;outline:none;font:inherit;text-align:inherit;border:0;width:-moz-available;width:-webkit-fill-available;width:stretch;}&[data-as='a']{text-decoration:none;}`;\n}\nfunction selectableColorStyle(props) {\n\tlet { $tone } = props, { color, style } = getTheme_v2(props.theme), tone = color.selectable[$tone];\n\treturn css`${_cardColorStyle(color, tone.enabled)} background-color:var(--card-bg-color);color:var(--card-fg-color);outline:none;&[data-as='button']{&:disabled{${_cardColorStyle(color, tone.disabled)}}&:not(:disabled){&[aria-pressed='true']{${_cardColorStyle(color, tone.pressed)}}&[data-selected],&[aria-selected='true'] > &{${_cardColorStyle(color, tone.selected)}}@media (hover:hover){&:not([data-selected]){&[data-hovered],&:hover{${_cardColorStyle(color, tone.hovered)}}&:active{${_cardColorStyle(color, tone.pressed)}}}}}}&[data-as='a']{&[data-disabled]{${_cardColorStyle(color, tone.disabled)}}&:not([data-disabled]){&[data-pressed]{${_cardColorStyle(color, tone.pressed)}}&[data-selected]{${_cardColorStyle(color, tone.selected)}}@media (hover:hover){&:not([data-selected]){&[data-hovered],&:hover{${_cardColorStyle(color, tone.hovered)}}&:active{${_cardColorStyle(color, tone.pressed)}}}}}}${style?.card?.root}`;\n}\n/**\n* @internal\n*/\nconst Selectable = /* @__PURE__ */ styled(Box).withConfig({\n\tdisplayName: \"Selectable\",\n\tcomponentId: \"sc-njdnrn-0\"\n})(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);\nfunction useMenu() {\n\tlet value = useContext(MenuContext);\n\tif (!value) throw Error(\"useMenu(): missing context value\");\n\tif (!isRecord(value) || value.version !== 2) throw Error(\"useMenu(): the context value is not compatible\");\n\treturn value;\n}\n/**\n* @public\n*/\nconst MenuGroup = function MenuGroup(props) {\n\tlet $ = c(82), IconComponent, children, gap, menuProps, onClick, popover, restProps, t0, t1, t2, t3, t4, t5, text;\n\t$[0] === props ? (IconComponent = $[1], children = $[2], gap = $[3], menuProps = $[4], onClick = $[5], popover = $[6], restProps = $[7], t0 = $[8], t1 = $[9], t2 = $[10], t3 = $[11], t4 = $[12], t5 = $[13], text = $[14]) : ({as: t0, children, fontSize: t1, icon: IconComponent, menu: menuProps, onClick, padding: t2, popover, radius: t3, gap, space: t4, text, tone: t5, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = children, $[3] = gap, $[4] = menuProps, $[5] = onClick, $[6] = popover, $[7] = restProps, $[8] = t0, $[9] = t1, $[10] = t2, $[11] = t3, $[12] = t4, $[13] = t5, $[14] = text);\n\tlet as = t0 === void 0 ? \"button\" : t0, fontSize = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, deprecated_space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? \"default\" : t5, spacing = gap === void 0 ? deprecated_space : gap, menu = useMenu(), { scheme } = useRootTheme(), { activeElement, mount, onClickOutside, onEscape, onItemClick, onItemMouseEnter: _onItemMouseEnter, registerElement } = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onItemMouseEnter, [rootElement, setRootElement] = useState(null), [open, setOpen] = useState(!1), [shouldFocus, setShouldFocus] = useState(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = useState(!1), t6;\n\t$[15] === onItemMouseEnter ? t6 = $[16] : (t6 = (event) => {\n\t\tsetWithinMenu(!1), onItemMouseEnter(event), setOpen(!0);\n\t}, $[15] = onItemMouseEnter, $[16] = t6);\n\tlet handleMouseEnter = t6, t7;\n\t$[17] === rootElement ? t7 = $[18] : (t7 = (event_0) => {\n\t\tevent_0.key === \"ArrowLeft\" && (event_0.stopPropagation(), setOpen(!1), requestAnimationFrame(() => {\n\t\t\trootElement?.focus();\n\t\t}));\n\t}, $[17] = rootElement, $[18] = t7);\n\tlet handleMenuKeyDown = t7, t8;\n\t$[19] === onClick ? t8 = $[20] : (t8 = (event_1) => {\n\t\tonClick?.(event_1), setShouldFocus(\"first\"), setOpen(!0);\n\t}, $[19] = onClick, $[20] = t8);\n\tlet handleClick = t8, t9;\n\t$[21] === onItemClick ? t9 = $[22] : (t9 = () => {\n\t\tsetOpen(!1), onItemClick?.();\n\t}, $[21] = onItemClick, $[22] = t9);\n\tlet handleChildItemClick = t9, t10;\n\t$[23] === Symbol.for(\"react.memo_cache_sentinel\") ? (t10 = () => setWithinMenu(!0), $[23] = t10) : t10 = $[23];\n\tlet handleMenuMouseEnter = t10, t11, t12;\n\t$[24] !== mount || $[25] !== rootElement ? (t11 = () => mount(rootElement), t12 = [mount, rootElement], $[24] = mount, $[25] = rootElement, $[26] = t11, $[27] = t12) : (t11 = $[26], t12 = $[27]), useEffect(t11, t12);\n\tlet t13, t14;\n\t$[28] === active ? (t13 = $[29], t14 = $[30]) : (t13 = () => {\n\t\tactive || setOpen(!1);\n\t}, t14 = [active], $[28] = active, $[29] = t13, $[30] = t14), useEffect(t13, t14);\n\tlet t15, t16;\n\t$[31] === open ? (t15 = $[32], t16 = $[33]) : (t15 = () => {\n\t\topen || setWithinMenu(!1);\n\t}, t16 = [open], $[31] = open, $[32] = t15, $[33] = t16), useEffect(t15, t16);\n\tlet t17, t18;\n\t$[34] === shouldFocus ? (t17 = $[35], t18 = $[36]) : (t17 = () => {\n\t\tif (!shouldFocus) return;\n\t\tlet rafId = requestAnimationFrame(() => setShouldFocus(null));\n\t\treturn () => cancelAnimationFrame(rafId);\n\t}, t18 = [shouldFocus], $[34] = shouldFocus, $[35] = t17, $[36] = t18), useEffect(t17, t18);\n\tlet t19;\n\t$[37] !== children || $[38] !== handleChildItemClick || $[39] !== handleMenuKeyDown || $[40] !== menuProps || $[41] !== onClickOutside || $[42] !== onEscape || $[43] !== registerElement || $[44] !== shouldFocus ? (t19 = /* @__PURE__ */ jsx(Menu, {\n\t\t...menuProps,\n\t\tonClickOutside,\n\t\tonEscape,\n\t\tonItemClick: handleChildItemClick,\n\t\tonKeyDown: handleMenuKeyDown,\n\t\tonMouseEnter: handleMenuMouseEnter,\n\t\tregisterElement,\n\t\tshouldFocus,\n\t\tchildren\n\t}), $[37] = children, $[38] = handleChildItemClick, $[39] = handleMenuKeyDown, $[40] = menuProps, $[41] = onClickOutside, $[42] = onEscape, $[43] = registerElement, $[44] = shouldFocus, $[45] = t19) : t19 = $[45];\n\tlet childMenu = t19, t20;\n\t$[46] === Symbol.for(\"react.memo_cache_sentinel\") ? (t20 = (event_2) => {\n\t\tlet target = event_2.currentTarget;\n\t\tif (document.activeElement === target && event_2.key === \"ArrowRight\") {\n\t\t\tsetShouldFocus(\"first\"), setOpen(!0), setWithinMenu(!0);\n\t\t\treturn;\n\t\t}\n\t}, $[46] = t20) : t20 = $[46];\n\tlet handleKeyDown = t20, t21 = as === \"button\" ? withinMenu : void 0, t22 = as === \"button\" ? void 0 : withinMenu, t23 = !withinMenu && active ? \"\" : void 0, t24;\n\t$[47] === radius ? t24 = $[48] : (t24 = _getArrayProp(radius), $[47] = radius, $[48] = t24);\n\tlet t25 = as === \"button\" ? \"button\" : void 0, t26;\n\t$[49] !== IconComponent || $[50] !== fontSize ? (t26 = IconComponent && /* @__PURE__ */ jsxs(Text, {\n\t\tsize: fontSize,\n\t\tchildren: [isValidElement(IconComponent) && IconComponent, isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})]\n\t}), $[49] = IconComponent, $[50] = fontSize, $[51] = t26) : t26 = $[51];\n\tlet t27;\n\t$[52] !== fontSize || $[53] !== text ? (t27 = /* @__PURE__ */ jsx(Box, {\n\t\tflex: 1,\n\t\tchildren: /* @__PURE__ */ jsx(Text, {\n\t\t\tsize: fontSize,\n\t\t\ttextOverflow: \"ellipsis\",\n\t\t\tweight: \"medium\",\n\t\t\tchildren: text\n\t\t})\n\t}), $[52] = fontSize, $[53] = text, $[54] = t27) : t27 = $[54];\n\tlet t28;\n\t$[55] === Symbol.for(\"react.memo_cache_sentinel\") ? (t28 = /* @__PURE__ */ jsx(ChevronRightIcon, {}), $[55] = t28) : t28 = $[55];\n\tlet t29;\n\t$[56] === fontSize ? t29 = $[57] : (t29 = /* @__PURE__ */ jsx(Text, {\n\t\tsize: fontSize,\n\t\tchildren: t28\n\t}), $[56] = fontSize, $[57] = t29);\n\tlet t30;\n\t$[58] !== padding || $[59] !== spacing || $[60] !== t26 || $[61] !== t27 || $[62] !== t29 ? (t30 = /* @__PURE__ */ jsxs(Flex, {\n\t\tgap: spacing,\n\t\tpadding,\n\t\tchildren: [\n\t\t\tt26,\n\t\t\tt27,\n\t\t\tt29\n\t\t]\n\t}), $[58] = padding, $[59] = spacing, $[60] = t26, $[61] = t27, $[62] = t29, $[63] = t30) : t30 = $[63];\n\tlet t31;\n\t$[64] !== as || $[65] !== handleClick || $[66] !== handleMouseEnter || $[67] !== restProps || $[68] !== scheme || $[69] !== t21 || $[70] !== t22 || $[71] !== t23 || $[72] !== t24 || $[73] !== t25 || $[74] !== t30 || $[75] !== tone ? (t31 = /* @__PURE__ */ jsx(Selectable, {\n\t\t\"data-as\": as,\n\t\t\"data-ui\": \"MenuGroup\",\n\t\tforwardedAs: as,\n\t\t...restProps,\n\t\t\"aria-pressed\": t21,\n\t\t\"data-pressed\": t22,\n\t\t\"data-selected\": t23,\n\t\t$radius: t24,\n\t\t$tone: tone,\n\t\t$scheme: scheme,\n\t\tonClick: handleClick,\n\t\tonKeyDown: handleKeyDown,\n\t\tonMouseEnter: handleMouseEnter,\n\t\tref: setRootElement,\n\t\ttabIndex: -1,\n\t\ttype: t25,\n\t\tchildren: t30\n\t}), $[64] = as, $[65] = handleClick, $[66] = handleMouseEnter, $[67] = restProps, $[68] = scheme, $[69] = t21, $[70] = t22, $[71] = t23, $[72] = t24, $[73] = t25, $[74] = t30, $[75] = tone, $[76] = t31) : t31 = $[76];\n\tlet t32;\n\treturn $[77] !== childMenu || $[78] !== open || $[79] !== popover || $[80] !== t31 ? (t32 = /* @__PURE__ */ jsx(Popover, {\n\t\t...popover,\n\t\tcontent: childMenu,\n\t\t\"data-ui\": \"MenuGroup__popover\",\n\t\topen,\n\t\tchildren: t31\n\t}), $[77] = childMenu, $[78] = open, $[79] = popover, $[80] = t31, $[81] = t32) : t32 = $[81], t32;\n}, MenuItem = forwardRef(function MenuItem(props, forwardedRef) {\n\tlet $ = c(76), IconComponent, IconRightComponent, children, disabled, gap, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;\n\t$[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], gap = $[5], hotkeys = $[6], onClick = $[7], paddingBottom = $[8], paddingLeft = $[9], paddingRight = $[10], paddingTop = $[11], paddingX = $[12], paddingY = $[13], pressed = $[14], restProps = $[15], selectedProp = $[16], t0 = $[17], t1 = $[18], t2 = $[19], t3 = $[20], t4 = $[21], t5 = $[22], text = $[23]) : ({as: t0, children, disabled, fontSize: t1, hotkeys, icon: IconComponent, iconRight: IconRightComponent, onClick, padding: t2, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft, pressed, radius: t3, selected: selectedProp, gap, space: t4, text, tone: t5, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = gap, $[6] = hotkeys, $[7] = onClick, $[8] = paddingBottom, $[9] = paddingLeft, $[10] = paddingRight, $[11] = paddingTop, $[12] = paddingX, $[13] = paddingY, $[14] = pressed, $[15] = restProps, $[16] = selectedProp, $[17] = t0, $[18] = t1, $[19] = t2, $[20] = t3, $[21] = t4, $[22] = t5, $[23] = text);\n\tlet as = t0 === void 0 ? \"button\" : t0, fontSize = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, deprecated_space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? \"default\" : t5, spacing = gap === void 0 ? deprecated_space : gap, { scheme } = useRootTheme(), menu = useMenu(), { activeElement, mount, onItemClick, onItemMouseEnter: _onItemMouseEnter, onItemMouseLeave: _onItemMouseLeave } = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onItemMouseEnter, onItemMouseLeave = _onItemMouseLeave ?? menu.onItemMouseLeave, [rootElement, setRootElement] = useState(null), active = !!activeElement && activeElement === rootElement, ref = useRef(null), t6;\n\t$[24] === Symbol.for(\"react.memo_cache_sentinel\") ? (t6 = () => ref.current, $[24] = t6) : t6 = $[24], useImperativeHandle(forwardedRef, t6);\n\tlet t7, t8;\n\t$[25] !== mount || $[26] !== rootElement || $[27] !== selectedProp ? (t7 = () => mount(rootElement, selectedProp), t8 = [\n\t\tmount,\n\t\trootElement,\n\t\tselectedProp\n\t], $[25] = mount, $[26] = rootElement, $[27] = selectedProp, $[28] = t7, $[29] = t8) : (t7 = $[28], t8 = $[29]), useEffect(t7, t8);\n\tlet t9;\n\t$[30] !== disabled || $[31] !== onClick || $[32] !== onItemClick ? (t9 = (event) => {\n\t\tdisabled || (onClick && onClick(event), onItemClick && onItemClick());\n\t}, $[30] = disabled, $[31] = onClick, $[32] = onItemClick, $[33] = t9) : t9 = $[33];\n\tlet handleClick = t9, t10;\n\t$[34] !== padding || $[35] !== paddingBottom || $[36] !== paddingLeft || $[37] !== paddingRight || $[38] !== paddingTop || $[39] !== paddingX || $[40] !== paddingY ? (t10 = {\n\t\tpadding,\n\t\tpaddingX,\n\t\tpaddingY,\n\t\tpaddingTop,\n\t\tpaddingRight,\n\t\tpaddingBottom,\n\t\tpaddingLeft\n\t}, $[34] = padding, $[35] = paddingBottom, $[36] = paddingLeft, $[37] = paddingRight, $[38] = paddingTop, $[39] = paddingX, $[40] = paddingY, $[41] = t10) : t10 = $[41];\n\tlet paddingProps = t10, t11;\n\t$[42] === fontSize ? t11 = $[43] : (t11 = _getArrayProp(fontSize).map(_temp$2), $[42] = fontSize, $[43] = t11);\n\tlet hotkeysFontSize = t11, t12;\n\t$[44] === Symbol.for(\"react.memo_cache_sentinel\") ? (t12 = (el) => {\n\t\tref.current = el, setRootElement(el);\n\t}, $[44] = t12) : t12 = $[44];\n\tlet setRef = t12, t13 = as !== \"button\" && pressed ? \"\" : void 0, t14 = active ? \"\" : void 0, t15 = disabled ? \"\" : void 0, t16;\n\t$[45] === radius ? t16 = $[46] : (t16 = _getArrayProp(radius), $[45] = radius, $[46] = t16);\n\tlet t17;\n\t$[47] === Symbol.for(\"react.memo_cache_sentinel\") ? (t17 = _getArrayProp(0), $[47] = t17) : t17 = $[47];\n\tlet t18 = disabled ? \"default\" : tone, t19 = as === \"button\" ? \"button\" : void 0, t20;\n\t$[48] !== IconComponent || $[49] !== IconRightComponent || $[50] !== fontSize || $[51] !== hotkeys || $[52] !== hotkeysFontSize || $[53] !== paddingProps || $[54] !== spacing || $[55] !== text ? (t20 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxs(Flex, {\n\t\tas: \"span\",\n\t\tgap: spacing,\n\t\talign: \"center\",\n\t\t...paddingProps,\n\t\tchildren: [\n\t\t\tIconComponent && /* @__PURE__ */ jsxs(Text, {\n\t\t\t\tsize: fontSize,\n\t\t\t\tchildren: [isValidElement(IconComponent) && IconComponent, isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})]\n\t\t\t}),\n\t\t\ttext && /* @__PURE__ */ jsx(Box, {\n\t\t\t\tflex: 1,\n\t\t\t\tchildren: /* @__PURE__ */ jsx(Text, {\n\t\t\t\t\tsize: fontSize,\n\t\t\t\t\ttextOverflow: \"ellipsis\",\n\t\t\t\t\tweight: \"medium\",\n\t\t\t\t\tchildren: text\n\t\t\t\t})\n\t\t\t}),\n\t\t\thotkeys && /* @__PURE__ */ jsx(Hotkeys, {\n\t\t\t\tfontSize: hotkeysFontSize,\n\t\t\t\tkeys: hotkeys,\n\t\t\t\tstyle: {\n\t\t\t\t\tmarginTop: -4,\n\t\t\t\t\tmarginBottom: -4\n\t\t\t\t}\n\t\t\t}),\n\t\t\tIconRightComponent && /* @__PURE__ */ jsxs(Text, {\n\t\t\t\tsize: fontSize,\n\t\t\t\tchildren: [isValidElement(IconRightComponent) && IconRightComponent, isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})]\n\t\t\t})\n\t\t]\n\t}), $[48] = IconComponent, $[49] = IconRightComponent, $[50] = fontSize, $[51] = hotkeys, $[52] = hotkeysFontSize, $[53] = paddingProps, $[54] = spacing, $[55] = text, $[56] = t20) : t20 = $[56];\n\tlet t21;\n\t$[57] !== children || $[58] !== paddingProps ? (t21 = children && /* @__PURE__ */ jsx(Box, {\n\t\tas: \"span\",\n\t\t...paddingProps,\n\t\tchildren\n\t}), $[57] = children, $[58] = paddingProps, $[59] = t21) : t21 = $[59];\n\tlet t22;\n\treturn $[60] !== as || $[61] !== disabled || $[62] !== handleClick || $[63] !== onItemMouseEnter || $[64] !== onItemMouseLeave || $[65] !== restProps || $[66] !== scheme || $[67] !== t13 || $[68] !== t14 || $[69] !== t15 || $[70] !== t16 || $[71] !== t18 || $[72] !== t19 || $[73] !== t20 || $[74] !== t21 ? (t22 = /* @__PURE__ */ jsxs(Selectable, {\n\t\t\"data-ui\": \"MenuItem\",\n\t\trole: \"menuitem\",\n\t\t...restProps,\n\t\t\"data-pressed\": t13,\n\t\t\"data-selected\": t14,\n\t\t\"data-disabled\": t15,\n\t\tforwardedAs: as,\n\t\t$radius: t16,\n\t\t$padding: t17,\n\t\t$tone: t18,\n\t\t$scheme: scheme,\n\t\tdisabled,\n\t\tonClick: handleClick,\n\t\tonMouseEnter: onItemMouseEnter,\n\t\tonMouseLeave: onItemMouseLeave,\n\t\tref: setRef,\n\t\ttabIndex: -1,\n\t\ttype: t19,\n\t\tchildren: [t20, t21]\n\t}), $[60] = as, $[61] = disabled, $[62] = handleClick, $[63] = onItemMouseEnter, $[64] = onItemMouseLeave, $[65] = restProps, $[66] = scheme, $[67] = t13, $[68] = t14, $[69] = t15, $[70] = t16, $[71] = t18, $[72] = t19, $[73] = t20, $[74] = t21, $[75] = t22) : t22 = $[75], t22;\n});\nfunction _temp$2(s) {\n\treturn s - 1;\n}\nconst CustomButton = styled(Button).withConfig({\n\tdisplayName: \"CustomButton\",\n\tcomponentId: \"sc-whlh6p-0\"\n})`max-width:100%;`, Tab = forwardRef(function Tab(props, forwardedRef) {\n\tlet $ = c(30), focused, icon, id, label, onClick, onFocus, restProps, selected, t0, t1;\n\t$[0] === props ? (focused = $[1], icon = $[2], id = $[3], label = $[4], onClick = $[5], onFocus = $[6], restProps = $[7], selected = $[8], t0 = $[9], t1 = $[10]) : ({icon, id, focused, fontSize: t0, label, onClick, onFocus, padding: t1, selected, ...restProps} = props, $[0] = props, $[1] = focused, $[2] = icon, $[3] = id, $[4] = label, $[5] = onClick, $[6] = onFocus, $[7] = restProps, $[8] = selected, $[9] = t0, $[10] = t1);\n\tlet fontSize = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 2 : t1, ref = useRef(null), focusedRef = useRef(!1), t2;\n\t$[11] === Symbol.for(\"react.memo_cache_sentinel\") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], useImperativeHandle(forwardedRef, t2);\n\tlet t3;\n\t$[12] === Symbol.for(\"react.memo_cache_sentinel\") ? (t3 = () => {\n\t\tfocusedRef.current = !1;\n\t}, $[12] = t3) : t3 = $[12];\n\tlet handleBlur = t3, t4;\n\t$[13] === onFocus ? t4 = $[14] : (t4 = (event) => {\n\t\tfocusedRef.current = !0, onFocus && onFocus(event);\n\t}, $[13] = onFocus, $[14] = t4);\n\tlet handleFocus = t4, t5, t6;\n\t$[15] === focused ? (t5 = $[16], t6 = $[17]) : (t5 = () => {\n\t\tfocused && !focusedRef.current && (ref.current && ref.current.focus(), focusedRef.current = !0);\n\t}, t6 = [focused], $[15] = focused, $[16] = t5, $[17] = t6), useEffect(t5, t6);\n\tlet t7 = selected ? \"true\" : \"false\", t8 = selected ? 0 : -1, t9;\n\treturn $[18] !== fontSize || $[19] !== handleFocus || $[20] !== icon || $[21] !== id || $[22] !== label || $[23] !== onClick || $[24] !== padding || $[25] !== restProps || $[26] !== selected || $[27] !== t7 || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsx(CustomButton, {\n\t\t\"data-ui\": \"Tab\",\n\t\t...restProps,\n\t\t\"aria-selected\": t7,\n\t\tfontSize,\n\t\ticon,\n\t\tid,\n\t\tmode: \"bleed\",\n\t\tonClick,\n\t\tonBlur: handleBlur,\n\t\tonFocus: handleFocus,\n\t\tpadding,\n\t\tref,\n\t\trole: \"tab\",\n\t\tselected,\n\t\ttabIndex: t8,\n\t\ttext: label,\n\t\ttype: \"button\"\n\t}), $[18] = fontSize, $[19] = handleFocus, $[20] = icon, $[21] = id, $[22] = label, $[23] = onClick, $[24] = padding, $[25] = restProps, $[26] = selected, $[27] = t7, $[28] = t8, $[29] = t9) : t9 = $[29], t9;\n}), CustomInline = styled(Inline).withConfig({\n\tdisplayName: \"CustomInline\",\n\tcomponentId: \"sc-tlz8f1-0\"\n})`& > div{display:inline-block;vertical-align:middle;max-width:100%;box-sizing:border-box;}`, TabList = forwardRef(function TabList(props, ref) {\n\tlet $ = c(15), childrenProp, restProps;\n\t$[0] === props ? (childrenProp = $[1], restProps = $[2]) : ({children: childrenProp, ...restProps} = props, $[0] = props, $[1] = childrenProp, $[2] = restProps);\n\tlet [focusedIndex, setFocusedIndex] = useState(-1), t0;\n\tif ($[3] !== childrenProp || $[4] !== focusedIndex) {\n\t\tlet children = Children.toArray(childrenProp).filter(isValidElement), t1;\n\t\t$[6] === focusedIndex ? t1 = $[7] : (t1 = (child, childIndex) => cloneElement(child, {\n\t\t\tfocused: focusedIndex === childIndex,\n\t\t\tkey: childIndex,\n\t\t\tonFocus: () => setFocusedIndex(childIndex)\n\t\t}), $[6] = focusedIndex, $[7] = t1), t0 = children.map(t1), $[3] = childrenProp, $[4] = focusedIndex, $[5] = t0;\n\t} else t0 = $[5];\n\tlet tabs = t0, numTabs = tabs.length, t1;\n\t$[8] === numTabs ? t1 = $[9] : (t1 = (event) => {\n\t\tevent.key === \"ArrowLeft\" && setFocusedIndex((prevIndex) => (prevIndex + numTabs - 1) % numTabs), event.key === \"ArrowRight\" && setFocusedIndex((prevIndex_0) => (prevIndex_0 + 1) % numTabs);\n\t}, $[8] = numTabs, $[9] = t1);\n\tlet handleKeyDown = t1, t2;\n\treturn $[10] !== handleKeyDown || $[11] !== ref || $[12] !== restProps || $[13] !== tabs ? (t2 = /* @__PURE__ */ jsx(CustomInline, {\n\t\t\"data-ui\": \"TabList\",\n\t\t...restProps,\n\t\tonKeyDown: handleKeyDown,\n\t\tref,\n\t\trole: \"tablist\",\n\t\tchildren: tabs\n\t}), $[10] = handleKeyDown, $[11] = ref, $[12] = restProps, $[13] = tabs, $[14] = t2) : t2 = $[14], t2;\n}), GRID_CSS = {\n\t\"&&:not([hidden])\": { display: \"grid\" },\n\t\"&[data-as=\\\"ul\\\"],&[data-as=\\\"ol\\\"]\": { listStyle: \"none\" }\n}, GRID_AUTO_COLUMS = {\n\tauto: \"auto\",\n\tmin: \"min-content\",\n\tmax: \"max-content\",\n\tfr: \"minmax(0, 1fr)\"\n}, GRID_AUTO_ROWS = {\n\tauto: \"auto\",\n\tmin: \"min-content\",\n\tmax: \"max-content\",\n\tfr: \"minmax(0, 1fr)\"\n};\nfunction responsiveGridStyle() {\n\treturn [\n\t\tGRID_CSS,\n\t\tresponsiveGridAutoFlowStyle,\n\t\tresponsiveGridAutoRowsStyle,\n\t\tresponsiveGridAutoColsStyle,\n\t\tresponsiveGridColumnsStyle,\n\t\tresponsiveGridRowsStyle,\n\t\tresponsiveGridGapStyle,\n\t\tresponsiveGridGapXStyle,\n\t\tresponsiveGridGapYStyle\n\t];\n}\nfunction responsiveGridAutoFlowStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$autoFlow, (autoFlow) => ({ gridAutoFlow: autoFlow }));\n}\nfunction responsiveGridAutoRowsStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$autoRows, (autoRows) => ({ gridAutoRows: autoRows && GRID_AUTO_ROWS[autoRows] }));\n}\nfunction responsiveGridAutoColsStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$autoCols, (autoCols) => ({ gridAutoColumns: autoCols && GRID_AUTO_COLUMS[autoCols] }));\n}\nfunction responsiveGridColumnsStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$columns, (columns) => ({ gridTemplateColumns: columns && `repeat(${columns},minmax(0,1fr));` }));\n}\nfunction responsiveGridRowsStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$rows, (rows) => ({ gridTemplateRows: rows && `repeat(${rows},minmax(0,1fr));` }));\n}\nfunction responsiveGridGapStyle(props) {\n\tlet { media, space } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$gap, (gap) => ({ gridGap: gap ? rem(space[gap]) : void 0 }));\n}\nfunction responsiveGridGapXStyle(props) {\n\tlet { media, space } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$gapX, (gapX) => ({ columnGap: gapX ? rem(space[gapX]) : void 0 }));\n}\nfunction responsiveGridGapYStyle(props) {\n\tlet { media, space } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$gapY, (gapY) => ({ rowGap: gapY ? rem(space[gapY]) : void 0 }));\n}\nconst StyledGrid = /* @__PURE__ */ styled(Box).withConfig({\n\tdisplayName: \"StyledGrid\",\n\tcomponentId: \"sc-osmjhz-0\"\n})(responsiveGridStyle), Grid = forwardRef(function Grid(props, ref) {\n\tlet $ = c(44), as, autoCols, autoFlow, autoRows, children, columns, gap, gapX, gapY, gridTemplateColumns, gridTemplateRows, restProps, rows;\n\t$[0] === props ? (as = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], children = $[5], columns = $[6], gap = $[7], gapX = $[8], gapY = $[9], gridTemplateColumns = $[10], gridTemplateRows = $[11], restProps = $[12], rows = $[13]) : ({as, autoRows, autoCols, autoFlow, columns, gridTemplateColumns, gap, gapX, gapY, rows, gridTemplateRows, children, ...restProps} = props, $[0] = props, $[1] = as, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = children, $[6] = columns, $[7] = gap, $[8] = gapX, $[9] = gapY, $[10] = gridTemplateColumns, $[11] = gridTemplateRows, $[12] = restProps, $[13] = rows);\n\tlet t0 = typeof as == \"string\" ? as : void 0, t1;\n\t$[14] === autoRows ? t1 = $[15] : (t1 = _getArrayProp(autoRows), $[14] = autoRows, $[15] = t1);\n\tlet t2;\n\t$[16] === autoCols ? t2 = $[17] : (t2 = _getArrayProp(autoCols), $[16] = autoCols, $[17] = t2);\n\tlet t3;\n\t$[18] === autoFlow ? t3 = $[19] : (t3 = _getArrayProp(autoFlow), $[18] = autoFlow, $[19] = t3);\n\tlet t4 = gridTemplateColumns === void 0 ? columns : gridTemplateColumns, t5;\n\t$[20] === t4 ? t5 = $[21] : (t5 = _getArrayProp(t4), $[20] = t4, $[21] = t5);\n\tlet t6;\n\t$[22] === gap ? t6 = $[23] : (t6 = _getArrayProp(gap), $[22] = gap, $[23] = t6);\n\tlet t7;\n\t$[24] === gapX ? t7 = $[25] : (t7 = _getArrayProp(gapX), $[24] = gapX, $[25] = t7);\n\tlet t8;\n\t$[26] === gapY ? t8 = $[27] : (t8 = _getArrayProp(gapY), $[26] = gapY, $[27] = t8);\n\tlet t9 = gridTemplateRows === void 0 ? rows : gridTemplateRows, t10;\n\t$[28] === t9 ? t10 = $[29] : (t10 = _getArrayProp(t9), $[28] = t9, $[29] = t10);\n\tlet t11;\n\treturn $[30] !== as || $[31] !== children || $[32] !== ref || $[33] !== restProps || $[34] !== t0 || $[35] !== t1 || $[36] !== t10 || $[37] !== t2 || $[38] !== t3 || $[39] !== t5 || $[40] !== t6 || $[41] !== t7 || $[42] !== t8 ? (t11 = /* @__PURE__ */ jsx(StyledGrid, {\n\t\t\"data-as\": t0,\n\t\t\"data-ui\": \"Grid\",\n\t\t...restProps,\n\t\t$autoRows: t1,\n\t\t$autoCols: t2,\n\t\t$autoFlow: t3,\n\t\t$columns: t5,\n\t\t$gap: t6,\n\t\t$gapX: t7,\n\t\t$gapY: t8,\n\t\t$rows: t10,\n\t\tforwardedAs: as,\n\t\tref,\n\t\tchildren\n\t}), $[30] = as, $[31] = children, $[32] = ref, $[33] = restProps, $[34] = t0, $[35] = t1, $[36] = t10, $[37] = t2, $[38] = t3, $[39] = t5, $[40] = t6, $[41] = t7, $[42] = t8, $[43] = t11) : t11 = $[43], t11;\n});\n/**\n* Returns true if a dark color scheme is preferred, false if a light color scheme is preferred or the preference is not known.\n*\n* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-color-scheme: light)` since it's the most common scheme (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)\n*\n* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.\n* Chrome supports reading the `prefers-color-scheme` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Color-Scheme\n* @example https://gist.github.com/stipsan/13c0cccf8dfc34f4b44bb1b984baf7df\n*\n* @public\n*/\nfunction usePrefersDark(t0) {\n\treturn useMatchMedia(\"(prefers-color-scheme: dark)\", t0 === void 0 ? _temp$1 : t0);\n}\nfunction _temp$1() {\n\treturn !1;\n}\n/**\n* @beta\n*/\nfunction useDelayedState(initialState) {\n\tlet $ = c(5), [state, setState] = useState(initialState), delayedAction = useRef(void 0), t0;\n\t$[0] === Symbol.for(\"react.memo_cache_sentinel\") ? (t0 = (nextState, delay) => {\n\t\tlet action = () => {\n\t\t\tsetState(nextState);\n\t\t};\n\t\tif (delayedAction.current &&= (clearTimeout(delayedAction.current), void 0), !delay) return action();\n\t\tdelayedAction.current = setTimeout(action, delay);\n\t}, $[0] = t0) : t0 = $[0];\n\tlet onStateChange = t0, t1, t2;\n\t$[1] === Symbol.for(\"react.memo_cache_sentinel\") ? (t1 = () => () => {\n\t\tdelayedAction.current && clearTimeout(delayedAction.current);\n\t}, t2 = [], $[1] = t1, $[2] = t2) : (t1 = $[1], t2 = $[2]), useEffect(t1, t2);\n\tlet t3;\n\treturn $[3] === state ? t3 = $[4] : (t3 = [state, onStateChange], $[3] = state, $[4] = t3), t3;\n}\nconst DEFAULT_FALLBACK_PLACEMENTS = {\n\ttop: [\n\t\t\"top-end\",\n\t\t\"top-start\",\n\t\t\"bottom\",\n\t\t\"left\",\n\t\t\"right\"\n\t],\n\t\"top-start\": [\n\t\t\"top\",\n\t\t\"top-end\",\n\t\t\"bottom-start\",\n\t\t\"left-start\",\n\t\t\"right-start\"\n\t],\n\t\"top-end\": [\n\t\t\"top\",\n\t\t\"top-start\",\n\t\t\"bottom-end\",\n\t\t\"left-end\",\n\t\t\"right-end\"\n\t],\n\tbottom: [\n\t\t\"bottom-end\",\n\t\t\"bottom-start\",\n\t\t\"top\",\n\t\t\"left\",\n\t\t\"right\"\n\t],\n\t\"bottom-start\": [\n\t\t\"bottom\",\n\t\t\"bottom-end\",\n\t\t\"top-start\",\n\t\t\"left-start\",\n\t\t\"right-start\"\n\t],\n\t\"bottom-end\": [\n\t\t\"bottom\",\n\t\t\"bottom-start\",\n\t\t\"top-end\",\n\t\t\"left-end\",\n\t\t\"right-end\"\n\t],\n\tleft: [\n\t\t\"left-end\",\n\t\t\"left-start\",\n\t\t\"right\",\n\t\t\"top\",\n\t\t\"bottom\"\n\t],\n\t\"left-start\": [\n\t\t\"left\",\n\t\t\"left-end\",\n\t\t\"right-start\",\n\t\t\"top-start\",\n\t\t\"bottom-start\"\n\t],\n\t\"left-end\": [\n\t\t\"left\",\n\t\t\"left-start\",\n\t\t\"right-end\",\n\t\t\"top-end\",\n\t\t\"bottom-end\"\n\t],\n\tright: [\n\t\t\"right-end\",\n\t\t\"right-start\",\n\t\t\"left\",\n\t\t\"top\",\n\t\t\"bottom\"\n\t],\n\t\"right-start\": [\n\t\t\"right\",\n\t\t\"right-end\",\n\t\t\"left-start\",\n\t\t\"top-start\",\n\t\t\"bottom-start\"\n\t],\n\t\"right-end\": [\n\t\t\"right\",\n\t\t\"right-start\",\n\t\t\"left-end\",\n\t\t\"top-end\",\n\t\t\"bottom-end\"\n\t]\n}, MotionCard = styled(motion.create(Card)).withConfig({\n\tdisplayName: \"MotionCard\",\n\tcomponentId: \"sc-k6wgsf-0\"\n})`will-change:transform;`, TooltipCard = forwardRef(function TooltipCard(props, ref) {\n\tlet $ = c(48), animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, restProps, scheme, shadow, style;\n\t$[0] === props ? (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], restProps = $[12], scheme = $[13], shadow = $[14], style = $[15]) : ({animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, scheme, shadow, style, ...restProps} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = restProps, $[13] = scheme, $[14] = shadow, $[15] = style);\n\tlet t0 = animate ? \"transform\" : void 0, t1;\n\t$[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t0 ? (t1 = {\n\t\toriginX,\n\t\toriginY,\n\t\twillChange: t0,\n\t\t...style\n\t}, $[16] = originX, $[17] = originY, $[18] = style, $[19] = t0, $[20] = t1) : t1 = $[20];\n\tlet rootStyle = t1, t2 = arrowX === null ? void 0 : arrowX, t3 = arrowY === null ? void 0 : arrowY, t4;\n\t$[21] !== t2 || $[22] !== t3 ? (t4 = {\n\t\tleft: t2,\n\t\ttop: t3,\n\t\tright: void 0,\n\t\tbottom: void 0\n\t}, $[21] = t2, $[22] = t3, $[23] = t4) : t4 = $[23];\n\tlet arrowStyle = t4, t5 = restProps, t6;\n\t$[24] === animate ? t6 = $[25] : (t6 = animate ? [\"hidden\", \"initial\"] : void 0, $[24] = animate, $[25] = t6);\n\tlet t7;\n\t$[26] === animate ? t7 = $[27] : (t7 = animate ? [\"visible\", \"scaleIn\"] : void 0, $[26] = animate, $[27] = t7);\n\tlet t8;\n\t$[28] === animate ? t8 = $[29] : (t8 = animate ? [\"hidden\", \"scaleOut\"] : void 0, $[28] = animate, $[29] = t8);\n\tlet t9;\n\t$[30] !== arrow || $[31] !== arrowRef || $[32] !== arrowStyle ? (t9 = arrow && /* @__PURE__ */ jsx(Arrow, {\n\t\tref: arrowRef,\n\t\tstyle: arrowStyle,\n\t\twidth: 15,\n\t\theight: 6,\n\t\tradius: 2\n\t}), $[30] = arrow, $[31] = arrowRef, $[32] = arrowStyle, $[33] = t9) : t9 = $[33];\n\tlet t10;\n\treturn $[34] !== children || $[35] !== padding || $[36] !== placement || $[37] !== radius || $[38] !== ref || $[39] !== rootStyle || $[40] !== scheme || $[41] !== shadow || $[42] !== t5 || $[43] !== t6 || $[44] !== t7 || $[45] !== t8 || $[46] !== t9 ? (t10 = /* @__PURE__ */ jsxs(MotionCard, {\n\t\t\"data-ui\": \"Tooltip__card\",\n\t\t...t5,\n\t\t\"data-placement\": placement,\n\t\tpadding,\n\t\tradius,\n\t\tref,\n\t\tscheme,\n\t\tshadow,\n\t\tstyle: rootStyle,\n\t\tvariants: POPOVER_MOTION_PROPS.card,\n\t\ttransition: POPOVER_MOTION_PROPS.transition,\n\t\tinitial: t6,\n\t\tanimate: t7,\n\t\texit: t8,\n\t\tchildren: [children, t9]\n\t}), $[34] = children, $[35] = padding, $[36] = placement, $[37] = radius, $[38] = ref, $[39] = rootStyle, $[40] = scheme, $[41] = shadow, $[42] = t5, $[43] = t6, $[44] = t7, $[45] = t8, $[46] = t9, $[47] = t10) : t10 = $[47], t10;\n}), TooltipDelayGroupContext = createGlobalScopedContext(\"@sanity/ui/context/tooltipDelayGroup\", null);\n/**\n* @beta\n*/\nfunction useTooltipDelayGroup() {\n\treturn useContext(TooltipDelayGroupContext);\n}\nconst StyledTooltip = styled(Layer).withConfig({\n\tdisplayName: \"StyledTooltip\",\n\tcomponentId: \"sc-4nppkj-0\"\n})`pointer-events:none;`, Tooltip = forwardRef(function Tooltip(props, forwardedRef) {\n\tlet $ = c(137), boundaryElementContext = useBoundaryElement(), { layer } = useTheme_v2(), _boundaryElement, _fallbackPlacementsProp, _zOffset, childProp, content, delay, disabled, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5;\n\t$[0] === props ? (_boundaryElement = $[1], _fallbackPlacementsProp = $[2], _zOffset = $[3], childProp = $[4], content = $[5], delay = $[6], disabled = $[7], portalProp = $[8], restProps = $[9], scheme = $[10], t0 = $[11], t1 = $[12], t2 = $[13], t3 = $[14], t4 = $[15], t5 = $[16]) : ({animate: t0, arrow: t1, boundaryElement: _boundaryElement, children: childProp, content, disabled, fallbackPlacements: _fallbackPlacementsProp, padding: t2, placement: t3, portal: portalProp, radius: t4, scheme, shadow: t5, zOffset: _zOffset, delay, ...restProps} = props, $[0] = props, $[1] = _boundaryElement, $[2] = _fallbackPlacementsProp, $[3] = _zOffset, $[4] = childProp, $[5] = content, $[6] = delay, $[7] = disabled, $[8] = portalProp, $[9] = restProps, $[10] = scheme, $[11] = t0, $[12] = t1, $[13] = t2, $[14] = t3, $[15] = t4, $[16] = t5);\n\tlet _animate = t0 !== void 0 && t0, arrowProp = t1 !== void 0 && t1, padding = t2 === void 0 ? 2 : t2, placementProp = t3 === void 0 ? \"bottom\" : t3, radius = t4 === void 0 ? 2 : t4, shadow = t5 === void 0 ? 2 : t5, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacementsProp = _fallbackPlacementsProp ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? \"bottom\"], zOffset = _zOffset ?? layer.tooltip.zOffset, animate = !usePrefersReducedMotion() && _animate, t6;\n\t$[17] === fallbackPlacementsProp ? t6 = $[18] : (t6 = _getArrayProp(fallbackPlacementsProp), $[17] = fallbackPlacementsProp, $[18] = t6);\n\tlet fallbackPlacements = t6, ref = useRef(null), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), [tooltipMaxWidth, setTooltipMaxWidth] = useState(0), t7;\n\t$[19] === Symbol.for(\"react.memo_cache_sentinel\") ? (t7 = () => ref.current, $[19] = t7) : t7 = $[19], useImperativeHandle(forwardedRef, t7);\n\tlet portal = usePortal(), portalElement = typeof portalProp == \"string\" ? portal.elements?.[portalProp] || null : portal.element, t8;\n\t$[20] !== animate || $[21] !== arrowProp || $[22] !== boundaryElement || $[23] !== fallbackPlacements ? (t8 = {\n\t\tanimate,\n\t\tarrowProp,\n\t\tarrowRef,\n\t\tboundaryElement,\n\t\tfallbackPlacements,\n\t\trootBoundary: \"viewport\"\n\t}, $[20] = animate, $[21] = arrowProp, $[22] = boundaryElement, $[23] = fallbackPlacements, $[24] = t8) : t8 = $[24];\n\tlet middleware = useMiddleware(t8), t9;\n\t$[25] === referenceElement ? t9 = $[26] : (t9 = { reference: referenceElement }, $[25] = referenceElement, $[26] = t9);\n\tlet t10;\n\t$[27] !== middleware || $[28] !== placementProp || $[29] !== t9 ? (t10 = {\n\t\tmiddleware,\n\t\tplacement: placementProp,\n\t\twhileElementsMounted: autoUpdate,\n\t\telements: t9\n\t}, $[27] = middleware, $[28] = placementProp, $[29] = t9, $[30] = t10) : t10 = $[30];\n\tlet { floatingStyles, placement, middlewareData, refs, update } = useFloating(t10), arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData[\"@sanity/ui/origin\"]?.originX, originY = middlewareData[\"@sanity/ui/origin\"]?.originY, tooltipId = useId(), [isOpen, setIsOpen] = useDelayedState(!1), delayGroupContext = useTooltipDelayGroup(), t11;\n\t$[31] === delayGroupContext ? t11 = $[32] : (t11 = delayGroupContext || {}, $[31] = delayGroupContext, $[32] = t11);\n\tlet { setIsGroupActive, setOpenTooltipId } = t11, showTooltip = isOpen || delayGroupContext?.openTooltipId === tooltipId, isInsideGroup = delayGroupContext !== null, openDelayProp = typeof delay == \"number\" ? delay : delay?.open || 0, closeDelayProp = typeof delay == \"number\" ? delay : delay?.close || 0, openDelay = isInsideGroup ? delayGroupContext.openDelay : openDelayProp, closeDelay = isInsideGroup ? delayGroupContext.closeDelay : closeDelayProp, t12;\n\t$[33] !== closeDelay || $[34] !== isInsideGroup || $[35] !== openDelay || $[36] !== setIsGroupActive || $[37] !== setIsOpen || $[38] !== setOpenTooltipId || $[39] !== tooltipId ? (t12 = (open, immediate) => {\n\t\tif (isInsideGroup) if (open) {\n\t\t\tlet groupedOpenDelay = immediate ? 0 : openDelay;\n\t\t\tsetIsGroupActive?.(open, groupedOpenDelay), setOpenTooltipId?.(tooltipId, groupedOpenDelay);\n\t\t} else setIsGroupActive?.(open, closeDelay > 200 ? closeDelay : 200), setOpenTooltipId?.(null, immediate ? 0 : closeDelay);\n\t\telse setIsOpen(open, immediate ? 0 : open ? openDelay : closeDelay);\n\t}, $[33] = closeDelay, $[34] = isInsideGroup, $[35] = openDelay, $[36] = setIsGroupActive, $[37] = setIsOpen, $[38] = setOpenTooltipId, $[39] = tooltipId, $[40] = t12) : t12 = $[40];\n\tlet handleIsOpenChange = t12, t13;\n\t$[41] !== childProp?.props || $[42] !== handleIsOpenChange ? (t13 = (e) => {\n\t\thandleIsOpenChange(!1), childProp?.props?.onBlur?.(e);\n\t}, $[41] = childProp?.props, $[42] = handleIsOpenChange, $[43] = t13) : t13 = $[43], childProp?.props;\n\tlet handleBlur = t13, t14;\n\t$[44] !== childProp?.props || $[45] !== handleIsOpenChange ? (t14 = (e_0) => {\n\t\thandleIsOpenChange(!1, !0), childProp?.props.onClick?.(e_0);\n\t}, $[44] = childProp?.props, $[45] = handleIsOpenChange, $[46] = t14) : t14 = $[46], childProp?.props;\n\tlet handleClick = t14, t15;\n\t$[47] !== childProp?.props || $[48] !== handleIsOpenChange ? (t15 = (e_1) => {\n\t\thandleIsOpenChange(!1, !0), childProp?.props.onContextMenu?.(e_1);\n\t}, $[47] = childProp?.props, $[48] = handleIsOpenChange, $[49] = t15) : t15 = $[49], childProp?.props;\n\tlet handleContextMenu = t15, t16;\n\t$[50] !== childProp?.props || $[51] !== handleIsOpenChange ? (t16 = (e_2) => {\n\t\thandleIsOpenChange(!0), childProp?.props?.onFocus?.(e_2);\n\t}, $[50] = childProp?.props, $[51] = handleIsOpenChange, $[52] = t16) : t16 = $[52], childProp?.props;\n\tlet handleFocus = t16, t17;\n\t$[53] !== childProp?.props || $[54] !== handleIsOpenChange ? (t17 = (e_3) => {\n\t\thandleIsOpenChange(!0), childProp?.props?.onMouseEnter?.(e_3);\n\t}, $[53] = childProp?.props, $[54] = handleIsOpenChange, $[55] = t17) : t17 = $[55], childProp?.props;\n\tlet handleMouseEnter = t17, t18;\n\t$[56] !== childProp?.props || $[57] !== handleIsOpenChange ? (t18 = (e_4) => {\n\t\thandleIsOpenChange(!1), childProp?.props?.onMouseLeave?.(e_4);\n\t}, $[56] = childProp?.props, $[57] = handleIsOpenChange, $[58] = t18) : t18 = $[58], childProp?.props;\n\tlet handleMouseLeave = t18, t19;\n\t$[59] !== handleIsOpenChange || $[60] !== isInsideGroup || $[61] !== referenceElement || $[62] !== showTooltip ? (t19 = {\n\t\thandleIsOpenChange,\n\t\treferenceElement,\n\t\tshowTooltip,\n\t\tisInsideGroup\n\t}, $[59] = handleIsOpenChange, $[60] = isInsideGroup, $[61] = referenceElement, $[62] = showTooltip, $[63] = t19) : t19 = $[63], useCloseOnMouseLeave(t19);\n\tlet t20, t21;\n\t$[64] !== disabled || $[65] !== handleIsOpenChange || $[66] !== showTooltip ? (t20 = () => {\n\t\tdisabled && showTooltip && handleIsOpenChange(!1);\n\t}, t21 = [\n\t\tdisabled,\n\t\thandleIsOpenChange,\n\t\tshowTooltip\n\t], $[64] = disabled, $[65] = handleIsOpenChange, $[66] = showTooltip, $[67] = t20, $[68] = t21) : (t20 = $[67], t21 = $[68]), useEffect(t20, t21);\n\tlet t22, t23;\n\t$[69] !== content || $[70] !== handleIsOpenChange || $[71] !== showTooltip ? (t22 = () => {\n\t\t!content && showTooltip && handleIsOpenChange(!1);\n\t}, t23 = [\n\t\tcontent,\n\t\thandleIsOpenChange,\n\t\tshowTooltip\n\t], $[69] = content, $[70] = handleIsOpenChange, $[71] = showTooltip, $[72] = t22, $[73] = t23) : (t22 = $[72], t23 = $[73]), useEffect(t22, t23);\n\tlet t24, t25;\n\t$[74] !== handleIsOpenChange || $[75] !== showTooltip ? (t24 = () => {\n\t\tif (!showTooltip) return;\n\t\tlet handleWindowKeyDown = function handleWindowKeyDown(event) {\n\t\t\tevent.key === \"Escape\" && handleIsOpenChange(!1, !0);\n\t\t};\n\t\treturn window.addEventListener(\"keydown\", handleWindowKeyDown), () => {\n\t\t\twindow.removeEventListener(\"keydown\", handleWindowKeyDown);\n\t\t};\n\t}, t25 = [handleIsOpenChange, showTooltip], $[74] = handleIsOpenChange, $[75] = showTooltip, $[76] = t24, $[77] = t25) : (t24 = $[76], t25 = $[77]), useEffect(t24, t25);\n\tlet t26;\n\t$[78] !== boundaryElement || $[79] !== portalElement?.offsetWidth ? (t26 = () => {\n\t\tlet availableWidths = [...boundaryElement ? [boundaryElement.offsetWidth] : [], portalElement?.offsetWidth || document.body.offsetWidth];\n\t\tsetTooltipMaxWidth(Math.min(...availableWidths) - 8);\n\t}, $[78] = boundaryElement, $[79] = portalElement?.offsetWidth, $[80] = t26) : t26 = $[80];\n\tlet t27;\n\t$[81] !== boundaryElement || $[82] !== portalElement ? (t27 = [boundaryElement, portalElement], $[81] = boundaryElement, $[82] = portalElement, $[83] = t27) : t27 = $[83], useLayoutEffect(t26, t27);\n\tlet t28;\n\t$[84] === update ? t28 = $[85] : (t28 = (arrowEl) => {\n\t\tarrowRef.current = arrowEl, update();\n\t}, $[84] = update, $[85] = t28);\n\tlet setArrow = t28, t29;\n\t$[86] === refs ? t29 = $[87] : (t29 = (node) => {\n\t\tref.current = node, refs.setFloating(node);\n\t}, $[86] = refs, $[87] = t29);\n\tlet setFloating = t29, t30;\n\tbb0: {\n\t\tif (!childProp) {\n\t\t\tt30 = null;\n\t\t\tbreak bb0;\n\t\t}\n\t\tlet t31;\n\t\t$[88] !== childProp || $[89] !== handleBlur || $[90] !== handleClick || $[91] !== handleContextMenu || $[92] !== handleFocus || $[93] !== handleMouseEnter || $[94] !== handleMouseLeave ? (t31 = cloneElement(childProp, {\n\t\t\tonBlur: handleBlur,\n\t\t\tonFocus: handleFocus,\n\t\t\tonMouseEnter: handleMouseEnter,\n\t\t\tonMouseLeave: handleMouseLeave,\n\t\t\tonClick: handleClick,\n\t\t\tonContextMenu: handleContextMenu,\n\t\t\tref: setReferenceElement\n\t\t}), $[88] = childProp, $[89] = handleBlur, $[90] = handleClick, $[91] = handleContextMenu, $[92] = handleFocus, $[93] = handleMouseEnter, $[94] = handleMouseLeave, $[95] = t31) : t31 = $[95], t30 = t31;\n\t}\n\tlet child = t30, t31;\n\t$[96] === childProp ? t31 = $[97] : (t31 = childProp ? getElementRef(childProp) : null, $[96] = childProp, $[97] = t31);\n\tlet t32, t33;\n\tif ($[98] === referenceElement ? (t32 = $[99], t33 = $[100]) : (t32 = () => referenceElement, t33 = [referenceElement], $[98] = referenceElement, $[99] = t32, $[100] = t33), useImperativeHandle(t31, t32, t33), !child) {\n\t\tlet t34;\n\t\treturn $[101] === Symbol.for(\"react.memo_cache_sentinel\") ? (t34 = /* @__PURE__ */ jsx(Fragment$1, {}), $[101] = t34) : t34 = $[101], t34;\n\t}\n\tif (disabled) return child;\n\tlet t34 = tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0, t35;\n\t$[102] !== floatingStyles || $[103] !== t34 ? (t35 = {\n\t\t...floatingStyles,\n\t\tmaxWidth: t34\n\t}, $[102] = floatingStyles, $[103] = t34, $[104] = t35) : t35 = $[104];\n\tlet t36;\n\t$[105] !== animate || $[106] !== arrowProp || $[107] !== arrowX || $[108] !== arrowY || $[109] !== content || $[110] !== originX || $[111] !== originY || $[112] !== padding || $[113] !== placement || $[114] !== radius || $[115] !== restProps || $[116] !== scheme || $[117] !== setArrow || $[118] !== setFloating || $[119] !== shadow ? (t36 = /* @__PURE__ */ jsx(TooltipCard, {\n\t\t...restProps,\n\t\tanimate,\n\t\tarrow: arrowProp,\n\t\tarrowRef: setArrow,\n\t\tarrowX,\n\t\tarrowY,\n\t\toriginX,\n\t\toriginY,\n\t\tpadding,\n\t\tplacement,\n\t\tradius,\n\t\tref: setFloating,\n\t\tscheme,\n\t\tshadow,\n\t\tchildren: content\n\t}), $[105] = animate, $[106] = arrowProp, $[107] = arrowX, $[108] = arrowY, $[109] = content, $[110] = originX, $[111] = originY, $[112] = padding, $[113] = placement, $[114] = radius, $[115] = restProps, $[116] = scheme, $[117] = setArrow, $[118] = setFloating, $[119] = shadow, $[120] = t36) : t36 = $[120];\n\tlet t37;\n\t$[121] !== restProps || $[122] !== setFloating || $[123] !== t35 || $[124] !== t36 || $[125] !== zOffset ? (t37 = /* @__PURE__ */ jsx(StyledTooltip, {\n\t\t\"data-ui\": \"Tooltip\",\n\t\t...restProps,\n\t\tref: setFloating,\n\t\tstyle: t35,\n\t\tzOffset,\n\t\tchildren: t36\n\t}), $[121] = restProps, $[122] = setFloating, $[123] = t35, $[124] = t36, $[125] = zOffset, $[126] = t37) : t37 = $[126];\n\tlet tooltip = t37, t38;\n\t$[127] !== portalProp || $[128] !== showTooltip || $[129] !== tooltip ? (t38 = showTooltip && (portalProp ? /* @__PURE__ */ jsx(Portal, {\n\t\t__unstable_name: typeof portalProp == \"string\" ? portalProp : void 0,\n\t\tchildren: tooltip\n\t}) : tooltip), $[127] = portalProp, $[128] = showTooltip, $[129] = tooltip, $[130] = t38) : t38 = $[130];\n\tlet children = t38, t39;\n\t$[131] !== animate || $[132] !== children ? (t39 = animate ? /* @__PURE__ */ jsx(AnimatePresence, { children }) : children, $[131] = animate, $[132] = children, $[133] = t39) : t39 = $[133];\n\tlet t40;\n\treturn $[134] !== child || $[135] !== t39 ? (t40 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t39, child] }), $[134] = child, $[135] = t39, $[136] = t40) : t40 = $[136], t40;\n});\nfunction useMiddleware(t0) {\n\tlet $ = c(17), { animate, arrowProp, arrowRef, boundaryElement, fallbackPlacements, rootBoundary } = t0, ret;\n\tif ($[0] !== animate || $[1] !== arrowProp || $[2] !== arrowRef || $[3] !== boundaryElement || $[4] !== fallbackPlacements || $[5] !== rootBoundary) {\n\t\tret = [];\n\t\tlet t1 = boundaryElement || void 0, t2;\n\t\t$[7] !== fallbackPlacements || $[8] !== rootBoundary || $[9] !== t1 ? (t2 = flip({\n\t\t\tboundary: t1,\n\t\t\tfallbackPlacements,\n\t\t\tpadding: 4,\n\t\t\trootBoundary\n\t\t}), $[7] = fallbackPlacements, $[8] = rootBoundary, $[9] = t1, $[10] = t2) : t2 = $[10], ret.push(t2);\n\t\tlet t3;\n\t\t$[11] === Symbol.for(\"react.memo_cache_sentinel\") ? (t3 = offset({ mainAxis: 4 }), $[11] = t3) : t3 = $[11], ret.push(t3);\n\t\tlet t4 = boundaryElement || void 0, t5;\n\t\tif ($[12] !== rootBoundary || $[13] !== t4 ? (t5 = shift({\n\t\t\tboundary: t4,\n\t\t\trootBoundary,\n\t\t\tpadding: 4\n\t\t}), $[12] = rootBoundary, $[13] = t4, $[14] = t5) : t5 = $[14], ret.push(t5), arrowProp) {\n\t\t\tlet t6;\n\t\t\t$[15] === arrowRef ? t6 = $[16] : (t6 = arrow({\n\t\t\t\telement: arrowRef,\n\t\t\t\tpadding: 4\n\t\t\t}), $[15] = arrowRef, $[16] = t6), ret.push(t6);\n\t\t}\n\t\tanimate && ret.push(origin), $[0] = animate, $[1] = arrowProp, $[2] = arrowRef, $[3] = boundaryElement, $[4] = fallbackPlacements, $[5] = rootBoundary, $[6] = ret;\n\t} else ret = $[6];\n\treturn ret;\n}\n/**\n* As `useEffectEvent` should never be passed to other components or hooks, this custom hook groups together the `useEffectEvent` and the `useEffect` hook using it.\n* @see https://19.react.dev/learn/separating-events-from-effects#reading-latest-props-and-state-with-effect-events:~:text=Never%20pass%20them%20to%20other%20components%20or%20Hooks\n*/\nfunction useCloseOnMouseLeave(t0) {\n\tlet $ = c(10), { handleIsOpenChange, referenceElement, showTooltip, isInsideGroup } = t0, t1;\n\t$[0] !== handleIsOpenChange || $[1] !== referenceElement ? (t1 = (target, teardown) => {\n\t\treferenceElement && (referenceElement === target || target instanceof Node && referenceElement.contains(target) || (handleIsOpenChange(!1), teardown()));\n\t}, $[0] = handleIsOpenChange, $[1] = referenceElement, $[2] = t1) : t1 = $[2];\n\tlet onMouseMove = useEffectEvent(t1), t2;\n\t$[3] !== isInsideGroup || $[4] !== onMouseMove || $[5] !== showTooltip ? (t2 = () => {\n\t\tif (!showTooltip || isInsideGroup) return;\n\t\tlet handleMouseMove = (event) => {\n\t\t\tonMouseMove(event.target, () => window.removeEventListener(\"mousemove\", handleMouseMove));\n\t\t};\n\t\treturn window.addEventListener(\"mousemove\", handleMouseMove), () => window.removeEventListener(\"mousemove\", handleMouseMove);\n\t}, $[3] = isInsideGroup, $[4] = onMouseMove, $[5] = showTooltip, $[6] = t2) : t2 = $[6];\n\tlet t3;\n\t$[7] !== isInsideGroup || $[8] !== showTooltip ? (t3 = [isInsideGroup, showTooltip], $[7] = isInsideGroup, $[8] = showTooltip, $[9] = t3) : t3 = $[9], useEffect(t2, t3);\n}\n/**\n* @public\n*/\nfunction PortalProvider(props) {\n\tlet $ = c(7), { boundaryElement, children, element, __unstable_elements: elements } = props, fallbackElement = useSyncExternalStore(emptySubscribe, _temp, _temp2), t0 = boundaryElement || null, t1 = element || fallbackElement, t2;\n\t$[0] !== elements || $[1] !== t0 || $[2] !== t1 ? (t2 = {\n\t\tversion: 0,\n\t\tboundaryElement: t0,\n\t\telement: t1,\n\t\telements\n\t}, $[0] = elements, $[1] = t0, $[2] = t1, $[3] = t2) : t2 = $[3];\n\tlet value = t2, t3;\n\treturn $[4] !== children || $[5] !== value ? (t3 = /* @__PURE__ */ jsx(PortalContext.Provider, {\n\t\tvalue,\n\t\tchildren\n\t}), $[4] = children, $[5] = value, $[6] = t3) : t3 = $[6], t3;\n}\nfunction _temp2() {\n\treturn null;\n}\nfunction _temp() {\n\treturn document.body;\n}\nconst emptySubscribe = () => () => {};\nexport { Spinner as $, Arrow as A, parseColor as At, useMediaIndex as B, textInputRepresentationStyle as C, isHTMLTextAreaElement as Ct, useCustomValidity as D, hexToRgb as Dt, responsiveInputPaddingStyle as E, createColorTheme as Et, useBoundaryElement as F, studioTheme as Ft, ThemeColorProvider as G, _elementSizeObserver as H, BoundaryElementContext as I, createGlobalScopedContext as J, useRootTheme as K, isRecord as L, usePortal as M, rgbToHsl as Mt, useLayer as N, rgba as Nt, Stack as O, hslToRgb as Ot, LayerProvider as P, screen as Pt, _cardColorStyle as Q, usePrefersReducedMotion as R, textInputFontSizeStyle as S, isHTMLSelectElement as St, responsiveInputPaddingIconRightStyle as T, EMPTY_RECORD as Tt, _ResizeObserver as U, useElementSize as V, Card as W, focusRingBorderStyle as X, Button as Y, focusRingStyle as Z, Layer as _, containsOrEqualsElement as _t, useDelayedState as a, Flex as at, TextInput as b, isHTMLElement as bt, TabList as c, responsiveRadiusStyle as ct, MenuGroup as d, _fillCSSObject as dt, Text as et, MenuDivider as f, _getArrayProp as ft, Inline as g, _isEnterToClickElement as gt, KBD as h, rem as ht, TooltipDelayGroupContext as i, responsiveTextAlignStyle as it, Portal as j, rgbToHex as jt, Popover as k, multiply as kt, Tab as l, Box as lt, Hotkeys as m, _responsive as mt, Tooltip as n, responsiveTextFont as nt, usePrefersDark as o, useTheme$1 as ot, Menu as p, _getResponsiveSpace as pt, ThemeProvider$1 as q, useTooltipDelayGroup as r, responsiveFont as rt, Grid as s, useTheme_v2 as st, PortalProvider as t, SpanWithTextOverflow as tt, MenuItem as u, responsivePaddingStyle as ut, useGlobalKeyDown as v, isHTMLAnchorElement as vt, textInputRootStyle as w, EMPTY_ARRAY as wt, textInputBaseStyle as x, isHTMLInputElement as xt, useClickOutsideEvent as y, isHTMLButtonElement as yt, useMatchMedia as z };\n\n//# sourceMappingURL=portalProvider.js.map","\"use client\";\nimport { i as getTheme_v2 } from \"./_chunks/getScopedTheme.js\";\nimport { $ as Spinner, A as Arrow, At as parseColor, B as useMediaIndex, C as textInputRepresentationStyle, Ct as isHTMLTextAreaElement, D as useCustomValidity, Dt as hexToRgb, E as responsiveInputPaddingStyle, Et as createColorTheme, F as useBoundaryElement, Ft as studioTheme, G as ThemeColorProvider, H as _elementSizeObserver, I as BoundaryElementContext, J as createGlobalScopedContext, K as useRootTheme, L as isRecord, M as usePortal, Mt as rgbToHsl, N as useLayer, Nt as rgba, O as Stack, Ot as hslToRgb, P as LayerProvider, Pt as screen, Q as _cardColorStyle, R as usePrefersReducedMotion, S as textInputFontSizeStyle, St as isHTMLSelectElement, T as responsiveInputPaddingIconRightStyle, Tt as EMPTY_RECORD, U as _ResizeObserver, V as useElementSize, W as Card, X as focusRingBorderStyle, Y as Button, Z as focusRingStyle, _ as Layer, _t as containsOrEqualsElement, a as useDelayedState, at as Flex, b as TextInput, bt as isHTMLElement, c as TabList, ct as responsiveRadiusStyle, d as MenuGroup, dt as _fillCSSObject, et as Text, f as MenuDivider, ft as _getArrayProp, g as Inline, gt as _isEnterToClickElement, h as KBD, ht as rem, i as TooltipDelayGroupContext, it as responsiveTextAlignStyle, j as Portal, jt as rgbToHex, k as Popover, kt as multiply, l as Tab, lt as Box, m as Hotkeys, mt as _responsive, n as Tooltip, nt as responsiveTextFont, o as usePrefersDark, ot as useTheme, p as Menu, pt as _getResponsiveSpace, q as ThemeProvider, r as useTooltipDelayGroup, rt as responsiveFont, s as Grid, st as useTheme_v2, t as PortalProvider, tt as SpanWithTextOverflow, u as MenuItem, ut as responsivePaddingStyle, v as useGlobalKeyDown, vt as isHTMLAnchorElement, w as textInputRootStyle, wt as EMPTY_ARRAY, x as textInputBaseStyle, xt as isHTMLInputElement, y as useClickOutsideEvent, yt as isHTMLButtonElement, z as useMatchMedia } from \"./_chunks/portalProvider.js\";\nimport { c } from \"react-compiler-runtime\";\nimport { ChevronDownIcon } from \"@sanity/icons/ChevronDown\";\nimport { Children, Component, Fragment, Suspense, cloneElement, forwardRef, isValidElement, lazy, startTransition, useContext, useEffect, useId, useImperativeHandle, useReducer, useRef, useState, useSyncExternalStore } from \"react\";\nimport { css, keyframes, styled } from \"styled-components\";\nimport { Fragment as Fragment$1, jsx, jsxs } from \"react/jsx-runtime\";\nimport ReactIs from \"react-is\";\nimport { SpinnerIcon } from \"@sanity/icons/Spinner\";\nimport { AnimatePresence, motion, stagger } from \"motion/react\";\nimport { CloseIcon } from \"@sanity/icons/Close\";\nimport { ToggleArrowRightIcon } from \"@sanity/icons/ToggleArrowRight\";\nimport { CheckmarkIcon } from \"@sanity/icons/Checkmark\";\nimport { RemoveIcon } from \"@sanity/icons/Remove\";\n/**\n* @internal\n*/\nfunction _raf(fn) {\n\tlet frameId = requestAnimationFrame(fn);\n\treturn () => {\n\t\tcancelAnimationFrame(frameId);\n\t};\n}\n/**\n* @internal\n*/\nfunction _raf2(fn) {\n\tlet innerDispose = null, outerDispose = _raf(() => {\n\t\tinnerDispose = _raf(fn);\n\t});\n\treturn () => {\n\t\tinnerDispose && innerDispose(), outerDispose();\n\t};\n}\n/**\n* @internal\n*/\nfunction _hasFocus(element) {\n\treturn !!document.activeElement && element.contains(document.activeElement);\n}\n/**\n* @internal\n*/\nfunction isFocusable(element) {\n\treturn element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute(\"tabIndex\") !== null ? !0 : isHTMLAnchorElement(element) ? !!element.href && element.rel !== \"ignore\" : isHTMLInputElement(element) ? element.type !== \"hidden\" && element.type !== \"file\" && !element.disabled : isHTMLButtonElement(element) || isHTMLSelectElement(element) || isHTMLTextAreaElement(element) ? !element.disabled : !1;\n}\n/**\n* @internal\n*/\nfunction attemptFocus(element) {\n\tif (!isFocusable(element)) return !1;\n\ttry {\n\t\telement.focus();\n\t} catch {}\n\treturn document.activeElement === element;\n}\n/**\n* @internal\n*/\nfunction focusFirstDescendant(element) {\n\tfor (let i = 0; i < element.childNodes.length; i++) {\n\t\tlet child = element.childNodes[i];\n\t\tif (isHTMLElement(child) && (attemptFocus(child) || focusFirstDescendant(child))) return !0;\n\t}\n\treturn !1;\n}\n/**\n* @internal\n*/\nfunction focusLastDescendant(element) {\n\tfor (let i = element.childNodes.length - 1; i >= 0; i--) {\n\t\tlet child = element.childNodes[i];\n\t\tif (isHTMLElement(child) && (attemptFocus(child) || focusLastDescendant(child))) return !0;\n\t}\n\treturn !1;\n}\n/**\n* @internal\n*/\nconst StyledAutocomplete = styled.div.withConfig({\n\tdisplayName: \"StyledAutocomplete\",\n\tcomponentId: \"sc-ilitn5-0\"\n})`line-height:0;`, ListBox = styled(Box).withConfig({\n\tdisplayName: \"ListBox\",\n\tcomponentId: \"sc-ilitn5-1\"\n})`& > ul{list-style:none;padding:0;margin:0;}`, rotate = keyframes`from{transform:rotate(0deg);}to{transform:rotate(360deg);}`, AnimatedSpinnerIcon = styled(SpinnerIcon).withConfig({\n\tdisplayName: \"AnimatedSpinnerIcon\",\n\tcomponentId: \"sc-ilitn5-2\"\n})`animation:${rotate} 500ms linear infinite;`;\nfunction AutocompleteOption(props) {\n\tlet $ = c(11), { children, id, onSelect, selected, value } = props, t0;\n\t$[0] !== onSelect || $[1] !== value ? (t0 = () => {\n\t\tsetTimeout(() => {\n\t\t\tonSelect(value);\n\t\t}, 0);\n\t}, $[0] = onSelect, $[1] = value, $[2] = t0) : t0 = $[2];\n\tlet handleClick = t0, t1;\n\t$[3] === handleClick ? t1 = $[4] : (t1 = (event) => {\n\t\tevent.key === \"Enter\" && !_isEnterToClickElement(event.currentTarget) && handleClick();\n\t}, $[3] = handleClick, $[4] = t1);\n\tlet handleKeyDown = t1, t2;\n\treturn $[5] !== children || $[6] !== handleClick || $[7] !== handleKeyDown || $[8] !== id || $[9] !== selected ? (t2 = /* @__PURE__ */ jsx(\"li\", {\n\t\t\"aria-selected\": selected,\n\t\t\"data-ui\": \"AutocompleteOption\",\n\t\tid,\n\t\trole: \"option\",\n\t\tonClick: handleClick,\n\t\tonKeyDown: handleKeyDown,\n\t\tchildren\n\t}), $[5] = children, $[6] = handleClick, $[7] = handleKeyDown, $[8] = id, $[9] = selected, $[10] = t2) : t2 = $[10], t2;\n}\n/**\n* @internal\n*/\nfunction autocompleteReducer(state, msg) {\n\treturn msg.type === \"input/change\" ? {\n\t\t...state,\n\t\tactiveValue: null,\n\t\tfocused: !0,\n\t\tquery: msg.query\n\t} : msg.type === \"input/focus\" ? {\n\t\t...state,\n\t\tfocused: !0\n\t} : msg.type === \"root/blur\" ? {\n\t\t...state,\n\t\tfocused: !1,\n\t\tquery: null\n\t} : msg.type === \"root/clear\" ? {\n\t\t...state,\n\t\tactiveValue: null,\n\t\tquery: null,\n\t\tvalue: null\n\t} : msg.type === \"root/escape\" ? {\n\t\t...state,\n\t\tfocused: !1,\n\t\tquery: null\n\t} : msg.type === \"root/open\" ? {\n\t\t...state,\n\t\tquery: state.query || msg.query\n\t} : msg.type === \"root/setActiveValue\" ? {\n\t\t...state,\n\t\tactiveValue: msg.value,\n\t\tlistFocused: msg.listFocused || state.listFocused\n\t} : msg.type === \"root/setListFocused\" ? {\n\t\t...state,\n\t\tlistFocused: msg.listFocused\n\t} : msg.type === \"value/change\" ? {\n\t\t...state,\n\t\tactiveValue: msg.value,\n\t\tquery: null,\n\t\tvalue: msg.value\n\t} : state;\n}\n/**\n* @internal\n*/\nconst AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [\n\t\"Control\",\n\t\"Shift\",\n\t\"Alt\",\n\t\"Enter\",\n\t\"Home\",\n\t\"End\",\n\t\"PageUp\",\n\t\"PageDown\",\n\t\"Meta\",\n\t\"Tab\",\n\t\"CapsLock\"\n], AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS = [\"bottom-start\", \"top-start\"], DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, DEFAULT_FILTER_OPTION = (query, option) => option.value.toLowerCase().indexOf(query.toLowerCase()) > -1, InnerAutocomplete = forwardRef(function Autocomplete(props, forwardedRef) {\n\tlet $ = c(181), customValidity, disabled, filterOptionProp, icon, id, loading, onBlur, onChange, onFocus, onQueryChange, onSelect, openButton, openOnFocus, optionsProp, prefix, readOnly, relatedElements, renderOptionProp, renderPopover, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, valueProp;\n\t$[0] === props ? (customValidity = $[1], disabled = $[2], filterOptionProp = $[3], icon = $[4], id = $[5], loading = $[6], onBlur = $[7], onChange = $[8], onFocus = $[9], onQueryChange = $[10], onSelect = $[11], openButton = $[12], openOnFocus = $[13], optionsProp = $[14], prefix = $[15], readOnly = $[16], relatedElements = $[17], renderOptionProp = $[18], renderPopover = $[19], restProps = $[20], suffix = $[21], t0 = $[22], t1 = $[23], t2 = $[24], t3 = $[25], t4 = $[26], t5 = $[27], t6 = $[28], valueProp = $[29]) : ({border: t0, customValidity, disabled, filterOption: filterOptionProp, fontSize: t1, icon, id, listBox: t2, loading, onBlur, onChange, onFocus, onQueryChange, onSelect, openButton, openOnFocus, options: optionsProp, padding: t3, popover: t4, prefix, radius: t5, readOnly, relatedElements, renderOption: renderOptionProp, renderPopover, renderValue: t6, suffix, value: valueProp, ...restProps} = props, $[0] = props, $[1] = customValidity, $[2] = disabled, $[3] = filterOptionProp, $[4] = icon, $[5] = id, $[6] = loading, $[7] = onBlur, $[8] = onChange, $[9] = onFocus, $[10] = onQueryChange, $[11] = onSelect, $[12] = openButton, $[13] = openOnFocus, $[14] = optionsProp, $[15] = prefix, $[16] = readOnly, $[17] = relatedElements, $[18] = renderOptionProp, $[19] = renderPopover, $[20] = restProps, $[21] = suffix, $[22] = t0, $[23] = t1, $[24] = t2, $[25] = t3, $[26] = t4, $[27] = t5, $[28] = t6, $[29] = valueProp);\n\tlet border = t0 === void 0 || t0, fontSize = t1 === void 0 ? 2 : t1, listBox = t2 === void 0 ? EMPTY_RECORD : t2, paddingProp = t3 === void 0 ? 3 : t3, popover = t4 === void 0 ? EMPTY_RECORD : t4, radius = t5 === void 0 ? 2 : t5, renderValue = t6 === void 0 ? DEFAULT_RENDER_VALUE : t6, t7 = valueProp || null, t8 = valueProp || null, t9;\n\t$[30] !== t7 || $[31] !== t8 ? (t9 = {\n\t\tactiveValue: t7,\n\t\tfocused: !1,\n\t\tlistFocused: !1,\n\t\tquery: null,\n\t\tvalue: t8\n\t}, $[30] = t7, $[31] = t8, $[32] = t9) : t9 = $[32];\n\tlet [state, dispatch] = useReducer(autocompleteReducer, t9), { activeValue, focused, listFocused, query, value } = state, t10;\n\t$[33] !== fontSize || $[34] !== paddingProp ? (t10 = (t11) => {\n\t\tlet { value: value_0 } = t11;\n\t\treturn /* @__PURE__ */ jsx(Card, {\n\t\t\t\"data-as\": \"button\",\n\t\t\tpadding: paddingProp,\n\t\t\tradius: 2,\n\t\t\ttone: \"inherit\",\n\t\t\tchildren: /* @__PURE__ */ jsx(Text, {\n\t\t\t\tsize: fontSize,\n\t\t\t\ttextOverflow: \"ellipsis\",\n\t\t\t\tchildren: value_0\n\t\t\t})\n\t\t});\n\t}, $[33] = fontSize, $[34] = paddingProp, $[35] = t10) : t10 = $[35];\n\tlet renderOption = typeof renderOptionProp == \"function\" ? renderOptionProp : t10, filterOption = typeof filterOptionProp == \"function\" ? filterOptionProp : DEFAULT_FILTER_OPTION, rootElementRef = useRef(null), resultsPopoverElementRef = useRef(null), inputElementRef = useRef(null), listBoxElementRef = useRef(null), [inputElement, _setInputElement] = useState(null), t11;\n\t$[36] === Symbol.for(\"react.memo_cache_sentinel\") ? (t11 = (node) => {\n\t\tstartTransition(() => _setInputElement(node));\n\t}, $[36] = t11) : t11 = $[36];\n\tlet setInputElement = t11, listFocusedRef = useRef(!1), valueRef = useRef(value), valuePropRef = useRef(valueProp), popoverMouseWithinRef = useRef(!1), t12, t13;\n\t$[37] === inputElement ? (t12 = $[38], t13 = $[39]) : (t12 = () => inputElement, t13 = [inputElement], $[37] = inputElement, $[38] = t12, $[39] = t13), useImperativeHandle(inputElementRef, t12, t13);\n\tlet t14, t15;\n\t$[40] === inputElement ? (t14 = $[41], t15 = $[42]) : (t14 = () => inputElement, t15 = [inputElement], $[40] = inputElement, $[41] = t14, $[42] = t15), useImperativeHandle(forwardedRef, t14, t15);\n\tlet listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY, padding = _getArrayProp(paddingProp), t16;\n\t$[43] !== options || $[44] !== value ? (t16 = value === null ? void 0 : options.find((o) => o.value === value), $[43] = options, $[44] = value, $[45] = t16) : t16 = $[45];\n\tlet currentOption = t16, t17;\n\tif ($[46] !== filterOption || $[47] !== options || $[48] !== query) {\n\t\tlet t18;\n\t\t$[50] !== filterOption || $[51] !== query ? (t18 = (option) => !query || filterOption(query, option), $[50] = filterOption, $[51] = query, $[52] = t18) : t18 = $[52], t17 = options.filter(t18), $[46] = filterOption, $[47] = options, $[48] = query, $[49] = t17;\n\t} else t17 = $[49];\n\tlet filteredOptions = t17, filteredOptionsLen = filteredOptions.length, activeItemId = activeValue ? `${id}-option-${activeValue}` : void 0, expanded = query !== null && loading || focused && query !== null, t18;\n\t$[53] !== onBlur || $[54] !== onQueryChange || $[55] !== relatedElements ? (t18 = (event) => {\n\t\tsetTimeout(() => {\n\t\t\tif (popoverMouseWithinRef.current) return;\n\t\t\tlet elements = (relatedElements || []).concat(rootElementRef.current ? [rootElementRef.current] : [], resultsPopoverElementRef.current ? [resultsPopoverElementRef.current] : []), focusInside = !1;\n\t\t\tif (document.activeElement) {\n\t\t\t\tfor (let e of elements) if (e === document.activeElement || e.contains(document.activeElement)) {\n\t\t\t\t\tfocusInside = !0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfocusInside === !1 && (dispatch({ type: \"root/blur\" }), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), onBlur && onBlur(event));\n\t\t}, 0);\n\t}, $[53] = onBlur, $[54] = onQueryChange, $[55] = relatedElements, $[56] = t18) : t18 = $[56];\n\tlet handleRootBlur = t18, t19;\n\t$[57] === Symbol.for(\"react.memo_cache_sentinel\") ? (t19 = (event_0) => {\n\t\tlet listBoxElement = listBoxElementRef.current, focusedElement = event_0.target instanceof HTMLElement ? event_0.target : null, listFocused_0 = listBoxElement?.contains(focusedElement) || !1;\n\t\tlistFocused_0 !== listFocusedRef.current && (listFocusedRef.current = listFocused_0, dispatch({\n\t\t\ttype: \"root/setListFocused\",\n\t\t\tlistFocused: listFocused_0\n\t\t}));\n\t}, $[57] = t19) : t19 = $[57];\n\tlet handleRootFocus = t19, t20;\n\t$[58] !== onChange || $[59] !== onQueryChange || $[60] !== onSelect ? (t20 = (v) => {\n\t\tdispatch({\n\t\t\ttype: \"value/change\",\n\t\t\tvalue: v\n\t\t}), popoverMouseWithinRef.current = !1, onSelect && onSelect(v), valueRef.current = v, onChange && onChange(v), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();\n\t}, $[58] = onChange, $[59] = onQueryChange, $[60] = onSelect, $[61] = t20) : t20 = $[61];\n\tlet handleOptionSelect = t20, t21;\n\t$[62] !== activeValue || $[63] !== filteredOptions || $[64] !== filteredOptionsLen || $[65] !== onQueryChange ? (t21 = (event_1) => {\n\t\tif (event_1.key === \"ArrowDown\") {\n\t\t\tif (event_1.preventDefault(), !filteredOptionsLen) return;\n\t\t\tlet activeOption = filteredOptions.find((o_0) => o_0.value === activeValue), activeIndex = activeOption ? filteredOptions.indexOf(activeOption) : -1, nextActiveOption = filteredOptions[(activeIndex + 1) % filteredOptionsLen];\n\t\t\tnextActiveOption && dispatch({\n\t\t\t\ttype: \"root/setActiveValue\",\n\t\t\t\tvalue: nextActiveOption.value,\n\t\t\t\tlistFocused: !0\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (event_1.key === \"ArrowUp\") {\n\t\t\tif (event_1.preventDefault(), !filteredOptionsLen) return;\n\t\t\tlet activeOption_0 = filteredOptions.find((o_1) => o_1.value === activeValue), activeIndex_0 = activeOption_0 ? filteredOptions.indexOf(activeOption_0) : -1, nextActiveOption_0 = filteredOptions[activeIndex_0 === -1 ? filteredOptionsLen - 1 : (filteredOptionsLen + activeIndex_0 - 1) % filteredOptionsLen];\n\t\t\tnextActiveOption_0 && dispatch({\n\t\t\t\ttype: \"root/setActiveValue\",\n\t\t\t\tvalue: nextActiveOption_0.value,\n\t\t\t\tlistFocused: !0\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (event_1.key === \"Escape\") {\n\t\t\tdispatch({ type: \"root/escape\" }), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), inputElementRef.current?.focus();\n\t\t\treturn;\n\t\t}\n\t\tlet target = event_1.target, listEl = listBoxElementRef.current;\n\t\tif ((listEl === target || listEl?.contains(target)) && !AUTOCOMPLETE_LISTBOX_IGNORE_KEYS.includes(event_1.key)) {\n\t\t\tinputElementRef.current?.focus();\n\t\t\treturn;\n\t\t}\n\t}, $[62] = activeValue, $[63] = filteredOptions, $[64] = filteredOptionsLen, $[65] = onQueryChange, $[66] = t21) : t21 = $[66];\n\tlet handleRootKeyDown = t21, t22;\n\t$[67] === onQueryChange ? t22 = $[68] : (t22 = (event_2) => {\n\t\tlet nextQuery = event_2.currentTarget.value;\n\t\tdispatch({\n\t\t\ttype: \"input/change\",\n\t\t\tquery: nextQuery\n\t\t}), onQueryChange && onQueryChange(nextQuery);\n\t}, $[67] = onQueryChange, $[68] = t22);\n\tlet handleInputChange = t22, t23;\n\t$[69] !== currentOption || $[70] !== renderValue || $[71] !== value ? (t23 = () => {\n\t\tdispatch({\n\t\t\ttype: \"root/open\",\n\t\t\tquery: value ? renderValue(value, currentOption) : \"\"\n\t\t});\n\t}, $[69] = currentOption, $[70] = renderValue, $[71] = value, $[72] = t23) : t23 = $[72];\n\tlet dispatchOpen = t23, t24;\n\t$[73] !== dispatchOpen || $[74] !== focused || $[75] !== onFocus || $[76] !== openOnFocus ? (t24 = (event_3) => {\n\t\tfocused || (dispatch({ type: \"input/focus\" }), onFocus && onFocus(event_3), openOnFocus && dispatchOpen());\n\t}, $[73] = dispatchOpen, $[74] = focused, $[75] = onFocus, $[76] = openOnFocus, $[77] = t24) : t24 = $[77];\n\tlet handleInputFocus = t24, t25;\n\t$[78] === Symbol.for(\"react.memo_cache_sentinel\") ? (t25 = () => {\n\t\tpopoverMouseWithinRef.current = !0;\n\t}, $[78] = t25) : t25 = $[78];\n\tlet handlePopoverMouseEnter = t25, t26;\n\t$[79] === Symbol.for(\"react.memo_cache_sentinel\") ? (t26 = () => {\n\t\tpopoverMouseWithinRef.current = !1;\n\t}, $[79] = t26) : t26 = $[79];\n\tlet handlePopoverMouseLeave = t26, t27;\n\t$[80] !== onChange || $[81] !== onQueryChange ? (t27 = () => {\n\t\tdispatch({ type: \"root/clear\" }), valueRef.current = \"\", onChange && onChange(\"\"), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();\n\t}, $[80] = onChange, $[81] = onQueryChange, $[82] = t27) : t27 = $[82];\n\tlet handleClearButtonClick = t27, t28;\n\t$[83] === Symbol.for(\"react.memo_cache_sentinel\") ? (t28 = () => {\n\t\tdispatch({ type: \"input/focus\" });\n\t}, $[83] = t28) : t28 = $[83];\n\tlet handleClearButtonFocus = t28, t29, t30;\n\t$[84] === valueProp ? (t29 = $[85], t30 = $[86]) : (t29 = () => {\n\t\tif (valueProp !== valuePropRef.current) {\n\t\t\tvaluePropRef.current = valueProp, valueProp !== void 0 && (dispatch({\n\t\t\t\ttype: \"value/change\",\n\t\t\t\tvalue: valueProp\n\t\t\t}), valueRef.current = valueProp);\n\t\t\treturn;\n\t\t}\n\t\tvalueProp !== valueRef.current && (valueRef.current = valueProp || null, dispatch({\n\t\t\ttype: \"value/change\",\n\t\t\tvalue: valueProp || null\n\t\t}));\n\t}, t30 = [valueProp], $[84] = valueProp, $[85] = t29, $[86] = t30), useEffect(t29, t30);\n\tlet t31, t32;\n\t$[87] === focused ? (t31 = $[88], t32 = $[89]) : (t31 = () => {\n\t\t!focused && valueRef.current && dispatch({\n\t\t\ttype: \"root/setActiveValue\",\n\t\t\tvalue: valueRef.current\n\t\t});\n\t}, t32 = [focused], $[87] = focused, $[88] = t31, $[89] = t32), useEffect(t31, t32);\n\tlet t33, t34;\n\t$[90] !== activeValue || $[91] !== filteredOptions ? (t33 = () => {\n\t\tlet listElement = listBoxElementRef.current;\n\t\tif (!listElement) return;\n\t\tlet activeOption_1 = filteredOptions.find((o_2) => o_2.value === activeValue);\n\t\tif (activeOption_1) {\n\t\t\tlet activeIndex_1 = filteredOptions.indexOf(activeOption_1), activeItemElement = listElement.childNodes[activeIndex_1];\n\t\t\tif (activeItemElement) {\n\t\t\t\tif (_hasFocus(activeItemElement)) return;\n\t\t\t\tfocusFirstDescendant(activeItemElement);\n\t\t\t}\n\t\t}\n\t}, t34 = [activeValue, filteredOptions], $[90] = activeValue, $[91] = filteredOptions, $[92] = t33, $[93] = t34) : (t33 = $[92], t34 = $[93]), useEffect(t33, t34);\n\tlet t35;\n\tbb0: {\n\t\tif (!loading && !disabled && value) {\n\t\t\tlet t36;\n\t\t\t$[94] === Symbol.for(\"react.memo_cache_sentinel\") ? (t36 = {\n\t\t\t\t\"aria-label\": \"Clear\",\n\t\t\t\tonFocus: handleClearButtonFocus\n\t\t\t}, $[94] = t36) : t36 = $[94], t35 = t36;\n\t\t\tbreak bb0;\n\t\t}\n\t\tt35 = void 0;\n\t}\n\tlet clearButton = t35, openButtonBoxPadding = padding.map(_temp$5), openButtonPadding = padding.map(_temp2$1), openButtonProps = typeof openButton == \"object\" ? openButton : EMPTY_RECORD, t36;\n\t$[95] !== dispatchOpen || $[96] !== openButtonProps ? (t36 = (event_4) => {\n\t\tdispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());\n\t}, $[95] = dispatchOpen, $[96] = openButtonProps, $[97] = t36) : t36 = $[97];\n\tlet handleOpenClick = t36, t37;\n\t$[98] !== disabled || $[99] !== expanded || $[100] !== fontSize || $[101] !== handleOpenClick || $[102] !== openButton || $[103] !== openButtonBoxPadding || $[104] !== openButtonPadding || $[105] !== openButtonProps || $[106] !== readOnly ? (t37 = !disabled && !readOnly && openButton ? /* @__PURE__ */ jsx(Box, {\n\t\t\"aria-hidden\": expanded,\n\t\tpadding: openButtonBoxPadding,\n\t\tchildren: /* @__PURE__ */ jsx(Button, {\n\t\t\t\"aria-label\": \"Open\",\n\t\t\tdisabled: expanded,\n\t\t\tfontSize,\n\t\t\ticon: ChevronDownIcon,\n\t\t\tmode: \"bleed\",\n\t\t\tpadding: openButtonPadding,\n\t\t\t...openButtonProps,\n\t\t\tonClick: handleOpenClick\n\t\t})\n\t}) : void 0, $[98] = disabled, $[99] = expanded, $[100] = fontSize, $[101] = handleOpenClick, $[102] = openButton, $[103] = openButtonBoxPadding, $[104] = openButtonPadding, $[105] = openButtonProps, $[106] = readOnly, $[107] = t37) : t37 = $[107];\n\tlet openButtonNode = t37, t38;\n\tbb1: {\n\t\tif (query === null) {\n\t\t\tif (value !== null) {\n\t\t\t\tlet t39;\n\t\t\t\t$[108] !== currentOption || $[109] !== renderValue || $[110] !== value ? (t39 = renderValue(value, currentOption), $[108] = currentOption, $[109] = renderValue, $[110] = value, $[111] = t39) : t39 = $[111], t38 = t39;\n\t\t\t\tbreak bb1;\n\t\t\t}\n\t\t\tt38 = \"\";\n\t\t\tbreak bb1;\n\t\t}\n\t\tt38 = query;\n\t}\n\tlet inputValue = t38, t39;\n\t$[112] === listFocused ? t39 = $[113] : (t39 = (event_5) => {\n\t\tevent_5.key === \"Tab\" && listFocused && inputElementRef.current?.focus();\n\t}, $[112] = listFocused, $[113] = t39);\n\tlet handleListBoxKeyDown = t39, t40;\n\tbb2: {\n\t\tif (filteredOptions.length === 0) {\n\t\t\tt40 = null;\n\t\t\tbreak bb2;\n\t\t}\n\t\tlet t41;\n\t\tif ($[114] !== activeValue || $[115] !== currentOption || $[116] !== filteredOptions || $[117] !== handleOptionSelect || $[118] !== id || $[119] !== listFocused || $[120] !== loading || $[121] !== renderOption) {\n\t\t\tlet t42;\n\t\t\t$[123] !== activeValue || $[124] !== currentOption || $[125] !== handleOptionSelect || $[126] !== id || $[127] !== listFocused || $[128] !== loading || $[129] !== renderOption ? (t42 = (option_0) => {\n\t\t\t\tlet active = activeValue === null ? currentOption === option_0 : option_0.value === activeValue;\n\t\t\t\treturn /* @__PURE__ */ jsx(AutocompleteOption, {\n\t\t\t\t\tid: `${id}-option-${option_0.value}`,\n\t\t\t\t\tonSelect: handleOptionSelect,\n\t\t\t\t\tselected: active,\n\t\t\t\t\tvalue: option_0.value,\n\t\t\t\t\tchildren: cloneElement(renderOption(option_0), {\n\t\t\t\t\t\tdisabled: loading,\n\t\t\t\t\t\tselected: active,\n\t\t\t\t\t\ttabIndex: listFocused && active ? 0 : -1\n\t\t\t\t\t})\n\t\t\t\t}, option_0.value);\n\t\t\t}, $[123] = activeValue, $[124] = currentOption, $[125] = handleOptionSelect, $[126] = id, $[127] = listFocused, $[128] = loading, $[129] = renderOption, $[130] = t42) : t42 = $[130], t41 = filteredOptions.map(t42), $[114] = activeValue, $[115] = currentOption, $[116] = filteredOptions, $[117] = handleOptionSelect, $[118] = id, $[119] = listFocused, $[120] = loading, $[121] = renderOption, $[122] = t41;\n\t\t} else t41 = $[122];\n\t\tlet t42;\n\t\t$[131] !== listBoxId || $[132] !== t41 ? (t42 = /* @__PURE__ */ jsx(Stack, {\n\t\t\tas: \"ul\",\n\t\t\t\"aria-multiselectable\": !1,\n\t\t\t\"data-ui\": \"AutoComplete__resultsList\",\n\t\t\tid: listBoxId,\n\t\t\tref: listBoxElementRef,\n\t\t\trole: \"listbox\",\n\t\t\tgap: 1,\n\t\t\tchildren: t41\n\t\t}), $[131] = listBoxId, $[132] = t41, $[133] = t42) : t42 = $[133];\n\t\tlet t43;\n\t\t$[134] !== handleListBoxKeyDown || $[135] !== listBox || $[136] !== t42 ? (t43 = /* @__PURE__ */ jsx(ListBox, {\n\t\t\t\"data-ui\": \"AutoComplete__results\",\n\t\t\tonKeyDown: handleListBoxKeyDown,\n\t\t\tpadding: 1,\n\t\t\t...listBox,\n\t\t\ttabIndex: -1,\n\t\t\tchildren: t42\n\t\t}), $[134] = handleListBoxKeyDown, $[135] = listBox, $[136] = t42, $[137] = t43) : t43 = $[137], t40 = t43;\n\t}\n\tlet content = t40, t41;\n\tbb3: {\n\t\tif (renderPopover) {\n\t\t\tlet t42 = !expanded, t43;\n\t\t\t$[138] !== content || $[139] !== handlePopoverMouseEnter || $[140] !== handlePopoverMouseLeave || $[141] !== inputElement || $[142] !== renderPopover || $[143] !== t42 ? (t43 = /* @__PURE__ */ jsx(RenderPopover, {\n\t\t\t\tcontent,\n\t\t\t\thidden: t42,\n\t\t\t\tinputElement,\n\t\t\t\tonMouseEnter: handlePopoverMouseEnter,\n\t\t\t\tonMouseLeave: handlePopoverMouseLeave,\n\t\t\t\tresultsPopoverElementRef,\n\t\t\t\trenderPopover\n\t\t\t}), $[138] = content, $[139] = handlePopoverMouseEnter, $[140] = handlePopoverMouseLeave, $[141] = inputElement, $[142] = renderPopover, $[143] = t42, $[144] = t43) : t43 = $[144], t41 = t43;\n\t\t\tbreak bb3;\n\t\t}\n\t\tif (filteredOptionsLen === 0) {\n\t\t\tt41 = null;\n\t\t\tbreak bb3;\n\t\t}\n\t\tlet t42;\n\t\t$[145] !== content || $[146] !== expanded || $[147] !== handlePopoverMouseEnter || $[148] !== handlePopoverMouseLeave || $[149] !== inputElement || $[150] !== popover || $[151] !== radius ? (t42 = /* @__PURE__ */ jsx(Popover, {\n\t\t\tarrow: !1,\n\t\t\tconstrainSize: !0,\n\t\t\tcontent,\n\t\t\tfallbackPlacements: AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS,\n\t\t\tmatchReferenceWidth: !0,\n\t\t\tonMouseEnter: handlePopoverMouseEnter,\n\t\t\tonMouseLeave: handlePopoverMouseLeave,\n\t\t\topen: expanded,\n\t\t\toverflow: \"auto\",\n\t\t\tplacement: \"bottom-start\",\n\t\t\tportal: !0,\n\t\t\tradius,\n\t\t\tref: resultsPopoverElementRef,\n\t\t\treferenceElement: inputElement,\n\t\t\t...popover\n\t\t}), $[145] = content, $[146] = expanded, $[147] = handlePopoverMouseEnter, $[148] = handlePopoverMouseLeave, $[149] = inputElement, $[150] = popover, $[151] = radius, $[152] = t42) : t42 = $[152], t41 = t42;\n\t}\n\tlet results = t41, t42 = loading && AnimatedSpinnerIcon, t43 = suffix || openButtonNode, t44;\n\t$[153] !== activeItemId || $[154] !== border || $[155] !== clearButton || $[156] !== customValidity || $[157] !== disabled || $[158] !== expanded || $[159] !== fontSize || $[160] !== handleClearButtonClick || $[161] !== handleInputChange || $[162] !== handleInputFocus || $[163] !== icon || $[164] !== id || $[165] !== inputValue || $[166] !== listBoxId || $[167] !== padding || $[168] !== prefix || $[169] !== radius || $[170] !== readOnly || $[171] !== restProps || $[172] !== t42 || $[173] !== t43 ? (t44 = /* @__PURE__ */ jsx(TextInput, {\n\t\t...restProps,\n\t\t\"aria-activedescendant\": activeItemId,\n\t\t\"aria-autocomplete\": \"list\",\n\t\t\"aria-expanded\": expanded,\n\t\t\"aria-owns\": listBoxId,\n\t\tautoCapitalize: \"off\",\n\t\tautoComplete: \"off\",\n\t\tautoCorrect: \"off\",\n\t\tborder,\n\t\tclearButton,\n\t\tcustomValidity,\n\t\tdisabled,\n\t\tfontSize,\n\t\ticon,\n\t\ticonRight: t42,\n\t\tid,\n\t\tinputMode: \"search\",\n\t\tonChange: handleInputChange,\n\t\tonClear: handleClearButtonClick,\n\t\tonFocus: handleInputFocus,\n\t\tpadding,\n\t\tprefix,\n\t\tradius,\n\t\treadOnly,\n\t\tref: setInputElement,\n\t\trole: \"combobox\",\n\t\tspellCheck: !1,\n\t\tsuffix: t43,\n\t\tvalue: inputValue\n\t}), $[153] = activeItemId, $[154] = border, $[155] = clearButton, $[156] = customValidity, $[157] = disabled, $[158] = expanded, $[159] = fontSize, $[160] = handleClearButtonClick, $[161] = handleInputChange, $[162] = handleInputFocus, $[163] = icon, $[164] = id, $[165] = inputValue, $[166] = listBoxId, $[167] = padding, $[168] = prefix, $[169] = radius, $[170] = readOnly, $[171] = restProps, $[172] = t42, $[173] = t43, $[174] = t44) : t44 = $[174];\n\tlet t45;\n\treturn $[175] !== handleRootBlur || $[176] !== handleRootFocus || $[177] !== handleRootKeyDown || $[178] !== results || $[179] !== t44 ? (t45 = /* @__PURE__ */ jsxs(StyledAutocomplete, {\n\t\t\"data-ui\": \"Autocomplete\",\n\t\tonBlur: handleRootBlur,\n\t\tonFocus: handleRootFocus,\n\t\tonKeyDown: handleRootKeyDown,\n\t\tref: rootElementRef,\n\t\tchildren: [t44, results]\n\t}), $[175] = handleRootBlur, $[176] = handleRootFocus, $[177] = handleRootKeyDown, $[178] = results, $[179] = t44, $[180] = t45) : t45 = $[180], t45;\n});\nfunction RenderPopover({ renderPopover, content, hidden, inputElement, onMouseEnter, onMouseLeave, resultsPopoverElementRef }) {\n\treturn renderPopover({\n\t\tcontent,\n\t\thidden,\n\t\tinputElement,\n\t\tonMouseEnter,\n\t\tonMouseLeave\n\t}, resultsPopoverElementRef);\n}\n/**\n* The Autocomplete component is typically used for search components.\n* It consists of a text input for writing a query, and properties for rendering suggestions.\n*\n* @public\n*/\nconst Autocomplete = InnerAutocomplete;\nfunction _temp$5(v_0) {\n\treturn v_0 === 0 ? 0 : v_0 === 1 || v_0 === 2 ? 1 : v_0 - 2;\n}\nfunction _temp2$1(v_1) {\n\treturn Math.max(v_1 - 1, 0);\n}\nconst StyledBreadcrumbs = styled.ol.withConfig({\n\tdisplayName: \"StyledBreadcrumbs\",\n\tcomponentId: \"sc-s3y9xo-0\"\n})`margin:0;padding:0;display:flex;list-style:none;align-items:center;white-space:nowrap;line-height:0;`, ExpandButton = styled(Button).withConfig({\n\tdisplayName: \"ExpandButton\",\n\tcomponentId: \"sc-s3y9xo-1\"\n})`appearance:none;margin:-4px;`, Breadcrumbs = forwardRef(function Breadcrumbs(props, ref) {\n\tlet $ = c(30), children, gap, maxLength, restProps, separator, t0;\n\t$[0] === props ? (children = $[1], gap = $[2], maxLength = $[3], restProps = $[4], separator = $[5], t0 = $[6]) : ({children, gap, maxLength, separator, space: t0, ...restProps} = props, $[0] = props, $[1] = children, $[2] = gap, $[3] = maxLength, $[4] = restProps, $[5] = separator, $[6] = t0);\n\tlet t1 = gap === void 0 ? t0 === void 0 ? 2 : t0 : gap, t2;\n\t$[7] === t1 ? t2 = $[8] : (t2 = _getArrayProp(t1), $[7] = t1, $[8] = t2);\n\tlet space = t2, [open, setOpen] = useState(!1), expandElementRef = useRef(null), popoverElementRef = useRef(null), t3;\n\t$[9] === Symbol.for(\"react.memo_cache_sentinel\") ? (t3 = () => setOpen(!1), $[9] = t3) : t3 = $[9];\n\tlet collapse = t3, t4;\n\t$[10] === Symbol.for(\"react.memo_cache_sentinel\") ? (t4 = () => setOpen(!0), $[10] = t4) : t4 = $[10];\n\tlet expand = t4, t5;\n\t$[11] === Symbol.for(\"react.memo_cache_sentinel\") ? (t5 = () => [expandElementRef.current, popoverElementRef.current], $[11] = t5) : t5 = $[11], useClickOutsideEvent(collapse, t5);\n\tlet t6;\n\t$[12] === children ? t6 = $[13] : (t6 = Children.toArray(children).filter(isValidElement), $[12] = children, $[13] = t6);\n\tlet rawItems = t6, t7;\n\t$[14] !== maxLength || $[15] !== open || $[16] !== rawItems || $[17] !== space ? (t7 = {\n\t\tcollapse,\n\t\texpand,\n\t\texpandElementRef,\n\t\tmaxLength,\n\t\topen,\n\t\tpopoverElementRef,\n\t\trawItems,\n\t\tspace\n\t}, $[14] = maxLength, $[15] = open, $[16] = rawItems, $[17] = space, $[18] = t7) : t7 = $[18];\n\tlet items = useItems(t7), t8;\n\tif ($[19] !== items || $[20] !== separator || $[21] !== space) {\n\t\tlet t9;\n\t\t$[23] !== separator || $[24] !== space ? (t9 = (item, itemIndex) => /* @__PURE__ */ jsxs(Fragment, { children: [itemIndex > 0 && /* @__PURE__ */ jsx(Box, {\n\t\t\t\"aria-hidden\": !0,\n\t\t\tas: \"li\",\n\t\t\tpaddingX: space,\n\t\t\tchildren: separator || /* @__PURE__ */ jsx(Text, {\n\t\t\t\tmuted: !0,\n\t\t\t\tchildren: \"/\"\n\t\t\t})\n\t\t}), /* @__PURE__ */ jsx(Box, {\n\t\t\tas: \"li\",\n\t\t\tchildren: item\n\t\t})] }, itemIndex), $[23] = separator, $[24] = space, $[25] = t9) : t9 = $[25], t8 = items.map(t9), $[19] = items, $[20] = separator, $[21] = space, $[22] = t8;\n\t} else t8 = $[22];\n\tlet t9;\n\treturn $[26] !== ref || $[27] !== restProps || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsx(StyledBreadcrumbs, {\n\t\t\"data-ui\": \"Breadcrumbs\",\n\t\t...restProps,\n\t\tref,\n\t\tchildren: t8\n\t}), $[26] = ref, $[27] = restProps, $[28] = t8, $[29] = t9) : t9 = $[29], t9;\n});\nfunction useItems(t0) {\n\tlet $ = c(28), { collapse, expand, expandElementRef, maxLength, open, popoverElementRef, rawItems, space } = t0, len = rawItems.length;\n\tif (maxLength && len > maxLength) {\n\t\tlet beforeLength = Math.ceil(maxLength / 2), afterLength = Math.floor(maxLength / 2), t1;\n\t\tif ($[0] !== afterLength || $[1] !== beforeLength || $[2] !== collapse || $[3] !== expand || $[4] !== expandElementRef || $[5] !== len || $[6] !== open || $[7] !== popoverElementRef || $[8] !== rawItems || $[9] !== space) {\n\t\t\tlet t2 = rawItems.slice(0, beforeLength - 1), t3;\n\t\t\t$[11] !== afterLength || $[12] !== beforeLength || $[13] !== len || $[14] !== rawItems ? (t3 = rawItems.slice(beforeLength - 1, len - afterLength), $[11] = afterLength, $[12] = beforeLength, $[13] = len, $[14] = rawItems, $[15] = t3) : t3 = $[15];\n\t\t\tlet t4;\n\t\t\t$[16] !== space || $[17] !== t3 ? (t4 = /* @__PURE__ */ jsx(Stack, {\n\t\t\t\tas: \"ol\",\n\t\t\t\toverflow: \"auto\",\n\t\t\t\tpadding: space,\n\t\t\t\tgap: space,\n\t\t\t\tchildren: t3\n\t\t\t}), $[16] = space, $[17] = t3, $[18] = t4) : t4 = $[18];\n\t\t\tlet t5 = open ? collapse : expand, t6;\n\t\t\t$[19] !== expandElementRef || $[20] !== open || $[21] !== t5 ? (t6 = /* @__PURE__ */ jsx(ExpandButton, {\n\t\t\t\tfontSize: 1,\n\t\t\t\tmode: \"bleed\",\n\t\t\t\tonClick: t5,\n\t\t\t\tpadding: 1,\n\t\t\t\tref: expandElementRef,\n\t\t\t\tselected: open,\n\t\t\t\ttext: \"…\"\n\t\t\t}), $[19] = expandElementRef, $[20] = open, $[21] = t5, $[22] = t6) : t6 = $[22];\n\t\t\tlet t7;\n\t\t\t$[23] !== open || $[24] !== popoverElementRef || $[25] !== t4 || $[26] !== t6 ? (t7 = /* @__PURE__ */ jsx(Popover, {\n\t\t\t\tconstrainSize: !0,\n\t\t\t\tcontent: t4,\n\t\t\t\topen,\n\t\t\t\tplacement: \"top\",\n\t\t\t\tportal: !0,\n\t\t\t\tref: popoverElementRef,\n\t\t\t\tchildren: t6\n\t\t\t}, \"button\"), $[23] = open, $[24] = popoverElementRef, $[25] = t4, $[26] = t6, $[27] = t7) : t7 = $[27], t1 = [\n\t\t\t\t...t2,\n\t\t\t\tt7,\n\t\t\t\t...rawItems.slice(len - afterLength)\n\t\t\t], $[0] = afterLength, $[1] = beforeLength, $[2] = collapse, $[3] = expand, $[4] = expandElementRef, $[5] = len, $[6] = open, $[7] = popoverElementRef, $[8] = rawItems, $[9] = space, $[10] = t1;\n\t\t} else t1 = $[10];\n\t\treturn t1;\n\t}\n\treturn rawItems;\n}\nconst BASE_STYLE = {\n\twidth: \"100%\",\n\tmargin: \"0 auto\"\n};\nfunction containerBaseStyle() {\n\treturn BASE_STYLE;\n}\nfunction responsiveContainerWidthStyle(props) {\n\tlet { container, media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$width, (val) => ({ maxWidth: val === \"auto\" ? \"none\" : rem(container[val]) }));\n}\nconst StyledContainer = /* @__PURE__ */ styled(Box).withConfig({\n\tdisplayName: \"StyledContainer\",\n\tcomponentId: \"sc-nbeafu-0\"\n})(containerBaseStyle, responsiveContainerWidthStyle), Container = forwardRef(function Container(props, ref) {\n\tlet $ = c(11), as, restProps, t0;\n\t$[0] === props ? (as = $[1], restProps = $[2], t0 = $[3]) : ({as, width: t0, ...restProps} = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = t0);\n\tlet width = t0 === void 0 ? 2 : t0, t1;\n\t$[4] === width ? t1 = $[5] : (t1 = _getArrayProp(width), $[4] = width, $[5] = t1);\n\tlet t2;\n\treturn $[6] !== as || $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsx(StyledContainer, {\n\t\t\"data-ui\": \"Container\",\n\t\t...restProps,\n\t\t$width: t1,\n\t\tforwardedAs: as,\n\t\tref\n\t}), $[6] = as, $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;\n});\nfunction dialogStyle({ theme }) {\n\tlet { color } = getTheme_v2(theme);\n\treturn {\n\t\t\"&:not([hidden])\": { display: \"flex\" },\n\t\ttop: 0,\n\t\tleft: 0,\n\t\tright: 0,\n\t\tbottom: 0,\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\toutline: \"none\",\n\t\tbackground: color.backdrop\n\t};\n}\nfunction responsiveDialogPositionStyle(props) {\n\tlet { media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$position, (position) => ({ \"&&\": { position } }));\n}\nfunction animationDialogStyle(props) {\n\treturn props.$animate ? css`@keyframes zoomIn{from{opacity:0;transform:scale(0.95);}to{opacity:1;transform:scale(1);}}@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}animation:fadeIn 200ms ease-out;& > [data-ui='DialogCard']{animation:zoomIn 200ms ease-out;}` : css``;\n}\n/**\n* @internal\n*/\nconst DialogContext = createGlobalScopedContext(\"@sanity/ui/context/dialog\", { version: 0 });\n/**\n* This API might change. DO NOT USE IN PRODUCTION.\n* @beta\n*/\nfunction useDialog() {\n\treturn useContext(DialogContext);\n}\nfunction isTargetWithinScope(boundaryElement, portalElement, target) {\n\treturn !boundaryElement || !portalElement || containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);\n}\nconst StyledDialog = /* @__PURE__ */ styled(Layer).withConfig({\n\tdisplayName: \"StyledDialog\",\n\tcomponentId: \"sc-x279l-0\"\n})(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle, animationDialogStyle), DialogContainer = styled(Container).withConfig({\n\tdisplayName: \"DialogContainer\",\n\tcomponentId: \"sc-x279l-1\"\n})`&:not([hidden]){display:flex;}width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;`, DialogCardRoot = styled(Card).withConfig({\n\tdisplayName: \"DialogCardRoot\",\n\tcomponentId: \"sc-x279l-2\"\n})`&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;`, DialogLayout = styled(Flex).withConfig({\n\tdisplayName: \"DialogLayout\",\n\tcomponentId: \"sc-x279l-3\"\n})`flex:1;min-height:0;width:100%;`, DialogHeader = styled(Box).withConfig({\n\tdisplayName: \"DialogHeader\",\n\tcomponentId: \"sc-x279l-4\"\n})`position:relative;z-index:2;`, DialogContent = styled(Box).withConfig({\n\tdisplayName: \"DialogContent\",\n\tcomponentId: \"sc-x279l-5\"\n})`position:relative;z-index:1;overflow:auto;outline:none;`, DialogFooter = styled(Box).withConfig({\n\tdisplayName: \"DialogFooter\",\n\tcomponentId: \"sc-x279l-6\"\n})`position:relative;z-index:3;`, DialogCard = forwardRef(function DialogCard(props, forwardedRef) {\n\tlet $ = c(44), { __unstable_autoFocus: autoFocus, __unstable_hideCloseButton: hideCloseButton, children, contentRef: forwardedContentRef, footer, header, id, onClickOutside, onClose, portal: portalProp, radius: radiusProp, scheme, shadow: shadowProp, width: widthProp } = props, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, t0;\n\t$[0] === radiusProp ? t0 = $[1] : (t0 = _getArrayProp(radiusProp), $[0] = radiusProp, $[1] = t0);\n\tlet radius = t0, t1;\n\t$[2] === shadowProp ? t1 = $[3] : (t1 = _getArrayProp(shadowProp), $[2] = shadowProp, $[3] = t1);\n\tlet shadow = t1, t2;\n\t$[4] === widthProp ? t2 = $[5] : (t2 = _getArrayProp(widthProp), $[4] = widthProp, $[5] = t2);\n\tlet width = t2, ref = useRef(null), contentRef = useRef(null), { isTopLayer } = useLayer(), labelId = `${id}_label`, showCloseButton = !!onClose && hideCloseButton === !1, showHeader = !!header || showCloseButton, t3;\n\t$[6] === Symbol.for(\"react.memo_cache_sentinel\") ? (t3 = () => ref.current, $[6] = t3) : t3 = $[6], useImperativeHandle(forwardedRef, t3);\n\tlet t4;\n\t$[7] === Symbol.for(\"react.memo_cache_sentinel\") ? (t4 = () => contentRef.current, $[7] = t4) : t4 = $[7], useImperativeHandle(forwardedContentRef, t4);\n\tlet t5, t6;\n\t$[8] === autoFocus ? (t5 = $[9], t6 = $[10]) : (t5 = () => {\n\t\tautoFocus && ref.current && focusFirstDescendant(ref.current);\n\t}, t6 = [autoFocus, ref], $[8] = autoFocus, $[9] = t5, $[10] = t6), useEffect(t5, t6);\n\tlet t7;\n\t$[11] !== boundaryElement || $[12] !== isTopLayer || $[13] !== onClose || $[14] !== portalElement ? (t7 = (event) => {\n\t\tif (!isTopLayer || !onClose) return;\n\t\tlet target = document.activeElement;\n\t\ttarget && !isTargetWithinScope(boundaryElement, portalElement, target) || event.key === \"Escape\" && (event.preventDefault(), event.stopPropagation(), onClose());\n\t}, $[11] = boundaryElement, $[12] = isTopLayer, $[13] = onClose, $[14] = portalElement, $[15] = t7) : t7 = $[15], useGlobalKeyDown(t7);\n\tlet t8;\n\t$[16] !== boundaryElement || $[17] !== isTopLayer || $[18] !== onClickOutside || $[19] !== portalElement ? (t8 = isTopLayer && onClickOutside && ((event_0) => {\n\t\tlet target_0 = event_0.target;\n\t\ttarget_0 && !isTargetWithinScope(boundaryElement, portalElement, target_0) || onClickOutside();\n\t}), $[16] = boundaryElement, $[17] = isTopLayer, $[18] = onClickOutside, $[19] = portalElement, $[20] = t8) : t8 = $[20];\n\tlet t9;\n\t$[21] === Symbol.for(\"react.memo_cache_sentinel\") ? (t9 = () => [ref.current], $[21] = t9) : t9 = $[21], useClickOutsideEvent(t8, t9);\n\tlet t10;\n\t$[22] !== header || $[23] !== labelId || $[24] !== onClose || $[25] !== showCloseButton || $[26] !== showHeader ? (t10 = showHeader && /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsxs(Flex, {\n\t\talign: \"flex-start\",\n\t\tpadding: 3,\n\t\tchildren: [/* @__PURE__ */ jsx(Box, {\n\t\t\tflex: 1,\n\t\t\tpadding: 2,\n\t\t\tchildren: header && /* @__PURE__ */ jsx(Text, {\n\t\t\t\tid: labelId,\n\t\t\t\tsize: 1,\n\t\t\t\tweight: \"semibold\",\n\t\t\t\tchildren: header\n\t\t\t})\n\t\t}), showCloseButton && /* @__PURE__ */ jsx(Box, {\n\t\t\tflex: \"none\",\n\t\t\tchildren: /* @__PURE__ */ jsx(Button, {\n\t\t\t\t\"aria-label\": \"Close dialog\",\n\t\t\t\tdisabled: !onClose,\n\t\t\t\ticon: CloseIcon,\n\t\t\t\tmode: \"bleed\",\n\t\t\t\tonClick: onClose,\n\t\t\t\tpadding: 2\n\t\t\t})\n\t\t})]\n\t}) }), $[22] = header, $[23] = labelId, $[24] = onClose, $[25] = showCloseButton, $[26] = showHeader, $[27] = t10) : t10 = $[27];\n\tlet t11;\n\t$[28] === children ? t11 = $[29] : (t11 = /* @__PURE__ */ jsx(DialogContent, {\n\t\tflex: 1,\n\t\tref: contentRef,\n\t\ttabIndex: -1,\n\t\tchildren\n\t}), $[28] = children, $[29] = t11);\n\tlet t12;\n\t$[30] === footer ? t12 = $[31] : (t12 = footer && /* @__PURE__ */ jsx(DialogFooter, { children: footer }), $[30] = footer, $[31] = t12);\n\tlet t13;\n\t$[32] !== t10 || $[33] !== t11 || $[34] !== t12 ? (t13 = /* @__PURE__ */ jsxs(DialogLayout, {\n\t\tdirection: \"column\",\n\t\tchildren: [\n\t\t\tt10,\n\t\t\tt11,\n\t\t\tt12\n\t\t]\n\t}), $[32] = t10, $[33] = t11, $[34] = t12, $[35] = t13) : t13 = $[35];\n\tlet t14;\n\t$[36] !== radius || $[37] !== scheme || $[38] !== shadow || $[39] !== t13 ? (t14 = /* @__PURE__ */ jsx(DialogCardRoot, {\n\t\tradius,\n\t\tref,\n\t\tscheme,\n\t\tshadow,\n\t\tchildren: t13\n\t}), $[36] = radius, $[37] = scheme, $[38] = shadow, $[39] = t13, $[40] = t14) : t14 = $[40];\n\tlet t15;\n\treturn $[41] !== t14 || $[42] !== width ? (t15 = /* @__PURE__ */ jsx(DialogContainer, {\n\t\t\"data-ui\": \"DialogCard\",\n\t\twidth,\n\t\tchildren: t14\n\t}), $[41] = t14, $[42] = width, $[43] = t15) : t15 = $[43], t15;\n}), Dialog = forwardRef(function Dialog(props, ref) {\n\tlet $ = c(70), dialog = useDialog(), { layer } = useTheme_v2(), _positionProp, _zOffsetProp, children, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5, t6;\n\t$[0] === props ? (_positionProp = $[1], _zOffsetProp = $[2], children = $[3], contentRef = $[4], footer = $[5], header = $[6], id = $[7], onActivate = $[8], onClickOutside = $[9], onClose = $[10], onFocus = $[11], portalProp = $[12], restProps = $[13], scheme = $[14], t0 = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21]) : ({__unstable_autoFocus: t0, __unstable_hideCloseButton: t1, cardRadius: t2, cardShadow: t3, children, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, padding: t4, portal: portalProp, position: _positionProp, scheme, width: t5, zOffset: _zOffsetProp, animate: t6, ...restProps} = props, $[0] = props, $[1] = _positionProp, $[2] = _zOffsetProp, $[3] = children, $[4] = contentRef, $[5] = footer, $[6] = header, $[7] = id, $[8] = onActivate, $[9] = onClickOutside, $[10] = onClose, $[11] = onFocus, $[12] = portalProp, $[13] = restProps, $[14] = scheme, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6);\n\tlet autoFocus = t0 === void 0 || t0, hideCloseButton = t1 !== void 0 && t1, cardRadiusProp = t2 === void 0 ? 4 : t2, cardShadow = t3 === void 0 ? 3 : t3, paddingProp = t4 === void 0 ? 3 : t4, widthProp = t5 === void 0 ? 0 : t5, _animate = t6 !== void 0 && t6, positionProp = _positionProp ?? (dialog.position || \"fixed\"), zOffsetProp = _zOffsetProp ?? (dialog.zOffset || layer.dialog.zOffset), animate = !usePrefersReducedMotion() && _animate, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, t7;\n\t$[22] === cardRadiusProp ? t7 = $[23] : (t7 = _getArrayProp(cardRadiusProp), $[22] = cardRadiusProp, $[23] = t7);\n\tlet cardRadius = t7, t8;\n\t$[24] === paddingProp ? t8 = $[25] : (t8 = _getArrayProp(paddingProp), $[24] = paddingProp, $[25] = t8);\n\tlet padding = t8, t9;\n\t$[26] === positionProp ? t9 = $[27] : (t9 = _getArrayProp(positionProp), $[26] = positionProp, $[27] = t9);\n\tlet position = t9, t10;\n\t$[28] === widthProp ? t10 = $[29] : (t10 = _getArrayProp(widthProp), $[28] = widthProp, $[29] = t10);\n\tlet width = t10, t11;\n\t$[30] === zOffsetProp ? t11 = $[31] : (t11 = _getArrayProp(zOffsetProp), $[30] = zOffsetProp, $[31] = t11);\n\tlet zOffset = t11, preDivRef = useRef(null), postDivRef = useRef(null), cardRef = useRef(null), focusedElementRef = useRef(null), t12;\n\t$[32] === onFocus ? t12 = $[33] : (t12 = (event) => {\n\t\tonFocus?.(event);\n\t\tlet target = event.target, cardElement = cardRef.current;\n\t\tif (cardElement && target === preDivRef.current) {\n\t\t\tfocusLastDescendant(cardElement);\n\t\t\treturn;\n\t\t}\n\t\tif (cardElement && target === postDivRef.current) {\n\t\t\tfocusFirstDescendant(cardElement);\n\t\t\treturn;\n\t\t}\n\t\tisHTMLElement(event.target) && (focusedElementRef.current = event.target);\n\t}, $[32] = onFocus, $[33] = t12);\n\tlet handleFocus = t12, labelId = `${id}_label`, rootClickTimeoutRef = useRef(void 0), t13;\n\t$[34] !== boundaryElement || $[35] !== portalElement ? (t13 = () => {\n\t\trootClickTimeoutRef.current && clearTimeout(rootClickTimeoutRef.current), rootClickTimeoutRef.current = setTimeout(() => {\n\t\t\tlet activeElement = document.activeElement;\n\t\t\tif (activeElement && !isTargetWithinScope(boundaryElement, portalElement, activeElement)) {\n\t\t\t\tlet target_0 = focusedElementRef.current;\n\t\t\t\tif (!target_0 || !document.body.contains(target_0)) {\n\t\t\t\t\tlet cardElement_0 = cardRef.current;\n\t\t\t\t\tcardElement_0 && focusFirstDescendant(cardElement_0);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttarget_0.focus();\n\t\t\t}\n\t\t}, 0);\n\t}, $[34] = boundaryElement, $[35] = portalElement, $[36] = t13) : t13 = $[36];\n\tlet handleRootClick = t13, t14;\n\t$[37] === Symbol.for(\"react.memo_cache_sentinel\") ? (t14 = /* @__PURE__ */ jsx(\"div\", {\n\t\tref: preDivRef,\n\t\ttabIndex: 0\n\t}), $[37] = t14) : t14 = $[37];\n\tlet t15;\n\t$[38] !== autoFocus || $[39] !== cardRadius || $[40] !== cardShadow || $[41] !== children || $[42] !== contentRef || $[43] !== footer || $[44] !== header || $[45] !== hideCloseButton || $[46] !== id || $[47] !== onClickOutside || $[48] !== onClose || $[49] !== portalProp || $[50] !== scheme || $[51] !== width ? (t15 = /* @__PURE__ */ jsx(DialogCard, {\n\t\t__unstable_autoFocus: autoFocus,\n\t\t__unstable_hideCloseButton: hideCloseButton,\n\t\tcontentRef,\n\t\tfooter,\n\t\theader,\n\t\tid,\n\t\tonClickOutside,\n\t\tonClose,\n\t\tportal: portalProp,\n\t\tradius: cardRadius,\n\t\tref: cardRef,\n\t\tscheme,\n\t\tshadow: cardShadow,\n\t\twidth,\n\t\tchildren\n\t}), $[38] = autoFocus, $[39] = cardRadius, $[40] = cardShadow, $[41] = children, $[42] = contentRef, $[43] = footer, $[44] = header, $[45] = hideCloseButton, $[46] = id, $[47] = onClickOutside, $[48] = onClose, $[49] = portalProp, $[50] = scheme, $[51] = width, $[52] = t15) : t15 = $[52];\n\tlet t16;\n\t$[53] === Symbol.for(\"react.memo_cache_sentinel\") ? (t16 = /* @__PURE__ */ jsx(\"div\", {\n\t\tref: postDivRef,\n\t\ttabIndex: 0\n\t}), $[53] = t16) : t16 = $[53];\n\tlet t17;\n\t$[54] !== animate || $[55] !== handleFocus || $[56] !== handleRootClick || $[57] !== id || $[58] !== labelId || $[59] !== onActivate || $[60] !== padding || $[61] !== position || $[62] !== ref || $[63] !== restProps || $[64] !== t15 || $[65] !== zOffset ? (t17 = /* @__PURE__ */ jsxs(StyledDialog, {\n\t\t...restProps,\n\t\t$animate: animate,\n\t\t$padding: padding,\n\t\t$position: position,\n\t\t\"aria-labelledby\": labelId,\n\t\t\"aria-modal\": !0,\n\t\t\"data-ui\": \"Dialog\",\n\t\tid,\n\t\tonActivate,\n\t\tonClick: handleRootClick,\n\t\tonFocus: handleFocus,\n\t\tref,\n\t\trole: \"dialog\",\n\t\tzOffset,\n\t\tchildren: [\n\t\t\tt14,\n\t\t\tt15,\n\t\t\tt16\n\t\t]\n\t}), $[54] = animate, $[55] = handleFocus, $[56] = handleRootClick, $[57] = id, $[58] = labelId, $[59] = onActivate, $[60] = padding, $[61] = position, $[62] = ref, $[63] = restProps, $[64] = t15, $[65] = zOffset, $[66] = t17) : t17 = $[66];\n\tlet t18;\n\treturn $[67] !== portalProp || $[68] !== t17 ? (t18 = /* @__PURE__ */ jsx(Portal, {\n\t\t__unstable_name: portalProp,\n\t\tchildren: t17\n\t}), $[67] = portalProp, $[68] = t17, $[69] = t18) : t18 = $[69], t18;\n});\n/**\n* This API might change. DO NOT USE IN PRODUCTION.\n* @beta\n*/\nfunction DialogProvider(props) {\n\tlet $ = c(6), { children, position, zOffset } = props, t0;\n\t$[0] !== position || $[1] !== zOffset ? (t0 = {\n\t\tversion: 0,\n\t\tposition,\n\t\tzOffset\n\t}, $[0] = position, $[1] = zOffset, $[2] = t0) : t0 = $[2];\n\tlet contextValue = t0, t1;\n\treturn $[3] !== children || $[4] !== contextValue ? (t1 = /* @__PURE__ */ jsx(DialogContext.Provider, {\n\t\tvalue: contextValue,\n\t\tchildren\n\t}), $[3] = children, $[4] = contextValue, $[5] = t1) : t1 = $[5], t1;\n}\n/**\n* The `MenuButton` component follows the WAI-ARIA specification for menu buttons.\n*\n* @public\n*/\nconst MenuButton = forwardRef(function MenuButton(props, forwardedRef) {\n\tlet $ = c(62), { __unstable_disableRestoreFocusOnClose: t0, boundaryElement: deprecated_boundaryElement, button: buttonProp, id, menu: menuProp, onClose, onOpen, placement: deprecated_placement, popoverScheme: deprecated_popoverScheme, portal: t1, popover, popoverRadius: deprecated_popoverRadius, preventOverflow: deprecated_preventOverflow } = props, disableRestoreFocusOnClose = t0 !== void 0 && t0, deprecated_portal = t1 === void 0 || t1, [open, setOpen] = useState(!1), [shouldFocus, setShouldFocus] = useState(null), [buttonElement, setButtonElement] = useState(null), t2;\n\t$[0] === Symbol.for(\"react.memo_cache_sentinel\") ? (t2 = [], $[0] = t2) : t2 = $[0];\n\tlet [menuElements, setChildMenuElements] = useState(t2), openRef = useRef(open), t3, t4;\n\t$[1] !== onOpen || $[2] !== open ? (t3 = () => {\n\t\tonOpen && open && !openRef.current && onOpen();\n\t}, t4 = [onOpen, open], $[1] = onOpen, $[2] = open, $[3] = t3, $[4] = t4) : (t3 = $[3], t4 = $[4]), useEffect(t3, t4);\n\tlet t5, t6;\n\t$[5] !== onClose || $[6] !== open ? (t5 = () => {\n\t\tonClose && !open && openRef.current && onClose();\n\t}, t6 = [onClose, open], $[5] = onClose, $[6] = open, $[7] = t5, $[8] = t6) : (t5 = $[7], t6 = $[8]), useEffect(t5, t6);\n\tlet t7, t8;\n\t$[9] === open ? (t7 = $[10], t8 = $[11]) : (t7 = () => {\n\t\topenRef.current = open;\n\t}, t8 = [open], $[9] = open, $[10] = t7, $[11] = t8), useEffect(t7, t8);\n\tlet t9;\n\t$[12] === Symbol.for(\"react.memo_cache_sentinel\") ? (t9 = () => {\n\t\tsetOpen(_temp$4), setShouldFocus(null);\n\t}, $[12] = t9) : t9 = $[12];\n\tlet handleButtonClick = t9, t10;\n\t$[13] === open ? t10 = $[14] : (t10 = (event) => {\n\t\topen && event.preventDefault();\n\t}, $[13] = open, $[14] = t10);\n\tlet handleMouseDown = t10, t11;\n\t$[15] === Symbol.for(\"react.memo_cache_sentinel\") ? (t11 = (event_0) => {\n\t\tif (event_0.key === \"ArrowDown\" || event_0.key === \"Enter\" || event_0.key === \" \") {\n\t\t\tevent_0.preventDefault(), setOpen(!0), setShouldFocus(\"first\");\n\t\t\treturn;\n\t\t}\n\t\tif (event_0.key === \"ArrowUp\") {\n\t\t\tevent_0.preventDefault(), setOpen(!0), setShouldFocus(\"last\");\n\t\t\treturn;\n\t\t}\n\t}, $[15] = t11) : t11 = $[15];\n\tlet handleButtonKeyDown = t11, t12;\n\t$[16] !== buttonElement || $[17] !== menuElements ? (t12 = (event_1) => {\n\t\tlet target = event_1.target;\n\t\tif (target instanceof Node && !(buttonElement && (target === buttonElement || buttonElement.contains(target)))) {\n\t\t\tfor (let el of menuElements) if (target === el || el.contains(target)) return;\n\t\t\tsetOpen(!1);\n\t\t}\n\t}, $[16] = buttonElement, $[17] = menuElements, $[18] = t12) : t12 = $[18];\n\tlet handleMenuClickOutside = t12, t13;\n\t$[19] !== buttonElement || $[20] !== disableRestoreFocusOnClose ? (t13 = () => {\n\t\tsetOpen(!1), !disableRestoreFocusOnClose && buttonElement && buttonElement.focus();\n\t}, $[19] = buttonElement, $[20] = disableRestoreFocusOnClose, $[21] = t13) : t13 = $[21];\n\tlet handleMenuEscape = t13, t14;\n\t$[22] === menuElements ? t14 = $[23] : (t14 = (event_2) => {\n\t\tlet target_0 = event_2.relatedTarget;\n\t\tif (target_0 instanceof Node) {\n\t\t\tfor (let el_0 of menuElements) if (el_0 === target_0 || el_0.contains(target_0)) return;\n\t\t\tsetOpen(!1);\n\t\t}\n\t}, $[22] = menuElements, $[23] = t14);\n\tlet handleBlur = t14, t15;\n\t$[24] !== buttonElement || $[25] !== disableRestoreFocusOnClose ? (t15 = () => {\n\t\tsetOpen(!1), !disableRestoreFocusOnClose && buttonElement && buttonElement.focus();\n\t}, $[24] = buttonElement, $[25] = disableRestoreFocusOnClose, $[26] = t15) : t15 = $[26];\n\tlet handleItemClick = t15, t16;\n\t$[27] === Symbol.for(\"react.memo_cache_sentinel\") ? (t16 = (el_1) => (setChildMenuElements((els) => els.concat([el_1])), () => setChildMenuElements((els_0) => els_0.filter((_el) => _el !== el_1))), $[27] = t16) : t16 = $[27];\n\tlet registerElement = t16, t17;\n\t$[28] !== buttonElement || $[29] !== handleBlur || $[30] !== handleItemClick || $[31] !== handleMenuClickOutside || $[32] !== handleMenuEscape || $[33] !== id || $[34] !== menuProp || $[35] !== shouldFocus ? (t17 = menuProp && cloneElement(menuProp, {\n\t\t\"aria-labelledby\": id,\n\t\tonBlurCapture: handleBlur,\n\t\tonClickOutside: handleMenuClickOutside,\n\t\tonEscape: handleMenuEscape,\n\t\tonItemClick: handleItemClick,\n\t\toriginElement: buttonElement,\n\t\tregisterElement,\n\t\tshouldFocus\n\t}), $[28] = buttonElement, $[29] = handleBlur, $[30] = handleItemClick, $[31] = handleMenuClickOutside, $[32] = handleMenuEscape, $[33] = id, $[34] = menuProp, $[35] = shouldFocus, $[36] = t17) : t17 = $[36];\n\tlet menu = t17, t18;\n\t$[37] !== buttonProp || $[38] !== handleMouseDown || $[39] !== id || $[40] !== open ? (t18 = buttonProp && cloneElement(buttonProp, {\n\t\t\"data-ui\": \"MenuButton\",\n\t\tid,\n\t\tonClick: handleButtonClick,\n\t\tonKeyDown: handleButtonKeyDown,\n\t\tonMouseDown: handleMouseDown,\n\t\t\"aria-haspopup\": !0,\n\t\t\"aria-expanded\": open,\n\t\tref: setButtonElement,\n\t\tselected: buttonProp.props.selected ?? open\n\t}), $[37] = buttonProp, $[38] = handleMouseDown, $[39] = id, $[40] = open, $[41] = t18) : t18 = $[41];\n\tlet button = t18, t19, t20;\n\t$[42] === buttonElement ? (t19 = $[43], t20 = $[44]) : (t19 = () => buttonElement, t20 = [buttonElement], $[42] = buttonElement, $[43] = t19, $[44] = t20), useImperativeHandle(forwardedRef, t19, t20);\n\tlet t21;\n\t$[45] === popover ? t21 = $[46] : (t21 = popover || {}, $[45] = popover, $[46] = t21);\n\tlet t22;\n\t$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !== deprecated_popoverRadius || $[50] !== deprecated_popoverScheme || $[51] !== deprecated_portal || $[52] !== deprecated_preventOverflow || $[53] !== t21 ? (t22 = {\n\t\tboundaryElement: deprecated_boundaryElement,\n\t\toverflow: \"auto\",\n\t\tplacement: deprecated_placement,\n\t\tportal: deprecated_portal,\n\t\tpreventOverflow: deprecated_preventOverflow,\n\t\tradius: deprecated_popoverRadius,\n\t\tscheme: deprecated_popoverScheme,\n\t\t...t21\n\t}, $[47] = deprecated_boundaryElement, $[48] = deprecated_placement, $[49] = deprecated_popoverRadius, $[50] = deprecated_popoverScheme, $[51] = deprecated_portal, $[52] = deprecated_preventOverflow, $[53] = t21, $[54] = t22) : t22 = $[54];\n\tlet popoverProps = t22, t23;\n\t$[55] === button ? t23 = $[56] : (t23 = button || /* @__PURE__ */ jsx(Fragment$1, {}), $[55] = button, $[56] = t23);\n\tlet t24;\n\treturn $[57] !== menu || $[58] !== open || $[59] !== popoverProps || $[60] !== t23 ? (t24 = /* @__PURE__ */ jsx(Popover, {\n\t\t\"data-ui\": \"MenuButton__popover\",\n\t\t...popoverProps,\n\t\tcontent: menu,\n\t\topen,\n\t\tchildren: t23\n\t}), $[57] = menu, $[58] = open, $[59] = popoverProps, $[60] = t23, $[61] = t24) : t24 = $[61], t24;\n});\nfunction _temp$4(v) {\n\treturn !v;\n}\nconst animation = css`background-image:linear-gradient( to right,var(--card-skeleton-color-from),var(--card-skeleton-color-to),var(--card-skeleton-color-from),var(--card-skeleton-color-from),var(--card-skeleton-color-from) );background-position:100%;background-size:200% 100%;background-attachment:fixed;animation-name:${keyframes`0%{background-position:100%;}100%{background-position:-100%;}`};animation-timing-function:ease-in-out;animation-iteration-count:infinite;animation-duration:2000ms;`, skeletonStyle = css`opacity:${({ $visible }) => +!!$visible};transition:opacity 200ms ease-in;@media screen and (prefers-reduced-motion:no-preference){${({ $animated }) => $animated ? animation : css`background-color:var(--card-skeleton-color-from);`}}@media screen and (prefers-reduced-motion:reduce){background-color:var(--card-skeleton-color-from);}`, StyledSkeleton$1 = /* @__PURE__ */ styled(Box).withConfig({\n\tdisplayName: \"StyledSkeleton\",\n\tcomponentId: \"sc-6p2gkd-0\"\n})(responsiveRadiusStyle, skeletonStyle), Skeleton = forwardRef(function Skeleton(props, ref) {\n\tlet $ = c(16), delay, radius, restProps, t0;\n\t$[0] === props ? (delay = $[1], radius = $[2], restProps = $[3], t0 = $[4]) : ({animated: t0, delay, radius, ...restProps} = props, $[0] = props, $[1] = delay, $[2] = radius, $[3] = restProps, $[4] = t0);\n\tlet animated = t0 !== void 0 && t0, [visible, setVisible] = useState(!delay), t1, t2;\n\t$[5] === delay ? (t1 = $[6], t2 = $[7]) : (t1 = () => {\n\t\tif (!delay) return;\n\t\tlet timeout = setTimeout(() => {\n\t\t\tsetVisible(!0);\n\t\t}, delay);\n\t\treturn () => {\n\t\t\tclearTimeout(timeout);\n\t\t};\n\t}, t2 = [delay], $[5] = delay, $[6] = t1, $[7] = t2), useEffect(t1, t2);\n\tlet t3;\n\t$[8] === radius ? t3 = $[9] : (t3 = _getArrayProp(radius), $[8] = radius, $[9] = t3);\n\tlet t4 = !delay || visible, t5;\n\treturn $[10] !== animated || $[11] !== ref || $[12] !== restProps || $[13] !== t3 || $[14] !== t4 ? (t5 = /* @__PURE__ */ jsx(StyledSkeleton$1, {\n\t\t...restProps,\n\t\t$animated: animated,\n\t\t$radius: t3,\n\t\t$visible: t4,\n\t\tref\n\t}), $[10] = animated, $[11] = ref, $[12] = restProps, $[13] = t3, $[14] = t4, $[15] = t5) : t5 = $[15], t5;\n}), StyledSkeleton = /* @__PURE__ */ styled(Skeleton).withConfig({\n\tdisplayName: \"StyledSkeleton\",\n\tcomponentId: \"sc-ilblpm-0\"\n})((props) => {\n\tlet { $size, $style } = props, { font, media } = getTheme_v2(props.theme), fontStyle = font[$style];\n\treturn _responsive(media, $size, (sizeIndex) => {\n\t\tlet fontSize = fontStyle.sizes[sizeIndex];\n\t\treturn { height: fontSize.lineHeight - fontSize.ascenderHeight - fontSize.descenderHeight };\n\t});\n}), TextSkeleton = forwardRef(function TextSkeleton(props, ref) {\n\tlet $ = c(9), restProps, t0;\n\t$[0] === props ? (restProps = $[1], t0 = $[2]) : ({size: t0, ...restProps} = props, $[0] = props, $[1] = restProps, $[2] = t0);\n\tlet size = t0 === void 0 ? 2 : t0, t1;\n\t$[3] === size ? t1 = $[4] : (t1 = _getArrayProp(size), $[3] = size, $[4] = t1);\n\tlet $size = t1, t2;\n\treturn $[5] !== $size || $[6] !== ref || $[7] !== restProps ? (t2 = /* @__PURE__ */ jsx(StyledSkeleton, {\n\t\t...restProps,\n\t\t$size,\n\t\tref,\n\t\t$style: \"text\"\n\t}), $[5] = $size, $[6] = ref, $[7] = restProps, $[8] = t2) : t2 = $[8], t2;\n}), LabelSkeleton = forwardRef(function LabelSkeleton(props, ref) {\n\tlet $ = c(9), restProps, t0;\n\t$[0] === props ? (restProps = $[1], t0 = $[2]) : ({size: t0, ...restProps} = props, $[0] = props, $[1] = restProps, $[2] = t0);\n\tlet size = t0 === void 0 ? 2 : t0, t1;\n\t$[3] === size ? t1 = $[4] : (t1 = _getArrayProp(size), $[3] = size, $[4] = t1);\n\tlet $size = t1, t2;\n\treturn $[5] !== $size || $[6] !== ref || $[7] !== restProps ? (t2 = /* @__PURE__ */ jsx(StyledSkeleton, {\n\t\t...restProps,\n\t\t$size,\n\t\tref,\n\t\t$style: \"label\"\n\t}), $[5] = $size, $[6] = ref, $[7] = restProps, $[8] = t2) : t2 = $[8], t2;\n}), HeadingSkeleton = forwardRef(function HeadingSkeleton(props, ref) {\n\tlet $ = c(9), restProps, t0;\n\t$[0] === props ? (restProps = $[1], t0 = $[2]) : ({size: t0, ...restProps} = props, $[0] = props, $[1] = restProps, $[2] = t0);\n\tlet size = t0 === void 0 ? 2 : t0, t1;\n\t$[3] === size ? t1 = $[4] : (t1 = _getArrayProp(size), $[3] = size, $[4] = t1);\n\tlet $size = t1, t2;\n\treturn $[5] !== $size || $[6] !== ref || $[7] !== restProps ? (t2 = /* @__PURE__ */ jsx(StyledSkeleton, {\n\t\t...restProps,\n\t\t$size,\n\t\tref,\n\t\t$style: \"heading\"\n\t}), $[5] = $size, $[6] = ref, $[7] = restProps, $[8] = t2) : t2 = $[8], t2;\n}), CodeSkeleton = forwardRef(function CodeSkeleton(props, ref) {\n\tlet $ = c(9), restProps, t0;\n\t$[0] === props ? (restProps = $[1], t0 = $[2]) : ({size: t0, ...restProps} = props, $[0] = props, $[1] = restProps, $[2] = t0);\n\tlet size = t0 === void 0 ? 2 : t0, t1;\n\t$[3] === size ? t1 = $[4] : (t1 = _getArrayProp(size), $[3] = size, $[4] = t1);\n\tlet $size = t1, t2;\n\treturn $[5] !== $size || $[6] !== ref || $[7] !== restProps ? (t2 = /* @__PURE__ */ jsx(StyledSkeleton, {\n\t\t...restProps,\n\t\t$size,\n\t\tref,\n\t\t$style: \"code\"\n\t}), $[5] = $size, $[6] = ref, $[7] = restProps, $[8] = t2) : t2 = $[8], t2;\n}), TabPanel = forwardRef(function TabPanel(props, ref) {\n\tlet $ = c(9), flex, restProps;\n\t$[0] === props ? (flex = $[1], restProps = $[2]) : ({flex, ...restProps} = props, $[0] = props, $[1] = flex, $[2] = restProps);\n\tlet t0 = props.tabIndex === void 0 ? 0 : props.tabIndex, t1;\n\treturn $[3] !== flex || $[4] !== props.children || $[5] !== ref || $[6] !== restProps || $[7] !== t0 ? (t1 = /* @__PURE__ */ jsx(Box, {\n\t\t\"data-ui\": \"TabPanel\",\n\t\t...restProps,\n\t\tflex,\n\t\tref,\n\t\trole: \"tabpanel\",\n\t\ttabIndex: t0,\n\t\tchildren: props.children\n\t}), $[3] = flex, $[4] = props.children, $[5] = ref, $[6] = restProps, $[7] = t0, $[8] = t1) : t1 = $[8], t1;\n}), STATUS_CARD_TONE = {\n\terror: \"critical\",\n\twarning: \"caution\",\n\tsuccess: \"positive\",\n\tinfo: \"neutral\"\n}, BUTTON_TONE = {\n\terror: \"critical\",\n\twarning: \"caution\",\n\tsuccess: \"positive\",\n\tinfo: \"neutral\"\n}, TextBox = styled(Flex).withConfig({\n\tdisplayName: \"TextBox\",\n\tcomponentId: \"sc-xd2ehd-0\"\n})`overflow-x:auto;`, StyledToast = styled(Card).withConfig({\n\tdisplayName: \"StyledToast\",\n\tcomponentId: \"sc-xd2ehd-1\"\n})`pointer-events:all;width:100%;position:relative;overflow:hidden;overflow:clip;&[data-has-duration]{padding-bottom:calc(${2}px / 2);}`, LoadingBar = styled.div.withConfig({\n\tdisplayName: \"LoadingBar\",\n\tcomponentId: \"sc-xd2ehd-2\"\n})`display:flex;position:absolute;bottom:0px;top:0px;left:0px;right:0px;pointer-events:none;z-index:-1;overflow:hidden;overflow:clip;background:transparent;align-items:flex-end;will-change:opacity;`, LoadingBarMask = styled(Card).withConfig({\n\tdisplayName: \"LoadingBarMask\",\n\tcomponentId: \"sc-xd2ehd-3\"\n})`position:absolute;top:0;left:-${2}px;right:-${2}px;bottom:${2}px;z-index:1;`, LoadingBarProgress = styled(Card).withConfig({\n\tdisplayName: \"LoadingBarProgress\",\n\tcomponentId: \"sc-xd2ehd-4\"\n})`display:block;height:100%;width:100%;transform-origin:0% 50%;background-color:${(props) => {\n\tlet { color } = getTheme_v2(props.theme);\n\treturn color.button.default[props.tone].enabled.bg;\n}};`, ROLES = {\n\terror: \"alert\",\n\twarning: \"alert\",\n\tsuccess: \"alert\",\n\tinfo: \"alert\"\n};\n/**\n* The `Toast` component gives feedback to users when an action has taken place.\n*\n* Toasts can be closed with a close button, or auto-dismiss after a certain timeout.\n*\n* @public\n*/\nfunction Toast(props) {\n\tlet $ = c(50), closable, description, duration, onClose, restProps, status, t0, title, updatedAt;\n\t$[0] === props ? (closable = $[1], description = $[2], duration = $[3], onClose = $[4], restProps = $[5], status = $[6], t0 = $[7], title = $[8], updatedAt = $[9]) : ({closable, description, duration, onClose, radius: t0, title, status, updatedAt, ...restProps} = props, $[0] = props, $[1] = closable, $[2] = description, $[3] = duration, $[4] = onClose, $[5] = restProps, $[6] = status, $[7] = t0, $[8] = title, $[9] = updatedAt);\n\tlet radius = t0 === void 0 ? 3 : t0, cardTone = status ? STATUS_CARD_TONE[status] : \"default\", buttonTone = status ? BUTTON_TONE[status] : \"default\", role = status ? ROLES[status] : \"status\", visualDuration = usePrefersReducedMotion() ? 0 : .26, t1;\n\t$[10] === visualDuration ? t1 = $[11] : (t1 = visualDuration ? {\n\t\ttype: \"spring\",\n\t\tvisualDuration,\n\t\tbounce: .25\n\t} : { duration: 0 }, $[10] = visualDuration, $[11] = t1);\n\tlet transition = t1, hasDuration = duration && isFinite(duration) && duration < 20736e5, t2;\n\t$[12] === Symbol.for(\"react.memo_cache_sentinel\") ? (t2 = [\"hidden\", \"initial\"], $[12] = t2) : t2 = $[12];\n\tlet initial = t2, t3;\n\t$[13] === Symbol.for(\"react.memo_cache_sentinel\") ? (t3 = [\"visible\", \"slideIn\"], $[13] = t3) : t3 = $[13];\n\tlet animate = t3, t4;\n\t$[14] === Symbol.for(\"react.memo_cache_sentinel\") ? (t4 = [\"hidden\", \"slideOut\"], $[14] = t4) : t4 = $[14];\n\tlet exit = t4, t5 = hasDuration ? \"\" : void 0, t6;\n\t$[15] === title ? t6 = $[16] : (t6 = title && /* @__PURE__ */ jsx(Text, {\n\t\tsize: 1,\n\t\tweight: \"medium\",\n\t\tchildren: title\n\t}), $[15] = title, $[16] = t6);\n\tlet t7;\n\t$[17] !== description || $[18] !== transition ? (t7 = description && /* @__PURE__ */ jsx(MotionText, {\n\t\tmuted: !0,\n\t\tsize: 1,\n\t\tvariants: content,\n\t\ttransition,\n\t\tchildren: description\n\t}), $[17] = description, $[18] = transition, $[19] = t7) : t7 = $[19];\n\tlet t8;\n\t$[20] !== t6 || $[21] !== t7 ? (t8 = /* @__PURE__ */ jsx(TextBox, {\n\t\tflex: 1,\n\t\tpadding: 3,\n\t\tchildren: /* @__PURE__ */ jsxs(Stack, {\n\t\t\tgap: 3,\n\t\t\tchildren: [t6, t7]\n\t\t})\n\t}), $[20] = t6, $[21] = t7, $[22] = t8) : t8 = $[22];\n\tlet t9;\n\t$[23] !== buttonTone || $[24] !== closable || $[25] !== onClose ? (t9 = closable && /* @__PURE__ */ jsx(Box, {\n\t\tpadding: 1,\n\t\tchildren: /* @__PURE__ */ jsx(Button, {\n\t\t\tas: \"button\",\n\t\t\ticon: CloseIcon,\n\t\t\tmode: \"bleed\",\n\t\t\tpadding: 2,\n\t\t\ttone: buttonTone,\n\t\t\tonClick: onClose,\n\t\t\tstyle: { verticalAlign: \"top\" }\n\t\t})\n\t}), $[23] = buttonTone, $[24] = closable, $[25] = onClose, $[26] = t9) : t9 = $[26];\n\tlet t10;\n\t$[27] !== t8 || $[28] !== t9 || $[29] !== transition ? (t10 = /* @__PURE__ */ jsxs(MotionFlex, {\n\t\talign: \"flex-start\",\n\t\tvariants: content,\n\t\ttransition,\n\t\tchildren: [t8, t9]\n\t}), $[27] = t8, $[28] = t9, $[29] = transition, $[30] = t10) : t10 = $[30];\n\tlet t11;\n\t$[31] !== cardTone || $[32] !== duration || $[33] !== hasDuration || $[34] !== onClose || $[35] !== radius || $[36] !== transition || $[37] !== updatedAt || $[38] !== visualDuration ? (t11 = hasDuration && /* @__PURE__ */ jsxs(MotionLoadingBar, {\n\t\tvariants: content,\n\t\ttransition,\n\t\tchildren: [/* @__PURE__ */ jsx(LoadingBarMask, {\n\t\t\ttone: cardTone,\n\t\t\tradius\n\t\t}), /* @__PURE__ */ jsx(MotionLoadingBarProgress, {\n\t\t\ttone: cardTone,\n\t\t\tinitial: { scaleX: 0 },\n\t\t\tanimate: { scaleX: 1 },\n\t\t\ttransition: {\n\t\t\t\tdelay: visualDuration,\n\t\t\t\tduration: duration / 1e3,\n\t\t\t\tease: \"linear\"\n\t\t\t},\n\t\t\tonAnimationComplete: onClose\n\t\t}, `progress-${updatedAt}`)]\n\t}), $[31] = cardTone, $[32] = duration, $[33] = hasDuration, $[34] = onClose, $[35] = radius, $[36] = transition, $[37] = updatedAt, $[38] = visualDuration, $[39] = t11) : t11 = $[39];\n\tlet t12;\n\treturn $[40] !== cardTone || $[41] !== radius || $[42] !== restProps || $[43] !== role || $[44] !== t10 || $[45] !== t11 || $[46] !== t5 || $[47] !== transition || $[48] !== visualDuration ? (t12 = /* @__PURE__ */ jsxs(MotionToast, {\n\t\t\"data-ui\": \"Toast\",\n\t\trole,\n\t\t...restProps,\n\t\t\"data-has-duration\": t5,\n\t\tcustom: visualDuration,\n\t\tradius,\n\t\tshadow: 2,\n\t\ttone: cardTone,\n\t\tforwardedAs: \"li\",\n\t\tlayout: \"position\",\n\t\tvariants: container,\n\t\tinitial,\n\t\tanimate,\n\t\texit,\n\t\ttransition,\n\t\tchildren: [t10, t11]\n\t}), $[40] = cardTone, $[41] = radius, $[42] = restProps, $[43] = role, $[44] = t10, $[45] = t11, $[46] = t5, $[47] = transition, $[48] = visualDuration, $[49] = t12) : t12 = $[49], t12;\n}\nconst container = {\n\tinitial: {\n\t\ty: 32,\n\t\tscale: .5,\n\t\tzIndex: 1\n\t},\n\thidden: { opacity: 0 },\n\tvisible: (visualDuration) => visualDuration ? {\n\t\topacity: 1,\n\t\ttransition: {\n\t\t\twhen: \"beforeChildren\",\n\t\t\tdelayChildren: stagger(visualDuration / 3),\n\t\t\tduration: visualDuration / 3\n\t\t}\n\t} : { opacity: 1 },\n\tslideIn: {\n\t\ty: 0,\n\t\tscale: 1\n\t},\n\tslideOut: {\n\t\tzIndex: 0,\n\t\tscale: .75\n\t}\n}, content = {\n\tinitial: { willChange: \"transform\" },\n\thidden: { opacity: 0 },\n\tvisible: { opacity: 1 }\n}, MotionToast = motion.create(StyledToast), MotionFlex = motion.create(Flex), MotionText = motion.create(Text), MotionLoadingBar = motion.create(LoadingBar), MotionLoadingBarProgress = motion.create(LoadingBarProgress);\n/**\n* Some components should only render after mounting to the DOM, and not be rendered at all during SSR renderToString or equivalent.\n* @public\n*/\nfunction useMounted() {\n\treturn useSyncExternalStore(subscribe, _temp$3, _temp2);\n}\nfunction _temp2() {\n\treturn !1;\n}\nfunction _temp$3() {\n\treturn !0;\n}\nconst subscribe = () => () => {}, ToastContext = createGlobalScopedContext(\"@sanity/ui/context/toast\", null);\n/**\n* @internal\n*/\nfunction ToastLayer(props) {\n\tlet $ = c(9), { children, padding: t0, paddingX, paddingY, gap: t1 } = props, padding = t0 === void 0 ? 4 : t0, gap = t1 === void 0 ? 3 : t1, { zIndex } = useLayer(), t2;\n\t$[0] === zIndex ? t2 = $[1] : (t2 = { zIndex }, $[0] = zIndex, $[1] = t2);\n\tlet t3;\n\treturn $[2] !== children || $[3] !== gap || $[4] !== padding || $[5] !== paddingX || $[6] !== paddingY || $[7] !== t2 ? (t3 = /* @__PURE__ */ jsx(StyledLayer, {\n\t\tforwardedAs: \"ul\",\n\t\t\"data-ui\": \"ToastProvider\",\n\t\tpadding,\n\t\tpaddingX,\n\t\tpaddingY,\n\t\tgap,\n\t\tcolumns: 1,\n\t\tstyle: t2,\n\t\tchildren\n\t}), $[2] = children, $[3] = gap, $[4] = padding, $[5] = paddingX, $[6] = paddingY, $[7] = t2, $[8] = t3) : t3 = $[8], t3;\n}\nconst StyledLayer = styled(Grid).withConfig({\n\tdisplayName: \"StyledLayer\",\n\tcomponentId: \"sc-vx00k8-0\"\n})`box-sizing:border-box;position:fixed;right:0;bottom:0;list-style:none;pointer-events:none;max-width:420px;width:100%;`;\nlet toastId = 0;\n/** @internal */\nfunction generateToastId() {\n\treturn String(toastId++);\n}\n/**\n* @public\n*/\nfunction ToastProvider(props) {\n\tlet $ = c(13), { children, padding, paddingX, paddingY, gap, zOffset: t0 } = props, zOffset = t0 === void 0 ? 1 : t0, t1;\n\t$[0] === Symbol.for(\"react.memo_cache_sentinel\") ? (t1 = [], $[0] = t1) : t1 = $[0];\n\tlet [state, setState] = useState(t1), mounted = useMounted(), t2;\n\tif ($[1] === Symbol.for(\"react.memo_cache_sentinel\")) {\n\t\tlet push = (params) => {\n\t\t\tlet id = params.id || generateToastId(), duration = params.duration || 5e3;\n\t\t\treturn startTransition(() => {\n\t\t\t\tsetState((prevState) => {\n\t\t\t\t\tif (duration === .01) return prevState.filter((toast) => toast.id !== id);\n\t\t\t\t\tlet dismiss = () => startTransition(() => setState((currentState) => currentState.filter((toast_0) => toast_0.id !== id)));\n\t\t\t\t\treturn [...prevState.filter((toast_1) => toast_1.id !== id), {\n\t\t\t\t\t\tdismiss,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tupdatedAt: Date.now(),\n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t...params,\n\t\t\t\t\t\t\tduration\n\t\t\t\t\t\t}\n\t\t\t\t\t}];\n\t\t\t\t});\n\t\t\t}), id;\n\t\t};\n\t\tt2 = {\n\t\t\tversion: 0,\n\t\t\tpush\n\t\t}, $[1] = t2;\n\t} else t2 = $[1];\n\tlet value = t2, t3;\n\t$[2] !== gap || $[3] !== mounted || $[4] !== padding || $[5] !== paddingX || $[6] !== paddingY || $[7] !== state || $[8] !== zOffset ? (t3 = mounted && /* @__PURE__ */ jsx(LayerProvider, {\n\t\tzOffset,\n\t\tchildren: /* @__PURE__ */ jsx(ToastLayer, {\n\t\t\tpadding,\n\t\t\tpaddingX,\n\t\t\tpaddingY,\n\t\t\tgap,\n\t\t\tchildren: /* @__PURE__ */ jsx(AnimatePresence, {\n\t\t\t\tinitial: !1,\n\t\t\t\tmode: \"popLayout\",\n\t\t\t\tchildren: state.map(_temp$2)\n\t\t\t})\n\t\t})\n\t}), $[2] = gap, $[3] = mounted, $[4] = padding, $[5] = paddingX, $[6] = paddingY, $[7] = state, $[8] = zOffset, $[9] = t3) : t3 = $[9];\n\tlet t4;\n\treturn $[10] !== children || $[11] !== t3 ? (t4 = /* @__PURE__ */ jsxs(ToastContext.Provider, {\n\t\tvalue,\n\t\tchildren: [children, t3]\n\t}), $[10] = children, $[11] = t3, $[12] = t4) : t4 = $[12], t4;\n}\nfunction _temp$2(t0) {\n\tlet { dismiss: dismiss_0, id: id_0, params: params_0, updatedAt } = t0;\n\treturn /* @__PURE__ */ jsx(Toast, {\n\t\tclosable: params_0.closable,\n\t\tdescription: params_0.description,\n\t\tonClose: dismiss_0,\n\t\tstatus: params_0.status,\n\t\ttitle: params_0.title,\n\t\tduration: params_0.duration,\n\t\tupdatedAt\n\t}, id_0);\n}\n/**\n* @public\n*/\nfunction useToast() {\n\tlet value = useContext(ToastContext);\n\tif (!value) throw Error(\"useToast(): missing context value\");\n\tif (!isRecord(value) || value.version !== 0) throw Error(\"useToast(): the context value is not compatible\");\n\treturn value;\n}\nfunction _findPrevItemElement(state, itemElements, focusedElement) {\n\tlet idx = itemElements.indexOf(focusedElement), els = itemElements.slice(0, idx), len = els.length;\n\tfor (let i = len - 1; i >= 0; --i) {\n\t\tlet itemKey = els[i].getAttribute(\"data-tree-key\");\n\t\tif (!itemKey) continue;\n\t\tlet segments = itemKey.split(\"/\");\n\t\tsegments.pop();\n\t\tlet p = [], expanded = !0;\n\t\tfor (let j = 0; j < segments.length; j += 1) if (p.push(segments[j]), !state[p.join(\"/\")]?.expanded) {\n\t\t\texpanded = !1;\n\t\t\tbreak;\n\t\t}\n\t\tif (expanded) return els[i];\n\t}\n\treturn null;\n}\nfunction _findNextItemElement(state, itemElements, focusedElement) {\n\tlet idx = itemElements.indexOf(focusedElement), els = itemElements.slice(idx), len = itemElements.length;\n\tfor (let i = 1; i < len; i += 1) {\n\t\tif (!els[i]) continue;\n\t\tlet itemKey = els[i].getAttribute(\"data-tree-key\");\n\t\tif (!itemKey) continue;\n\t\tlet segments = itemKey.split(\"/\");\n\t\tsegments.pop();\n\t\tlet p = [], expanded = !0;\n\t\tfor (let j = 0; j < segments.length; j += 1) if (p.push(segments[j]), !state[p.join(\"/\")]?.expanded) {\n\t\t\texpanded = !1;\n\t\t\tbreak;\n\t\t}\n\t\tif (expanded) return els[i];\n\t}\n\treturn null;\n}\nfunction _focusItemElement(el) {\n\tif (el.getAttribute(\"role\") === \"treeitem\" && el.focus(), el.getAttribute(\"role\") === \"none\") {\n\t\tlet firstChild = el.firstChild;\n\t\tfirstChild && firstChild instanceof HTMLElement && firstChild.focus();\n\t}\n}\n/**\n* @internal\n*/\nconst TreeContext = createGlobalScopedContext(\"@sanity/ui/context/tree\", null), Tree = forwardRef(function Tree(props, forwardedRef) {\n\tlet $ = c(38), children, gap, onFocus, restProps, t0;\n\t$[0] === props ? (children = $[1], gap = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]) : ({children, gap, space: t0, onFocus, ...restProps} = props, $[0] = props, $[1] = children, $[2] = gap, $[3] = onFocus, $[4] = restProps, $[5] = t0);\n\tlet spacing = gap === void 0 ? t0 === void 0 ? 1 : t0 : gap, ref = useRef(null), [focusedElement, setFocusedElement] = useState(null), focusedElementRef = useRef(focusedElement), t1;\n\t$[6] === Symbol.for(\"react.memo_cache_sentinel\") ? (t1 = [], $[6] = t1) : t1 = $[6];\n\tlet path = t1, t2;\n\t$[7] === Symbol.for(\"react.memo_cache_sentinel\") ? (t2 = [], $[7] = t2) : t2 = $[7];\n\tlet [itemElements, setItemElements] = useState(t2), t3;\n\t$[8] === Symbol.for(\"react.memo_cache_sentinel\") ? (t3 = {}, $[8] = t3) : t3 = $[8];\n\tlet [state, setState] = useState(t3), stateRef = useRef(state), t4;\n\t$[9] === Symbol.for(\"react.memo_cache_sentinel\") ? (t4 = () => ref.current, $[9] = t4) : t4 = $[9], useImperativeHandle(forwardedRef, t4);\n\tlet t5, t6;\n\t$[10] === focusedElement ? (t5 = $[11], t6 = $[12]) : (t5 = () => {\n\t\tfocusedElementRef.current = focusedElement;\n\t}, t6 = [focusedElement], $[10] = focusedElement, $[11] = t5, $[12] = t6), useEffect(t5, t6);\n\tlet t7, t8;\n\t$[13] === state ? (t7 = $[14], t8 = $[15]) : (t7 = () => {\n\t\tstateRef.current = state;\n\t}, t8 = [state], $[13] = state, $[14] = t7, $[15] = t8), useEffect(t7, t8);\n\tlet t9;\n\t$[16] === Symbol.for(\"react.memo_cache_sentinel\") ? (t9 = (element, path_0, expanded, selected) => (setState((s) => ({\n\t\t...s,\n\t\t[path_0]: {\n\t\t\telement,\n\t\t\texpanded\n\t\t}\n\t})), selected && setFocusedElement(element), () => {\n\t\tsetState((s_0) => {\n\t\t\tlet newState = { ...s_0 };\n\t\t\treturn delete newState[path_0], newState;\n\t\t});\n\t}), $[16] = t9) : t9 = $[16];\n\tlet registerItem = t9, t10;\n\t$[17] === Symbol.for(\"react.memo_cache_sentinel\") ? (t10 = (path_1, expanded_0) => {\n\t\tsetState((s_1) => {\n\t\t\tlet itemState = s_1[path_1];\n\t\t\treturn itemState ? {\n\t\t\t\t...s_1,\n\t\t\t\t[path_1]: {\n\t\t\t\t\t...itemState,\n\t\t\t\t\texpanded: expanded_0\n\t\t\t\t}\n\t\t\t} : s_1;\n\t\t});\n\t}, $[17] = t10) : t10 = $[17];\n\tlet setExpanded = t10, t11 = focusedElement || itemElements[0] || null, t12;\n\t$[18] !== spacing || $[19] !== state || $[20] !== t11 ? (t12 = {\n\t\tversion: 0,\n\t\tfocusedElement: t11,\n\t\tlevel: 0,\n\t\tpath,\n\t\tregisterItem,\n\t\tsetExpanded,\n\t\tsetFocusedElement,\n\t\tgap: spacing,\n\t\tspace: spacing,\n\t\tstate\n\t}, $[18] = spacing, $[19] = state, $[20] = t11, $[21] = t12) : t12 = $[21];\n\tlet contextValue = t12, t13;\n\t$[22] === itemElements ? t13 = $[23] : (t13 = (event) => {\n\t\tif (focusedElementRef.current) {\n\t\t\tif (event.key === \"ArrowDown\") {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tlet nextEl = _findNextItemElement(stateRef.current, itemElements, focusedElementRef.current);\n\t\t\t\tnextEl && (_focusItemElement(nextEl), setFocusedElement(nextEl));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (event.key === \"ArrowUp\") {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tlet prevEl = _findPrevItemElement(stateRef.current, itemElements, focusedElementRef.current);\n\t\t\t\tprevEl && (_focusItemElement(prevEl), setFocusedElement(prevEl));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (event.key === \"ArrowLeft\") {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tlet itemKey = focusedElementRef.current.getAttribute(\"data-tree-key\");\n\t\t\t\tif (!itemKey) return;\n\t\t\t\tlet itemState_0 = stateRef.current[itemKey];\n\t\t\t\tif (!itemState_0) return;\n\t\t\t\tif (itemState_0.expanded) setState((s_2) => {\n\t\t\t\t\tlet itemState_1 = s_2[itemKey];\n\t\t\t\t\treturn itemState_1 ? {\n\t\t\t\t\t\t...s_2,\n\t\t\t\t\t\t[itemKey]: {\n\t\t\t\t\t\t\t...itemState_1,\n\t\t\t\t\t\t\texpanded: !1\n\t\t\t\t\t\t}\n\t\t\t\t\t} : s_2;\n\t\t\t\t});\n\t\t\t\telse {\n\t\t\t\t\tlet itemPath = itemKey.split(\"/\");\n\t\t\t\t\titemPath.pop();\n\t\t\t\t\tlet parentKey = itemPath.join(\"/\"), parentState = parentKey && stateRef.current[parentKey];\n\t\t\t\t\tparentState && (parentState.element.focus(), setFocusedElement(parentState.element));\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (event.key === \"ArrowRight\") {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tlet focusedKey = focusedElementRef.current.getAttribute(\"data-tree-key\");\n\t\t\t\tif (!focusedKey) return;\n\t\t\t\tstateRef.current[focusedKey]?.expanded || setState((s_3) => {\n\t\t\t\t\tlet itemState_2 = s_3[focusedKey];\n\t\t\t\t\treturn itemState_2 ? {\n\t\t\t\t\t\t...s_3,\n\t\t\t\t\t\t[focusedKey]: {\n\t\t\t\t\t\t\t...itemState_2,\n\t\t\t\t\t\t\texpanded: !0\n\t\t\t\t\t\t}\n\t\t\t\t\t} : s_3;\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}, $[22] = itemElements, $[23] = t13);\n\tlet handleKeyDown = t13, t14;\n\t$[24] === onFocus ? t14 = $[25] : (t14 = (event_0) => {\n\t\tsetFocusedElement(event_0.target), onFocus?.(event_0);\n\t}, $[24] = onFocus, $[25] = t14);\n\tlet handleFocus = t14, t15;\n\t$[26] === Symbol.for(\"react.memo_cache_sentinel\") ? (t15 = () => {\n\t\tif (!ref.current) return;\n\t\tlet _itemElements = Array.from(ref.current.querySelectorAll(\"[data-ui=\\\"TreeItem\\\"]\"));\n\t\tsetItemElements(_itemElements);\n\t}, $[26] = t15) : t15 = $[26];\n\tlet t16;\n\t$[27] === children ? t16 = $[28] : (t16 = [children], $[27] = children, $[28] = t16), useEffect(t15, t16);\n\tlet t17;\n\t$[29] !== children || $[30] !== handleFocus || $[31] !== handleKeyDown || $[32] !== restProps || $[33] !== spacing ? (t17 = /* @__PURE__ */ jsx(Stack, {\n\t\tas: \"ul\",\n\t\t\"data-ui\": \"Tree\",\n\t\t...restProps,\n\t\tonFocus: handleFocus,\n\t\tonKeyDown: handleKeyDown,\n\t\tref,\n\t\trole: \"tree\",\n\t\tgap: spacing,\n\t\tchildren\n\t}), $[29] = children, $[30] = handleFocus, $[31] = handleKeyDown, $[32] = restProps, $[33] = spacing, $[34] = t17) : t17 = $[34];\n\tlet t18;\n\treturn $[35] !== contextValue || $[36] !== t17 ? (t18 = /* @__PURE__ */ jsx(TreeContext.Provider, {\n\t\tvalue: contextValue,\n\t\tchildren: t17\n\t}), $[35] = contextValue, $[36] = t17, $[37] = t18) : t18 = $[37], t18;\n});\nfunction treeItemRootStyle() {\n\treturn css`&[role='none'] > [role='treeitem']{outline:none;cursor:default;border-radius:3px;background-color:var(--card-bg-color);color:var(--treeitem-fg-color);&:focus{position:relative;}}&[role='treeitem']{outline:none;& > div{cursor:default;border-radius:3px;background-color:var(--card-bg-color);color:var(--treeitem-fg-color);}&:focus > div{position:relative;}}`;\n}\nfunction treeItemRootColorStyle(props) {\n\tlet { color } = getTheme_v2(props.theme), tone = color.selectable.default;\n\treturn css`&[role='none']{& > [role='treeitem']{${_cardColorStyle(color, tone.enabled)}}&[data-selected] > [role='treeitem']{${_cardColorStyle(color, tone.pressed)}}@media (hover:hover){&:not([data-selected]) > [role='treeitem']:not(:focus):hover{${_cardColorStyle(color, tone.hovered)}}& > [role='treeitem']:focus{${_cardColorStyle(color, tone.selected)}}}}&[role='treeitem']{& > [data-ui='TreeItem__box']{${_cardColorStyle(color, tone.enabled)}}&[data-selected] > [data-ui='TreeItem__box']{${_cardColorStyle(color, tone.pressed)}}@media (hover:hover){&:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover{${_cardColorStyle(color, tone.hovered)}}&:focus > [data-ui='TreeItem__box']{${_cardColorStyle(color, tone.selected)}}}}`;\n}\nfunction treeItemBoxStyle(props) {\n\tlet { $level } = props, { space } = getTheme_v2(props.theme);\n\treturn css`display:block;padding-left:${rem(space[2] * $level)};text-decoration:none;`;\n}\n/**\n* @beta\n*/\nfunction useTree() {\n\tlet tree = useContext(TreeContext);\n\tif (!tree) throw Error(\"Tree: missing context value\");\n\treturn tree;\n}\nfunction TreeGroup(props) {\n\tlet $ = c(9), children, restProps, t0;\n\t$[0] === props ? (children = $[1], restProps = $[2], t0 = $[3]) : ({children, expanded: t0, ...restProps} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0);\n\tlet expanded = t0 !== void 0 && t0, tree = useTree(), t1 = !expanded, t2;\n\treturn $[4] !== children || $[5] !== restProps || $[6] !== t1 || $[7] !== tree.gap ? (t2 = /* @__PURE__ */ jsx(Stack, {\n\t\tas: \"ul\",\n\t\t\"data-ui\": \"TreeGroup\",\n\t\t...restProps,\n\t\thidden: t1,\n\t\tmarginTop: tree.gap,\n\t\trole: \"group\",\n\t\tgap: tree.gap,\n\t\tchildren\n\t}), $[4] = children, $[5] = restProps, $[6] = t1, $[7] = tree.gap, $[8] = t2) : t2 = $[8], t2;\n}\nconst StyledTreeItem = /* @__PURE__ */ styled.li.withConfig({\n\tdisplayName: \"StyledTreeItem\",\n\tcomponentId: \"sc-qnd0f7-0\"\n})(treeItemRootStyle, treeItemRootColorStyle), TreeItemBox = /* @__PURE__ */ styled.a.withConfig({\n\tdisplayName: \"TreeItemBox\",\n\tcomponentId: \"sc-qnd0f7-1\"\n})(treeItemBoxStyle), ToggleArrowText = styled(Text).withConfig({\n\tdisplayName: \"ToggleArrowText\",\n\tcomponentId: \"sc-qnd0f7-2\"\n})`& > svg{transition:transform 100ms;}`;\n/**\n* This API might change. DO NOT USE IN PRODUCTION.\n* @beta\n*/\nfunction TreeItem(props) {\n\tlet $ = c(117), IconComponent, children, gap, href, idProp, linkAs, linkProps, muted, onClick, restProps, t0, t1, t2, t3, t4, text, weight;\n\t$[0] === props ? (IconComponent = $[1], children = $[2], gap = $[3], href = $[4], idProp = $[5], linkAs = $[6], linkProps = $[7], muted = $[8], onClick = $[9], restProps = $[10], t0 = $[11], t1 = $[12], t2 = $[13], t3 = $[14], t4 = $[15], text = $[16], weight = $[17]) : ({children, expanded: t0, fontSize: t1, href, icon: IconComponent, id: idProp, linkAs, linkProps, muted, onClick, padding: t2, selected: t3, gap, space: t4, text, weight, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = children, $[3] = gap, $[4] = href, $[5] = idProp, $[6] = linkAs, $[7] = linkProps, $[8] = muted, $[9] = onClick, $[10] = restProps, $[11] = t0, $[12] = t1, $[13] = t2, $[14] = t3, $[15] = t4, $[16] = text, $[17] = weight);\n\tlet expandedProp = t0 !== void 0 && t0, fontSize = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 2 : t2, selected = t3 !== void 0 && t3, spacing = gap === void 0 ? t4 === void 0 ? 2 : t4 : gap, [rootElement, _setRootElement] = useState(null), t5;\n\t$[18] === Symbol.for(\"react.memo_cache_sentinel\") ? (t5 = (node) => {\n\t\tstartTransition(() => _setRootElement(node));\n\t}, $[18] = t5) : t5 = $[18];\n\tlet setRootElement = t5, treeitemRef = useRef(null), tree = useTree(), { path, registerItem, setExpanded, setFocusedElement } = tree, _id = useId(), id = idProp || _id, t6, t7;\n\tif ($[19] !== id || $[20] !== path) {\n\t\tlet itemPath = path.concat([id || \"\"]);\n\t\tt6 = itemPath, t7 = itemPath.join(\"/\"), $[19] = id, $[20] = path, $[21] = t6, $[22] = t7;\n\t} else t6 = $[21], t7 = $[22];\n\tlet t8;\n\t$[23] !== t6 || $[24] !== t7 ? (t8 = [t6, t7], $[23] = t6, $[24] = t7, $[25] = t8) : t8 = $[25];\n\tlet [itemPath_0, itemKey] = t8, itemState = tree.state[itemKey], focused = tree.focusedElement === rootElement, expanded = itemState?.expanded === void 0 ? expandedProp : itemState?.expanded || !1, tabIndex = tree.focusedElement && tree.focusedElement === rootElement ? 0 : -1, t9 = tree.level + 1, t10;\n\t$[26] !== itemPath_0 || $[27] !== t9 || $[28] !== tree ? (t10 = {\n\t\t...tree,\n\t\tlevel: t9,\n\t\tpath: itemPath_0\n\t}, $[26] = itemPath_0, $[27] = t9, $[28] = tree, $[29] = t10) : t10 = $[29];\n\tlet contextValue = t10, t11;\n\t$[30] !== expanded || $[31] !== itemKey || $[32] !== onClick || $[33] !== rootElement || $[34] !== setExpanded || $[35] !== setFocusedElement ? (t11 = (event) => {\n\t\tonClick && onClick(event);\n\t\tlet target = event.target;\n\t\ttarget instanceof HTMLElement && (target.getAttribute(\"data-ui\") === \"TreeItem\" || target.closest(\"[data-ui=\\\"TreeItem__box\\\"]\")) && (event.stopPropagation(), setExpanded(itemKey, !expanded), setFocusedElement(rootElement));\n\t}, $[30] = expanded, $[31] = itemKey, $[32] = onClick, $[33] = rootElement, $[34] = setExpanded, $[35] = setFocusedElement, $[36] = t11) : t11 = $[36];\n\tlet handleClick = t11, t12;\n\t$[37] !== focused || $[38] !== rootElement ? (t12 = (event_0) => {\n\t\tfocused && event_0.key === \"Enter\" && (treeitemRef.current || rootElement)?.click();\n\t}, $[37] = focused, $[38] = rootElement, $[39] = t12) : t12 = $[39];\n\tlet handleKeyDown = t12, t13, t14;\n\t$[40] !== expanded || $[41] !== itemKey || $[42] !== registerItem || $[43] !== rootElement || $[44] !== selected ? (t13 = () => {\n\t\tif (rootElement) return registerItem(rootElement, itemKey, expanded, selected);\n\t}, t14 = [\n\t\texpanded,\n\t\titemKey,\n\t\tregisterItem,\n\t\trootElement,\n\t\tselected\n\t], $[40] = expanded, $[41] = itemKey, $[42] = registerItem, $[43] = rootElement, $[44] = selected, $[45] = t13, $[46] = t14) : (t13 = $[45], t14 = $[46]), useEffect(t13, t14);\n\tlet t15 = IconComponent || children ? \"visible\" : \"hidden\", t16;\n\t$[47] === t15 ? t16 = $[48] : (t16 = {\n\t\tvisibility: t15,\n\t\tpointerEvents: \"none\"\n\t}, $[47] = t15, $[48] = t16);\n\tlet t17;\n\t$[49] !== IconComponent || $[50] !== fontSize || $[51] !== muted || $[52] !== weight ? (t17 = IconComponent && /* @__PURE__ */ jsx(Text, {\n\t\tmuted,\n\t\tsize: fontSize,\n\t\tweight,\n\t\tchildren: /* @__PURE__ */ jsx(IconComponent, {})\n\t}), $[49] = IconComponent, $[50] = fontSize, $[51] = muted, $[52] = weight, $[53] = t17) : t17 = $[53];\n\tlet t18;\n\t$[54] !== IconComponent || $[55] !== expanded || $[56] !== fontSize || $[57] !== muted || $[58] !== weight ? (t18 = !IconComponent && /* @__PURE__ */ jsx(ToggleArrowText, {\n\t\tmuted,\n\t\tsize: fontSize,\n\t\tweight,\n\t\tchildren: /* @__PURE__ */ jsx(ToggleArrowRightIcon, { style: { transform: expanded ? \"rotate(90deg)\" : void 0 } })\n\t}), $[54] = IconComponent, $[55] = expanded, $[56] = fontSize, $[57] = muted, $[58] = weight, $[59] = t18) : t18 = $[59];\n\tlet t19;\n\t$[60] !== spacing || $[61] !== t16 || $[62] !== t17 || $[63] !== t18 ? (t19 = /* @__PURE__ */ jsxs(Box, {\n\t\tmarginRight: spacing,\n\t\tstyle: t16,\n\t\tchildren: [t17, t18]\n\t}), $[60] = spacing, $[61] = t16, $[62] = t17, $[63] = t18, $[64] = t19) : t19 = $[64];\n\tlet t20;\n\t$[65] !== fontSize || $[66] !== muted || $[67] !== text || $[68] !== weight ? (t20 = /* @__PURE__ */ jsx(Box, {\n\t\tflex: 1,\n\t\tchildren: /* @__PURE__ */ jsx(Text, {\n\t\t\tmuted,\n\t\t\tsize: fontSize,\n\t\t\ttextOverflow: \"ellipsis\",\n\t\t\tweight,\n\t\t\tchildren: text\n\t\t})\n\t}), $[65] = fontSize, $[66] = muted, $[67] = text, $[68] = weight, $[69] = t20) : t20 = $[69];\n\tlet t21;\n\t$[70] !== padding || $[71] !== t19 || $[72] !== t20 ? (t21 = /* @__PURE__ */ jsxs(Flex, {\n\t\tpadding,\n\t\tchildren: [t19, t20]\n\t}), $[70] = padding, $[71] = t19, $[72] = t20, $[73] = t21) : t21 = $[73];\n\tlet content = t21;\n\tif (href) {\n\t\tlet t22 = selected ? \"\" : void 0, t23 = typeof linkAs == \"string\" ? linkAs : \"a\", t24;\n\t\t$[74] !== content || $[75] !== expanded || $[76] !== href || $[77] !== linkAs || $[78] !== linkProps || $[79] !== t23 || $[80] !== tabIndex || $[81] !== tree.level ? (t24 = /* @__PURE__ */ jsx(TreeItemBox, {\n\t\t\t...linkProps,\n\t\t\t$level: tree.level,\n\t\t\t\"aria-expanded\": expanded,\n\t\t\tas: linkAs,\n\t\t\t\"data-as\": t23,\n\t\t\t\"data-ui\": \"TreeItem__box\",\n\t\t\thref,\n\t\t\tref: treeitemRef,\n\t\t\trole: \"treeitem\",\n\t\t\ttabIndex,\n\t\t\tchildren: content\n\t\t}), $[74] = content, $[75] = expanded, $[76] = href, $[77] = linkAs, $[78] = linkProps, $[79] = t23, $[80] = tabIndex, $[81] = tree.level, $[82] = t24) : t24 = $[82];\n\t\tlet t25;\n\t\t$[83] !== children || $[84] !== expanded ? (t25 = children && /* @__PURE__ */ jsx(TreeGroup, {\n\t\t\thidden: !expanded,\n\t\t\tchildren\n\t\t}), $[83] = children, $[84] = expanded, $[85] = t25) : t25 = $[85];\n\t\tlet t26;\n\t\t$[86] !== contextValue || $[87] !== t25 ? (t26 = /* @__PURE__ */ jsx(TreeContext.Provider, {\n\t\t\tvalue: contextValue,\n\t\t\tchildren: t25\n\t\t}), $[86] = contextValue, $[87] = t25, $[88] = t26) : t26 = $[88];\n\t\tlet t27;\n\t\treturn $[89] !== handleClick || $[90] !== id || $[91] !== itemKey || $[92] !== restProps || $[93] !== t22 || $[94] !== t24 || $[95] !== t26 ? (t27 = /* @__PURE__ */ jsxs(StyledTreeItem, {\n\t\t\t\"data-selected\": t22,\n\t\t\t\"data-tree-id\": id,\n\t\t\t\"data-tree-key\": itemKey,\n\t\t\t\"data-ui\": \"TreeItem\",\n\t\t\t...restProps,\n\t\t\tonClick: handleClick,\n\t\t\tref: setRootElement,\n\t\t\trole: \"none\",\n\t\t\tchildren: [t24, t26]\n\t\t}), $[89] = handleClick, $[90] = id, $[91] = itemKey, $[92] = restProps, $[93] = t22, $[94] = t24, $[95] = t26, $[96] = t27) : t27 = $[96], t27;\n\t}\n\tlet t22 = selected ? \"\" : void 0, t23;\n\t$[97] !== content || $[98] !== tree.level ? (t23 = /* @__PURE__ */ jsx(TreeItemBox, {\n\t\t$level: tree.level,\n\t\tas: \"div\",\n\t\t\"data-ui\": \"TreeItem__box\",\n\t\tchildren: content\n\t}), $[97] = content, $[98] = tree.level, $[99] = t23) : t23 = $[99];\n\tlet t24;\n\t$[100] !== children || $[101] !== expanded ? (t24 = children && /* @__PURE__ */ jsx(TreeGroup, {\n\t\texpanded,\n\t\tchildren\n\t}), $[100] = children, $[101] = expanded, $[102] = t24) : t24 = $[102];\n\tlet t25;\n\t$[103] !== contextValue || $[104] !== t24 ? (t25 = /* @__PURE__ */ jsx(TreeContext.Provider, {\n\t\tvalue: contextValue,\n\t\tchildren: t24\n\t}), $[103] = contextValue, $[104] = t24, $[105] = t25) : t25 = $[105];\n\tlet t26;\n\treturn $[106] !== expanded || $[107] !== handleClick || $[108] !== handleKeyDown || $[109] !== id || $[110] !== itemKey || $[111] !== restProps || $[112] !== t22 || $[113] !== t23 || $[114] !== t25 || $[115] !== tabIndex ? (t26 = /* @__PURE__ */ jsxs(StyledTreeItem, {\n\t\t\"data-selected\": t22,\n\t\t\"data-ui\": \"TreeItem\",\n\t\t\"data-tree-id\": id,\n\t\t\"data-tree-key\": itemKey,\n\t\t...restProps,\n\t\t\"aria-expanded\": expanded,\n\t\tonClick: handleClick,\n\t\tonKeyDown: handleKeyDown,\n\t\tref: setRootElement,\n\t\trole: \"treeitem\",\n\t\ttabIndex,\n\t\tchildren: [t23, t25]\n\t}), $[106] = expanded, $[107] = handleClick, $[108] = handleKeyDown, $[109] = id, $[110] = itemKey, $[111] = restProps, $[112] = t22, $[113] = t23, $[114] = t25, $[115] = tabIndex, $[116] = t26) : t26 = $[116], t26;\n}\n/**\n* @internal\n*/\nfunction _isScrollable(el) {\n\tif (!(el instanceof Element)) return !1;\n\tlet style = window.getComputedStyle(el);\n\treturn style.overflowX.includes(\"auto\") || style.overflowX.includes(\"scroll\") || style.overflowY.includes(\"auto\") || style.overflowY.includes(\"scroll\");\n}\n/**\n* @deprecated instead of `useArrayProp(width)` use `Array.isArray(width) ? width : [width]` instead\n* @beta\n*/\nfunction useArrayProp(val, defaultVal) {\n\tlet $ = c(3), t0;\n\treturn $[0] !== defaultVal || $[1] !== val ? (t0 = _getArrayProp(val, defaultVal), $[0] = defaultVal, $[1] = val, $[2] = t0) : t0 = $[2], t0;\n}\nfunction _getElements(element, elementsArg) {\n\tlet ret = [element];\n\tfor (let el of elementsArg) Array.isArray(el) ? ret.push(...el) : ret.push(el);\n\treturn ret.filter(Boolean);\n}\n/**\n* @public\n* @deprecated replaced by the new `useClickOutsideEvent` hook, instead of:\n* ```tsx\n* const [button, setButtonElement] = useState(null)\n* useClickOutside((event) => {}, [button])\n* return <button ref={setButtonElement} />\n* ```\n* do:\n* ```tsx\n* const buttonRef = useRef()\n* useClickOutsideEvent((event) => {}, () => [buttonRef.current])\n* return <button ref={buttonRef} />\n* ```\n*/\nfunction useClickOutside(listener, t0, boundaryElement) {\n\tlet $ = c(12), elementsArg = t0 === void 0 ? EMPTY_ARRAY : t0, [element, setElement] = useState(null), t1;\n\t$[0] !== element || $[1] !== elementsArg ? (t1 = () => _getElements(element, elementsArg), $[0] = element, $[1] = elementsArg, $[2] = t1) : t1 = $[2];\n\tlet [elements, setElements] = useState(t1), elementsRef = useRef(elements), t2, t3;\n\t$[3] !== element || $[4] !== elementsArg ? (t2 = () => {\n\t\tlet prevElements = elementsRef.current, nextElements = _getElements(element, elementsArg);\n\t\tif (prevElements.length !== nextElements.length) {\n\t\t\tsetElements(nextElements), elementsRef.current = nextElements;\n\t\t\treturn;\n\t\t}\n\t\tfor (let el of prevElements) if (!nextElements.includes(el)) {\n\t\t\tsetElements(nextElements), elementsRef.current = nextElements;\n\t\t\treturn;\n\t\t}\n\t\tfor (let el_0 of nextElements) if (!prevElements.includes(el_0)) {\n\t\t\tsetElements(nextElements), elementsRef.current = nextElements;\n\t\t\treturn;\n\t\t}\n\t}, t3 = [element, elementsArg], $[3] = element, $[4] = elementsArg, $[5] = t2, $[6] = t3) : (t2 = $[5], t3 = $[6]), useEffect(t2, t3);\n\tlet t4, t5;\n\treturn $[7] !== boundaryElement || $[8] !== elements || $[9] !== listener ? (t4 = () => {\n\t\tif (!listener) return;\n\t\tlet handleWindowMouseDown = (evt) => {\n\t\t\tlet target = evt.target;\n\t\t\tif (target instanceof Node && !(boundaryElement && !boundaryElement.contains(target))) {\n\t\t\t\tfor (let el_1 of elements) if (target === el_1 || el_1.contains(target)) return;\n\t\t\t\tlistener(evt);\n\t\t\t}\n\t\t};\n\t\treturn window.addEventListener(\"mousedown\", handleWindowMouseDown), () => {\n\t\t\twindow.removeEventListener(\"mousedown\", handleWindowMouseDown);\n\t\t};\n\t}, t5 = [\n\t\tboundaryElement,\n\t\tlistener,\n\t\telements\n\t], $[7] = boundaryElement, $[8] = elements, $[9] = listener, $[10] = t4, $[11] = t5) : (t4 = $[10], t5 = $[11]), useEffect(t4, t5), setElement;\n}\n/**\n* Subscribe to the rect of a DOM element.\n* @beta\n*\n* @deprecated Use `useElementSize` instead\n*/\nfunction useElementRect(element) {\n\treturn useElementSize(element)?._contentRect || null;\n}\n/**\n* @beta\n* @deprecated use `useImperativeHandle` instead\n* @example\n* ```diff\n* -const ref = useForwardedRef(forwardedRef)\n* +const ref = useRef(null)\n* +useImperativeHandle(forwardedRef, () => ref.current)\n* ```\n*/\nfunction useForwardedRef(ref) {\n\tlet $ = c(1), innerRef = useRef(null), t0;\n\treturn $[0] === Symbol.for(\"react.memo_cache_sentinel\") ? (t0 = () => innerRef.current, $[0] = t0) : t0 = $[0], useImperativeHandle(ref, t0), innerRef;\n}\n/**\n* Get responsive CSS for the `label` font style.\n* @internal\n*/\nfunction responsiveLabelFont(props) {\n\treturn responsiveFont(\"label\", props);\n}\nfunction labelBaseStyle(props) {\n\tlet { $accent, $muted } = props, { font } = getTheme_v2(props.theme);\n\treturn css`text-transform:uppercase;${$accent && css`color:var(--card-accent-fg-color);`} ${$muted && css`color:var(--card-muted-fg-color);`} & code{font-family:${font.code.family};border-radius:1px;}& a{text-decoration:none;border-radius:1px;}& svg{display:inline;}& [data-sanity-icon]{vertical-align:baseline;}`;\n}\nconst StyledLabel = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"StyledLabel\",\n\tcomponentId: \"sc-6qcmll-0\"\n})(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), Label = forwardRef(function Label(props, ref) {\n\tlet $ = c(26), accent, align, childrenProp, restProps, t0, t1, textOverflow, weight;\n\t$[0] === props ? (accent = $[1], align = $[2], childrenProp = $[3], restProps = $[4], t0 = $[5], t1 = $[6], textOverflow = $[7], weight = $[8]) : ({accent, align, children: childrenProp, muted: t0, size: t1, textOverflow, weight, ...restProps} = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = childrenProp, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = textOverflow, $[8] = weight);\n\tlet muted = t0 !== void 0 && t0, size = t1 === void 0 ? 2 : t1, children = childrenProp;\n\tif (textOverflow === \"ellipsis\") {\n\t\tlet t2;\n\t\t$[9] === children ? t2 = $[10] : (t2 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[9] = children, $[10] = t2), children = t2;\n\t} else {\n\t\tlet t2;\n\t\t$[11] === children ? t2 = $[12] : (t2 = /* @__PURE__ */ jsx(\"span\", { children }), $[11] = children, $[12] = t2), children = t2;\n\t}\n\tlet t2;\n\t$[13] === align ? t2 = $[14] : (t2 = _getArrayProp(align), $[13] = align, $[14] = t2);\n\tlet t3;\n\t$[15] === size ? t3 = $[16] : (t3 = _getArrayProp(size), $[15] = size, $[16] = t3);\n\tlet t4;\n\treturn $[17] !== accent || $[18] !== children || $[19] !== muted || $[20] !== ref || $[21] !== restProps || $[22] !== t2 || $[23] !== t3 || $[24] !== weight ? (t4 = /* @__PURE__ */ jsx(StyledLabel, {\n\t\t\"data-ui\": \"Label\",\n\t\t...restProps,\n\t\t$accent: accent,\n\t\t$align: t2,\n\t\t$muted: muted,\n\t\t$size: t3,\n\t\t$weight: weight,\n\t\tref,\n\t\tchildren\n\t}), $[17] = accent, $[18] = children, $[19] = muted, $[20] = ref, $[21] = restProps, $[22] = t2, $[23] = t3, $[24] = weight, $[25] = t4) : t4 = $[25], t4;\n}), avatarStyle = {\n\troot: avatarRootStyle,\n\tarrow: avatarArrowStyle,\n\tbgStroke: avatarBgStrokeStyle,\n\tstroke: avatarStrokeStyle,\n\tinitials: avatarInitialsStyle,\n\timage: avatarImageStyle\n};\nfunction avatarArrowStyle() {\n\treturn {\n\t\tposition: \"absolute\",\n\t\tboxSizing: \"border-box\",\n\t\tzIndex: \"0\",\n\t\topacity: \"0\",\n\t\ttransition: \"all 0.2s linear\",\n\t\ttransform: \"rotate(-90deg) translate3d(0, 6px, 0)\",\n\t\tleft: 0,\n\t\tright: 0,\n\t\ttop: 0,\n\t\tbottom: 0,\n\t\t\"& > svg\": {\n\t\t\twidth: \"11px\",\n\t\t\theight: \"7px\",\n\t\t\tposition: \"absolute\",\n\t\t\ttop: \"-5px\",\n\t\t\tleft: \"50%\",\n\t\t\ttransform: \"translateX(-6px)\",\n\t\t\t\"&:not([hidden])\": { display: \"block\" }\n\t\t},\n\t\t\"[data-arrow-position='inside'] > &\": {\n\t\t\ttransform: \"rotate(-90deg) translate3d(0, 6px, 0)\",\n\t\t\topacity: \"0\"\n\t\t},\n\t\t\"[data-arrow-position='top'] > &\": {\n\t\t\topacity: \"1\",\n\t\t\ttransform: \"rotate(0deg)\"\n\t\t},\n\t\t\"[data-arrow-position='bottom'] > &\": {\n\t\t\topacity: \"1\",\n\t\t\ttransform: \"rotate(-180deg)\"\n\t\t}\n\t};\n}\nfunction avatarRootStyle(props) {\n\tlet { $color } = props, { avatar } = getTheme_v2(props.theme);\n\treturn {\n\t\t\"--avatar-bg-color\": `var(--card-avatar-${$color}-bg-color)`,\n\t\t\"--avatar-fg-color\": `var(--card-avatar-${$color}-fg-color)`,\n\t\tbackgroundColor: \"var(--avatar-bg-color)\",\n\t\tposition: \"relative\",\n\t\tboxSizing: \"border-box\",\n\t\tuserSelect: \"none\",\n\t\tboxShadow: \"0 0 0 1px var(--card-bg-color)\",\n\t\t\"&[data-status=\\\"inactive\\\"]\": { opacity: \"0.5\" },\n\t\t\"&>svg\": { \"&:not([hidden])\": { display: \"block\" } },\n\t\t\"&[data-as=\\\"button\\\"]\": {\n\t\t\tWebkitFontSmoothing: \"inherit\",\n\t\t\tappearance: \"none\",\n\t\t\tmargin: 0,\n\t\t\tpadding: 0,\n\t\t\tborder: 0,\n\t\t\tfont: \"inherit\",\n\t\t\tcolor: \"inherit\",\n\t\t\toutline: \"none\",\n\t\t\t\"&:focus\": { boxShadow: focusRingStyle({ focusRing: avatar.focusRing }) },\n\t\t\t\"&:focus:not(:focus-visible)\": { boxShadow: \"none\" }\n\t\t}\n\t};\n}\nfunction responsiveAvatarSizeStyle(props) {\n\tlet { avatar, media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$size, (size) => {\n\t\tlet avatarSize = avatar.sizes[size] || avatar.sizes[0];\n\t\treturn {\n\t\t\twidth: rem(avatarSize.size),\n\t\t\theight: rem(avatarSize.size),\n\t\t\tborderRadius: rem(avatarSize.size / 2),\n\t\t\t\"&>svg\": {\n\t\t\t\twidth: rem(avatarSize.size),\n\t\t\t\theight: rem(avatarSize.size),\n\t\t\t\tborderRadius: rem(avatarSize.size / 2)\n\t\t\t}\n\t\t};\n\t});\n}\nfunction avatarImageStyle() {\n\treturn { position: \"relative\" };\n}\nfunction avatarInitialsStyle() {\n\treturn {\n\t\twidth: \"100%\",\n\t\theight: \"100%\",\n\t\tcolor: \"var(--avatar-fg-color)\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\ttextTransform: \"uppercase\",\n\t\ttextAlign: \"center\",\n\t\tborderRadius: \"50%\",\n\t\t\"&:not([hidden])\": { display: \"flex\" }\n\t};\n}\nfunction avatarBgStrokeStyle() {\n\treturn {\n\t\tstrokeWidth: \"4px\",\n\t\tstroke: \"var(--card-bg-color)\"\n\t};\n}\nfunction avatarStrokeStyle() {\n\treturn {\n\t\tstrokeWidth: \"2px\",\n\t\tstroke: \"var(--avatar-bg-color)\",\n\t\t\"[data-status=\\\"editing\\\"] &\": {\n\t\t\tstrokeDasharray: \"2 4\",\n\t\t\tstrokeLinecap: \"round\"\n\t\t}\n\t};\n}\nconst StyledAvatar = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"StyledAvatar\",\n\tcomponentId: \"sc-hfmugy-0\"\n})(responsiveAvatarSizeStyle, avatarStyle.root), Arrow$1 = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"Arrow\",\n\tcomponentId: \"sc-hfmugy-1\"\n})(avatarStyle.arrow), BgStroke = /* @__PURE__ */ styled.ellipse.withConfig({\n\tdisplayName: \"BgStroke\",\n\tcomponentId: \"sc-hfmugy-2\"\n})(avatarStyle.bgStroke), Stroke = /* @__PURE__ */ styled.ellipse.withConfig({\n\tdisplayName: \"Stroke\",\n\tcomponentId: \"sc-hfmugy-3\"\n})(avatarStyle.stroke), Initials = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"Initials\",\n\tcomponentId: \"sc-hfmugy-4\"\n})(avatarStyle.initials), InitialsLabel = /* @__PURE__ */ styled(Label).withConfig({\n\tdisplayName: \"InitialsLabel\",\n\tcomponentId: \"sc-hfmugy-5\"\n})({ color: \"inherit\" }), AvatarImage = /* @__PURE__ */ styled.svg.withConfig({\n\tdisplayName: \"AvatarImage\",\n\tcomponentId: \"sc-hfmugy-6\"\n})(avatarStyle.image), Avatar = forwardRef(function Avatar(props, ref) {\n\tlet $ = c(46), __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, restProps, src, t0, t1, t2, title;\n\t$[0] === props ? (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], asProp = $[4], initials = $[5], onImageLoadError = $[6], restProps = $[7], src = $[8], t0 = $[9], t1 = $[10], t2 = $[11], title = $[12]) : ({__unstable_hideInnerStroke, as: asProp, color: t0, src, title, initials, onImageLoadError, arrowPosition: arrowPositionProp, animateArrowFrom, status: t1, size: t2, ...restProps} = props, $[0] = props, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = asProp, $[5] = initials, $[6] = onImageLoadError, $[7] = restProps, $[8] = src, $[9] = t0, $[10] = t1, $[11] = t2, $[12] = title);\n\tlet color = t0 === void 0 ? \"gray\" : t0, status = t1 === void 0 ? \"online\" : t1, sizeProp = t2 === void 0 ? 1 : t2, { avatar } = useTheme_v2(), as = ReactIs.isValidElementType(asProp) ? asProp : \"div\", size = _getArrayProp(sizeProp), _sizeRem = (avatar.sizes[size[0]] || avatar.sizes[0]).size, _radius = _sizeRem / 2, elementId = useId(), [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || \"inside\"), [imageFailed, setImageFailed] = useState(!1), imageId = `avatar-image-${elementId}`, t3, t4;\n\t$[13] !== arrowPosition || $[14] !== arrowPositionProp ? (t3 = () => {\n\t\tif (arrowPosition === arrowPositionProp) return;\n\t\tlet raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));\n\t\treturn () => cancelAnimationFrame(raf);\n\t}, t4 = [arrowPosition, arrowPositionProp], $[13] = arrowPosition, $[14] = arrowPositionProp, $[15] = t3, $[16] = t4) : (t3 = $[15], t4 = $[16]), useEffect(t3, t4);\n\tlet t5, t6;\n\t$[17] === src ? (t5 = $[18], t6 = $[19]) : (t5 = () => {\n\t\tsrc && setImageFailed(!1);\n\t}, t6 = [src], $[17] = src, $[18] = t5, $[19] = t6), useEffect(t5, t6);\n\tlet t7;\n\t$[20] === onImageLoadError ? t7 = $[21] : (t7 = () => {\n\t\tsetImageFailed(!0), onImageLoadError && onImageLoadError(/* @__PURE__ */ Error(\"Avatar: the image failed to load\"));\n\t}, $[20] = onImageLoadError, $[21] = t7);\n\tlet handleImageError = t7, T0 = StyledAvatar, t8 = typeof as == \"string\" ? as : void 0, t10;\n\t$[22] === color ? t10 = $[23] : (t10 = /* @__PURE__ */ jsx(Arrow$1, { children: /* @__PURE__ */ jsx(\"svg\", {\n\t\twidth: \"11\",\n\t\theight: \"7\",\n\t\tviewBox: \"0 0 11 7\",\n\t\tfill: \"none\",\n\t\tchildren: /* @__PURE__ */ jsx(\"path\", {\n\t\t\td: \"M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z\",\n\t\t\tfill: color\n\t\t})\n\t}) }), $[22] = color, $[23] = t10);\n\tlet t11;\n\t$[24] !== __unstable_hideInnerStroke || $[25] !== _radius || $[26] !== _sizeRem || $[27] !== handleImageError || $[28] !== imageFailed || $[29] !== imageId || $[30] !== src ? (t11 = !imageFailed && src && /* @__PURE__ */ jsxs(AvatarImage, {\n\t\tviewBox: `0 0 ${_sizeRem} ${_sizeRem}`,\n\t\tfill: \"none\",\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsx(\"defs\", { children: /* @__PURE__ */ jsx(\"pattern\", {\n\t\t\t\tid: imageId,\n\t\t\t\tpatternContentUnits: \"objectBoundingBox\",\n\t\t\t\twidth: \"1\",\n\t\t\t\theight: \"1\",\n\t\t\t\tchildren: /* @__PURE__ */ jsx(\"image\", {\n\t\t\t\t\thref: src,\n\t\t\t\t\twidth: \"1\",\n\t\t\t\t\theight: \"1\",\n\t\t\t\t\tonError: handleImageError\n\t\t\t\t})\n\t\t\t}) }),\n\t\t\t/* @__PURE__ */ jsx(\"circle\", {\n\t\t\t\tcx: _radius,\n\t\t\t\tcy: _radius,\n\t\t\t\tr: _radius,\n\t\t\t\tfill: `url(#${imageId})`\n\t\t\t}),\n\t\t\t!__unstable_hideInnerStroke && /* @__PURE__ */ jsx(BgStroke, {\n\t\t\t\tcx: _radius,\n\t\t\t\tcy: _radius,\n\t\t\t\trx: _radius,\n\t\t\t\try: _radius,\n\t\t\t\tvectorEffect: \"non-scaling-stroke\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(Stroke, {\n\t\t\t\tcx: _radius,\n\t\t\t\tcy: _radius,\n\t\t\t\trx: _radius,\n\t\t\t\try: _radius,\n\t\t\t\tvectorEffect: \"non-scaling-stroke\"\n\t\t\t})\n\t\t]\n\t}), $[24] = __unstable_hideInnerStroke, $[25] = _radius, $[26] = _sizeRem, $[27] = handleImageError, $[28] = imageFailed, $[29] = imageId, $[30] = src, $[31] = t11) : t11 = $[31];\n\tlet t12 = (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Initials, { children: /* @__PURE__ */ jsx(InitialsLabel, {\n\t\tforwardedAs: \"span\",\n\t\tsize: size.map(_temp$1),\n\t\tweight: \"medium\",\n\t\tchildren: initials\n\t}) }) }), t13;\n\treturn $[32] !== T0 || $[33] !== arrowPosition || $[34] !== as || $[35] !== color || $[36] !== ref || $[37] !== restProps || $[38] !== size || $[39] !== status || $[40] !== t10 || $[41] !== t11 || $[42] !== t12 || $[43] !== t8 || $[44] !== title ? (t13 = /* @__PURE__ */ jsxs(T0, {\n\t\tas,\n\t\t\"data-as\": t8,\n\t\t\"data-ui\": \"Avatar\",\n\t\t...restProps,\n\t\t$color: color,\n\t\t$size: size,\n\t\t\"aria-label\": title,\n\t\t\"data-arrow-position\": arrowPosition,\n\t\t\"data-status\": status,\n\t\tref,\n\t\ttitle,\n\t\tchildren: [\n\t\t\tt10,\n\t\t\tt11,\n\t\t\tt12\n\t\t]\n\t}), $[32] = T0, $[33] = arrowPosition, $[34] = as, $[35] = color, $[36] = ref, $[37] = restProps, $[38] = size, $[39] = status, $[40] = t10, $[41] = t11, $[42] = t12, $[43] = t8, $[44] = title, $[45] = t13) : t13 = $[45], t13;\n});\nfunction _temp$1(s) {\n\treturn s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;\n}\nfunction _responsiveAvatarCounterSizeStyle(props) {\n\tlet { avatar, media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$size, (size) => {\n\t\tlet avatarSize = avatar.sizes[size];\n\t\treturn avatarSize ? {\n\t\t\tborderRadius: rem(avatarSize.size / 2),\n\t\t\tminWidth: rem(avatarSize.size),\n\t\t\theight: rem(avatarSize.size)\n\t\t} : EMPTY_RECORD;\n\t});\n}\nfunction _avatarCounterBaseStyle(props) {\n\tlet { space } = getTheme_v2(props.theme);\n\treturn css`align-items:center;justify-content:center;box-sizing:border-box;user-select:none;color:inherit;color:var(--card-fg-color);background:var(--card-bg-color);box-shadow:0 0 0 1px var(--card-bg-color),inset 0 0 0 1px var(--card-hairline-hard-color);padding:0 ${rem(space[2])};&:not([hidden]){display:flex;}`;\n}\nconst StyledAvatarCounter = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"StyledAvatarCounter\",\n\tcomponentId: \"sc-miwe8s-0\"\n})(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle), AvatarCounter = forwardRef(function AvatarCounter(props, ref) {\n\tlet $ = c(20), { count, size: t0 } = props, sizeProp = t0 === void 0 ? 1 : t0, T0, T1, t1, t2, t3, t4, t5;\n\tif ($[0] !== ref || $[1] !== sizeProp) {\n\t\tlet size = _getArrayProp(sizeProp);\n\t\tT1 = StyledAvatarCounter, t3 = size, t4 = \"AvatarCounter\", t5 = ref, T0 = Label, t1 = \"span\", t2 = size.map(_temp), $[0] = ref, $[1] = sizeProp, $[2] = T0, $[3] = T1, $[4] = t1, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5;\n\t} else T0 = $[2], T1 = $[3], t1 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8];\n\tlet t6;\n\t$[9] !== T0 || $[10] !== count || $[11] !== t1 || $[12] !== t2 ? (t6 = /* @__PURE__ */ jsx(T0, {\n\t\tas: t1,\n\t\tsize: t2,\n\t\tweight: \"medium\",\n\t\tchildren: count\n\t}), $[9] = T0, $[10] = count, $[11] = t1, $[12] = t2, $[13] = t6) : t6 = $[13];\n\tlet t7;\n\treturn $[14] !== T1 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 ? (t7 = /* @__PURE__ */ jsx(T1, {\n\t\t$size: t3,\n\t\t\"data-ui\": t4,\n\t\tref: t5,\n\t\tchildren: t6\n\t}), $[14] = T1, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = t7) : t7 = $[19], t7;\n});\nfunction _temp(s) {\n\treturn s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;\n}\nconst BASE_STYLES = css`white-space:nowrap;& > div{vertical-align:top;&:not([hidden]){display:inline-block;}}`;\nfunction avatarStackStyle() {\n\treturn BASE_STYLES;\n}\nfunction responsiveAvatarStackSizeStyle(props) {\n\tlet { avatar, media } = getTheme_v2(props.theme);\n\treturn _responsive(media, props.$size, (size) => {\n\t\tlet avatarSize = avatar.sizes[size];\n\t\treturn avatarSize ? { \"& > div + div\": { marginLeft: rem(avatarSize.distance) } } : EMPTY_RECORD;\n\t});\n}\nconst StyledAvatarStack = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"StyledAvatarStack\",\n\tcomponentId: \"sc-m8rww4-0\"\n})(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = forwardRef(function AvatarStack(props, ref) {\n\tlet $ = c(38), childrenProp, restProps, t0, t1;\n\t$[0] === props ? (childrenProp = $[1], restProps = $[2], t0 = $[3], t1 = $[4]) : ({children: childrenProp, maxLength: t0, size: t1, ...restProps} = props, $[0] = props, $[1] = childrenProp, $[2] = restProps, $[3] = t0, $[4] = t1);\n\tlet maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, T0, t2, t3, t4, t5, t6, t7, t8;\n\tif ($[5] !== childrenProp || $[6] !== maxLengthProp || $[7] !== ref || $[8] !== restProps || $[9] !== sizeProp) {\n\t\tlet children = Children.toArray(childrenProp).filter(isValidElement), maxLength = Math.max(maxLengthProp, 0), t9;\n\t\t$[18] === sizeProp ? t9 = $[19] : (t9 = _getArrayProp(sizeProp), $[18] = sizeProp, $[19] = t9);\n\t\tlet size = t9, len = children.length, extraCount = len - (maxLength - 1), visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;\n\t\tT0 = StyledAvatarStack, t2 = \"AvatarStack\", t3 = restProps, t4 = ref, t5 = size, $[20] !== len || $[21] !== size ? (t6 = len === 0 && /* @__PURE__ */ jsx(\"div\", { children: /* @__PURE__ */ jsx(AvatarCounter, {\n\t\t\tcount: len,\n\t\t\tsize\n\t\t}) }), $[20] = len, $[21] = size, $[22] = t6) : t6 = $[22], $[23] !== extraCount || $[24] !== len || $[25] !== size ? (t7 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx(\"div\", { children: /* @__PURE__ */ jsx(AvatarCounter, {\n\t\t\tcount: extraCount,\n\t\t\tsize\n\t\t}) }), $[23] = extraCount, $[24] = len, $[25] = size, $[26] = t7) : t7 = $[26];\n\t\tlet t10;\n\t\t$[27] === size ? t10 = $[28] : (t10 = (child, childIndex) => /* @__PURE__ */ jsx(\"div\", { children: cloneElement(child, { size }) }, String(childIndex)), $[27] = size, $[28] = t10), t8 = visibleChildren.map(t10), $[5] = childrenProp, $[6] = maxLengthProp, $[7] = ref, $[8] = restProps, $[9] = sizeProp, $[10] = T0, $[11] = t2, $[12] = t3, $[13] = t4, $[14] = t5, $[15] = t6, $[16] = t7, $[17] = t8;\n\t} else T0 = $[10], t2 = $[11], t3 = $[12], t4 = $[13], t5 = $[14], t6 = $[15], t7 = $[16], t8 = $[17];\n\tlet t9;\n\treturn $[29] !== T0 || $[30] !== t2 || $[31] !== t3 || $[32] !== t4 || $[33] !== t5 || $[34] !== t6 || $[35] !== t7 || $[36] !== t8 ? (t9 = /* @__PURE__ */ jsxs(T0, {\n\t\t\"data-ui\": t2,\n\t\t...t3,\n\t\tref: t4,\n\t\t$size: t5,\n\t\tchildren: [\n\t\t\tt6,\n\t\t\tt7,\n\t\t\tt8\n\t\t]\n\t}), $[29] = T0, $[30] = t2, $[31] = t3, $[32] = t4, $[33] = t5, $[34] = t6, $[35] = t7, $[36] = t8, $[37] = t9) : t9 = $[37], t9;\n});\nfunction badgeStyle(props) {\n\tlet { $tone } = props;\n\treturn {\n\t\t\"--card-bg-color\": `var(--card-badge-${$tone}-bg-color)`,\n\t\t\"--card-fg-color\": `var(--card-badge-${$tone}-fg-color)`,\n\t\tbackgroundColor: \"var(--card-bg-color)\",\n\t\tcursor: \"default\",\n\t\t\"&:not([hidden])\": {\n\t\t\tdisplay: \"inline-block\",\n\t\t\tverticalAlign: \"top\"\n\t\t}\n\t};\n}\nconst StyledBadge = /* @__PURE__ */ styled(Box).withConfig({\n\tdisplayName: \"StyledBadge\",\n\tcomponentId: \"sc-4z4hgx-0\"\n})(responsiveRadiusStyle, badgeStyle), Badge = forwardRef(function Badge(props, ref) {\n\tlet $ = c(21), children, restProps, t0, t1, t2, t3;\n\tif ($[0] !== props) {\n\t\tlet { children: t4, fontSize: t5, mode: _deprecated_mode, padding: t6, radius: t7, tone: t8, ...t9 } = props;\n\t\tchildren = t4, t0 = t5, t1 = t6, t2 = t7, t3 = t8, restProps = t9, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2, $[6] = t3;\n\t} else children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5], t3 = $[6];\n\tlet fontSize = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? \"full\" : t2, tone = t3 === void 0 ? \"default\" : t3, t4;\n\t$[7] === radius ? t4 = $[8] : (t4 = _getArrayProp(radius), $[7] = radius, $[8] = t4);\n\tlet t5;\n\t$[9] === padding ? t5 = $[10] : (t5 = _getArrayProp(padding), $[9] = padding, $[10] = t5);\n\tlet t6;\n\t$[11] !== children || $[12] !== fontSize ? (t6 = /* @__PURE__ */ jsx(Text, {\n\t\tsize: fontSize,\n\t\tchildren\n\t}), $[11] = children, $[12] = fontSize, $[13] = t6) : t6 = $[13];\n\tlet t7;\n\treturn $[14] !== ref || $[15] !== restProps || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 || $[19] !== tone ? (t7 = /* @__PURE__ */ jsx(StyledBadge, {\n\t\t\"data-ui\": \"Badge\",\n\t\t...restProps,\n\t\t$tone: tone,\n\t\t$radius: t4,\n\t\tpadding: t5,\n\t\tref,\n\t\tchildren: t6\n\t}), $[14] = ref, $[15] = restProps, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = tone, $[20] = t7) : t7 = $[20], t7;\n});\nfunction checkboxBaseStyles() {\n\treturn css`position:relative;display:inline-block;`;\n}\nfunction inputElementStyles(props) {\n\tlet { color, input, radius } = getTheme_v2(props.theme), { focusRing } = input.checkbox;\n\treturn css`position:absolute;top:0;left:0;width:100%;height:100%;outline:none;opacity:0;z-index:1;padding:0;margin:0;& + span{position:relative;display:block;height:${rem(input.checkbox.size)};width:${rem(input.checkbox.size)};box-sizing:border-box;box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.default.enabled.border,\n\t\twidth: input.border.width\n\t})};border-radius:${rem(radius[2])};line-height:1;background-color:${color.input.default.enabled.bg};& > svg{display:block;position:absolute;opacity:0;height:100%;width:100%;& > path{vector-effect:non-scaling-stroke;stroke-width:1.5px !important;}}}&:checked + span{background:${color.input.default.enabled.fg};box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.default.enabled.fg,\n\t\twidth: input.border.width\n\t})};color:${color.input.default.enabled.bg};}&:not(:disabled):focus:focus-visible + span{box-shadow:${focusRingStyle({ focusRing })};}&:not(:disabled):focus:focus-visible&:checked + span{box-shadow:${focusRingStyle({ focusRing: {\n\t\twidth: 1,\n\t\toffset: 1\n\t} })};}&[data-error] + span{background-color:${color.input.invalid.enabled.border};box-shadow:${focusRingBorderStyle({\n\t\twidth: input.border.width,\n\t\tcolor: color.input.invalid.enabled.muted.bg\n\t})};color:${color.input.default.disabled.fg};}&[data-error]&:checked + span{background-color:${color.input.invalid.enabled.muted.bg};color:${color.input.default.enabled.bg};}&[data-error]&:checked&:not(:disabled):focus:focus-visible + span{box-shadow:${focusRingStyle({\n\t\tborder: {\n\t\t\twidth: input.border.width,\n\t\t\tcolor: color.input.invalid.readOnly.muted.bg\n\t\t},\n\t\tfocusRing: {\n\t\t\twidth: 1,\n\t\t\toffset: 1\n\t\t}\n\t})};}&:disabled + span{background-color:${color.input.default.disabled.bg};box-shadow:${focusRingBorderStyle({\n\t\twidth: input.border.width,\n\t\tcolor: color.input.default.disabled.border\n\t})};color:${color.input.default.disabled.fg};}&:disabled&:checked + span{background-color:${color.input.default.disabled.muted.bg};}&[data-read-only] + span{background-color:${color.input.default.readOnly.bg};box-shadow:${focusRingBorderStyle({\n\t\twidth: input.border.width,\n\t\tcolor: color.input.default.readOnly.border\n\t})};color:${color.input.default.readOnly.fg};}&[data-read-only]&:checked + span{background-color:${color.input.default.readOnly.muted.bg};}&:checked + span > svg:first-child{opacity:1;}&:indeterminate + span > svg:last-child{opacity:1;}`;\n}\nconst StyledCheckbox = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"StyledCheckbox\",\n\tcomponentId: \"sc-33tf77-0\"\n})(checkboxBaseStyles), Input$4 = /* @__PURE__ */ styled.input.withConfig({\n\tdisplayName: \"Input\",\n\tcomponentId: \"sc-33tf77-1\"\n})(inputElementStyles), Checkbox = forwardRef(function Checkbox(props, forwardedRef) {\n\tlet $ = c(25), checked, className, customValidity, disabled, indeterminate, readOnly, restProps, style;\n\t$[0] === props ? (checked = $[1], className = $[2], customValidity = $[3], disabled = $[4], indeterminate = $[5], readOnly = $[6], restProps = $[7], style = $[8]) : ({checked, className, disabled, indeterminate, customValidity, readOnly, style, ...restProps} = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = customValidity, $[4] = disabled, $[5] = indeterminate, $[6] = readOnly, $[7] = restProps, $[8] = style);\n\tlet ref = useRef(null), t0;\n\t$[9] === Symbol.for(\"react.memo_cache_sentinel\") ? (t0 = () => ref.current, $[9] = t0) : t0 = $[9], useImperativeHandle(forwardedRef, t0);\n\tlet t1, t2;\n\t$[10] === indeterminate ? (t1 = $[11], t2 = $[12]) : (t1 = () => {\n\t\tref.current && (ref.current.indeterminate = indeterminate || !1);\n\t}, t2 = [indeterminate], $[10] = indeterminate, $[11] = t1, $[12] = t2), useEffect(t1, t2), useCustomValidity(ref, customValidity);\n\tlet t3 = !disabled && readOnly ? \"\" : void 0, t4 = customValidity ? \"\" : void 0, t5 = disabled || readOnly, t6;\n\t$[13] !== checked || $[14] !== readOnly || $[15] !== restProps || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsx(Input$4, {\n\t\t\"data-read-only\": t3,\n\t\t\"data-error\": t4,\n\t\t...restProps,\n\t\tchecked,\n\t\tdisabled: t5,\n\t\ttype: \"checkbox\",\n\t\treadOnly,\n\t\tref\n\t}), $[13] = checked, $[14] = readOnly, $[15] = restProps, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6) : t6 = $[19];\n\tlet t7;\n\t$[20] === Symbol.for(\"react.memo_cache_sentinel\") ? (t7 = /* @__PURE__ */ jsxs(\"span\", { children: [/* @__PURE__ */ jsx(CheckmarkIcon, {}), /* @__PURE__ */ jsx(RemoveIcon, {})] }), $[20] = t7) : t7 = $[20];\n\tlet t8;\n\treturn $[21] !== className || $[22] !== style || $[23] !== t6 ? (t8 = /* @__PURE__ */ jsxs(StyledCheckbox, {\n\t\tclassName,\n\t\t\"data-ui\": \"Checkbox\",\n\t\tstyle,\n\t\tchildren: [t6, t7]\n\t}), $[21] = className, $[22] = style, $[23] = t6, $[24] = t8) : t8 = $[24], t8;\n});\n/**\n* Get responsive CSS for the `code` font style.\n* @internal\n*/\nfunction responsiveCodeFontStyle(props) {\n\treturn responsiveFont(\"code\", props);\n}\nfunction codeSyntaxHighlightingStyle({ theme }) {\n\tlet { color: { syntax: color } } = getTheme_v2(theme);\n\treturn {\n\t\t\"&.atrule\": { color: color.atrule },\n\t\t\"&.attr-name\": { color: color.attrName },\n\t\t\"&.attr-value\": { color: color.attrValue },\n\t\t\"&.attribute\": { color: color.attribute },\n\t\t\"&.boolean\": { color: color.boolean },\n\t\t\"&.builtin\": { color: color.builtin },\n\t\t\"&.cdata\": { color: color.cdata },\n\t\t\"&.char\": { color: color.char },\n\t\t\"&.class\": { color: color.class },\n\t\t\"&.class-name\": { color: color.className },\n\t\t\"&.comment\": { color: color.comment },\n\t\t\"&.constant\": { color: color.constant },\n\t\t\"&.deleted\": { color: color.deleted },\n\t\t\"&.doctype\": { color: color.doctype },\n\t\t\"&.entity\": { color: color.entity },\n\t\t\"&.function\": { color: color.function },\n\t\t\"&.hexcode\": { color: color.hexcode },\n\t\t\"&.id\": { color: color.id },\n\t\t\"&.important\": { color: color.important },\n\t\t\"&.inserted\": { color: color.inserted },\n\t\t\"&.keyword\": { color: color.keyword },\n\t\t\"&.number\": { color: color.number },\n\t\t\"&.operator\": { color: color.operator },\n\t\t\"&.prolog\": { color: color.prolog },\n\t\t\"&.property\": { color: color.property },\n\t\t\"&.pseudo-class\": { color: color.pseudoClass },\n\t\t\"&.pseudo-element\": { color: color.pseudoElement },\n\t\t\"&.punctuation\": { color: color.punctuation },\n\t\t\"&.regex\": { color: color.regex },\n\t\t\"&.selector\": { color: color.selector },\n\t\t\"&.string\": { color: color.string },\n\t\t\"&.symbol\": { color: color.symbol },\n\t\t\"&.tag\": { color: color.tag },\n\t\t\"&.unit\": { color: color.unit },\n\t\t\"&.url\": { color: color.url },\n\t\t\"&.variable\": { color: color.variable }\n\t};\n}\nfunction codeBaseStyle() {\n\treturn css`color:var(--card-code-fg-color);& code{font-family:inherit;&.refractor .token{${codeSyntaxHighlightingStyle}}}& a{color:inherit;text-decoration:underline;border-radius:1px;}& svg{display:inline;}& [data-sanity-icon]{vertical-align:baseline;}`;\n}\nconst LazyRefractor = lazy(() => import(\"./_chunks/refractor.js\")), StyledCode = /* @__PURE__ */ styled.pre.withConfig({\n\tdisplayName: \"StyledCode\",\n\tcomponentId: \"sc-4i8yh-0\"\n})(codeBaseStyle, responsiveCodeFontStyle), Code = forwardRef(function Code(props, ref) {\n\tlet $ = c(22), children, language, restProps, t0, weight;\n\t$[0] === props ? (children = $[1], language = $[2], restProps = $[3], t0 = $[4], weight = $[5]) : ({children, language, size: t0, weight, ...restProps} = props, $[0] = props, $[1] = children, $[2] = language, $[3] = restProps, $[4] = t0, $[5] = weight);\n\tlet size = t0 === void 0 ? 2 : t0, t1;\n\t$[6] === size ? t1 = $[7] : (t1 = _getArrayProp(size), $[6] = size, $[7] = t1);\n\tlet t2 = weight, t3;\n\t$[8] === children ? t3 = $[9] : (t3 = /* @__PURE__ */ jsx(\"code\", { children }), $[8] = children, $[9] = t3);\n\tlet t4;\n\t$[10] !== children || $[11] !== language ? (t4 = /* @__PURE__ */ jsx(LazyRefractor, {\n\t\tlanguage,\n\t\tvalue: children\n\t}), $[10] = children, $[11] = language, $[12] = t4) : t4 = $[12];\n\tlet t5;\n\t$[13] !== t3 || $[14] !== t4 ? (t5 = /* @__PURE__ */ jsx(Suspense, {\n\t\tfallback: t3,\n\t\tchildren: t4\n\t}), $[13] = t3, $[14] = t4, $[15] = t5) : t5 = $[15];\n\tlet t6;\n\treturn $[16] !== ref || $[17] !== restProps || $[18] !== t1 || $[19] !== t2 || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsx(StyledCode, {\n\t\t\"data-ui\": \"Code\",\n\t\t...restProps,\n\t\t$size: t1,\n\t\t$weight: t2,\n\t\tref,\n\t\tchildren: t5\n\t}), $[16] = ref, $[17] = restProps, $[18] = t1, $[19] = t2, $[20] = t5, $[21] = t6) : t6 = $[21], t6;\n});\n/**\n* Get responsive CSS for the `heading` font style.\n* @internal\n*/\nfunction responsiveHeadingFont(props) {\n\treturn responsiveFont(\"heading\", props);\n}\nfunction headingBaseStyle(props) {\n\tlet { $accent, $muted } = props, { font } = getTheme_v2(props.theme);\n\treturn css`${$accent && css`color:var(--card-accent-fg-color);`} ${$muted && css`color:var(--card-muted-fg-color);`} & code{font-family:${font.code.family};border-radius:1px;}& a{text-decoration:none;border-radius:1px;color:var(--card-link-color);outline:none;@media (hover:hover){&:hover{text-decoration:underline;}}&:focus{box-shadow:0 0 0 1px var(--card-bg-color),0 0 0 3px var(--card-focus-ring-color);}&:focus:not(:focus-visible){box-shadow:none;}}& strong{font-weight:${font.heading.weights.bold};}& svg{display:inline;}& [data-sanity-icon]{vertical-align:baseline;}`;\n}\nconst StyledHeading = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"StyledHeading\",\n\tcomponentId: \"sc-kfxezu-0\"\n})(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont), Heading = forwardRef(function Heading(props, ref) {\n\tlet $ = c(26), align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;\n\t$[0] === props ? (align = $[1], childrenProp = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], textOverflow = $[7], weight = $[8]) : ({accent: t0, align, children: childrenProp, muted: t1, size: t2, textOverflow, weight, ...restProps} = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = textOverflow, $[8] = weight);\n\tlet accent = t0 !== void 0 && t0, muted = t1 !== void 0 && t1, size = t2 === void 0 ? 2 : t2, children = childrenProp;\n\tif (textOverflow === \"ellipsis\") {\n\t\tlet t3;\n\t\t$[9] === children ? t3 = $[10] : (t3 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[9] = children, $[10] = t3), children = t3;\n\t}\n\tlet t3;\n\t$[11] === align ? t3 = $[12] : (t3 = _getArrayProp(align), $[11] = align, $[12] = t3);\n\tlet t4;\n\t$[13] === size ? t4 = $[14] : (t4 = _getArrayProp(size), $[13] = size, $[14] = t4);\n\tlet t5;\n\t$[15] === children ? t5 = $[16] : (t5 = /* @__PURE__ */ jsx(\"span\", { children }), $[15] = children, $[16] = t5);\n\tlet t6;\n\treturn $[17] !== accent || $[18] !== muted || $[19] !== ref || $[20] !== restProps || $[21] !== t3 || $[22] !== t4 || $[23] !== t5 || $[24] !== weight ? (t6 = /* @__PURE__ */ jsx(StyledHeading, {\n\t\t\"data-ui\": \"Heading\",\n\t\t...restProps,\n\t\t$accent: accent,\n\t\t$align: t3,\n\t\t$muted: muted,\n\t\t$size: t4,\n\t\t$weight: weight,\n\t\tref,\n\t\tchildren: t5\n\t}), $[17] = accent, $[18] = muted, $[19] = ref, $[20] = restProps, $[21] = t3, $[22] = t4, $[23] = t5, $[24] = weight, $[25] = t6) : t6 = $[25], t6;\n});\nfunction radioBaseStyle() {\n\treturn css`position:relative;&:not([hidden]){display:inline-block;}&[data-read-only]{outline:1px solid red;}`;\n}\nfunction inputElementStyle(props) {\n\tlet { color, input } = getTheme_v2(props.theme), dist = (input.radio.size - input.radio.markSize) / 2;\n\treturn css`appearance:none;position:absolute;top:0;left:0;opacity:0;height:100%;width:100%;outline:none;z-index:1;padding:0;margin:0;border-radius:${rem(input.radio.size / 2)};border:none;& + span{display:block;position:relative;height:${rem(input.radio.size)};width:${rem(input.radio.size)};border-radius:${rem(input.radio.size / 2)};background:${color.input.default.enabled.bg};box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.default.enabled.border,\n\t\twidth: input.border.width\n\t})};&::after{content:'';position:absolute;top:${rem(dist)};left:${rem(dist)};height:${rem(input.radio.markSize)};width:${rem(input.radio.markSize)};border-radius:${rem(input.radio.markSize / 2)};background:${color.input.default.enabled.fg};opacity:0;}}&:not(:disabled):focus + span{box-shadow:${focusRingStyle({\n\t\tborder: {\n\t\t\twidth: input.border.width,\n\t\t\tcolor: color.input.default.enabled.border\n\t\t},\n\t\tfocusRing: input.radio.focusRing\n\t})};}&:not(:disabled):focus:not(:focus-visible) + span{box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.default.enabled.border,\n\t\twidth: input.border.width\n\t})};}&:checked + span::after{opacity:1;}&[data-error] + span{background-color:${color.input.invalid.enabled.border};box-shadow:${focusRingBorderStyle({\n\t\twidth: input.border.width,\n\t\tcolor: color.input.invalid.enabled.muted.bg\n\t})};&::after{background:${color.input.invalid.enabled.muted.bg};}}&[data-read-only] + span{box-shadow:0 0 0 1px ${color.input.default.readOnly.border};background:${color.input.default.readOnly.bg};&::after{background:${color.input.default.readOnly.border};}}&:not([data-read-only]):disabled + span{box-shadow:0 0 0 1px ${color.input.default.disabled.border};background:${color.input.default.disabled.bg};&::after{background:${color.input.default.disabled.border};}}`;\n}\nconst StyledRadio = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"StyledRadio\",\n\tcomponentId: \"sc-f02knx-0\"\n})(radioBaseStyle), Input$3 = /* @__PURE__ */ styled.input.withConfig({\n\tdisplayName: \"Input\",\n\tcomponentId: \"sc-f02knx-1\"\n})(inputElementStyle), Radio = forwardRef(function Radio(props, forwardedRef) {\n\tlet $ = c(19), className, customValidity, disabled, readOnly, restProps, style;\n\t$[0] === props ? (className = $[1], customValidity = $[2], disabled = $[3], readOnly = $[4], restProps = $[5], style = $[6]) : ({className, disabled, style, customValidity, readOnly, ...restProps} = props, $[0] = props, $[1] = className, $[2] = customValidity, $[3] = disabled, $[4] = readOnly, $[5] = restProps, $[6] = style);\n\tlet ref = useRef(null), t0;\n\t$[7] === Symbol.for(\"react.memo_cache_sentinel\") ? (t0 = () => ref.current, $[7] = t0) : t0 = $[7], useImperativeHandle(forwardedRef, t0), useCustomValidity(ref, customValidity);\n\tlet t1 = !disabled && readOnly ? \"\" : void 0, t2 = customValidity ? \"\" : void 0, t3 = disabled || readOnly, t4;\n\t$[8] !== readOnly || $[9] !== restProps || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 ? (t4 = /* @__PURE__ */ jsx(Input$3, {\n\t\t\"data-read-only\": t1,\n\t\t\"data-error\": t2,\n\t\t...restProps,\n\t\tdisabled: t3,\n\t\treadOnly,\n\t\tref,\n\t\ttype: \"radio\"\n\t}), $[8] = readOnly, $[9] = restProps, $[10] = t1, $[11] = t2, $[12] = t3, $[13] = t4) : t4 = $[13];\n\tlet t5;\n\t$[14] === Symbol.for(\"react.memo_cache_sentinel\") ? (t5 = /* @__PURE__ */ jsx(\"span\", {}), $[14] = t5) : t5 = $[14];\n\tlet t6;\n\treturn $[15] !== className || $[16] !== style || $[17] !== t4 ? (t6 = /* @__PURE__ */ jsxs(StyledRadio, {\n\t\tclassName,\n\t\t\"data-ui\": \"Radio\",\n\t\tstyle,\n\t\tchildren: [t4, t5]\n\t}), $[15] = className, $[16] = style, $[17] = t4, $[18] = t6) : t6 = $[18], t6;\n});\nfunction rootStyle() {\n\treturn css`position:relative;width:-moz-available;width:-webkit-fill-available;width:stretch;&:not([hidden]){display:inline-block;}`;\n}\nfunction inputBaseStyle(props) {\n\tlet { font } = getTheme_v2(props.theme);\n\treturn css`-webkit-font-smoothing:antialiased;appearance:none;border:0;font-family:${font.text.family};color:inherit;width:100%;outline:none;margin:0;&:disabled{opacity:1;}`;\n}\nfunction inputColorStyle(props) {\n\tlet { color, input } = getTheme_v2(props.theme);\n\treturn css`background-color:${color.input.default.enabled.bg};color:${color.input.default.enabled.fg};box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.default.enabled.border,\n\t\twidth: input.border.width\n\t})};@media (hover:hover){&:not(:disabled):hover{background-color:${color.input.default.hovered.bg};color:${color.input.default.hovered.fg};box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.default.hovered.border,\n\t\twidth: input.border.width\n\t})};}}&:not(:disabled):focus{box-shadow:${focusRingStyle({\n\t\tborder: {\n\t\t\twidth: input.border.width,\n\t\t\tcolor: color.input.default.enabled.border\n\t\t},\n\t\tfocusRing: input.select.focusRing\n\t})};}&[data-read-only]{background-color:${color.input.default.readOnly.bg};color:${color.input.default.readOnly.fg};box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.default.readOnly.border,\n\t\twidth: input.border.width\n\t})};}&:not([data-read-only]):disabled{background-color:${color.input.default.disabled.bg};color:${color.input.default.disabled.fg};box-shadow:${focusRingBorderStyle({\n\t\tcolor: color.input.default.disabled.border,\n\t\twidth: input.border.width\n\t})};}`;\n}\nfunction textSize(size) {\n\treturn {\n\t\tfontSize: rem(size.fontSize),\n\t\tlineHeight: `${rem(size.lineHeight)}`\n\t};\n}\nfunction inputTextSizeStyle(props) {\n\tlet { $fontSize } = props, { font, media } = getTheme_v2(props.theme);\n\treturn _responsive(media, $fontSize, (sizeIndex) => textSize(font.text.sizes[sizeIndex] || font.text.sizes[2]));\n}\nfunction inputStyle() {\n\treturn [\n\t\tresponsiveRadiusStyle,\n\t\tinputBaseStyle,\n\t\tinputColorStyle,\n\t\tinputTextSizeStyle,\n\t\tresponsiveInputPaddingIconRightStyle\n\t];\n}\nfunction iconBoxStyle(props) {\n\tlet { color } = getTheme_v2(props.theme);\n\treturn css`pointer-events:none;position:absolute;top:0;right:0;--card-fg-color:${color.input.default.enabled.fg};@media (hover:hover){select:not(disabled):not(:read-only):hover + &&{--card-fg-color:${color.input.default.hovered.fg};}}select:disabled + &&{--card-fg-color:${color.input.default.disabled.fg};}select[data-read-only] + &&{--card-fg-color:${color.input.default.readOnly.fg};}`;\n}\nconst selectStyle = {\n\troot: rootStyle,\n\tinput: inputStyle,\n\ticonBox: iconBoxStyle\n}, StyledSelect = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"StyledSelect\",\n\tcomponentId: \"sc-fjdmul-0\"\n})(selectStyle.root), Input$2 = /* @__PURE__ */ styled.select.withConfig({\n\tdisplayName: \"Input\",\n\tcomponentId: \"sc-fjdmul-1\"\n})(selectStyle.input), IconBox = /* @__PURE__ */ styled(Box).withConfig({\n\tdisplayName: \"IconBox\",\n\tcomponentId: \"sc-fjdmul-2\"\n})(selectStyle.iconBox), Select = forwardRef(function Select(props, forwardedRef) {\n\tlet $ = c(38), children, customValidity, disabled, gap, readOnly, restProps, t0, t1, t2, t3;\n\t$[0] === props ? (children = $[1], customValidity = $[2], disabled = $[3], gap = $[4], readOnly = $[5], restProps = $[6], t0 = $[7], t1 = $[8], t2 = $[9], t3 = $[10]) : ({children, customValidity, disabled, fontSize: t0, gap, padding: t1, radius: t2, readOnly, space: t3, ...restProps} = props, $[0] = props, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = gap, $[5] = readOnly, $[6] = restProps, $[7] = t0, $[8] = t1, $[9] = t2, $[10] = t3);\n\tlet fontSize = t0 === void 0 ? 2 : t0, padding = t1 === void 0 ? 3 : t1, radius = t2 === void 0 ? 2 : t2, spacing = gap === void 0 ? t3 === void 0 ? 3 : t3 : gap, ref = useRef(null), t4;\n\t$[11] === Symbol.for(\"react.memo_cache_sentinel\") ? (t4 = () => ref.current, $[11] = t4) : t4 = $[11], useImperativeHandle(forwardedRef, t4), useCustomValidity(ref, customValidity);\n\tlet t5 = !disabled && readOnly ? \"\" : void 0, t6;\n\t$[12] === fontSize ? t6 = $[13] : (t6 = _getArrayProp(fontSize), $[12] = fontSize, $[13] = t6);\n\tlet t7;\n\t$[14] === padding ? t7 = $[15] : (t7 = _getArrayProp(padding), $[14] = padding, $[15] = t7);\n\tlet t8;\n\t$[16] === radius ? t8 = $[17] : (t8 = _getArrayProp(radius), $[16] = radius, $[17] = t8);\n\tlet t9;\n\t$[18] === spacing ? t9 = $[19] : (t9 = _getArrayProp(spacing), $[18] = spacing, $[19] = t9);\n\tlet t10 = disabled || readOnly, t11;\n\t$[20] !== children || $[21] !== restProps || $[22] !== t10 || $[23] !== t5 || $[24] !== t6 || $[25] !== t7 || $[26] !== t8 || $[27] !== t9 ? (t11 = /* @__PURE__ */ jsx(Input$2, {\n\t\t\"data-read-only\": t5,\n\t\t\"data-ui\": \"Select\",\n\t\t...restProps,\n\t\t$fontSize: t6,\n\t\t$padding: t7,\n\t\t$radius: t8,\n\t\t$space: t9,\n\t\tdisabled: t10,\n\t\tref,\n\t\tchildren\n\t}), $[20] = children, $[21] = restProps, $[22] = t10, $[23] = t5, $[24] = t6, $[25] = t7, $[26] = t8, $[27] = t9, $[28] = t11) : t11 = $[28];\n\tlet t12;\n\t$[29] === Symbol.for(\"react.memo_cache_sentinel\") ? (t12 = /* @__PURE__ */ jsx(ChevronDownIcon, {}), $[29] = t12) : t12 = $[29];\n\tlet t13;\n\t$[30] === fontSize ? t13 = $[31] : (t13 = /* @__PURE__ */ jsx(Text, {\n\t\tsize: fontSize,\n\t\tchildren: t12\n\t}), $[30] = fontSize, $[31] = t13);\n\tlet t14;\n\t$[32] !== padding || $[33] !== t13 ? (t14 = /* @__PURE__ */ jsx(IconBox, {\n\t\tpadding,\n\t\tchildren: t13\n\t}), $[32] = padding, $[33] = t13, $[34] = t14) : t14 = $[34];\n\tlet t15;\n\treturn $[35] !== t11 || $[36] !== t14 ? (t15 = /* @__PURE__ */ jsxs(StyledSelect, {\n\t\t\"data-ui\": \"Select\",\n\t\tchildren: [t11, t14]\n\t}), $[35] = t11, $[36] = t14, $[37] = t15) : t15 = $[37], t15;\n});\nfunction switchBaseStyles() {\n\treturn css`position:relative;&:not([hidden]){display:inline-block;}`;\n}\nfunction switchInputStyles() {\n\treturn css`position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;height:100%;width:100%;outline:none;padding:0;margin:0;z-index:1;`;\n}\nfunction switchRepresentationStyles(props) {\n\tlet { color, input } = getTheme_v2(props.theme);\n\treturn css`--switch-bg-color:${color.input.default.enabled.border};--switch-fg-color:${color.input.default.enabled.bg};--switch-box-shadow:none;&:not([hidden]){display:block;}position:relative;width:${rem(input.switch.width)};height:${rem(input.switch.height)};border-radius:${rem(input.switch.height / 2)};pointer-events:none;&:after{content:'';display:block;position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;box-shadow:var(--switch-box-shadow);border-radius:inherit;}input:focus + &&{--switch-box-shadow:${focusRingStyle({ focusRing: input.switch.focusRing })};}input:focus:not(:focus-visible) + &&{--switch-box-shadow:none;}input:checked + &&{--switch-bg-color:${color.input.default.enabled.fg};--switch-fg-color:${color.input.default.enabled.bg};}@media (hover:hover){input:not(:disabled):hover + &&{--switch-bg-color:${color.input.default.hovered.border};--switch-fg-color:${color.input.default.hovered.bg};}input:not(:disabled):checked:hover + &&{--switch-bg-color:${color.input.default.enabled.fg};--switch-fg-color:${color.input.default.enabled.bg};}}input:not([data-read-only]):disabled + &&{--switch-bg-color:${color.input.default.disabled.border};--switch-fg-color:${color.input.default.disabled.bg};}input[data-read-only]:disabled + &&{--switch-bg-color:${color.input.default.readOnly.border};--switch-fg-color:${color.input.default.readOnly.bg};}input:checked[data-read-only]:disabled + &&{--switch-bg-color:${color.input.default.readOnly.fg};--switch-fg-color:${color.input.default.readOnly.bg};}`;\n}\nfunction switchTrackStyles(props) {\n\tlet { input } = getTheme_v2(props.theme);\n\treturn css`&:not([hidden]){display:block;}background-color:var(--switch-bg-color);position:absolute;left:0;top:0;width:${rem(input.switch.width)};height:${rem(input.switch.height)};border-radius:${rem(input.switch.height / 2)};`;\n}\nfunction switchThumbStyles(props) {\n\tlet { $indeterminate } = props, { input } = getTheme_v2(props.theme), trackWidth = input.switch.width, trackHeight = input.switch.height, trackPadding = input.switch.padding, size = trackHeight - input.switch.padding * 2, checkedOffset = trackWidth - trackPadding * 2 - size, indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding, checked = $indeterminate !== !0 && props.$checked === !0;\n\treturn css`&:not([hidden]){display:block;}position:absolute;left:${rem(trackPadding)};top:${rem(trackPadding)};height:${rem(size)};width:${rem(size)};border-radius:${rem(size / 2)};transition-property:transform;transition-duration:${input.switch.transitionDurationMs}ms;transition-timing-function:${input.switch.transitionTimingFunction};background:var(--switch-fg-color);transform:translate3d(0,0,0);box-shadow:0px 1px 0px 0px rgba(0,0,0,0.05);${checked && css`transform:translate3d(${checkedOffset}px,0,0);`} ${$indeterminate && css`transform:translate3d(${indeterminateOffset}px,0,0);`}`;\n}\nconst StyledSwitch = /* @__PURE__ */ styled.span.withConfig({\n\tdisplayName: \"StyledSwitch\",\n\tcomponentId: \"sc-aod7y9-0\"\n})(switchBaseStyles), Input$1 = /* @__PURE__ */ styled.input.withConfig({\n\tdisplayName: \"Input\",\n\tcomponentId: \"sc-aod7y9-1\"\n})(switchInputStyles), Representation = /* @__PURE__ */ styled.span.withConfig({\n\tdisplayName: \"Representation\",\n\tcomponentId: \"sc-aod7y9-2\"\n})(switchRepresentationStyles), Track = /* @__PURE__ */ styled.span.withConfig({\n\tdisplayName: \"Track\",\n\tcomponentId: \"sc-aod7y9-3\"\n})(switchTrackStyles), Thumb = /* @__PURE__ */ styled.span.withConfig({\n\tdisplayName: \"Thumb\",\n\tcomponentId: \"sc-aod7y9-4\"\n})(switchThumbStyles), Switch = forwardRef(function Switch(props, forwardedRef) {\n\tlet $ = c(26), checked, className, disabled, indeterminate, readOnly, restProps, style;\n\t$[0] === props ? (checked = $[1], className = $[2], disabled = $[3], indeterminate = $[4], readOnly = $[5], restProps = $[6], style = $[7]) : ({checked, className, disabled, indeterminate, readOnly, style, ...restProps} = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = disabled, $[4] = indeterminate, $[5] = readOnly, $[6] = restProps, $[7] = style);\n\tlet ref = useRef(null), t0;\n\t$[8] === Symbol.for(\"react.memo_cache_sentinel\") ? (t0 = () => ref.current, $[8] = t0) : t0 = $[8], useImperativeHandle(forwardedRef, t0);\n\tlet t1, t2;\n\t$[9] === indeterminate ? (t1 = $[10], t2 = $[11]) : (t1 = () => {\n\t\tref.current && (ref.current.indeterminate = indeterminate || !1);\n\t}, t2 = [indeterminate], $[9] = indeterminate, $[10] = t1, $[11] = t2), useEffect(t1, t2);\n\tlet t3 = !disabled && readOnly ? \"\" : void 0, t4 = indeterminate !== !0 && checked, t5 = disabled || readOnly, t6;\n\t$[12] !== restProps || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsx(Input$1, {\n\t\t\"data-read-only\": t3,\n\t\t...restProps,\n\t\tchecked: t4,\n\t\tdisabled: t5,\n\t\ttype: \"checkbox\",\n\t\tref\n\t}), $[12] = restProps, $[13] = t3, $[14] = t4, $[15] = t5, $[16] = t6) : t6 = $[16];\n\tlet t7;\n\t$[17] === Symbol.for(\"react.memo_cache_sentinel\") ? (t7 = /* @__PURE__ */ jsx(Track, {}), $[17] = t7) : t7 = $[17];\n\tlet t8;\n\t$[18] !== checked || $[19] !== indeterminate ? (t8 = /* @__PURE__ */ jsxs(Representation, {\n\t\t\"aria-hidden\": !0,\n\t\t\"data-name\": \"representation\",\n\t\tchildren: [t7, /* @__PURE__ */ jsx(Thumb, {\n\t\t\t$checked: checked,\n\t\t\t$indeterminate: indeterminate\n\t\t})]\n\t}), $[18] = checked, $[19] = indeterminate, $[20] = t8) : t8 = $[20];\n\tlet t9;\n\treturn $[21] !== className || $[22] !== style || $[23] !== t6 || $[24] !== t8 ? (t9 = /* @__PURE__ */ jsxs(StyledSwitch, {\n\t\tclassName,\n\t\t\"data-ui\": \"Switch\",\n\t\tstyle,\n\t\tchildren: [t6, t8]\n\t}), $[21] = className, $[22] = style, $[23] = t6, $[24] = t8, $[25] = t9) : t9 = $[25], t9;\n}), StyledTextArea = /* @__PURE__ */ styled.span.withConfig({\n\tdisplayName: \"StyledTextArea\",\n\tcomponentId: \"sc-ndqkyw-0\"\n})(textInputRootStyle), InputRoot = styled.span.withConfig({\n\tdisplayName: \"InputRoot\",\n\tcomponentId: \"sc-ndqkyw-1\"\n})`flex:1;min-width:0;display:block;position:relative;`, Input = /* @__PURE__ */ styled.textarea.withConfig({\n\tdisplayName: \"Input\",\n\tcomponentId: \"sc-ndqkyw-2\"\n})(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation = /* @__PURE__ */ styled.div.withConfig({\n\tdisplayName: \"Presentation\",\n\tcomponentId: \"sc-ndqkyw-3\"\n})(responsiveRadiusStyle, textInputRepresentationStyle), TextArea = forwardRef(function TextArea(props, forwardedRef) {\n\tlet $ = c(35), __unstable_disableFocusRing, customValidity, restProps, t0, t1, t2, t3, t4, weight;\n\t$[0] === props ? (__unstable_disableFocusRing = $[1], customValidity = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], weight = $[9]) : ({border: t0, customValidity, disabled: t1, fontSize: t2, padding: t3, radius: t4, weight, __unstable_disableFocusRing, ...restProps} = props, $[0] = props, $[1] = __unstable_disableFocusRing, $[2] = customValidity, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = weight);\n\tlet border = t0 === void 0 || t0, disabled = t1 !== void 0 && t1, fontSize = t2 === void 0 ? 2 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, ref = useRef(null), rootTheme = useRootTheme(), t5;\n\t$[10] === Symbol.for(\"react.memo_cache_sentinel\") ? (t5 = () => ref.current, $[10] = t5) : t5 = $[10], useImperativeHandle(forwardedRef, t5), useCustomValidity(ref, customValidity);\n\tlet t6 = rootTheme.scheme, t7 = rootTheme.tone, t8;\n\t$[11] === fontSize ? t8 = $[12] : (t8 = _getArrayProp(fontSize), $[11] = fontSize, $[12] = t8);\n\tlet t9;\n\t$[13] === padding ? t9 = $[14] : (t9 = _getArrayProp(padding), $[13] = padding, $[14] = t9);\n\tlet t10 = rootTheme.scheme, t11;\n\t$[15] === Symbol.for(\"react.memo_cache_sentinel\") ? (t11 = _getArrayProp(0), $[15] = t11) : t11 = $[15];\n\tlet t12;\n\t$[16] !== disabled || $[17] !== restProps || $[18] !== rootTheme.scheme || $[19] !== rootTheme.tone || $[20] !== t8 || $[21] !== t9 || $[22] !== weight ? (t12 = /* @__PURE__ */ jsx(Input, {\n\t\t\"data-as\": \"textarea\",\n\t\t\"data-scheme\": t6,\n\t\t\"data-tone\": t7,\n\t\t...restProps,\n\t\t$fontSize: t8,\n\t\t$padding: t9,\n\t\t$scheme: t10,\n\t\t$space: t11,\n\t\t$tone: rootTheme.tone,\n\t\t$weight: weight,\n\t\tdisabled,\n\t\tref\n\t}), $[16] = disabled, $[17] = restProps, $[18] = rootTheme.scheme, $[19] = rootTheme.tone, $[20] = t8, $[21] = t9, $[22] = weight, $[23] = t12) : t12 = $[23];\n\tlet t13;\n\t$[24] === radius ? t13 = $[25] : (t13 = _getArrayProp(radius), $[24] = radius, $[25] = t13);\n\tlet t14 = border ? \"\" : void 0, t15;\n\t$[26] !== __unstable_disableFocusRing || $[27] !== rootTheme.scheme || $[28] !== rootTheme.tone || $[29] !== t13 || $[30] !== t14 ? (t15 = /* @__PURE__ */ jsx(Presentation, {\n\t\t$radius: t13,\n\t\t$unstableDisableFocusRing: __unstable_disableFocusRing,\n\t\t$scheme: rootTheme.scheme,\n\t\t$tone: rootTheme.tone,\n\t\t\"data-border\": t14,\n\t\t\"data-scheme\": rootTheme.scheme,\n\t\t\"data-tone\": rootTheme.tone\n\t}), $[26] = __unstable_disableFocusRing, $[27] = rootTheme.scheme, $[28] = rootTheme.tone, $[29] = t13, $[30] = t14, $[31] = t15) : t15 = $[31];\n\tlet t16;\n\treturn $[32] !== t12 || $[33] !== t15 ? (t16 = /* @__PURE__ */ jsx(StyledTextArea, {\n\t\t\"data-ui\": \"TextArea\",\n\t\tchildren: /* @__PURE__ */ jsxs(InputRoot, { children: [t12, t15] })\n\t}), $[32] = t12, $[33] = t15, $[34] = t16) : t16 = $[34], t16;\n});\n/**\n* @public\n* Provides context for a group of tooltip elements that should share a delay\n* which temporarily becomes 1 ms after the first floating element of the group opens.\n*/\nfunction TooltipDelayGroupProvider(props) {\n\tlet $ = c(9), { children, delay } = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == \"number\" ? delay : delay?.open || 0, closeDelay = typeof delay == \"number\" ? delay : delay?.close || 0, t0 = isGroupActive ? 1 : openDelay, t1;\n\t$[0] !== closeDelay || $[1] !== openTooltipId || $[2] !== setIsGroupActive || $[3] !== setOpenTooltipId || $[4] !== t0 ? (t1 = {\n\t\tsetIsGroupActive,\n\t\topenTooltipId,\n\t\tsetOpenTooltipId,\n\t\topenDelay: t0,\n\t\tcloseDelay\n\t}, $[0] = closeDelay, $[1] = openTooltipId, $[2] = setIsGroupActive, $[3] = setOpenTooltipId, $[4] = t0, $[5] = t1) : t1 = $[5];\n\tlet value = t1, t2;\n\treturn $[6] !== children || $[7] !== value ? (t2 = /* @__PURE__ */ jsx(TooltipDelayGroupContext.Provider, {\n\t\tvalue,\n\t\tchildren\n\t}), $[6] = children, $[7] = value, $[8] = t2) : t2 = $[8], t2;\n}\n/**\n* @public\n*/\nfunction BoundaryElementProvider(props) {\n\tlet $ = c(5), { children, element } = props, t0;\n\t$[0] === element ? t0 = $[1] : (t0 = {\n\t\tversion: 0,\n\t\telement\n\t}, $[0] = element, $[1] = t0);\n\tlet value = t0, t1;\n\treturn $[2] !== children || $[3] !== value ? (t1 = /* @__PURE__ */ jsx(BoundaryElementContext.Provider, {\n\t\tvalue,\n\t\tchildren\n\t}), $[2] = children, $[3] = value, $[4] = t1) : t1 = $[4], t1;\n}\n/**\n* @internal\n* @deprecated this component will be removed in the next major release\n*/\nfunction ConditionalWrapper({ children, condition, wrapper }) {\n\treturn condition ? wrapper(children) : children;\n}\nfunction findMaxBreakpoints(media, width) {\n\tlet ret = [];\n\tfor (let i = 0; i < media.length; i += 1) media[i] > width && ret.push(i);\n\treturn ret;\n}\nfunction findMinBreakpoints(media, width) {\n\tlet ret = [];\n\tfor (let i = 0; i < media.length; i += 1) media[i] <= width && ret.push(i);\n\treturn ret;\n}\n/**\n* DO NOT USE IN PRODUCTION.\n* @beta\n*/\nconst ElementQuery = forwardRef(function ElementQuery(props, forwardedRef) {\n\tlet $ = c(18), theme = useTheme_v2(), _media, children, restProps;\n\t$[0] === props ? (_media = $[1], children = $[2], restProps = $[3]) : ({children, media: _media, ...restProps} = props, $[0] = props, $[1] = _media, $[2] = children, $[3] = restProps);\n\tlet media = _media ?? theme.media, [element, setElement] = useState(null), width = useElementSize(element)?.border.width ?? window.innerWidth, t0;\n\tif ($[4] !== media || $[5] !== width) {\n\t\tlet eq = findMaxBreakpoints(media, width);\n\t\tt0 = eq.length ? eq.join(\" \") : void 0, $[4] = media, $[5] = width, $[6] = t0;\n\t} else t0 = $[6];\n\tlet max = t0, t1;\n\tif ($[7] !== media || $[8] !== width) {\n\t\tlet eq_0 = findMinBreakpoints(media, width);\n\t\tt1 = eq_0.length ? eq_0.join(\" \") : void 0, $[7] = media, $[8] = width, $[9] = t1;\n\t} else t1 = $[9];\n\tlet min = t1, t2, t3;\n\t$[10] === element ? (t2 = $[11], t3 = $[12]) : (t2 = () => element, t3 = [element], $[10] = element, $[11] = t2, $[12] = t3), useImperativeHandle(forwardedRef, t2, t3);\n\tlet t4;\n\treturn $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t4 = /* @__PURE__ */ jsx(\"div\", {\n\t\t\"data-ui\": \"ElementQuery\",\n\t\t...restProps,\n\t\t\"data-eq-max\": max,\n\t\t\"data-eq-min\": min,\n\t\tref: setElement,\n\t\tchildren\n\t}), $[13] = children, $[14] = max, $[15] = min, $[16] = restProps, $[17] = t4) : t4 = $[17], t4;\n});\n/**\n* DO NOT USE IN PRODUCTION\n* @beta\n*/\nvar ErrorBoundary = class extends Component {\n\tstate = { error: null };\n\tstatic getDerivedStateFromError(error) {\n\t\treturn { error };\n\t}\n\tcomponentDidCatch(error, info) {\n\t\tthis.props.onCatch({\n\t\t\terror,\n\t\t\tinfo\n\t\t});\n\t}\n\trender() {\n\t\tlet { error } = this.state;\n\t\treturn error ? /* @__PURE__ */ jsx(Code, { children: typeof error?.message == \"string\" ? error.message : \"Error\" }) : this.props.children;\n\t}\n};\nconst StyledSrOnly = styled.div.withConfig({\n\tdisplayName: \"StyledSrOnly\",\n\tcomponentId: \"sc-ow9exq-0\"\n})`display:block;width:0;height:0;position:absolute;overflow:hidden;overflow:clip;`, SrOnly = forwardRef(function SrOnly(props, ref) {\n\tlet $ = c(4), { as, children } = props, t0;\n\treturn $[0] !== as || $[1] !== children || $[2] !== ref ? (t0 = /* @__PURE__ */ jsx(StyledSrOnly, {\n\t\t\"aria-hidden\": !0,\n\t\tas,\n\t\t\"data-ui\": \"SrOnly\",\n\t\tref,\n\t\tchildren\n\t}), $[0] = as, $[1] = children, $[2] = ref, $[3] = t0) : t0 = $[3], t0;\n}), StyledVirtualList = styled.div.withConfig({\n\tdisplayName: \"StyledVirtualList\",\n\tcomponentId: \"sc-lfoa81-0\"\n})`position:relative;`, ItemWrapper = styled.div.withConfig({\n\tdisplayName: \"ItemWrapper\",\n\tcomponentId: \"sc-lfoa81-1\"\n})`position:absolute;left:0;right:0;`, VirtualList = forwardRef(function VirtualList(props, forwardedRef) {\n\tlet $ = c(44), getItemKey, onChange, renderItem, restProps, t0, t1, t2;\n\t$[0] === props ? (getItemKey = $[1], onChange = $[2], renderItem = $[3], restProps = $[4], t0 = $[5], t1 = $[6], t2 = $[7]) : ({as: t0, gap: t1, getItemKey, items: t2, onChange, renderItem, ...restProps} = props, $[0] = props, $[1] = getItemKey, $[2] = onChange, $[3] = renderItem, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = t2);\n\tlet as = t0 === void 0 ? \"div\" : t0, gap = t1 === void 0 ? 0 : t1, t3;\n\t$[8] === t2 ? t3 = $[9] : (t3 = t2 === void 0 ? [] : t2, $[8] = t2, $[9] = t3);\n\tlet items = t3, { space } = useTheme_v2(), ref = useRef(null), wrapperRef = useRef(null), [scrollTop, setScrollTop] = useState(0), [scrollHeight, setScrollHeight] = useState(0), [itemHeight, setItemHeight] = useState(-1), t4;\n\t$[10] === Symbol.for(\"react.memo_cache_sentinel\") ? (t4 = () => ref.current, $[10] = t4) : t4 = $[10], useImperativeHandle(forwardedRef, t4);\n\tlet t5;\n\t$[11] === Symbol.for(\"react.memo_cache_sentinel\") ? (t5 = () => {\n\t\tif (!wrapperRef.current) return;\n\t\tlet firstElement = wrapperRef.current.firstChild;\n\t\tfirstElement instanceof HTMLElement && setItemHeight(firstElement.offsetHeight);\n\t}, $[11] = t5) : t5 = $[11];\n\tlet t6;\n\t$[12] === renderItem ? t6 = $[13] : (t6 = [renderItem], $[12] = renderItem, $[13] = t6), useEffect(t5, t6);\n\tlet t7, t8;\n\t$[14] === Symbol.for(\"react.memo_cache_sentinel\") ? (t7 = () => {\n\t\tif (!ref.current) return;\n\t\tlet scrollEl = findScrollable(ref.current.parentNode);\n\t\tif (scrollEl) {\n\t\t\tif (!(scrollEl instanceof HTMLElement)) return;\n\t\t\tlet handleScroll = () => {\n\t\t\t\tsetScrollTop(scrollEl.scrollTop);\n\t\t\t};\n\t\t\tscrollEl.addEventListener(\"scroll\", handleScroll, { passive: !0 });\n\t\t\tlet ro = new _ResizeObserver((entries) => {\n\t\t\t\tsetScrollHeight(entries[0].contentRect.height);\n\t\t\t});\n\t\t\treturn ro.observe(scrollEl), handleScroll(), () => {\n\t\t\t\tscrollEl.removeEventListener(\"scroll\", handleScroll), ro.unobserve(scrollEl), ro.disconnect();\n\t\t\t};\n\t\t}\n\t\tlet handleScroll_0 = () => {\n\t\t\tsetScrollTop(window.scrollY);\n\t\t}, handleResize = () => {\n\t\t\tsetScrollHeight(window.innerHeight);\n\t\t};\n\t\treturn window.addEventListener(\"scroll\", handleScroll_0, { passive: !0 }), window.addEventListener(\"resize\", handleResize), setScrollHeight(window.innerHeight), handleScroll_0(), () => {\n\t\t\twindow.removeEventListener(\"scroll\", handleScroll_0), window.removeEventListener(\"resize\", handleResize);\n\t\t};\n\t}, t8 = [], $[14] = t7, $[15] = t8) : (t7 = $[14], t8 = $[15]), useEffect(t7, t8);\n\tlet len = items.length, height = itemHeight ? len * (itemHeight + space[gap]) - space[gap] : 0, fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0, toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0, t10, t9;\n\t$[16] !== fromIndex || $[17] !== gap || $[18] !== itemHeight || $[19] !== onChange || $[20] !== scrollHeight || $[21] !== scrollTop || $[22] !== space || $[23] !== toIndex ? (t9 = () => {\n\t\tonChange && onChange({\n\t\t\tfromIndex,\n\t\t\tgap: space[gap],\n\t\t\titemHeight,\n\t\t\tscrollHeight,\n\t\t\tscrollTop,\n\t\t\ttoIndex\n\t\t});\n\t}, t10 = [\n\t\tfromIndex,\n\t\tgap,\n\t\titemHeight,\n\t\tonChange,\n\t\tscrollHeight,\n\t\tscrollTop,\n\t\tspace,\n\t\ttoIndex\n\t], $[16] = fromIndex, $[17] = gap, $[18] = itemHeight, $[19] = onChange, $[20] = scrollHeight, $[21] = scrollTop, $[22] = space, $[23] = toIndex, $[24] = t10, $[25] = t9) : (t10 = $[24], t9 = $[25]), useEffect(t9, t10);\n\tlet t11;\n\t$[26] !== fromIndex || $[27] !== gap || $[28] !== getItemKey || $[29] !== itemHeight || $[30] !== items || $[31] !== renderItem || $[32] !== space || $[33] !== toIndex ? (t11 = {\n\t\tfromIndex,\n\t\tgap,\n\t\titemHeight,\n\t\tspace,\n\t\ttoIndex,\n\t\tgetItemKey,\n\t\titems,\n\t\trenderItem\n\t}, $[26] = fromIndex, $[27] = gap, $[28] = getItemKey, $[29] = itemHeight, $[30] = items, $[31] = renderItem, $[32] = space, $[33] = toIndex, $[34] = t11) : t11 = $[34];\n\tlet children = useChildren(t11), t12;\n\t$[35] === height ? t12 = $[36] : (t12 = { height }, $[35] = height, $[36] = t12);\n\tlet t13;\n\t$[37] !== children || $[38] !== t12 ? (t13 = /* @__PURE__ */ jsx(\"div\", {\n\t\tref: wrapperRef,\n\t\tstyle: t12,\n\t\tchildren\n\t}), $[37] = children, $[38] = t12, $[39] = t13) : t13 = $[39];\n\tlet t14;\n\treturn $[40] !== as || $[41] !== restProps || $[42] !== t13 ? (t14 = /* @__PURE__ */ jsx(StyledVirtualList, {\n\t\tas,\n\t\t\"data-ui\": \"VirtualList\",\n\t\t...restProps,\n\t\tref,\n\t\tchildren: t13\n\t}), $[40] = as, $[41] = restProps, $[42] = t13, $[43] = t14) : t14 = $[43], t14;\n});\nfunction useChildren(t0) {\n\tlet $ = c(21), { fromIndex, gap, getItemKey, itemHeight, items, renderItem, space, toIndex } = t0;\n\tif (!renderItem || items.length === 0) return null;\n\tif (itemHeight === -1) {\n\t\tlet t1;\n\t\t$[0] !== items[0] || $[1] !== renderItem ? (t1 = renderItem(items[0]), $[0] = items[0], $[1] = renderItem, $[2] = t1) : t1 = $[2];\n\t\tlet t2;\n\t\treturn $[3] === t1 ? t2 = $[4] : (t2 = [/* @__PURE__ */ jsx(ItemWrapper, { children: t1 }, 0)], $[3] = t1, $[4] = t2), t2;\n\t}\n\tlet t1;\n\tif ($[5] !== fromIndex || $[6] !== gap || $[7] !== getItemKey || $[8] !== itemHeight || $[9] !== items || $[10] !== renderItem || $[11] !== space || $[12] !== toIndex) {\n\t\tlet t2;\n\t\t$[14] !== fromIndex || $[15] !== gap || $[16] !== getItemKey || $[17] !== itemHeight || $[18] !== renderItem || $[19] !== space ? (t2 = (item, _itemIndex) => {\n\t\t\tlet itemIndex = fromIndex + _itemIndex, node = renderItem(item), key = getItemKey ? getItemKey(item, itemIndex) : itemIndex;\n\t\t\treturn /* @__PURE__ */ jsx(ItemWrapper, {\n\t\t\t\tstyle: { top: itemIndex * (itemHeight + space[gap]) },\n\t\t\t\tchildren: node\n\t\t\t}, key);\n\t\t}, $[14] = fromIndex, $[15] = gap, $[16] = getItemKey, $[17] = itemHeight, $[18] = renderItem, $[19] = space, $[20] = t2) : t2 = $[20], t1 = items.slice(fromIndex, toIndex).map(t2), $[5] = fromIndex, $[6] = gap, $[7] = getItemKey, $[8] = itemHeight, $[9] = items, $[10] = renderItem, $[11] = space, $[12] = toIndex, $[13] = t1;\n\t} else t1 = $[13];\n\treturn t1;\n}\nfunction findScrollable(parentNode) {\n\tlet _scrollEl = parentNode;\n\tfor (; _scrollEl && !_isScrollable(_scrollEl);) _scrollEl = _scrollEl.parentNode;\n\treturn _scrollEl;\n}\nexport { Arrow, Autocomplete, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider, Box, Breadcrumbs, Button, Card, Checkbox, Code, CodeSkeleton, ConditionalWrapper, Container, Dialog, DialogContext, DialogProvider, ElementQuery, ErrorBoundary, Flex, Grid, Heading, HeadingSkeleton, Hotkeys, Inline, KBD, Label, LabelSkeleton, Layer, LayerProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuItem, Popover, Portal, PortalProvider, Radio, Select, Skeleton, Spinner, SrOnly, Stack, Switch, Tab, TabList, TabPanel, Text, TextArea, TextInput, TextSkeleton, ThemeColorProvider, ThemeProvider, Toast, ToastProvider, Tooltip, TooltipDelayGroupContext, TooltipDelayGroupProvider, Tree, TreeItem, VirtualList, _ResizeObserver, _elementSizeObserver, _fillCSSObject, _getArrayProp, _getResponsiveSpace, _hasFocus, _isEnterToClickElement, _isScrollable, _raf, _raf2, _responsive, attemptFocus, containsOrEqualsElement, createColorTheme, focusFirstDescendant, focusLastDescendant, hexToRgb, hslToRgb, isFocusable, isHTMLAnchorElement, isHTMLButtonElement, isHTMLElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, multiply, parseColor, rem, responsiveCodeFontStyle, responsiveHeadingFont, responsiveLabelFont, responsiveTextAlignStyle, responsiveTextFont, rgbToHex, rgbToHsl, rgba, screen, studioTheme, useArrayProp, useBoundaryElement, useClickOutside, useClickOutsideEvent, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMatchMedia, useMediaIndex, usePortal, usePrefersDark, usePrefersReducedMotion, useRootTheme, useTheme, useTheme_v2, useToast, useTooltipDelayGroup, useTree };\n\n//# sourceMappingURL=index.js.map","import {Card, Flex, Select, Stack, Text} from '@sanity/ui'\nimport {useCallback} from 'react'\nimport {set, type StringInputProps, unset, useFormValue} from 'sanity'\n\nimport {usableSpeakers} from '../lib/speakers'\nimport type {Speaker} from '../lib/types'\n\nconst FIELD = 'interviewSpeakers'\n\nfunction readSpeakers(value: unknown): Speaker[] {\n if (!Array.isArray(value)) return []\n\n return value.flatMap((entry) => {\n if (!entry || typeof entry !== 'object') return []\n const id = Reflect.get(entry, 'id')\n const name = Reflect.get(entry, 'name')\n const role = Reflect.get(entry, 'role')\n return [\n {\n id: typeof id === 'string' ? id : undefined,\n name: typeof name === 'string' ? name : undefined,\n role: typeof role === 'string' ? role : undefined,\n },\n ]\n })\n}\n\n/**\n * Picks one of the speakers defined on the document.\n *\n * @public\n */\nexport function SpeakerInput(props: StringInputProps): React.JSX.Element {\n const {value, onChange, elementProps, schemaType} = props\n\n const options: unknown = schemaType.options\n const named =\n options && typeof options === 'object' && 'speakersField' in options\n ? Reflect.get(options, 'speakersField')\n : undefined\n const field = typeof named === 'string' ? named : FIELD\n\n const speakers = usableSpeakers(readSpeakers(useFormValue([field])))\n\n const handle = useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n const next = event.currentTarget.value\n onChange(next ? set(next) : unset())\n },\n [onChange],\n )\n\n if (speakers.length === 0) {\n return (\n <Card padding={3} radius={2} border tone=\"caution\">\n <Stack gap={3}>\n <Text size={1} weight=\"medium\">\n No speakers yet\n </Text>\n <Text size={1}>\n Add them in the “{field}” field of this document, then pick one here.\n </Text>\n </Stack>\n </Card>\n )\n }\n\n return (\n <Stack gap={3}>\n <Select {...elementProps} value={value ?? ''} onChange={handle}>\n <option value=\"\">Not set</option>\n {speakers.map((speaker) => (\n <option key={speaker.id} value={speaker.id}>\n {speaker.name ?? speaker.id}\n {speaker.role ? ` — ${speaker.role}` : ''}\n </option>\n ))}\n </Select>\n\n {value && !speakers.some((speaker) => speaker.id === value) && (\n <Flex>\n <Text size={0} style={{color: 'var(--card-critical-fg-color)'}}>\n “{value}” is not in the speaker list — it was renamed or removed.\n </Text>\n </Flex>\n )}\n </Stack>\n )\n}\n","/**\n * Two speech turns, drawn to match the stroke weight of `@sanity/icons`.\n */\nexport function InterviewIcon(): React.JSX.Element {\n return (\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 25 25\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n data-sanity-icon=\"interview\"\n >\n <path d=\"M4 5.5h9a1.5 1.5 0 0 1 1.5 1.5v3A1.5 1.5 0 0 1 13 11.5H7L4.5 14v-2.5H4A1.5 1.5 0 0 1 2.5 10V7A1.5 1.5 0 0 1 4 5.5z\" />\n <path d=\"M21 12.5h-8a1.5 1.5 0 0 0-1.5 1.5v3a1.5 1.5 0 0 0 1.5 1.5h5l2.5 2.5V18.5h.5a1.5 1.5 0 0 0 1.5-1.5v-3a1.5 1.5 0 0 0-1.5-1.5z\" />\n </svg>\n )\n}\n","import {defineArrayMember, defineField, defineType} from 'sanity'\n\nimport {SpeakerInput} from '../components/SpeakerInput'\nimport {InterviewIcon} from '../components/InterviewIcon'\nimport type {InterviewConfig} from '../lib/types'\n\nconst DEFAULT_DECORATORS = ['strong', 'em']\n\n/**\n * The question-and-answer block.\n *\n * @public\n */\nexport function createInterviewBlockType(config: InterviewConfig = {}) {\n const {\n name = 'interviewBlock',\n title = 'Interview',\n timestamps = true,\n translation = true,\n answerMarks,\n } = config\n\n const decorators = (answerMarks?.decorators ?? DEFAULT_DECORATORS).map((value) => ({\n title: value === 'strong' ? 'Bold' : value === 'em' ? 'Italic' : value,\n value,\n }))\n\n const annotations =\n answerMarks?.link === false\n ? []\n : [\n defineArrayMember({\n type: 'object',\n name: 'link',\n title: 'Link',\n fields: [defineField({name: 'href', type: 'url', validation: (r) => r.required()})],\n }),\n ]\n\n return defineType({\n name,\n title,\n type: 'object',\n icon: InterviewIcon,\n fields: [\n defineField({\n name: 'speaker',\n title: 'Answered by',\n type: 'string',\n components: {input: SpeakerInput},\n validation: (rule) => rule.required(),\n }),\n\n defineField({\n name: 'question',\n type: 'string',\n validation: (rule) => rule.required(),\n }),\n\n defineField({\n name: 'answer',\n type: 'array',\n of: [\n defineArrayMember({\n type: 'block',\n styles: [{title: 'Normal', value: 'normal'}],\n lists: [],\n marks: {decorators, annotations},\n }),\n ],\n validation: (rule) => rule.required(),\n }),\n\n defineField({\n name: 'askedBy',\n title: 'Asked by',\n description: 'Only needed when somebody other than the usual interviewer asks.',\n type: 'string',\n components: {input: SpeakerInput},\n }),\n\n ...(timestamps\n ? [\n defineField({\n name: 'timestamp',\n description: 'Where this sits in the recording, as 12:34 or 1:02:33.',\n type: 'string',\n validation: (rule) =>\n rule.regex(/^\\d{1,3}:\\d{2}(:\\d{2})?$/, {name: 'mm:ss or hh:mm:ss'}),\n }),\n ]\n : []),\n\n ...(translation\n ? [\n defineField({\n name: 'translated',\n title: 'Answer was translated',\n description: 'A translated answer is not a verbatim quote — say so.',\n type: 'boolean',\n initialValue: false,\n }),\n defineField({\n name: 'originalAnswer',\n title: 'Original wording',\n type: 'text',\n rows: 3,\n hidden: ({parent}) => parent?.translated !== true,\n }),\n ]\n : []),\n ],\n\n preview: {\n select: {question: 'question', speaker: 'speaker', timestamp: 'timestamp'},\n prepare: (select) => ({\n title: typeof select.question === 'string' ? select.question : 'Question',\n subtitle: [select.speaker, select.timestamp].filter(Boolean).join(' · '),\n }),\n },\n })\n}\n","import {defineArrayMember, defineField} from 'sanity'\n\nimport type {InterviewConfig} from '../lib/types'\n\n/**\n * The document field the blocks read their speakers from.\n *\n * Add it to any type that carries interviews:\n *\n * ```ts\n * defineType({name: 'post', fields: [createSpeakersField(), /* … *\\/]})\n * ```\n *\n * @public\n */\nexport function createSpeakersField(config: InterviewConfig = {}) {\n const {speakersField = 'interviewSpeakers', speakerTypes = []} = config\n\n return defineField({\n name: speakersField,\n title: 'Interview speakers',\n description: 'Everyone taking part. Blocks pick from this list, so a name is only typed once.',\n type: 'array',\n of: [\n defineArrayMember({\n type: 'object',\n name: 'speaker',\n fields: [\n defineField({\n name: 'id',\n title: 'Short id',\n description: 'Used by the blocks, e.g. `till`. Lowercase, no spaces.',\n type: 'string',\n validation: (rule) =>\n rule.required().regex(/^[a-z0-9-]+$/, {name: 'lowercase letters, digits and dashes'}),\n }),\n defineField({name: 'name', type: 'string', validation: (rule) => rule.required()}),\n defineField({\n name: 'role',\n description: 'Shown under the name, e.g. Vocals or Editor.',\n type: 'string',\n }),\n defineField({\n name: 'interviewer',\n title: 'Asks the questions',\n description: 'Blocks without their own asker fall back to the first one marked here.',\n type: 'boolean',\n initialValue: false,\n }),\n ...(speakerTypes.length > 0\n ? [\n defineField({\n name: 'person',\n title: 'Person',\n description: 'Optional link to an existing document.',\n type: 'reference',\n to: speakerTypes.map((type) => ({type})),\n }),\n ]\n : []),\n ],\n preview: {\n select: {title: 'name', role: 'role', id: 'id', interviewer: 'interviewer'},\n prepare: (select) => ({\n title: typeof select.title === 'string' ? select.title : 'Speaker',\n subtitle: [select.id, select.role, select.interviewer ? 'asks' : undefined]\n .filter(Boolean)\n .join(' · '),\n }),\n },\n }),\n ],\n })\n}\n","import {definePlugin} from 'sanity'\n\nimport type {InterviewConfig} from './lib/types'\nimport {createInterviewBlockType} from './schema/interviewBlock'\n\n/**\n * Adds an `interviewBlock` to Sanity Studio: one question and its answer, as a\n * block in the article body, so intros, photos and section headings can sit\n * between the turns the way a printed interview does.\n *\n * Speakers are defined once on the document with `createSpeakersField`, and\n * each block picks from that list — renaming somebody fixes every turn at once.\n * An answer takes bold, italic and links, and can carry a timestamp into the\n * recording plus a note when it was translated rather than quoted.\n *\n * ```ts\n * import {defineArrayMember, defineConfig, defineField} from 'sanity'\n * import {createSpeakersField, interview} from 'sanity-plugin-sgntech-interview'\n *\n * export default defineConfig({\n * plugins: [interview()],\n * schema: {\n * types: [\n * {\n * type: 'document',\n * name: 'post',\n * fields: [\n * createSpeakersField(),\n * defineField({\n * type: 'array',\n * name: 'body',\n * of: [defineArrayMember({type: 'block'}), defineArrayMember({type: 'interviewBlock'})],\n * }),\n * ],\n * },\n * ],\n * },\n * })\n * ```\n *\n * The React renderer lives under `sanity-plugin-sgntech-interview/render` and\n * imports neither `sanity` nor `@sanity/ui`.\n *\n * @public\n */\nexport const interview = definePlugin<InterviewConfig | void>((config) => {\n const options = config || {}\n\n return {\n name: 'sanity-plugin-sgntech-interview',\n schema: {types: [createInterviewBlockType(options)]},\n }\n})\n\nexport {InterviewIcon} from './components/InterviewIcon'\nexport {SpeakerInput} from './components/SpeakerInput'\nexport {\n askingSpeaker,\n findSpeaker,\n speakerLabel,\n timestampSeconds,\n timestampUrl,\n usableSpeakers,\n} from './lib/speakers'\nexport type {InterviewConfig, InterviewValue, Speaker} from './lib/types'\nexport {createInterviewBlockType} from './schema/interviewBlock'\nexport {createSpeakersField} from './schema/speakers'\n"],"names":["color","key","t","node","context","isRecord","hue","tone","b","mix","x","a","clamp","min","max","round","hex","rgba","r","g","l","c","m","black","white","cache","from","require$$0","useRef","useEffect","isValidElement","size","$","k","v","length","position","index","filter","offset","character","characters","i","j","z","_","d","f","e","n","o","o.RULESET","o.prefixer","o.stringify","o.middleware","o.rulesheet","u","s","h","o.compile","o.serialize","S","y","w","N","C","O","reactIsModule","require$$1","detectOverflow","platform","computePosition","middleware","arrow","autoPlacement","alignment","flip","placements","sides","side","placement","overflow","hide","shift","isElement","isHTMLElement","getComputedStyle","getComputedStyle$1","scale","offset$1","autoPlacement$1","shift$1","flip$1","hide$1","arrow$1","noop","reactDomModule","React","data","ReactDOM.flushSync","isBrowser","range","p","ease","frameData","process","time","token","alpha","red","green","blue","getAnimatableNone","q","mixNumber","progress","origin","undampedFreq","A","P","current","keyframes","percent","motionValue","delay","now","rotate","match","animation","prev","animations","number","next","transformPoint","scaleX","scaleY","distance","rootProjectionNode","hasTransform","layout","scrapeMotionValuesFromProps","isSVGTag","id","createProjectionNode","notifyAll","interpolate","notify","isRTL","featureDefinitions","Component","isSVG","Fragment","scrapeHTMLMotionValuesFromProps","drag","MeasureLayout","event","info","point","timestamp","isDragging","inertia","motion","fm.motion","ResizeObserverBoxOptions","ResizeObserverSize","DOMRectReadOnly","global","borderTop","borderRight","borderBottom","borderLeft","ResizeObserverEntry","callbacks","ot","Scheduler","ResizeObservation","ResizeObserverDetail","ResizeObserverController","ResizeObserver","column","styled","useTheme","fontSize","css","t3","border","isValidElementType","t1","t2","ThemeProvider","getServerSnapshot","isTopLayer","createPortal","rootStyle","t12","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","t23","t24","t25","t26","t27","t28","t29","t30","t31","t32","t33","t34","t35","t36","t37","t38","t39","t40","Fragment$1","BASE_STYLE","InputRoot","Input","Presentation","prefix","_temp2$1","_temp$5","_temp$4","t4","t5","t6","t7","t8","t9","t10","t11","setRef","msg","t41","t42","t43","dist"],"mappings":";;;;;;;;;;;;AAIA,MAAM,aAAa;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAG,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GA+BM,QAAQ;AAAA,EACb,OAAO;AAAA,EACP,KAAK;AACN,GAAG,QAAQ;AAAA,EACV,OAAO;AAAA,EACP,KAAK;AACN,GAAG,OAAO;AAAA,EACT,IAAI;AAAA,IACH,OAAO;AAAA,IACP,KAAK;AAAA,EACP;AAAA,EACC,KAAK;AAAA,IACJ,OAAO;AAAA,IACP,KAAK;AAAA,EACP;AAAA,EACC,KAAK;AAAA,IACJ,OAAO;AAAA,IACP,KAAK;AAAA,EACP;AAAA,EACC,KAAK;AAAA,IACJ,OAAO;AAAA,IACP,KAAK;AAAA,EACP;AAAA,EACC,KAAK;AAAA,IACJ,OAAO;AAAA,IACP,KAAK;AAAA,EACP;AAAA,EACC,KAAK;AAAA,IACJ,OAAO;AAAA,IACP,KAAK;AAAA,EACP;AAAA,EACC,KAAK;AAAA,IACJ,OAAO;AAAA,IACP,KAAK;AAAA,EACP;AAAA,EACC,KAAK;AAAA,IACJ,OAAO;AAAA,IACP,KAAK;AAAA,EACP;AAAA,EACC,KAAK;AAAA,IACJ,OAAO;AAAA,IACP,KAAK;A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,IAAA;AAAA,EACH,CACD;AACH;AC5BO,MAAM,YAAY,aAAqC,CAAC,YAGtD;AAAA,EACL,MAAM;AAAA,EACN,QAAQ,EAAC,OAAO,CAAC,yBAJH,UAAU,CAAA,CAIyB,CAAC,EAAA;AACpD,EACD;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315]}