// muse-ui v4.0.0-alpha.1
// © 2024 kjxbyz. All Rights Reserved.
"use client";
"use strict";
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 _extends() {
    _extends = Object.assign || function(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);
}
function _object_destructuring_empty(o) {
    if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
    return o;
}
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;
}
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = function(target, all) {
    for(var name in all)__defProp(target, name, {
        get: all[name],
        enumerable: true
    });
};
var __copyProps = function(to, from, except, desc) {
    if (from && typeof from === "object" || typeof from === "function") {
        var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
        try {
            var _loop = function() {
                var key = _step.value;
                if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
                    get: function() {
                        return from[key];
                    },
                    enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
                });
            };
            for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
        } catch (err) {
            _didIteratorError = true;
            _iteratorError = err;
        } finally{
            try {
                if (!_iteratorNormalCompletion && _iterator.return != null) {
                    _iterator.return();
                }
            } finally{
                if (_didIteratorError) {
                    throw _iteratorError;
                }
            }
        }
    }
    return to;
};
var __toESM = function(mod, isNodeMode, target) {
    return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
        value: mod,
        enumerable: true
    }) : target, mod);
};
var __toCommonJS = function(mod) {
    return __copyProps(__defProp({}, "__esModule", {
        value: true
    }), mod);
};
// registry/new-york/ui/input-otp.tsx
var input_otp_exports = {};
__export(input_otp_exports, {
    InputOTP: function() {
        return InputOTP;
    },
    InputOTPGroup: function() {
        return InputOTPGroup;
    },
    InputOTPSeparator: function() {
        return InputOTPSeparator;
    },
    InputOTPSlot: function() {
        return InputOTPSlot;
    }
});
module.exports = __toCommonJS(input_otp_exports);
var React = __toESM(require("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
var import_react = require("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$1z = [
    "color"
];
var DashIcon = /* @__PURE__ */ (0, import_react.forwardRef)(function(_ref, forwardedRef) {
    var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, props = _objectWithoutPropertiesLoose(_ref, _excluded$1z);
    return (0, import_react.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
    }), (0, import_react.createElement)("path", {
        d: "M5 7.5C5 7.22386 5.22386 7 5.5 7H9.5C9.77614 7 10 7.22386 10 7.5C10 7.77614 9.77614 8 9.5 8H5.5C5.22386 8 5 7.77614 5 7.5Z",
        fill: color,
        fillRule: "evenodd",
        clipRule: "evenodd"
    }));
});
// registry/new-york/ui/input-otp.tsx
var import_input_otp = require("input-otp");
// lib/utils.ts
var import_clsx = require("clsx");
var import_tailwind_merge = require("tailwind-merge");
function cn() {
    for(var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++){
        inputs[_key] = arguments[_key];
    }
    return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
}
// registry/new-york/ui/input-otp.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var InputOTP = React.forwardRef(function(_param, ref) {
    var className = _param.className, containerClassName = _param.containerClassName, props = _object_without_properties(_param, [
        "className",
        "containerClassName"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input_otp.OTPInput, _object_spread({
        ref: ref,
        containerClassName: cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName),
        className: cn("disabled:cursor-not-allowed", className)
    }, props));
});
InputOTP.displayName = "InputOTP";
var InputOTPGroup = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", _object_spread({
        ref: ref,
        className: cn("flex items-center", className)
    }, props));
});
InputOTPGroup.displayName = "InputOTPGroup";
var InputOTPSlot = React.forwardRef(function(_param, ref) {
    var index = _param.index, className = _param.className, props = _object_without_properties(_param, [
        "index",
        "className"
    ]);
    var inputOTPContext = React.useContext(import_input_otp.OTPInputContext);
    var _inputOTPContext_slots_index = inputOTPContext.slots[index], char = _inputOTPContext_slots_index.char, hasFakeCaret = _inputOTPContext_slots_index.hasFakeCaret, isActive = _inputOTPContext_slots_index.isActive;
    return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", _object_spread_props(_object_spread({
        ref: ref,
        className: cn("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md", isActive && "z-10 ring-1 ring-ring", className)
    }, props), {
        children: [
            char,
            hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
                className: "pointer-events-none absolute inset-0 flex items-center justify-center",
                children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
                    className: "h-4 w-px animate-caret-blink bg-foreground duration-1000"
                })
            })
        ]
    }));
});
InputOTPSlot.displayName = "InputOTPSlot";
var InputOTPSeparator = React.forwardRef(function(_param, ref) {
    var props = _extends({}, _object_destructuring_empty(_param));
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", _object_spread_props(_object_spread({
        ref: ref,
        role: "separator"
    }, props), {
        children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DashIcon, {})
    }));
});
InputOTPSeparator.displayName = "InputOTPSeparator";
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
    InputOTP: InputOTP,
    InputOTPGroup: InputOTPGroup,
    InputOTPSeparator: InputOTPSeparator,
    InputOTPSlot: InputOTPSlot
});
//# sourceMappingURL=input-otp.js.map