: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
const tagName = useTagName(ref, props.as);
const nativeTabbable = focusable && isNativeTabbable(tagName);
const supportsDisabled = focusable && supportsDisabledAttribute(tagName);
const style = trulyDisabled ? _4R3V3JGP_spreadValues({ pointerEvents: "none" }, props.style) : props.style;
props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({
"data-focus-visible": focusable && focusVisible ? "" : void 0,
"data-autofocus": autoFocus ? true : void 0,
"aria-disabled": disabled ? true : void 0
ref: useMergeRefs(ref, autoFocusRef, props.ref),
disabled: supportsDisabled && trulyDisabled ? true : void 0,
// TODO: Test Focusable contentEditable.
contentEditable: disabled ? void 0 : props.contentEditable,
var Focusable = createComponent((props) => {
props = useFocusable(props);
return _3ORBWXWF_createElement("div", props);
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/NWCBQ4CV.js
// src/command/command.ts
function isNativeClick(event) {
const element = event.currentTarget;
if (event.key === "Enter") {
return isButton(element) || element.tagName === "SUMMARY" || element.tagName === "A";
return isButton(element) || element.tagName === "SUMMARY" || element.tagName === "INPUT" || element.tagName === "SELECT";
var symbol = Symbol("command");
var useCommand = createHook(
var _b = _a, { clickOnEnter = true, clickOnSpace = true } = _b, props = __objRest(_b, ["clickOnEnter", "clickOnSpace"]);
const ref = (0,external_React_.useRef)(null);
const tagName = useTagName(ref, props.as);
const [isNativeButton, setIsNativeButton] = (0,external_React_.useState)(
() => !!tagName && isButton({ tagName, type })
(0,external_React_.useEffect)(() => {
setIsNativeButton(isButton(ref.current));
const [active, setActive] = (0,external_React_.useState)(false);
const activeRef = (0,external_React_.useRef)(false);
const disabled = disabledFromProps(props);
const [isDuplicate, metadataProps] = useMetadataProps(props, symbol, true);
const onKeyDownProp = props.onKeyDown;
const onKeyDown = useEvent((event) => {
onKeyDownProp == null ? void 0 : onKeyDownProp(event);
const element = event.currentTarget;
if (event.defaultPrevented)
if (!isSelfTarget(event))
if (DLOEKDPY_isTextField(element))
if (element.isContentEditable)
const isEnter = clickOnEnter && event.key === "Enter";
const isSpace = clickOnSpace && event.key === " ";
const shouldPreventEnter = event.key === "Enter" && !clickOnEnter;
const shouldPreventSpace = event.key === " " && !clickOnSpace;
if (shouldPreventEnter || shouldPreventSpace) {
if (isEnter || isSpace) {
const nativeClick = isNativeClick(event);
const _a2 = event, { view } = _a2, eventInit = __objRest(_a2, ["view"]);
const click = () => fireClickEvent(element, eventInit);
queueBeforeEvent(element, "keyup", click);
activeRef.current = true;
const onKeyUpProp = props.onKeyUp;
const onKeyUp = useEvent((event) => {
onKeyUpProp == null ? void 0 : onKeyUpProp(event);
if (event.defaultPrevented)
const isSpace = clickOnSpace && event.key === " ";
if (activeRef.current && isSpace) {
activeRef.current = false;
if (!isNativeClick(event)) {
const element = event.currentTarget;
const _a2 = event, { view } = _a2, eventInit = __objRest(_a2, ["view"]);
queueMicrotask(() => fireClickEvent(element, eventInit));
props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues(_4R3V3JGP_spreadValues({
"data-active": active ? "" : void 0,
type: isNativeButton ? "button" : void 0
}, metadataProps), props), {
ref: useMergeRefs(ref, props.ref),
props = useFocusable(props);
var Command = createComponent((props) => {
props = useCommand(props);
return _3ORBWXWF_createElement("button", props);
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/4UUKJZ4V.js
// src/collection/collection-context.tsx
var ctx = createStoreContext();
var useCollectionContext = ctx.useContext;
var useCollectionScopedContext = ctx.useScopedContext;
var useCollectionProviderContext = ctx.useProviderContext;
var CollectionContextProvider = ctx.ContextProvider;
var CollectionScopedContextProvider = ctx.ScopedContextProvider;
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/UH3I23HL.js
// src/collection/collection-item.ts
var useCollectionItem = createHook(
shouldRegisterItem = true,
} = _b, props = __objRest(_b, [
// @ts-expect-error This prop may come from a collection renderer.
const context = useCollectionContext();
store = store || context;
const id = useId(props.id);
const ref = (0,external_React_.useRef)(element);
(0,external_React_.useEffect)(() => {
const element2 = ref.current;
const item = getItem({ id, element: element2 });
return store == null ? void 0 : store.renderItem(item);
}, [id, shouldRegisterItem, getItem, store]);
props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), {
ref: useMergeRefs(ref, props.ref)
var CollectionItem = createComponent(
const htmlProps = useCollectionItem(props);
return _3ORBWXWF_createElement("div", htmlProps);
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/3IEDWLST.js
// src/composite/utils.ts
var NULL_ITEM = { id: null };
function flipItems(items, activeId, shouldInsertNullItem = false) {
const index = items.findIndex((item) => item.id === activeId);
...items.slice(index + 1),
...shouldInsertNullItem ? [NULL_ITEM] : [],
function findFirstEnabledItem(items, excludeId) {
return items.find((item) => {
return !item.disabled && item.id !== excludeId;
function getEnabledItem(store, id) {
return store.item(id) || null;
function groupItemsByRows(items) {
for (const item of items) {
const row = rows.find((currentRow) => {
return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item.rowId;
function selectTextField(element, collapseToEnd = false) {
if (isTextField(element)) {
element.setSelectionRange(
collapseToEnd ? element.value.length : 0,
} else if (element.isContentEditable) {
const selection = getDocument(element).getSelection();
selection == null ? void 0 : selection.selectAllChildren(element);
selection == null ? void 0 : selection.collapseToEnd();
var FOCUS_SILENTLY = Symbol("FOCUS_SILENTLY");
function focusSilently(element) {
element[FOCUS_SILENTLY] = true;
element.focus({ preventScroll: true });
function silentlyFocused(element) {
const isSilentlyFocused = element[FOCUS_SILENTLY];
delete element[FOCUS_SILENTLY];
return isSilentlyFocused;
function isItem(store, element, exclude) {
const item = store.item(element.id);
if (exclude && item.element === exclude)
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/IB7YUKH5.js
// src/composite/composite-context.tsx
var IB7YUKH5_ctx = createStoreContext(
[CollectionContextProvider],
[CollectionScopedContextProvider]
var useCompositeContext = IB7YUKH5_ctx.useContext;
var useCompositeScopedContext = IB7YUKH5_ctx.useScopedContext;
var useCompositeProviderContext = IB7YUKH5_ctx.useProviderContext;
var CompositeContextProvider = IB7YUKH5_ctx.ContextProvider;
var CompositeScopedContextProvider = IB7YUKH5_ctx.ScopedContextProvider;
var CompositeItemContext = (0,external_React_.createContext)(
var CompositeRowContext = (0,external_React_.createContext)(
;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/EAHJFCU4.js
function getInternal(store, key) {
const internals = store.__unstableInternals;
invariant(internals, "Invalid store");
function createStore(initialState, ...stores) {
let state = initialState;
let prevStateBatch = state;
let lastUpdate = Symbol();
const instances = /* @__PURE__ */ new Set();
const updatedKeys = /* @__PURE__ */ new Set();
const setups = /* @__PURE__ */ new Set();
const listeners = /* @__PURE__ */ new Set();
const batchListeners = /* @__PURE__ */ new Set();
const disposables = /* @__PURE__ */ new WeakMap();
const listenerKeys = /* @__PURE__ */ new WeakMap();
const storeSetup = (callback) => {
return () => setups.delete(callback);
const storeInit = () => {
const initialized = instances.size;
const instance = Symbol();
const maybeDestroy = () => {
instances.delete(instance);
const desyncs = getKeys(state).map(
...stores.map((store) => {
const storeState = (_a = store == null ? void 0 : store.getState) == null ? void 0 : _a.call(store);
if (!Y3OOHFCN_hasOwnProperty(storeState, key))
return sync(store, [key], (state2) => {
// @ts-expect-error - Not public API. This is just to prevent
setups.forEach((setup2) => teardowns.push(setup2()));
const cleanups = stores.map(init);
destroy = chain(...desyncs, ...teardowns, ...cleanups);
const sub = (keys, listener, set = listeners) => {
listenerKeys.set(listener, keys);
(_a = disposables.get(listener)) == null ? void 0 : _a();
disposables.delete(listener);
listenerKeys.delete(listener);
const storeSubscribe = (keys, listener) => sub(keys, listener);
const storeSync = (keys, listener) => {
disposables.set(listener, listener(state, state));
return sub(keys, listener);
const storeBatch = (keys, listener) => {
disposables.set(listener, listener(state, prevStateBatch));
return sub(keys, listener, batchListeners);
const storePick = (keys) => createStore(pick(state, keys), finalStore);
const storeOmit = (keys) => createStore(omit(state, keys), finalStore);
const getState = () => state;
const setState = (key, value, fromStores = false) => {
if (!Y3OOHFCN_hasOwnProperty(state, key))
const nextValue = Y3OOHFCN_applyState(value, state[key]);
if (nextValue === state[key])
stores.forEach((store) => {
(_a = store == null ? void 0 : store.setState) == null ? void 0 : _a.call(store, key, nextValue);
state = _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, state), { [key]: nextValue });
const thisUpdate = Symbol();
const run = (listener, prev, uKeys) => {
const keys = listenerKeys.get(listener);
const updated = (k) => uKeys ? uKeys.has(k) : k === key;
if (!keys || keys.some(updated)) {
(_a = disposables.get(listener)) == null ? void 0 : _a();
disposables.set(listener, listener(state, prev));
listeners.forEach((listener) => {
run(listener, prevState);
if (lastUpdate !== thisUpdate)
batchListeners.forEach((listener) => {
run(listener, prevStateBatch, updatedKeys);
prevStateBatch = snapshot;
subscribe: storeSubscribe,
function setup(store, ...args) {
return getInternal(store, "setup")(...args);
function init(store, ...args) {