// muse-ui v4.0.0-alpha.1
// © 2024 kjxbyz. All Rights Reserved.
"use client";
function _array_like_to_array(arr, len) {
    if (len == null || len > arr.length) len = arr.length;
    for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
    return arr2;
}
function _array_with_holes(arr) {
    if (Array.isArray(arr)) return arr;
}
function _array_without_holes(arr) {
    if (Array.isArray(arr)) return _array_like_to_array(arr);
}
function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _iterable_to_array(iter) {
    if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
function _iterable_to_array_limit(arr, i) {
    var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
    if (_i == null) return;
    var _arr = [];
    var _n = true;
    var _d = false;
    var _s, _e;
    try {
        for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
            _arr.push(_s.value);
            if (i && _arr.length === i) break;
        }
    } catch (err) {
        _d = true;
        _e = err;
    } finally{
        try {
            if (!_n && _i["return"] != null) _i["return"]();
        } finally{
            if (_d) throw _e;
        }
    }
    return _arr;
}
function _non_iterable_rest() {
    throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _non_iterable_spread() {
    throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _object_spread(target) {
    for(var i = 1; i < arguments.length; i++){
        var source = arguments[i] != null ? arguments[i] : {};
        var ownKeys = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
            ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
                return Object.getOwnPropertyDescriptor(source, sym).enumerable;
            }));
        }
        ownKeys.forEach(function(key) {
            _define_property(target, key, source[key]);
        });
    }
    return target;
}
function ownKeys(object, enumerableOnly) {
    var keys = Object.keys(object);
    if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        if (enumerableOnly) {
            symbols = symbols.filter(function(sym) {
                return Object.getOwnPropertyDescriptor(object, sym).enumerable;
            });
        }
        keys.push.apply(keys, symbols);
    }
    return keys;
}
function _object_spread_props(target, source) {
    source = source != null ? source : {};
    if (Object.getOwnPropertyDescriptors) {
        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
        ownKeys(Object(source)).forEach(function(key) {
            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
        });
    }
    return target;
}
function _object_without_properties(source, excluded) {
    if (source == null) return {};
    var target = _object_without_properties_loose(source, excluded);
    var key, i;
    if (Object.getOwnPropertySymbols) {
        var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
        for(i = 0; i < sourceSymbolKeys.length; i++){
            key = sourceSymbolKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
    }
    return target;
}
function _object_without_properties_loose(source, excluded) {
    if (source == null) return {};
    var target = {};
    var sourceKeys = Object.keys(source);
    var key, i;
    for(i = 0; i < sourceKeys.length; i++){
        key = sourceKeys[i];
        if (excluded.indexOf(key) >= 0) continue;
        target[key] = source[key];
    }
    return target;
}
function _sliced_to_array(arr, i) {
    return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
}
function _to_consumable_array(arr) {
    return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
}
function _unsupported_iterable_to_array(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return _array_like_to_array(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(n);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
}
// registry/new-york/ui/toast.tsx
import * as React from "react";
// ../../node_modules/.pnpm/@radix-ui+react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js
import { forwardRef, createElement } from "react";
function _objectWithoutPropertiesLoose(source, excluded) {
    if (source == null) return {};
    var target = {};
    var sourceKeys = Object.keys(source);
    var key, i;
    for(i = 0; i < sourceKeys.length; i++){
        key = sourceKeys[i];
        if (excluded.indexOf(key) >= 0) continue;
        target[key] = source[key];
    }
    return target;
}
var _excluded$1r = [
    "color"
];
var Cross2Icon = /* @__PURE__ */ forwardRef(function(_ref, forwardedRef) {
    var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, props = _objectWithoutPropertiesLoose(_ref, _excluded$1r);
    return createElement("svg", Object.assign({
        width: "15",
        height: "15",
        viewBox: "0 0 15 15",
        fill: "none",
        xmlns: "http://www.w3.org/2000/svg"
    }, props, {
        ref: forwardedRef
    }), createElement("path", {
        d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",
        fill: color,
        fillRule: "evenodd",
        clipRule: "evenodd"
    }));
});
// ../../node_modules/.pnpm/@babel+runtime@7.22.3/node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() {
    _extends = Object.assign ? Object.assign.bind() : function _extends(target) {
        for(var i = 1; i < arguments.length; i++){
            var source = arguments[i];
            for(var key in source){
                if (Object.prototype.hasOwnProperty.call(source, key)) {
                    target[key] = source[key];
                }
            }
        }
        return target;
    };
    return _extends.apply(this, arguments);
}
// ../../node_modules/.pnpm/@radix-ui+react-toast@1.1.4_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-toast/dist/index.mjs
import { useState as $eyrYI$useState, useRef as $eyrYI$useRef, createElement as $eyrYI$createElement, useCallback as $eyrYI$useCallback, forwardRef as $eyrYI$forwardRef, useEffect as $eyrYI$useEffect, useMemo as $eyrYI$useMemo, Fragment as $eyrYI$Fragment } from "react";
import { createPortal as $eyrYI$createPortal } from "react-dom";
// ../../node_modules/.pnpm/@radix-ui+primitive@1.0.1/node_modules/@radix-ui/primitive/dist/index.mjs
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler) {
    var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, _ref_checkForDefaultPrevented = _ref.checkForDefaultPrevented, checkForDefaultPrevented = _ref_checkForDefaultPrevented === void 0 ? true : _ref_checkForDefaultPrevented;
    return function handleEvent(event) {
        originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
        if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
    };
}
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
import { useCallback as $3vqmr$useCallback } from "react";
function $6ed0406888f73fc4$var$setRef(ref, value) {
    if (typeof ref === "function") ref(value);
    else if (ref !== null && ref !== void 0) ref.current = value;
}
function $6ed0406888f73fc4$export$43e446d32b3d21af() {
    for(var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++){
        refs[_key] = arguments[_key];
    }
    return function(node) {
        return refs.forEach(function(ref) {
            return $6ed0406888f73fc4$var$setRef(ref, node);
        });
    };
}
function $6ed0406888f73fc4$export$c7b2cbe3552a0d05() {
    for(var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++){
        refs[_key] = arguments[_key];
    }
    return $3vqmr$useCallback($6ed0406888f73fc4$export$43e446d32b3d21af.apply(void 0, _to_consumable_array(refs)), refs);
}
// ../../node_modules/.pnpm/@radix-ui+react-collection@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-collection/dist/index.mjs
import $6vYhU$react from "react";
// ../../node_modules/.pnpm/@radix-ui+react-context@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.mjs
import { createContext as $3bkAK$createContext, useMemo as $3bkAK$useMemo, createElement as $3bkAK$createElement, useContext as $3bkAK$useContext } from "react";
function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName) {
    var createContextScopeDeps = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    var defaultContexts = [];
    function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
        var BaseContext = /* @__PURE__ */ $3bkAK$createContext(defaultContext);
        var index = defaultContexts.length;
        defaultContexts = _to_consumable_array(defaultContexts).concat([
            defaultContext
        ]);
        function Provider(props) {
            var scope = props.scope, children = props.children, context = _object_without_properties(props, [
                "scope",
                "children"
            ]);
            var Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
            var value = $3bkAK$useMemo(function() {
                return context;
            }, Object.values(context));
            return /* @__PURE__ */ $3bkAK$createElement(Context.Provider, {
                value: value
            }, children);
        }
        function useContext(consumerName, scope) {
            var Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
            var context = $3bkAK$useContext(Context);
            if (context) return context;
            if (defaultContext !== void 0) return defaultContext;
            throw new Error("`".concat(consumerName, "` must be used within `").concat(rootComponentName, "`"));
        }
        Provider.displayName = rootComponentName + "Provider";
        return [
            Provider,
            useContext
        ];
    }
    var createScope = function() {
        var scopeContexts = defaultContexts.map(function(defaultContext) {
            return /* @__PURE__ */ $3bkAK$createContext(defaultContext);
        });
        return function useScope(scope) {
            var contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
            return $3bkAK$useMemo(function() {
                return _define_property({}, "__scope".concat(scopeName), _object_spread_props(_object_spread({}, scope), _define_property({}, scopeName, contexts)));
            }, [
                scope,
                contexts
            ]);
        };
    };
    createScope.scopeName = scopeName;
    return [
        $c512c27ab02ef895$export$fd42f52fd3ae1109,
        $c512c27ab02ef895$var$composeContextScopes.apply(void 0, [
            createScope
        ].concat(_to_consumable_array(createContextScopeDeps)))
    ];
}
function $c512c27ab02ef895$var$composeContextScopes() {
    for(var _len = arguments.length, scopes = new Array(_len), _key = 0; _key < _len; _key++){
        scopes[_key] = arguments[_key];
    }
    var baseScope = scopes[0];
    if (scopes.length === 1) return baseScope;
    var createScope1 = function() {
        var scopeHooks = scopes.map(function(createScope) {
            return {
                useScope: createScope(),
                scopeName: createScope.scopeName
            };
        });
        return function useComposedScopes(overrideScopes) {
            var nextScopes1 = scopeHooks.reduce(function(nextScopes, param) {
                var useScope = param.useScope, scopeName = param.scopeName;
                var scopeProps = useScope(overrideScopes);
                var currentScope = scopeProps["__scope".concat(scopeName)];
                return _object_spread({}, nextScopes, currentScope);
            }, {});
            return $3bkAK$useMemo(function() {
                return _define_property({}, "__scope".concat(baseScope.scopeName), nextScopes1);
            }, [
                nextScopes1
            ]);
        };
    };
    createScope1.scopeName = baseScope.scopeName;
    return createScope1;
}
// ../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/esm/extends.js
function _extends2() {
    _extends2 = Object.assign ? Object.assign.bind() : function _extends2(target) {
        for(var i = 1; i < arguments.length; i++){
            var source = arguments[i];
            for(var key in source){
                if (Object.prototype.hasOwnProperty.call(source, key)) {
                    target[key] = source[key];
                }
            }
        }
        return target;
    };
    return _extends2.apply(this, arguments);
}
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.0.2_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs
import { forwardRef as $9IrjX$forwardRef, Children as $9IrjX$Children, isValidElement as $9IrjX$isValidElement, createElement as $9IrjX$createElement, cloneElement as $9IrjX$cloneElement, Fragment as $9IrjX$Fragment } from "react";
var $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /* @__PURE__ */ $9IrjX$forwardRef(function(props, forwardedRef) {
    var children = props.children, slotProps = _object_without_properties(props, [
        "children"
    ]);
    var childrenArray = $9IrjX$Children.toArray(children);
    var slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
    if (slottable) {
        var newElement = slottable.props.children;
        var newChildren = childrenArray.map(function(child) {
            if (child === slottable) {
                if ($9IrjX$Children.count(newElement) > 1) return $9IrjX$Children.only(null);
                return /* @__PURE__ */ $9IrjX$isValidElement(newElement) ? newElement.props.children : null;
            } else return child;
        });
        return /* @__PURE__ */ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, _extends2({}, slotProps, {
            ref: forwardedRef
        }), /* @__PURE__ */ $9IrjX$isValidElement(newElement) ? /* @__PURE__ */ $9IrjX$cloneElement(newElement, void 0, newChildren) : null);
    }
    return /* @__PURE__ */ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, _extends2({}, slotProps, {
        ref: forwardedRef
    }), children);
});
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = "Slot";
var $5e63c961fc1ce211$var$SlotClone = /* @__PURE__ */ $9IrjX$forwardRef(function(props, forwardedRef) {
    var children = props.children, slotProps = _object_without_properties(props, [
        "children"
    ]);
    if (/* @__PURE__ */ $9IrjX$isValidElement(children)) return /* @__PURE__ */ $9IrjX$cloneElement(children, _object_spread_props(_object_spread({}, $5e63c961fc1ce211$var$mergeProps(slotProps, children.props)), {
        ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
    }));
    return $9IrjX$Children.count(children) > 1 ? $9IrjX$Children.only(null) : null;
});
$5e63c961fc1ce211$var$SlotClone.displayName = "SlotClone";
var $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = function(param) {
    var children = param.children;
    return /* @__PURE__ */ $9IrjX$createElement($9IrjX$Fragment, null, children);
};
function $5e63c961fc1ce211$var$isSlottable(child) {
    return /* @__PURE__ */ $9IrjX$isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
}
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
    var _loop = function(propName) {
        var slotPropValue = slotProps[propName];
        var childPropValue = childProps[propName];
        var isHandler = /^on[A-Z]/.test(propName);
        if (isHandler) {
            if (slotPropValue && childPropValue) overrideProps[propName] = function() {
                for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
                    args[_key] = arguments[_key];
                }
                childPropValue.apply(void 0, _to_consumable_array(args));
                slotPropValue.apply(void 0, _to_consumable_array(args));
            };
            else if (slotPropValue) overrideProps[propName] = slotPropValue;
        } else if (propName === "style") overrideProps[propName] = _object_spread({}, slotPropValue, childPropValue);
        else if (propName === "className") overrideProps[propName] = [
            slotPropValue,
            childPropValue
        ].filter(Boolean).join(" ");
    };
    var overrideProps = _object_spread({}, childProps);
    for(var propName in childProps)_loop(propName);
    return _object_spread({}, slotProps, overrideProps);
}
// ../../node_modules/.pnpm/@radix-ui+react-collection@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-collection/dist/index.mjs
function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
    var PROVIDER_NAME = name + "CollectionProvider";
    var _$c512c27ab02ef895$export$50c7b4e9d9f19c1 = _sliced_to_array($c512c27ab02ef895$export$50c7b4e9d9f19c1(PROVIDER_NAME), 2), createCollectionContext = _$c512c27ab02ef895$export$50c7b4e9d9f19c1[0], createCollectionScope = _$c512c27ab02ef895$export$50c7b4e9d9f19c1[1];
    var _createCollectionContext = _sliced_to_array(createCollectionContext(PROVIDER_NAME, {
        collectionRef: {
            current: null
        },
        itemMap: /* @__PURE__ */ new Map()
    }), 2), CollectionProviderImpl = _createCollectionContext[0], useCollectionContext = _createCollectionContext[1];
    var CollectionProvider = function(props) {
        var scope = props.scope, children = props.children;
        var ref = $6vYhU$react.useRef(null);
        var itemMap = $6vYhU$react.useRef(/* @__PURE__ */ new Map()).current;
        return /* @__PURE__ */ $6vYhU$react.createElement(CollectionProviderImpl, {
            scope: scope,
            itemMap: itemMap,
            collectionRef: ref
        }, children);
    };
    /* @__PURE__ */ Object.assign(CollectionProvider, {
        displayName: PROVIDER_NAME
    });
    var COLLECTION_SLOT_NAME = name + "CollectionSlot";
    var CollectionSlot = /* @__PURE__ */ $6vYhU$react.forwardRef(function(props, forwardedRef) {
        var scope = props.scope, children = props.children;
        var context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
        var composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.collectionRef);
        return /* @__PURE__ */ $6vYhU$react.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
            ref: composedRefs
        }, children);
    });
    /* @__PURE__ */ Object.assign(CollectionSlot, {
        displayName: COLLECTION_SLOT_NAME
    });
    var ITEM_SLOT_NAME = name + "CollectionItemSlot";
    var ITEM_DATA_ATTR = "data-radix-collection-item";
    var CollectionItemSlot = /* @__PURE__ */ $6vYhU$react.forwardRef(function(props, forwardedRef) {
        var scope = props.scope, children = props.children, itemData = _object_without_properties(props, [
            "scope",
            "children"
        ]);
        var ref = $6vYhU$react.useRef(null);
        var composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
        var context = useCollectionContext(ITEM_SLOT_NAME, scope);
        $6vYhU$react.useEffect(function() {
            context.itemMap.set(ref, _object_spread({
                ref: ref
            }, itemData));
            return function() {
                return void context.itemMap.delete(ref);
            };
        });
        var _obj;
        return /* @__PURE__ */ $6vYhU$react.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, (_obj = {}, _define_property(_obj, ITEM_DATA_ATTR, ""), _define_property(_obj, "ref", composedRefs), _obj), children);
    });
    /* @__PURE__ */ Object.assign(CollectionItemSlot, {
        displayName: ITEM_SLOT_NAME
    });
    function useCollection(scope) {
        var context = useCollectionContext(name + "CollectionConsumer", scope);
        var getItems = $6vYhU$react.useCallback(function() {
            var collectionNode = context.collectionRef.current;
            if (!collectionNode) return [];
            var orderedNodes = Array.from(collectionNode.querySelectorAll("[".concat(ITEM_DATA_ATTR, "]")));
            var items = Array.from(context.itemMap.values());
            var orderedItems = items.sort(function(a, b) {
                return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
            });
            return orderedItems;
        }, [
            context.collectionRef,
            context.itemMap
        ]);
        return getItems;
    }
    return [
        {
            Provider: CollectionProvider,
            Slot: CollectionSlot,
            ItemSlot: CollectionItemSlot
        },
        useCollection,
        createCollectionScope
    ];
}
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.0.4_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
import { createContext as $kqwpH$createContext, forwardRef as $kqwpH$forwardRef, useContext as $kqwpH$useContext, useState as $kqwpH$useState, useEffect as $kqwpH$useEffect, createElement as $kqwpH$createElement, useRef as $kqwpH$useRef } from "react";
// ../../node_modules/.pnpm/@radix-ui+react-primitive@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs
import { forwardRef as $4q5Fq$forwardRef, useEffect as $4q5Fq$useEffect, createElement as $4q5Fq$createElement } from "react";
import { flushSync as $4q5Fq$flushSync } from "react-dom";
var $8927f6f2acc4f386$var$NODES = [
    "a",
    "button",
    "div",
    "form",
    "h2",
    "h3",
    "img",
    "input",
    "label",
    "li",
    "nav",
    "ol",
    "p",
    "span",
    "svg",
    "ul"
];
var $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce(function(primitive, node) {
    var Node = /* @__PURE__ */ $4q5Fq$forwardRef(function(props, forwardedRef) {
        var asChild = props.asChild, primitiveProps = _object_without_properties(props, [
            "asChild"
        ]);
        var Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
        $4q5Fq$useEffect(function() {
            window[Symbol.for("radix-ui")] = true;
        }, []);
        return /* @__PURE__ */ $4q5Fq$createElement(Comp, _extends2({}, primitiveProps, {
            ref: forwardedRef
        }));
    });
    Node.displayName = "Primitive.".concat(node);
    return _object_spread_props(_object_spread({}, primitive), _define_property({}, node, Node));
}, {});
function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
    if (target) $4q5Fq$flushSync(function() {
        return target.dispatchEvent(event);
    });
}
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
import { useRef as $lwiWj$useRef, useEffect as $lwiWj$useEffect, useMemo as $lwiWj$useMemo } from "react";
function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
    var callbackRef = $lwiWj$useRef(callback);
    $lwiWj$useEffect(function() {
        callbackRef.current = callback;
    });
    return $lwiWj$useMemo(function() {
        return function() {
            for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
                args[_key] = arguments[_key];
            }
            var _callbackRef$current;
            var _callbackRef$current1;
            return (_callbackRef$current1 = callbackRef.current) === null || _callbackRef$current1 === void 0 ? void 0 : (_callbackRef$current = _callbackRef$current1).call.apply(_callbackRef$current, [
                callbackRef
            ].concat(_to_consumable_array(args)));
        };
    }, []);
}
// ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.0.3_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
import { useEffect as $hPSQ5$useEffect } from "react";
function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp) {
    var ownerDocument = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
    var onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
    $hPSQ5$useEffect(function() {
        var handleKeyDown = function(event) {
            if (event.key === "Escape") onEscapeKeyDown(event);
        };
        ownerDocument.addEventListener("keydown", handleKeyDown);
        return function() {
            return ownerDocument.removeEventListener("keydown", handleKeyDown);
        };
    }, [
        onEscapeKeyDown,
        ownerDocument
    ]);
}
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.0.4_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
var $5cb92bef7577960e$var$CONTEXT_UPDATE = "dismissableLayer.update";
var $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
var $5cb92bef7577960e$var$FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
var $5cb92bef7577960e$var$originalBodyPointerEvents;
var $5cb92bef7577960e$var$DismissableLayerContext = /* @__PURE__ */ $kqwpH$createContext({
    layers: /* @__PURE__ */ new Set(),
    layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
    branches: /* @__PURE__ */ new Set()
});
var $5cb92bef7577960e$export$177fb62ff3ec1f22 = /* @__PURE__ */ $kqwpH$forwardRef(function(props, forwardedRef) {
    var _node$ownerDocument;
    var _props_disableOutsidePointerEvents = props.disableOutsidePointerEvents, disableOutsidePointerEvents = _props_disableOutsidePointerEvents === void 0 ? false : _props_disableOutsidePointerEvents, onEscapeKeyDown = props.onEscapeKeyDown, onPointerDownOutside = props.onPointerDownOutside, onFocusOutside = props.onFocusOutside, onInteractOutside = props.onInteractOutside, onDismiss = props.onDismiss, layerProps = _object_without_properties(props, [
        "disableOutsidePointerEvents",
        "onEscapeKeyDown",
        "onPointerDownOutside",
        "onFocusOutside",
        "onInteractOutside",
        "onDismiss"
    ]);
    var context = $kqwpH$useContext($5cb92bef7577960e$var$DismissableLayerContext);
    var _$kqwpH$useState = _sliced_to_array($kqwpH$useState(null), 2), node1 = _$kqwpH$useState[0], setNode = _$kqwpH$useState[1];
    var ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
    var _$kqwpH$useState1 = _sliced_to_array($kqwpH$useState({}), 2), force = _$kqwpH$useState1[1];
    var composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, function(node) {
        return setNode(node);
    });
    var layers = Array.from(context.layers);
    var _to_consumable_array_slice = _sliced_to_array(_to_consumable_array(context.layersWithOutsidePointerEventsDisabled).slice(-1), 1), highestLayerWithOutsidePointerEventsDisabled = _to_consumable_array_slice[0];
    var highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
    var index = node1 ? layers.indexOf(node1) : -1;
    var isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
    var isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
    var pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside(function(event) {
        var target = event.target;
        var isPointerDownOnBranch = _to_consumable_array(context.branches).some(function(branch) {
            return branch.contains(target);
        });
        if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
        onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
        onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
        if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
    }, ownerDocument);
    var focusOutside = $5cb92bef7577960e$var$useFocusOutside(function(event) {
        var target = event.target;
        var isFocusInBranch = _to_consumable_array(context.branches).some(function(branch) {
            return branch.contains(target);
        });
        if (isFocusInBranch) return;
        onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
        onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
        if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
    }, ownerDocument);
    $addc16e1bbe58fd0$export$3a72a57244d6e765(function(event) {
        var isHighestLayer = index === context.layers.size - 1;
        if (!isHighestLayer) return;
        onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
        if (!event.defaultPrevented && onDismiss) {
            event.preventDefault();
            onDismiss();
        }
    }, ownerDocument);
    $kqwpH$useEffect(function() {
        if (!node1) return;
        if (disableOutsidePointerEvents) {
            if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
                $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
                ownerDocument.body.style.pointerEvents = "none";
            }
            context.layersWithOutsidePointerEventsDisabled.add(node1);
        }
        context.layers.add(node1);
        $5cb92bef7577960e$var$dispatchUpdate();
        return function() {
            if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
        };
    }, [
        node1,
        ownerDocument,
        disableOutsidePointerEvents,
        context
    ]);
    $kqwpH$useEffect(function() {
        return function() {
            if (!node1) return;
            context.layers.delete(node1);
            context.layersWithOutsidePointerEventsDisabled.delete(node1);
            $5cb92bef7577960e$var$dispatchUpdate();
        };
    }, [
        node1,
        context
    ]);
    $kqwpH$useEffect(function() {
        var handleUpdate = function() {
            return force({});
        };
        document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
        return function() {
            return document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
        };
    }, []);
    return /* @__PURE__ */ $kqwpH$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends2({}, layerProps, {
        ref: composedRefs,
        style: _object_spread({
            pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0
        }, props.style),
        onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
        onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
        onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
    }));
});
var $5cb92bef7577960e$export$4d5eb2109db14228 = /* @__PURE__ */ $kqwpH$forwardRef(function(props, forwardedRef) {
    var context = $kqwpH$useContext($5cb92bef7577960e$var$DismissableLayerContext);
    var ref = $kqwpH$useRef(null);
    var composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
    $kqwpH$useEffect(function() {
        var node = ref.current;
        if (node) {
            context.branches.add(node);
            return function() {
                context.branches.delete(node);
            };
        }
    }, [
        context.branches
    ]);
    return /* @__PURE__ */ $kqwpH$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends2({}, props, {
        ref: composedRefs
    }));
});
function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside) {
    var ownerDocument = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
    var handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
    var isPointerInsideReactTreeRef = $kqwpH$useRef(false);
    var handleClickRef = $kqwpH$useRef(function() {});
    $kqwpH$useEffect(function() {
        var handlePointerDown = function(event) {
            if (event.target && !isPointerInsideReactTreeRef.current) {
                var handleAndDispatchPointerDownOutsideEvent = function handleAndDispatchPointerDownOutsideEvent() {
                    $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
                        discrete: true
                    });
                };
                var eventDetail = {
                    originalEvent: event
                };
                if (event.pointerType === "touch") {
                    ownerDocument.removeEventListener("click", handleClickRef.current);
                    handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
                    ownerDocument.addEventListener("click", handleClickRef.current, {
                        once: true
                    });
                } else handleAndDispatchPointerDownOutsideEvent();
            }
            isPointerInsideReactTreeRef.current = false;
        };
        var timerId = window.setTimeout(function() {
            ownerDocument.addEventListener("pointerdown", handlePointerDown);
        }, 0);
        return function() {
            window.clearTimeout(timerId);
            ownerDocument.removeEventListener("pointerdown", handlePointerDown);
            ownerDocument.removeEventListener("click", handleClickRef.current);
        };
    }, [
        ownerDocument,
        handlePointerDownOutside
    ]);
    return {
        // ensures we check React component tree (not just DOM tree)
        onPointerDownCapture: function() {
            return isPointerInsideReactTreeRef.current = true;
        }
    };
}
function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside) {
    var ownerDocument = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
    var handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
    var isFocusInsideReactTreeRef = $kqwpH$useRef(false);
    $kqwpH$useEffect(function() {
        var handleFocus = function(event) {
            if (event.target && !isFocusInsideReactTreeRef.current) {
                var eventDetail = {
                    originalEvent: event
                };
                $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
                    discrete: false
                });
            }
        };
        ownerDocument.addEventListener("focusin", handleFocus);
        return function() {
            return ownerDocument.removeEventListener("focusin", handleFocus);
        };
    }, [
        ownerDocument,
        handleFocusOutside
    ]);
    return {
        onFocusCapture: function() {
            return isFocusInsideReactTreeRef.current = true;
        },
        onBlurCapture: function() {
            return isFocusInsideReactTreeRef.current = false;
        }
    };
}
function $5cb92bef7577960e$var$dispatchUpdate() {
    var event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
    document.dispatchEvent(event);
}
function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, param) {
    var discrete = param.discrete;
    var target = detail.originalEvent.target;
    var event = new CustomEvent(name, {
        bubbles: false,
        cancelable: true,
        detail: detail
    });
    if (handler) target.addEventListener(name, handler, {
        once: true
    });
    if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
    else target.dispatchEvent(event);
}
var $5cb92bef7577960e$export$be92b6f5f03c0fe9 = $5cb92bef7577960e$export$177fb62ff3ec1f22;
var $5cb92bef7577960e$export$aecb2ddcb55c95be = $5cb92bef7577960e$export$4d5eb2109db14228;
// ../../node_modules/.pnpm/@radix-ui+react-portal@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.mjs
import { forwardRef as $7SXl2$forwardRef, createElement as $7SXl2$createElement } from "react";
import $7SXl2$reactdom from "react-dom";
var $f1701beae083dbae$export$602eac185826482c = /* @__PURE__ */ $7SXl2$forwardRef(function(props, forwardedRef) {
    var _globalThis$document;
    var _props_container = props.container, container = _props_container === void 0 ? globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body : _props_container, portalProps = _object_without_properties(props, [
        "container"
    ]);
    return container ? /* @__PURE__ */ $7SXl2$reactdom.createPortal(/* @__PURE__ */ $7SXl2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends2({}, portalProps, {
        ref: forwardedRef
    })), container) : null;
});
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.0.1_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.mjs
import { Children as $iqq3r$Children, cloneElement as $iqq3r$cloneElement, useState as $iqq3r$useState, useRef as $iqq3r$useRef, useEffect as $iqq3r$useEffect, useCallback as $iqq3r$useCallback, useReducer as $iqq3r$useReducer } from "react";
import { flushSync as $iqq3r$flushSync } from "react-dom";
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
import { useLayoutEffect as $dxlwH$useLayoutEffect } from "react";
var $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? $dxlwH$useLayoutEffect : function() {};
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.0.1_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.mjs
function $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {
    return $iqq3r$useReducer(function(state, event) {
        var nextState = machine[state][event];
        return nextState !== null && nextState !== void 0 ? nextState : state;
    }, initialState);
}
var $921a889cee6df7e8$export$99c2b779aa4e8b8b = function(props) {
    var present = props.present, children = props.children;
    var presence = $921a889cee6df7e8$var$usePresence(present);
    var child = typeof children === "function" ? children({
        present: presence.isPresent
    }) : $iqq3r$Children.only(children);
    var ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(presence.ref, child.ref);
    var forceMount = typeof children === "function";
    return forceMount || presence.isPresent ? /* @__PURE__ */ $iqq3r$cloneElement(child, {
        ref: ref
    }) : null;
};
$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = "Presence";
function $921a889cee6df7e8$var$usePresence(present) {
    var _$iqq3r$useState = _sliced_to_array($iqq3r$useState(), 2), node1 = _$iqq3r$useState[0], setNode = _$iqq3r$useState[1];
    var stylesRef = $iqq3r$useRef({});
    var prevPresentRef = $iqq3r$useRef(present);
    var prevAnimationNameRef = $iqq3r$useRef("none");
    var initialState = present ? "mounted" : "unmounted";
    var _$fe963b355347cc68$export$3e6543de14f8614f = _sliced_to_array($fe963b355347cc68$export$3e6543de14f8614f(initialState, {
        mounted: {
            UNMOUNT: "unmounted",
            ANIMATION_OUT: "unmountSuspended"
        },
        unmountSuspended: {
            MOUNT: "mounted",
            ANIMATION_END: "unmounted"
        },
        unmounted: {
            MOUNT: "mounted"
        }
    }), 2), state = _$fe963b355347cc68$export$3e6543de14f8614f[0], send = _$fe963b355347cc68$export$3e6543de14f8614f[1];
    $iqq3r$useEffect(function() {
        var currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
        prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
    }, [
        state
    ]);
    $9f79659886946c16$export$e5c5a5f917a5871c(function() {
        var styles = stylesRef.current;
        var wasPresent = prevPresentRef.current;
        var hasPresentChanged = wasPresent !== present;
        if (hasPresentChanged) {
            var prevAnimationName = prevAnimationNameRef.current;
            var currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles);
            if (present) send("MOUNT");
            else if (currentAnimationName === "none" || (styles === null || styles === void 0 ? void 0 : styles.display) === "none") send("UNMOUNT");
            else {
                var isAnimating = prevAnimationName !== currentAnimationName;
                if (wasPresent && isAnimating) send("ANIMATION_OUT");
                else send("UNMOUNT");
            }
            prevPresentRef.current = present;
        }
    }, [
        present,
        send
    ]);
    $9f79659886946c16$export$e5c5a5f917a5871c(function() {
        if (node1) {
            var handleAnimationEnd = function(event) {
                var currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
                var isCurrentAnimation = currentAnimationName.includes(event.animationName);
                if (event.target === node1 && isCurrentAnimation) $iqq3r$flushSync(function() {
                    return send("ANIMATION_END");
                });
            };
            var handleAnimationStart = function(event) {
                if (event.target === node1) prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
            };
            node1.addEventListener("animationstart", handleAnimationStart);
            node1.addEventListener("animationcancel", handleAnimationEnd);
            node1.addEventListener("animationend", handleAnimationEnd);
            return function() {
                node1.removeEventListener("animationstart", handleAnimationStart);
                node1.removeEventListener("animationcancel", handleAnimationEnd);
                node1.removeEventListener("animationend", handleAnimationEnd);
            };
        } else send("ANIMATION_END");
    }, [
        node1,
        send
    ]);
    return {
        isPresent: [
            "mounted",
            "unmountSuspended"
        ].includes(state),
        ref: $iqq3r$useCallback(function(node) {
            if (node) stylesRef.current = getComputedStyle(node);
            setNode(node);
        }, [])
    };
}
function $921a889cee6df7e8$var$getAnimationName(styles) {
    return (styles === null || styles === void 0 ? void 0 : styles.animationName) || "none";
}
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
import { useCallback as $bnPw9$useCallback, useState as $bnPw9$useState, useRef as $bnPw9$useRef, useEffect as $bnPw9$useEffect } from "react";
function $71cd76cc60e0454e$export$6f32135080cb4c3(param) {
    var prop = param.prop, defaultProp = param.defaultProp, _param_onChange = param.onChange, onChange = _param_onChange === void 0 ? function() {} : _param_onChange;
    var _$71cd76cc60e0454e$var$useUncontrolledState = _sliced_to_array($71cd76cc60e0454e$var$useUncontrolledState({
        defaultProp: defaultProp,
        onChange: onChange
    }), 2), uncontrolledProp = _$71cd76cc60e0454e$var$useUncontrolledState[0], setUncontrolledProp = _$71cd76cc60e0454e$var$useUncontrolledState[1];
    var isControlled = prop !== void 0;
    var value1 = isControlled ? prop : uncontrolledProp;
    var handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
    var setValue = $bnPw9$useCallback(function(nextValue) {
        if (isControlled) {
            var setter = nextValue;
            var value = typeof nextValue === "function" ? setter(prop) : nextValue;
            if (value !== prop) handleChange(value);
        } else setUncontrolledProp(nextValue);
    }, [
        isControlled,
        prop,
        setUncontrolledProp,
        handleChange
    ]);
    return [
        value1,
        setValue
    ];
}
function $71cd76cc60e0454e$var$useUncontrolledState(param) {
    var defaultProp = param.defaultProp, onChange = param.onChange;
    var uncontrolledState = $bnPw9$useState(defaultProp);
    var _uncontrolledState = _sliced_to_array(uncontrolledState, 1), value = _uncontrolledState[0];
    var prevValueRef = $bnPw9$useRef(value);
    var handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
    $bnPw9$useEffect(function() {
        if (prevValueRef.current !== value) {
            handleChange(value);
            prevValueRef.current = value;
        }
    }, [
        value,
        prevValueRef,
        handleChange
    ]);
    return uncontrolledState;
}
// ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
import { forwardRef as $kVwnw$forwardRef, createElement as $kVwnw$createElement } from "react";
var $ea1ef594cf570d83$export$439d29a4e110a164 = /* @__PURE__ */ $kVwnw$forwardRef(function(props, forwardedRef) {
    return /* @__PURE__ */ $kVwnw$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, props, {
        ref: forwardedRef,
        style: _object_spread({
            // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
            position: "absolute",
            border: 0,
            width: 1,
            height: 1,
            padding: 0,
            margin: -1,
            overflow: "hidden",
            clip: "rect(0, 0, 0, 0)",
            whiteSpace: "nowrap",
            wordWrap: "normal"
        }, props.style)
    }));
});
// ../../node_modules/.pnpm/@radix-ui+react-toast@1.1.4_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-toast/dist/index.mjs
var $054eb8030ebde76e$var$PROVIDER_NAME = "ToastProvider";
var _$e02a7d9cb1dc128c$export$c74125a8e3af6bb2 = _sliced_to_array($e02a7d9cb1dc128c$export$c74125a8e3af6bb2("Toast"), 3), $054eb8030ebde76e$var$Collection = _$e02a7d9cb1dc128c$export$c74125a8e3af6bb2[0], $054eb8030ebde76e$var$useCollection = _$e02a7d9cb1dc128c$export$c74125a8e3af6bb2[1], $054eb8030ebde76e$var$createCollectionScope = _$e02a7d9cb1dc128c$export$c74125a8e3af6bb2[2];
var _$c512c27ab02ef895$export$50c7b4e9d9f19c1 = _sliced_to_array($c512c27ab02ef895$export$50c7b4e9d9f19c1("Toast", [
    $054eb8030ebde76e$var$createCollectionScope
]), 2), $054eb8030ebde76e$var$createToastContext = _$c512c27ab02ef895$export$50c7b4e9d9f19c1[0], $054eb8030ebde76e$export$8a359da18fbc9073 = _$c512c27ab02ef895$export$50c7b4e9d9f19c1[1];
var _$054eb8030ebde76e$var$createToastContext = _sliced_to_array($054eb8030ebde76e$var$createToastContext($054eb8030ebde76e$var$PROVIDER_NAME), 2), $054eb8030ebde76e$var$ToastProviderProvider = _$054eb8030ebde76e$var$createToastContext[0], $054eb8030ebde76e$var$useToastProviderContext = _$054eb8030ebde76e$var$createToastContext[1];
var $054eb8030ebde76e$export$f5d03d415824e0e = function(props) {
    var __scopeToast = props.__scopeToast, _props_label = props.label, label = _props_label === void 0 ? "Notification" : _props_label, _props_duration = props.duration, duration = _props_duration === void 0 ? 5e3 : _props_duration, _props_swipeDirection = props.swipeDirection, swipeDirection = _props_swipeDirection === void 0 ? "right" : _props_swipeDirection, _props_swipeThreshold = props.swipeThreshold, swipeThreshold = _props_swipeThreshold === void 0 ? 50 : _props_swipeThreshold, children = props.children;
    var _$eyrYI$useState = _sliced_to_array($eyrYI$useState(null), 2), viewport = _$eyrYI$useState[0], setViewport = _$eyrYI$useState[1];
    var _$eyrYI$useState1 = _sliced_to_array($eyrYI$useState(0), 2), toastCount = _$eyrYI$useState1[0], setToastCount = _$eyrYI$useState1[1];
    var isFocusedToastEscapeKeyDownRef = $eyrYI$useRef(false);
    var isClosePausedRef = $eyrYI$useRef(false);
    return /* @__PURE__ */ $eyrYI$createElement($054eb8030ebde76e$var$Collection.Provider, {
        scope: __scopeToast
    }, /* @__PURE__ */ $eyrYI$createElement($054eb8030ebde76e$var$ToastProviderProvider, {
        scope: __scopeToast,
        label: label,
        duration: duration,
        swipeDirection: swipeDirection,
        swipeThreshold: swipeThreshold,
        toastCount: toastCount,
        viewport: viewport,
        onViewportChange: setViewport,
        onToastAdd: $eyrYI$useCallback(function() {
            return setToastCount(function(prevCount) {
                return prevCount + 1;
            });
        }, []),
        onToastRemove: $eyrYI$useCallback(function() {
            return setToastCount(function(prevCount) {
                return prevCount - 1;
            });
        }, []),
        isFocusedToastEscapeKeyDownRef: isFocusedToastEscapeKeyDownRef,
        isClosePausedRef: isClosePausedRef
    }, children));
};
$054eb8030ebde76e$export$f5d03d415824e0e.propTypes = {
    label: function label(props) {
        if (props.label && typeof props.label === "string" && !props.label.trim()) {
            var error = "Invalid prop `label` supplied to `".concat($054eb8030ebde76e$var$PROVIDER_NAME, "`. Expected non-empty `string`.");
            return new Error(error);
        }
        return null;
    }
};
var $054eb8030ebde76e$var$VIEWPORT_NAME = "ToastViewport";
var $054eb8030ebde76e$var$VIEWPORT_DEFAULT_HOTKEY = [
    "F8"
];
var $054eb8030ebde76e$var$VIEWPORT_PAUSE = "toast.viewportPause";
var $054eb8030ebde76e$var$VIEWPORT_RESUME = "toast.viewportResume";
var $054eb8030ebde76e$export$6192c2425ecfd989 = /* @__PURE__ */ $eyrYI$forwardRef(function(props, forwardedRef) {
    var __scopeToast = props.__scopeToast, _props_hotkey = props.hotkey, hotkey = _props_hotkey === void 0 ? $054eb8030ebde76e$var$VIEWPORT_DEFAULT_HOTKEY : _props_hotkey, _props_label = props.label, label = _props_label === void 0 ? "Notifications ({hotkey})" : _props_label, viewportProps = _object_without_properties(props, [
        "__scopeToast",
        "hotkey",
        "label"
    ]);
    var context = $054eb8030ebde76e$var$useToastProviderContext($054eb8030ebde76e$var$VIEWPORT_NAME, __scopeToast);
    var getItems = $054eb8030ebde76e$var$useCollection(__scopeToast);
    var wrapperRef = $eyrYI$useRef(null);
    var headFocusProxyRef = $eyrYI$useRef(null);
    var tailFocusProxyRef = $eyrYI$useRef(null);
    var ref = $eyrYI$useRef(null);
    var composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref, context.onViewportChange);
    var hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
    var hasToasts = context.toastCount > 0;
    $eyrYI$useEffect(function() {
        var handleKeyDown = function(event) {
            var _ref$current;
            var isHotkeyPressed = hotkey.every(function(key) {
                return event[key] || event.code === key;
            });
            if (isHotkeyPressed) (_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.focus();
        };
        document.addEventListener("keydown", handleKeyDown);
        return function() {
            return document.removeEventListener("keydown", handleKeyDown);
        };
    }, [
        hotkey
    ]);
    $eyrYI$useEffect(function() {
        var wrapper = wrapperRef.current;
        var viewport = ref.current;
        if (hasToasts && wrapper && viewport) {
            var handlePause = function() {
                if (!context.isClosePausedRef.current) {
                    var pauseEvent = new CustomEvent($054eb8030ebde76e$var$VIEWPORT_PAUSE);
                    viewport.dispatchEvent(pauseEvent);
                    context.isClosePausedRef.current = true;
                }
            };
            var handleResume = function() {
                if (context.isClosePausedRef.current) {
                    var resumeEvent = new CustomEvent($054eb8030ebde76e$var$VIEWPORT_RESUME);
                    viewport.dispatchEvent(resumeEvent);
                    context.isClosePausedRef.current = false;
                }
            };
            var handleFocusOutResume = function(event) {
                var isFocusMovingOutside = !wrapper.contains(event.relatedTarget);
                if (isFocusMovingOutside) handleResume();
            };
            var handlePointerLeaveResume = function() {
                var isFocusInside = wrapper.contains(document.activeElement);
                if (!isFocusInside) handleResume();
            };
            wrapper.addEventListener("focusin", handlePause);
            wrapper.addEventListener("focusout", handleFocusOutResume);
            wrapper.addEventListener("pointermove", handlePause);
            wrapper.addEventListener("pointerleave", handlePointerLeaveResume);
            window.addEventListener("blur", handlePause);
            window.addEventListener("focus", handleResume);
            return function() {
                wrapper.removeEventListener("focusin", handlePause);
                wrapper.removeEventListener("focusout", handleFocusOutResume);
                wrapper.removeEventListener("pointermove", handlePause);
                wrapper.removeEventListener("pointerleave", handlePointerLeaveResume);
                window.removeEventListener("blur", handlePause);
                window.removeEventListener("focus", handleResume);
            };
        }
    }, [
        hasToasts,
        context.isClosePausedRef
    ]);
    var getSortedTabbableCandidates = $eyrYI$useCallback(function(param) {
        var tabbingDirection = param.tabbingDirection;
        var toastItems = getItems();
        var tabbableCandidates = toastItems.map(function(toastItem) {
            var toastNode = toastItem.ref.current;
            var toastTabbableCandidates = [
                toastNode
            ].concat(_to_consumable_array($054eb8030ebde76e$var$getTabbableCandidates(toastNode)));
            return tabbingDirection === "forwards" ? toastTabbableCandidates : toastTabbableCandidates.reverse();
        });
        return (tabbingDirection === "forwards" ? tabbableCandidates.reverse() : tabbableCandidates).flat();
    }, [
        getItems
    ]);
    $eyrYI$useEffect(function() {
        var viewport = ref.current;
        if (viewport) {
            var handleKeyDown = function(event) {
                var isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
                var isTabKey = event.key === "Tab" && !isMetaKey;
                if (isTabKey) {
                    var focusedElement = document.activeElement;
                    var isTabbingBackwards = event.shiftKey;
                    var targetIsViewport = event.target === viewport;
                    if (targetIsViewport && isTabbingBackwards) {
                        var _headFocusProxyRef$cu;
                        (_headFocusProxyRef$cu = headFocusProxyRef.current) === null || _headFocusProxyRef$cu === void 0 || _headFocusProxyRef$cu.focus();
                        return;
                    }
                    var tabbingDirection = isTabbingBackwards ? "backwards" : "forwards";
                    var sortedCandidates = getSortedTabbableCandidates({
                        tabbingDirection: tabbingDirection
                    });
                    var index = sortedCandidates.findIndex(function(candidate) {
                        return candidate === focusedElement;
                    });
                    if ($054eb8030ebde76e$var$focusFirst(sortedCandidates.slice(index + 1))) event.preventDefault();
                    else {
                        var _headFocusProxyRef$cu2, _tailFocusProxyRef$cu;
                        isTabbingBackwards ? (_headFocusProxyRef$cu2 = headFocusProxyRef.current) === null || _headFocusProxyRef$cu2 === void 0 || _headFocusProxyRef$cu2.focus() : (_tailFocusProxyRef$cu = tailFocusProxyRef.current) === null || _tailFocusProxyRef$cu === void 0 || _tailFocusProxyRef$cu.focus();
                    }
                }
            };
            viewport.addEventListener("keydown", handleKeyDown);
            return function() {
                return viewport.removeEventListener("keydown", handleKeyDown);
            };
        }
    }, [
        getItems,
        getSortedTabbableCandidates
    ]);
    return /* @__PURE__ */ $eyrYI$createElement($5cb92bef7577960e$export$aecb2ddcb55c95be, {
        ref: wrapperRef,
        role: "region",
        "aria-label": label.replace("{hotkey}", hotkeyLabel),
        tabIndex: -1,
        style: {
            pointerEvents: hasToasts ? void 0 : "none"
        }
    }, hasToasts && /* @__PURE__ */ $eyrYI$createElement($054eb8030ebde76e$var$FocusProxy, {
        ref: headFocusProxyRef,
        onFocusFromOutsideViewport: function() {
            var tabbableCandidates = getSortedTabbableCandidates({
                tabbingDirection: "forwards"
            });
            $054eb8030ebde76e$var$focusFirst(tabbableCandidates);
        }
    }), /* @__PURE__ */ $eyrYI$createElement($054eb8030ebde76e$var$Collection.Slot, {
        scope: __scopeToast
    }, /* @__PURE__ */ $eyrYI$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.ol, _extends({
        tabIndex: -1
    }, viewportProps, {
        ref: composedRefs
    }))), hasToasts && /* @__PURE__ */ $eyrYI$createElement($054eb8030ebde76e$var$FocusProxy, {
        ref: tailFocusProxyRef,
        onFocusFromOutsideViewport: function() {
            var tabbableCandidates = getSortedTabbableCandidates({
                tabbingDirection: "backwards"
            });
            $054eb8030ebde76e$var$focusFirst(tabbableCandidates);
        }
    }));
});
var $054eb8030ebde76e$var$FOCUS_PROXY_NAME = "ToastFocusProxy";
var $054eb8030ebde76e$var$FocusProxy = /* @__PURE__ */ $eyrYI$forwardRef(function(props, forwardedRef) {
    var __scopeToast = props.__scopeToast, onFocusFromOutsideViewport = props.onFocusFromOutsideViewport, proxyProps = _object_without_properties(props, [
        "__scopeToast",
        "onFocusFromOutsideViewport"
    ]);
    var context = $054eb8030ebde76e$var$useToastProviderContext($054eb8030ebde76e$var$FOCUS_PROXY_NAME, __scopeToast);
    return /* @__PURE__ */ $eyrYI$createElement($ea1ef594cf570d83$export$439d29a4e110a164, _extends({
        "aria-hidden": true,
        tabIndex: 0
    }, proxyProps, {
        ref: forwardedRef,
        style: {
            position: "fixed"
        },
        onFocus: function(event) {
            var _context$viewport;
            var prevFocusedElement = event.relatedTarget;
            var isFocusFromOutsideViewport = !((_context$viewport = context.viewport) !== null && _context$viewport !== void 0 && _context$viewport.contains(prevFocusedElement));
            if (isFocusFromOutsideViewport) onFocusFromOutsideViewport();
        }
    }));
});
var $054eb8030ebde76e$var$TOAST_NAME = "Toast";
var $054eb8030ebde76e$var$TOAST_SWIPE_START = "toast.swipeStart";
var $054eb8030ebde76e$var$TOAST_SWIPE_MOVE = "toast.swipeMove";
var $054eb8030ebde76e$var$TOAST_SWIPE_CANCEL = "toast.swipeCancel";
var $054eb8030ebde76e$var$TOAST_SWIPE_END = "toast.swipeEnd";
var $054eb8030ebde76e$export$8d8dc7d5f743331b = /* @__PURE__ */ $eyrYI$forwardRef(function(props, forwardedRef) {
    var forceMount = props.forceMount, openProp = props.open, defaultOpen = props.defaultOpen, onOpenChange = props.onOpenChange, toastProps = _object_without_properties(props, [
        "forceMount",
        "open",
        "defaultOpen",
        "onOpenChange"
    ]);
    var _$71cd76cc60e0454e$export$6f32135080cb4c3 = _sliced_to_array($71cd76cc60e0454e$export$6f32135080cb4c3({
        prop: openProp,
        defaultProp: defaultOpen,
        onChange: onOpenChange
    }), 2), tmp = _$71cd76cc60e0454e$export$6f32135080cb4c3[0], open = tmp === void 0 ? true : tmp, setOpen = _$71cd76cc60e0454e$export$6f32135080cb4c3[1];
    return /* @__PURE__ */ $eyrYI$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
        present: forceMount || open
    }, /* @__PURE__ */ $eyrYI$createElement($054eb8030ebde76e$var$ToastImpl, _extends({
        open: open
    }, toastProps, {
        ref: forwardedRef,
        onClose: function() {
            return setOpen(false);
        },
        onPause: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(props.onPause),
        onResume: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(props.onResume),
        onSwipeStart: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onSwipeStart, function(event) {
            event.currentTarget.setAttribute("data-swipe", "start");
        }),
        onSwipeMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onSwipeMove, function(event) {
            var _event_detail_delta = event.detail.delta, x = _event_detail_delta.x, y = _event_detail_delta.y;
            event.currentTarget.setAttribute("data-swipe", "move");
            event.currentTarget.style.setProperty("--radix-toast-swipe-move-x", "".concat(x, "px"));
            event.currentTarget.style.setProperty("--radix-toast-swipe-move-y", "".concat(y, "px"));
        }),
        onSwipeCancel: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onSwipeCancel, function(event) {
            event.currentTarget.setAttribute("data-swipe", "cancel");
            event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x");
            event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y");
            event.currentTarget.style.removeProperty("--radix-toast-swipe-end-x");
            event.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
        }),
        onSwipeEnd: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onSwipeEnd, function(event) {
            var _event_detail_delta = event.detail.delta, x = _event_detail_delta.x, y = _event_detail_delta.y;
            event.currentTarget.setAttribute("data-swipe", "end");
            event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x");
            event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y");
            event.currentTarget.style.setProperty("--radix-toast-swipe-end-x", "".concat(x, "px"));
            event.currentTarget.style.setProperty("--radix-toast-swipe-end-y", "".concat(y, "px"));
            setOpen(false);
        })
    })));
});
var _$054eb8030ebde76e$var$createToastContext1 = _sliced_to_array($054eb8030ebde76e$var$createToastContext($054eb8030ebde76e$var$TOAST_NAME, {
    onClose: function onClose() {}
}), 2), $054eb8030ebde76e$var$ToastInteractiveProvider = _$054eb8030ebde76e$var$createToastContext1[0], $054eb8030ebde76e$var$useToastInteractiveContext = _$054eb8030ebde76e$var$createToastContext1[1];
var $054eb8030ebde76e$var$ToastImpl = /* @__PURE__ */ $eyrYI$forwardRef(function(props, forwardedRef) {
    var __scopeToast = props.__scopeToast, _props_type = props.type, type = _props_type === void 0 ? "foreground" : _props_type, durationProp = props.duration, open = props.open, onClose = props.onClose, onEscapeKeyDown = props.onEscapeKeyDown, onPause = props.onPause, onResume = props.onResume, onSwipeStart = props.onSwipeStart, onSwipeMove = props.onSwipeMove, onSwipeCancel = props.onSwipeCancel, onSwipeEnd = props.onSwipeEnd, toastProps = _object_without_properties(props, [
        "__scopeToast",
        "type",
        "duration",
        "open",
        "onClose",
        "onEscapeKeyDown",
        "onPause",
        "onResume",
        "onSwipeStart",
        "onSwipeMove",
        "onSwipeCancel",
        "onSwipeEnd"
    ]);
    var context = $054eb8030ebde76e$var$useToastProviderContext($054eb8030ebde76e$var$TOAST_NAME, __scopeToast);
    var _$eyrYI$useState = _sliced_to_array($eyrYI$useState(null), 2), node1 = _$eyrYI$useState[0], setNode = _$eyrYI$useState[1];
    var composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, function(node) {
        return setNode(node);
    });
    var pointerStartRef = $eyrYI$useRef(null);
    var swipeDeltaRef = $eyrYI$useRef(null);
    var duration1 = durationProp || context.duration;
    var closeTimerStartTimeRef = $eyrYI$useRef(0);
    var closeTimerRemainingTimeRef = $eyrYI$useRef(duration1);
    var closeTimerRef = $eyrYI$useRef(0);
    var onToastAdd = context.onToastAdd, onToastRemove = context.onToastRemove;
    var handleClose = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(function() {
        var _context$viewport2;
        var isFocusInToast = node1 === null || node1 === void 0 ? void 0 : node1.contains(document.activeElement);
        if (isFocusInToast) (_context$viewport2 = context.viewport) === null || _context$viewport2 === void 0 || _context$viewport2.focus();
        onClose();
    });
    var startTimer = $eyrYI$useCallback(function(duration) {
        if (!duration || duration === Infinity) return;
        window.clearTimeout(closeTimerRef.current);
        closeTimerStartTimeRef.current = /* @__PURE__ */ new Date().getTime();
        closeTimerRef.current = window.setTimeout(handleClose, duration);
    }, [
        handleClose
    ]);
    $eyrYI$useEffect(function() {
        var viewport = context.viewport;
        if (viewport) {
            var handleResume = function() {
                startTimer(closeTimerRemainingTimeRef.current);
                onResume === null || onResume === void 0 || onResume();
            };
            var handlePause = function() {
                var elapsedTime = /* @__PURE__ */ new Date().getTime() - closeTimerStartTimeRef.current;
                closeTimerRemainingTimeRef.current = closeTimerRemainingTimeRef.current - elapsedTime;
                window.clearTimeout(closeTimerRef.current);
                onPause === null || onPause === void 0 || onPause();
            };
            viewport.addEventListener($054eb8030ebde76e$var$VIEWPORT_PAUSE, handlePause);
            viewport.addEventListener($054eb8030ebde76e$var$VIEWPORT_RESUME, handleResume);
            return function() {
                viewport.removeEventListener($054eb8030ebde76e$var$VIEWPORT_PAUSE, handlePause);
                viewport.removeEventListener($054eb8030ebde76e$var$VIEWPORT_RESUME, handleResume);
            };
        }
    }, [
        context.viewport,
        duration1,
        onPause,
        onResume,
        startTimer
    ]);
    $eyrYI$useEffect(function() {
        if (open && !context.isClosePausedRef.current) startTimer(duration1);
    }, [
        open,
        duration1,
        context.isClosePausedRef,
        startTimer
    ]);
    $eyrYI$useEffect(function() {
        onToastAdd();
        return function() {
            return onToastRemove();
        };
    }, [
        onToastAdd,
        onToastRemove
    ]);
    var announceTextContent = $eyrYI$useMemo(function() {
        return node1 ? $054eb8030ebde76e$var$getAnnounceTextContent(node1) : null;
    }, [
        node1
    ]);
    if (!context.viewport) return null;
    return /* @__PURE__ */ $eyrYI$createElement($eyrYI$Fragment, null, announceTextContent && /* @__PURE__ */ $eyrYI$createElement($054eb8030ebde76e$var$ToastAnnounce, {
        __scopeToast: __scopeToast,
        role: "status",
        "aria-live": type === "foreground" ? "assertive" : "polite",
        "aria-atomic": true
    }, announceTextContent), /* @__PURE__ */ $eyrYI$createElement($054eb8030ebde76e$var$ToastInteractiveProvider, {
        scope: __scopeToast,
        onClose: handleClose
    }, /* @__PURE__ */ $eyrYI$createPortal(/* @__PURE__ */ $eyrYI$createElement($054eb8030ebde76e$var$Collection.ItemSlot, {
        scope: __scopeToast
    }, /* @__PURE__ */ $eyrYI$createElement($5cb92bef7577960e$export$be92b6f5f03c0fe9, {
        asChild: true,
        onEscapeKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(onEscapeKeyDown, function() {
            if (!context.isFocusedToastEscapeKeyDownRef.current) handleClose();
            context.isFocusedToastEscapeKeyDownRef.current = false;
        })
    }, /* @__PURE__ */ $eyrYI$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.li, _extends({
        // Ensure toasts are announced as status list or status when focused
        role: "status",
        "aria-live": "off",
        "aria-atomic": true,
        tabIndex: 0,
        "data-state": open ? "open" : "closed",
        "data-swipe-direction": context.swipeDirection
    }, toastProps, {
        ref: composedRefs,
        style: _object_spread({
            userSelect: "none",
            touchAction: "none"
        }, props.style),
        onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, function(event) {
            if (event.key !== "Escape") return;
            onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event.nativeEvent);
            if (!event.nativeEvent.defaultPrevented) {
                context.isFocusedToastEscapeKeyDownRef.current = true;
                handleClose();
            }
        }),
        onPointerDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDown, function(event) {
            if (event.button !== 0) return;
            pointerStartRef.current = {
                x: event.clientX,
                y: event.clientY
            };
        }),
        onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerMove, function(event) {
            if (!pointerStartRef.current) return;
            var x = event.clientX - pointerStartRef.current.x;
            var y = event.clientY - pointerStartRef.current.y;
            var hasSwipeMoveStarted = Boolean(swipeDeltaRef.current);
            var isHorizontalSwipe = [
                "left",
                "right"
            ].includes(context.swipeDirection);
            var clamp = [
                "left",
                "up"
            ].includes(context.swipeDirection) ? Math.min : Math.max;
            var clampedX = isHorizontalSwipe ? clamp(0, x) : 0;
            var clampedY = !isHorizontalSwipe ? clamp(0, y) : 0;
            var moveStartBuffer = event.pointerType === "touch" ? 10 : 2;
            var delta = {
                x: clampedX,
                y: clampedY
            };
            var eventDetail = {
                originalEvent: event,
                delta: delta
            };
            if (hasSwipeMoveStarted) {
                swipeDeltaRef.current = delta;
                $054eb8030ebde76e$var$handleAndDispatchCustomEvent($054eb8030ebde76e$var$TOAST_SWIPE_MOVE, onSwipeMove, eventDetail, {
                    discrete: false
                });
            } else if ($054eb8030ebde76e$var$isDeltaInDirection(delta, context.swipeDirection, moveStartBuffer)) {
                swipeDeltaRef.current = delta;
                $054eb8030ebde76e$var$handleAndDispatchCustomEvent($054eb8030ebde76e$var$TOAST_SWIPE_START, onSwipeStart, eventDetail, {
                    discrete: false
                });
                event.target.setPointerCapture(event.pointerId);
            } else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) pointerStartRef.current = null;
        }),
        onPointerUp: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerUp, function(event1) {
            var delta = swipeDeltaRef.current;
            var target = event1.target;
            if (target.hasPointerCapture(event1.pointerId)) target.releasePointerCapture(event1.pointerId);
            swipeDeltaRef.current = null;
            pointerStartRef.current = null;
            if (delta) {
                var toast = event1.currentTarget;
                var eventDetail = {
                    originalEvent: event1,
                    delta: delta
                };
                if ($054eb8030ebde76e$var$isDeltaInDirection(delta, context.swipeDirection, context.swipeThreshold)) $054eb8030ebde76e$var$handleAndDispatchCustomEvent($054eb8030ebde76e$var$TOAST_SWIPE_END, onSwipeEnd, eventDetail, {
                    discrete: true
                });
                else $054eb8030ebde76e$var$handleAndDispatchCustomEvent($054eb8030ebde76e$var$TOAST_SWIPE_CANCEL, onSwipeCancel, eventDetail, {
                    discrete: true
                });
                toast.addEventListener("click", function(event) {
                    return event.preventDefault();
                }, {
                    once: true
                });
            }
        })
    })))), context.viewport)));
});
$054eb8030ebde76e$var$ToastImpl.propTypes = {
    type: function type(props) {
        if (props.type && ![
            "foreground",
            "background"
        ].includes(props.type)) {
            var error = "Invalid prop `type` supplied to `".concat($054eb8030ebde76e$var$TOAST_NAME, "`. Expected `foreground | background`.");
            return new Error(error);
        }
        return null;
    }
};
var $054eb8030ebde76e$var$ToastAnnounce = function(props) {
    var __scopeToast = props.__scopeToast, children = props.children, announceProps = _object_without_properties(props, [
        "__scopeToast",
        "children"
    ]);
    var context = $054eb8030ebde76e$var$useToastProviderContext($054eb8030ebde76e$var$TOAST_NAME, __scopeToast);
    var _$eyrYI$useState = _sliced_to_array($eyrYI$useState(false), 2), renderAnnounceText = _$eyrYI$useState[0], setRenderAnnounceText = _$eyrYI$useState[1];
    var _$eyrYI$useState1 = _sliced_to_array($eyrYI$useState(false), 2), isAnnounced = _$eyrYI$useState1[0], setIsAnnounced = _$eyrYI$useState1[1];
    $054eb8030ebde76e$var$useNextFrame(function() {
        return setRenderAnnounceText(true);
    });
    $eyrYI$useEffect(function() {
        var timer = window.setTimeout(function() {
            return setIsAnnounced(true);
        }, 1e3);
        return function() {
            return window.clearTimeout(timer);
        };
    }, []);
    return isAnnounced ? null : /* @__PURE__ */ $eyrYI$createElement($f1701beae083dbae$export$602eac185826482c, {
        asChild: true
    }, /* @__PURE__ */ $eyrYI$createElement($ea1ef594cf570d83$export$439d29a4e110a164, announceProps, renderAnnounceText && /* @__PURE__ */ $eyrYI$createElement($eyrYI$Fragment, null, context.label, " ", children)));
};
var $054eb8030ebde76e$export$16d42d7c29b95a4 = /* @__PURE__ */ $eyrYI$forwardRef(function(props, forwardedRef) {
    var __scopeToast = props.__scopeToast, titleProps = _object_without_properties(props, [
        "__scopeToast"
    ]);
    return /* @__PURE__ */ $eyrYI$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, titleProps, {
        ref: forwardedRef
    }));
});
var $054eb8030ebde76e$export$ecddd96c53621d9a = /* @__PURE__ */ $eyrYI$forwardRef(function(props, forwardedRef) {
    var __scopeToast = props.__scopeToast, descriptionProps = _object_without_properties(props, [
        "__scopeToast"
    ]);
    return /* @__PURE__ */ $eyrYI$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, descriptionProps, {
        ref: forwardedRef
    }));
});
var $054eb8030ebde76e$var$ACTION_NAME = "ToastAction";
var $054eb8030ebde76e$export$3019feecfda683d2 = /* @__PURE__ */ $eyrYI$forwardRef(function(props, forwardedRef) {
    var altText = props.altText, actionProps = _object_without_properties(props, [
        "altText"
    ]);
    if (!altText) return null;
    return /* @__PURE__ */ $eyrYI$createElement($054eb8030ebde76e$var$ToastAnnounceExclude, {
        altText: altText,
        asChild: true
    }, /* @__PURE__ */ $eyrYI$createElement($054eb8030ebde76e$export$811e70f61c205839, _extends({}, actionProps, {
        ref: forwardedRef
    })));
});
$054eb8030ebde76e$export$3019feecfda683d2.propTypes = {
    altText: function altText(props) {
        if (!props.altText) return new Error("Missing prop `altText` expected on `".concat($054eb8030ebde76e$var$ACTION_NAME, "`"));
        return null;
    }
};
var $054eb8030ebde76e$var$CLOSE_NAME = "ToastClose";
var $054eb8030ebde76e$export$811e70f61c205839 = /* @__PURE__ */ $eyrYI$forwardRef(function(props, forwardedRef) {
    var __scopeToast = props.__scopeToast, closeProps = _object_without_properties(props, [
        "__scopeToast"
    ]);
    var interactiveContext = $054eb8030ebde76e$var$useToastInteractiveContext($054eb8030ebde76e$var$CLOSE_NAME, __scopeToast);
    return /* @__PURE__ */ $eyrYI$createElement($054eb8030ebde76e$var$ToastAnnounceExclude, {
        asChild: true
    }, /* @__PURE__ */ $eyrYI$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
        type: "button"
    }, closeProps, {
        ref: forwardedRef,
        onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, interactiveContext.onClose)
    })));
});
var $054eb8030ebde76e$var$ToastAnnounceExclude = /* @__PURE__ */ $eyrYI$forwardRef(function(props, forwardedRef) {
    var __scopeToast = props.__scopeToast, altText = props.altText, announceExcludeProps = _object_without_properties(props, [
        "__scopeToast",
        "altText"
    ]);
    return /* @__PURE__ */ $eyrYI$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
        "data-radix-toast-announce-exclude": "",
        "data-radix-toast-announce-alt": altText || void 0
    }, announceExcludeProps, {
        ref: forwardedRef
    }));
});
function $054eb8030ebde76e$var$getAnnounceTextContent(container) {
    var textContent = [];
    var childNodes = Array.from(container.childNodes);
    childNodes.forEach(function(node) {
        if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent);
        if ($054eb8030ebde76e$var$isHTMLElement(node)) {
            var isHidden = node.ariaHidden || node.hidden || node.style.display === "none";
            var isExcluded = node.dataset.radixToastAnnounceExclude === "";
            if (!isHidden) {
                var _textContent;
                if (isExcluded) {
                    var altText = node.dataset.radixToastAnnounceAlt;
                    if (altText) textContent.push(altText);
                } else (_textContent = textContent).push.apply(_textContent, _to_consumable_array($054eb8030ebde76e$var$getAnnounceTextContent(node)));
            }
        }
    });
    return textContent;
}
function $054eb8030ebde76e$var$handleAndDispatchCustomEvent(name, handler, detail, param) {
    var discrete = param.discrete;
    var currentTarget = detail.originalEvent.currentTarget;
    var event = new CustomEvent(name, {
        bubbles: true,
        cancelable: true,
        detail: detail
    });
    if (handler) currentTarget.addEventListener(name, handler, {
        once: true
    });
    if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(currentTarget, event);
    else currentTarget.dispatchEvent(event);
}
var $054eb8030ebde76e$var$isDeltaInDirection = function(delta, direction) {
    var threshold = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
    var deltaX = Math.abs(delta.x);
    var deltaY = Math.abs(delta.y);
    var isDeltaX = deltaX > deltaY;
    if (direction === "left" || direction === "right") return isDeltaX && deltaX > threshold;
    else return !isDeltaX && deltaY > threshold;
};
function $054eb8030ebde76e$var$useNextFrame() {
    var callback = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function() {};
    var fn = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback);
    $9f79659886946c16$export$e5c5a5f917a5871c(function() {
        var raf1 = 0;
        var raf2 = 0;
        raf1 = window.requestAnimationFrame(function() {
            return raf2 = window.requestAnimationFrame(fn);
        });
        return function() {
            window.cancelAnimationFrame(raf1);
            window.cancelAnimationFrame(raf2);
        };
    }, [
        fn
    ]);
}
function $054eb8030ebde76e$var$isHTMLElement(node) {
    return node.nodeType === node.ELEMENT_NODE;
}
function $054eb8030ebde76e$var$getTabbableCandidates(container) {
    var nodes = [];
    var walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
        acceptNode: function(node) {
            var isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
            if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
            return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
        }
    });
    while(walker.nextNode())nodes.push(walker.currentNode);
    return nodes;
}
function $054eb8030ebde76e$var$focusFirst(candidates) {
    var previouslyFocusedElement = document.activeElement;
    return candidates.some(function(candidate) {
        if (candidate === previouslyFocusedElement) return true;
        candidate.focus();
        return document.activeElement !== previouslyFocusedElement;
    });
}
var $054eb8030ebde76e$export$2881499e37b75b9a = $054eb8030ebde76e$export$f5d03d415824e0e;
var $054eb8030ebde76e$export$d5c6c08dc2d3ca7 = $054eb8030ebde76e$export$6192c2425ecfd989;
var $054eb8030ebde76e$export$be92b6f5f03c0fe9 = $054eb8030ebde76e$export$8d8dc7d5f743331b;
var $054eb8030ebde76e$export$f99233281efd08a0 = $054eb8030ebde76e$export$16d42d7c29b95a4;
var $054eb8030ebde76e$export$393edc798c47379d = $054eb8030ebde76e$export$ecddd96c53621d9a;
var $054eb8030ebde76e$export$e19cd5f9376f8cee = $054eb8030ebde76e$export$3019feecfda683d2;
var $054eb8030ebde76e$export$f39c2d165cd861fe = $054eb8030ebde76e$export$811e70f61c205839;
// registry/new-york/ui/toast.tsx
import { cva } from "class-variance-authority";
// lib/utils.ts
import { clsx } from "clsx";
import { twMerge } from "tailwind-merge";
function cn() {
    for(var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++){
        inputs[_key] = arguments[_key];
    }
    return twMerge(clsx(inputs));
}
// registry/new-york/ui/toast.tsx
import { jsx } from "react/jsx-runtime";
var ToastProvider = $054eb8030ebde76e$export$2881499e37b75b9a;
var ToastViewport = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ jsx($054eb8030ebde76e$export$d5c6c08dc2d3ca7, _object_spread({
        ref: ref,
        className: cn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", className)
    }, props));
});
ToastViewport.displayName = $054eb8030ebde76e$export$d5c6c08dc2d3ca7.displayName;
var toastVariants = cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
    variants: {
        variant: {
            default: "border bg-background text-foreground",
            destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
        }
    },
    defaultVariants: {
        variant: "default"
    }
});
var Toast = React.forwardRef(function(_param, ref) {
    var className = _param.className, variant = _param.variant, props = _object_without_properties(_param, [
        "className",
        "variant"
    ]);
    return /* @__PURE__ */ jsx($054eb8030ebde76e$export$be92b6f5f03c0fe9, _object_spread({
        ref: ref,
        className: cn(toastVariants({
            variant: variant
        }), className)
    }, props));
});
Toast.displayName = $054eb8030ebde76e$export$be92b6f5f03c0fe9.displayName;
var ToastAction = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ jsx($054eb8030ebde76e$export$e19cd5f9376f8cee, _object_spread({
        ref: ref,
        className: cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", className)
    }, props));
});
ToastAction.displayName = $054eb8030ebde76e$export$e19cd5f9376f8cee.displayName;
var ToastClose = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ jsx($054eb8030ebde76e$export$f39c2d165cd861fe, _object_spread_props(_object_spread({
        ref: ref,
        className: cn("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", className),
        "toast-close": ""
    }, props), {
        children: /* @__PURE__ */ jsx(Cross2Icon, {
            className: "h-4 w-4"
        })
    }));
});
ToastClose.displayName = $054eb8030ebde76e$export$f39c2d165cd861fe.displayName;
var ToastTitle = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ jsx($054eb8030ebde76e$export$f99233281efd08a0, _object_spread({
        ref: ref,
        className: cn("text-sm font-semibold [&+div]:text-xs", className)
    }, props));
});
ToastTitle.displayName = $054eb8030ebde76e$export$f99233281efd08a0.displayName;
var ToastDescription = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ jsx($054eb8030ebde76e$export$393edc798c47379d, _object_spread({
        ref: ref,
        className: cn("text-sm opacity-90", className)
    }, props));
});
ToastDescription.displayName = $054eb8030ebde76e$export$393edc798c47379d.displayName;
export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport };
//# sourceMappingURL=toast.mjs.map