[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/script-modules/core-fields/ -> attachment.js (source)

   1  var __create = Object.create;
   2  var __defProp = Object.defineProperty;
   3  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
   4  var __getOwnPropNames = Object.getOwnPropertyNames;
   5  var __getProtoOf = Object.getPrototypeOf;
   6  var __hasOwnProp = Object.prototype.hasOwnProperty;
   7  var __commonJS = (cb, mod) => function __require() {
   8    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
   9  };
  10  var __export = (target, all) => {
  11    for (var name in all)
  12      __defProp(target, name, { get: all[name], enumerable: true });
  13  };
  14  var __copyProps = (to, from, except, desc) => {
  15    if (from && typeof from === "object" || typeof from === "function") {
  16      for (let key of __getOwnPropNames(from))
  17        if (!__hasOwnProp.call(to, key) && key !== except)
  18          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  19    }
  20    return to;
  21  };
  22  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  23    // If the importer is in node compatibility mode or this is not an ESM
  24    // file that has been converted to a CommonJS file using a Babel-
  25    // compatible transform (i.e. "__esModule" has not been set), then set
  26    // "default" to the CommonJS "module.exports" for node compatibility.
  27    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  28    mod
  29  ));
  30  
  31  // package-external:@wordpress/i18n
  32  var require_i18n = __commonJS({
  33    "package-external:@wordpress/i18n"(exports, module) {
  34      module.exports = window.wp.i18n;
  35    }
  36  });
  37  
  38  // vendor-external:react
  39  var require_react = __commonJS({
  40    "vendor-external:react"(exports, module) {
  41      module.exports = window.React;
  42    }
  43  });
  44  
  45  // vendor-external:react/jsx-runtime
  46  var require_jsx_runtime = __commonJS({
  47    "vendor-external:react/jsx-runtime"(exports, module) {
  48      module.exports = window.ReactJSXRuntime;
  49    }
  50  });
  51  
  52  // vendor-external:react-dom
  53  var require_react_dom = __commonJS({
  54    "vendor-external:react-dom"(exports, module) {
  55      module.exports = window.ReactDOM;
  56    }
  57  });
  58  
  59  // package-external:@wordpress/element
  60  var require_element = __commonJS({
  61    "package-external:@wordpress/element"(exports, module) {
  62      module.exports = window.wp.element;
  63    }
  64  });
  65  
  66  // package-external:@wordpress/primitives
  67  var require_primitives = __commonJS({
  68    "package-external:@wordpress/primitives"(exports, module) {
  69      module.exports = window.wp.primitives;
  70    }
  71  });
  72  
  73  // node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
  74  var require_use_sync_external_store_shim_development = __commonJS({
  75    "node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
  76      "use strict";
  77      (function() {
  78        function is(x, y) {
  79          return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
  80        }
  81        function useSyncExternalStore$2(subscribe, getSnapshot) {
  82          didWarnOld18Alpha || void 0 === React49.startTransition || (didWarnOld18Alpha = true, console.error(
  83            "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
  84          ));
  85          var value = getSnapshot();
  86          if (!didWarnUncachedGetSnapshot) {
  87            var cachedValue = getSnapshot();
  88            objectIs(value, cachedValue) || (console.error(
  89              "The result of getSnapshot should be cached to avoid an infinite loop"
  90            ), didWarnUncachedGetSnapshot = true);
  91          }
  92          cachedValue = useState16({
  93            inst: { value, getSnapshot }
  94          });
  95          var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
  96          useLayoutEffect3(
  97            function() {
  98              inst.value = value;
  99              inst.getSnapshot = getSnapshot;
 100              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 101            },
 102            [subscribe, value, getSnapshot]
 103          );
 104          useEffect14(
 105            function() {
 106              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 107              return subscribe(function() {
 108                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 109              });
 110            },
 111            [subscribe]
 112          );
 113          useDebugValue2(value);
 114          return value;
 115        }
 116        function checkIfSnapshotChanged(inst) {
 117          var latestGetSnapshot = inst.getSnapshot;
 118          inst = inst.value;
 119          try {
 120            var nextValue = latestGetSnapshot();
 121            return !objectIs(inst, nextValue);
 122          } catch (error) {
 123            return true;
 124          }
 125        }
 126        function useSyncExternalStore$1(subscribe, getSnapshot) {
 127          return getSnapshot();
 128        }
 129        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 130        var React49 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState16 = React49.useState, useEffect14 = React49.useEffect, useLayoutEffect3 = React49.useLayoutEffect, useDebugValue2 = React49.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
 131        exports.useSyncExternalStore = void 0 !== React49.useSyncExternalStore ? React49.useSyncExternalStore : shim;
 132        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 133      })();
 134    }
 135  });
 136  
 137  // node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/shim/index.js
 138  var require_shim = __commonJS({
 139    "node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/shim/index.js"(exports, module) {
 140      "use strict";
 141      if (false) {
 142        module.exports = null;
 143      } else {
 144        module.exports = require_use_sync_external_store_shim_development();
 145      }
 146    }
 147  });
 148  
 149  // node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
 150  var require_with_selector_development = __commonJS({
 151    "node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
 152      "use strict";
 153      (function() {
 154        function is(x, y) {
 155          return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
 156        }
 157        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 158        var React49 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef19 = React49.useRef, useEffect14 = React49.useEffect, useMemo17 = React49.useMemo, useDebugValue2 = React49.useDebugValue;
 159        exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
 160          var instRef = useRef19(null);
 161          if (null === instRef.current) {
 162            var inst = { hasValue: false, value: null };
 163            instRef.current = inst;
 164          } else inst = instRef.current;
 165          instRef = useMemo17(
 166            function() {
 167              function memoizedSelector(nextSnapshot) {
 168                if (!hasMemo) {
 169                  hasMemo = true;
 170                  memoizedSnapshot = nextSnapshot;
 171                  nextSnapshot = selector(nextSnapshot);
 172                  if (void 0 !== isEqual && inst.hasValue) {
 173                    var currentSelection = inst.value;
 174                    if (isEqual(currentSelection, nextSnapshot))
 175                      return memoizedSelection = currentSelection;
 176                  }
 177                  return memoizedSelection = nextSnapshot;
 178                }
 179                currentSelection = memoizedSelection;
 180                if (objectIs(memoizedSnapshot, nextSnapshot))
 181                  return currentSelection;
 182                var nextSelection = selector(nextSnapshot);
 183                if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
 184                  return memoizedSnapshot = nextSnapshot, currentSelection;
 185                memoizedSnapshot = nextSnapshot;
 186                return memoizedSelection = nextSelection;
 187              }
 188              var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
 189              return [
 190                function() {
 191                  return memoizedSelector(getSnapshot());
 192                },
 193                null === maybeGetServerSnapshot ? void 0 : function() {
 194                  return memoizedSelector(maybeGetServerSnapshot());
 195                }
 196              ];
 197            },
 198            [getSnapshot, getServerSnapshot, selector, isEqual]
 199          );
 200          var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
 201          useEffect14(
 202            function() {
 203              inst.hasValue = true;
 204              inst.value = value;
 205            },
 206            [value]
 207          );
 208          useDebugValue2(value);
 209          return value;
 210        };
 211        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 212      })();
 213    }
 214  });
 215  
 216  // node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/shim/with-selector.js
 217  var require_with_selector = __commonJS({
 218    "node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
 219      "use strict";
 220      if (false) {
 221        module.exports = null;
 222      } else {
 223        module.exports = require_with_selector_development();
 224      }
 225    }
 226  });
 227  
 228  // package-external:@wordpress/compose
 229  var require_compose = __commonJS({
 230    "package-external:@wordpress/compose"(exports, module) {
 231      module.exports = window.wp.compose;
 232    }
 233  });
 234  
 235  // package-external:@wordpress/theme
 236  var require_theme = __commonJS({
 237    "package-external:@wordpress/theme"(exports, module) {
 238      module.exports = window.wp.theme;
 239    }
 240  });
 241  
 242  // package-external:@wordpress/private-apis
 243  var require_private_apis = __commonJS({
 244    "package-external:@wordpress/private-apis"(exports, module) {
 245      module.exports = window.wp.privateApis;
 246    }
 247  });
 248  
 249  // package-external:@wordpress/core-data
 250  var require_core_data = __commonJS({
 251    "package-external:@wordpress/core-data"(exports, module) {
 252      module.exports = window.wp.coreData;
 253    }
 254  });
 255  
 256  // package-external:@wordpress/components
 257  var require_components = __commonJS({
 258    "package-external:@wordpress/components"(exports, module) {
 259      module.exports = window.wp.components;
 260    }
 261  });
 262  
 263  // package-external:@wordpress/data
 264  var require_data = __commonJS({
 265    "package-external:@wordpress/data"(exports, module) {
 266      module.exports = window.wp.data;
 267    }
 268  });
 269  
 270  // package-external:@wordpress/url
 271  var require_url = __commonJS({
 272    "package-external:@wordpress/url"(exports, module) {
 273      module.exports = window.wp.url;
 274    }
 275  });
 276  
 277  // package-external:@wordpress/html-entities
 278  var require_html_entities = __commonJS({
 279    "package-external:@wordpress/html-entities"(exports, module) {
 280      module.exports = window.wp.htmlEntities;
 281    }
 282  });
 283  
 284  // packages/core-fields/build-module/attachment/alt_text/field.mjs
 285  var import_i18n3 = __toESM(require_i18n(), 1);
 286  
 287  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useRenderElement.mjs
 288  var React4 = __toESM(require_react(), 1);
 289  
 290  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useRefWithInit.mjs
 291  var React = __toESM(require_react(), 1);
 292  var UNINITIALIZED = {};
 293  function useRefWithInit(init, initArg) {
 294    const ref = React.useRef(UNINITIALIZED);
 295    if (ref.current === UNINITIALIZED) {
 296      ref.current = init(initArg);
 297    }
 298    return ref;
 299  }
 300  
 301  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useMergedRefs.mjs
 302  function useMergedRefs(a, b, c, d) {
 303    const forkRef = useRefWithInit(createForkRef).current;
 304    if (didChange(forkRef, a, b, c, d)) {
 305      update(forkRef, [a, b, c, d]);
 306    }
 307    return forkRef.callback;
 308  }
 309  function useMergedRefsN(refs) {
 310    const forkRef = useRefWithInit(createForkRef).current;
 311    if (didChangeN(forkRef, refs)) {
 312      update(forkRef, refs);
 313    }
 314    return forkRef.callback;
 315  }
 316  function createForkRef() {
 317    return {
 318      callback: null,
 319      cleanup: null,
 320      refs: []
 321    };
 322  }
 323  function didChange(forkRef, a, b, c, d) {
 324    return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
 325  }
 326  function didChangeN(forkRef, newRefs) {
 327    return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
 328  }
 329  function update(forkRef, refs) {
 330    forkRef.refs = refs;
 331    if (refs.every((ref) => ref == null)) {
 332      forkRef.callback = null;
 333      return;
 334    }
 335    forkRef.callback = (instance) => {
 336      if (forkRef.cleanup) {
 337        forkRef.cleanup();
 338        forkRef.cleanup = null;
 339      }
 340      if (instance != null) {
 341        const cleanupCallbacks = Array(refs.length).fill(null);
 342        for (let i = 0; i < refs.length; i += 1) {
 343          const ref = refs[i];
 344          if (ref == null) {
 345            continue;
 346          }
 347          switch (typeof ref) {
 348            case "function": {
 349              const refCleanup = ref(instance);
 350              if (typeof refCleanup === "function") {
 351                cleanupCallbacks[i] = refCleanup;
 352              }
 353              break;
 354            }
 355            case "object": {
 356              ref.current = instance;
 357              break;
 358            }
 359            default:
 360          }
 361        }
 362        forkRef.cleanup = () => {
 363          for (let i = 0; i < refs.length; i += 1) {
 364            const ref = refs[i];
 365            if (ref == null) {
 366              continue;
 367            }
 368            switch (typeof ref) {
 369              case "function": {
 370                const cleanupCallback = cleanupCallbacks[i];
 371                if (typeof cleanupCallback === "function") {
 372                  cleanupCallback();
 373                } else {
 374                  void ref(null);
 375                }
 376                break;
 377              }
 378              case "object": {
 379                ref.current = null;
 380                break;
 381              }
 382              default:
 383            }
 384          }
 385        };
 386      }
 387    };
 388  }
 389  
 390  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/getReactElementRef.mjs
 391  var React3 = __toESM(require_react(), 1);
 392  
 393  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/reactVersion.mjs
 394  var React2 = __toESM(require_react(), 1);
 395  var majorVersion = parseInt(React2.version, 10);
 396  function isReactVersionAtLeast(reactVersionToCheck) {
 397    return majorVersion >= reactVersionToCheck;
 398  }
 399  
 400  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/getReactElementRef.mjs
 401  function getReactElementRef(element) {
 402    if (!/* @__PURE__ */ React3.isValidElement(element)) {
 403      return null;
 404    }
 405    const reactElement = element;
 406    const propsWithRef = reactElement.props;
 407    return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
 408  }
 409  
 410  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/mergeObjects.mjs
 411  function mergeObjects(a, b) {
 412    if (a && !b) {
 413      return a;
 414    }
 415    if (!a && b) {
 416      return b;
 417    }
 418    if (a || b) {
 419      return {
 420        ...a,
 421        ...b
 422      };
 423    }
 424    return void 0;
 425  }
 426  
 427  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/createLogOnce.mjs
 428  var loggedMessages;
 429  if (true) {
 430    loggedMessages = /* @__PURE__ */ new Set();
 431  }
 432  function createLogOnce(severity, prefix) {
 433    return function logOnce(...messages) {
 434      if (true) {
 435        const message = messages.join(" ");
 436        const output = prefix ? `$prefix}: $message}` : message;
 437        const key = `$severity}:$output}`;
 438        if (!loggedMessages.has(key)) {
 439          loggedMessages.add(key);
 440          if (severity === "warn") {
 441            console.warn(output);
 442          } else {
 443            console.error(output);
 444          }
 445        }
 446      }
 447    };
 448  }
 449  
 450  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/warn.mjs
 451  var warn = createLogOnce("warn", "Base UI");
 452  
 453  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/empty.mjs
 454  function NOOP() {
 455  }
 456  var EMPTY_ARRAY = Object.freeze([]);
 457  var EMPTY_OBJECT = Object.freeze({});
 458  
 459  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
 460  function getStateAttributesProps(state, customMapping) {
 461    const props = {};
 462    for (const key in state) {
 463      const value = state[key];
 464      if (customMapping?.hasOwnProperty(key)) {
 465        const customProps = customMapping[key](value);
 466        if (customProps != null) {
 467          Object.assign(props, customProps);
 468        }
 469        continue;
 470      }
 471      if (value === true) {
 472        props[`data-$key.toLowerCase()}`] = "";
 473      } else if (value) {
 474        props[`data-$key.toLowerCase()}`] = value.toString();
 475      }
 476    }
 477    return props;
 478  }
 479  
 480  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveClassName.mjs
 481  function resolveClassName(className, state) {
 482    return typeof className === "function" ? className(state) : className;
 483  }
 484  
 485  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveStyle.mjs
 486  function resolveStyle(style, state) {
 487    return typeof style === "function" ? style(state) : style;
 488  }
 489  
 490  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/merge-props/mergeProps.mjs
 491  var EMPTY_PROPS = {};
 492  function mergeProps(a, b, c, d, e) {
 493    if (!c && !d && !e && !a) {
 494      return createInitialMergedProps(b);
 495    }
 496    let merged = createInitialMergedProps(a);
 497    if (b) {
 498      merged = mergeInto(merged, b);
 499    }
 500    if (c) {
 501      merged = mergeInto(merged, c);
 502    }
 503    if (d) {
 504      merged = mergeInto(merged, d);
 505    }
 506    if (e) {
 507      merged = mergeInto(merged, e);
 508    }
 509    return merged;
 510  }
 511  function mergePropsN(props) {
 512    if (props.length === 0) {
 513      return EMPTY_PROPS;
 514    }
 515    if (props.length === 1) {
 516      return createInitialMergedProps(props[0]);
 517    }
 518    let merged = createInitialMergedProps(props[0]);
 519    for (let i = 1; i < props.length; i += 1) {
 520      merged = mergeInto(merged, props[i]);
 521    }
 522    return merged;
 523  }
 524  function createInitialMergedProps(inputProps) {
 525    if (isPropsGetter(inputProps)) {
 526      return {
 527        ...inputProps(EMPTY_PROPS)
 528      };
 529    }
 530    return copyInitialProps(inputProps);
 531  }
 532  function mergeInto(merged, inputProps) {
 533    if (isPropsGetter(inputProps)) {
 534      return inputProps(merged);
 535    }
 536    return mutablyMergeInto(merged, inputProps);
 537  }
 538  function copyInitialProps(inputProps) {
 539    const copiedProps = {
 540      ...inputProps
 541    };
 542    for (const propName in copiedProps) {
 543      const propValue = copiedProps[propName];
 544      if (isEventHandler(propName, propValue)) {
 545        copiedProps[propName] = wrapEventHandler(propValue);
 546      }
 547    }
 548    return copiedProps;
 549  }
 550  function mutablyMergeInto(mergedProps, externalProps) {
 551    if (!externalProps) {
 552      return mergedProps;
 553    }
 554    for (const propName in externalProps) {
 555      const externalPropValue = externalProps[propName];
 556      switch (propName) {
 557        case "style": {
 558          mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
 559          break;
 560        }
 561        case "className": {
 562          mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
 563          break;
 564        }
 565        default: {
 566          if (isEventHandler(propName, externalPropValue)) {
 567            mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
 568          } else {
 569            mergedProps[propName] = externalPropValue;
 570          }
 571        }
 572      }
 573    }
 574    return mergedProps;
 575  }
 576  function isEventHandler(key, value) {
 577    const code0 = key.charCodeAt(0);
 578    const code1 = key.charCodeAt(1);
 579    const code2 = key.charCodeAt(2);
 580    return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
 581  }
 582  function isPropsGetter(inputProps) {
 583    return typeof inputProps === "function";
 584  }
 585  function mergeEventHandlers(ourHandler, theirHandler) {
 586    if (!theirHandler) {
 587      return ourHandler;
 588    }
 589    if (!ourHandler) {
 590      return wrapEventHandler(theirHandler);
 591    }
 592    return (...args) => {
 593      const event = args[0];
 594      if (isSyntheticEvent(event)) {
 595        const baseUIEvent = event;
 596        makeEventPreventable(baseUIEvent);
 597        const result2 = theirHandler(...args);
 598        if (!baseUIEvent.baseUIHandlerPrevented) {
 599          ourHandler?.(...args);
 600        }
 601        return result2;
 602      }
 603      const result = theirHandler(...args);
 604      ourHandler?.(...args);
 605      return result;
 606    };
 607  }
 608  function wrapEventHandler(handler) {
 609    if (!handler) {
 610      return handler;
 611    }
 612    return (...args) => {
 613      const event = args[0];
 614      if (isSyntheticEvent(event)) {
 615        makeEventPreventable(event);
 616      }
 617      return handler(...args);
 618    };
 619  }
 620  function makeEventPreventable(event) {
 621    event.preventBaseUIHandler = () => {
 622      event.baseUIHandlerPrevented = true;
 623    };
 624    return event;
 625  }
 626  function mergeClassNames(ourClassName, theirClassName) {
 627    if (theirClassName) {
 628      if (ourClassName) {
 629        return theirClassName + " " + ourClassName;
 630      }
 631      return theirClassName;
 632    }
 633    return ourClassName;
 634  }
 635  function isSyntheticEvent(event) {
 636    return event != null && typeof event === "object" && "nativeEvent" in event;
 637  }
 638  
 639  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useRenderElement.mjs
 640  var import_react = __toESM(require_react(), 1);
 641  function useRenderElement(element, componentProps, params = {}) {
 642    let renderProp = componentProps.render;
 643    if (params.enabled !== false) {
 644      renderProp = unwrapLazyRenderProp(renderProp);
 645    }
 646    const outProps = useRenderElementProps(componentProps, params, renderProp);
 647    if (params.enabled === false) {
 648      return null;
 649    }
 650    const state = params.state ?? EMPTY_OBJECT;
 651    return evaluateRenderProp(element, renderProp, outProps, state);
 652  }
 653  function useRenderElementProps(componentProps, params, renderProp) {
 654    const {
 655      className: classNameProp,
 656      style: styleProp
 657    } = componentProps;
 658    const {
 659      state = EMPTY_OBJECT,
 660      ref,
 661      props,
 662      stateAttributesMapping,
 663      enabled = true
 664    } = params;
 665    const className = enabled ? resolveClassName(classNameProp, state) : void 0;
 666    const style = enabled ? resolveStyle(styleProp, state) : void 0;
 667    const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
 668    const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
 669    const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
 670    if (typeof document !== "undefined") {
 671      if (!enabled) {
 672        void useMergedRefs(null, null);
 673      } else if (Array.isArray(ref)) {
 674        outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
 675      } else {
 676        outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
 677      }
 678    }
 679    if (!enabled) {
 680      return EMPTY_OBJECT;
 681    }
 682    if (className !== void 0) {
 683      outProps.className = mergeClassNames(outProps.className, className);
 684    }
 685    if (style !== void 0) {
 686      outProps.style = mergeObjects(outProps.style, style);
 687    }
 688    return outProps;
 689  }
 690  function resolveRenderFunctionProps(props) {
 691    if (Array.isArray(props)) {
 692      return mergePropsN(props);
 693    }
 694    return mergeProps(void 0, props);
 695  }
 696  var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
 697  var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
 698  var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
 699  function unwrapLazyRenderProp(render) {
 700    if (render?.$$typeof !== REACT_LAZY_TYPE) {
 701      return render;
 702    }
 703    const unwrapped = React4.Children.toArray(render)[0];
 704    return /* @__PURE__ */ React4.isValidElement(unwrapped) ? unwrapped : render;
 705  }
 706  function evaluateRenderProp(element, render, props, state) {
 707    if (render) {
 708      if (typeof render === "function") {
 709        if (true) {
 710          warnIfRenderPropLooksLikeComponent(render);
 711        }
 712        return render(props, state);
 713      }
 714      const mergedProps = mergeProps(props, render.props);
 715      mergedProps.ref = props.ref;
 716      if (true) {
 717        if (!/* @__PURE__ */ React4.isValidElement(render)) {
 718          throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join("\n"));
 719        }
 720      }
 721      return /* @__PURE__ */ React4.cloneElement(render, mergedProps);
 722    }
 723    return renderTag(element, props);
 724  }
 725  function warnIfRenderPropLooksLikeComponent(renderFn) {
 726    const functionName = renderFn.name;
 727    if (functionName.length === 0) {
 728      return;
 729    }
 730    if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
 731      return;
 732    }
 733    if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
 734      return;
 735    }
 736    warn(`The \`render\` prop received a function named \`$functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
 737  }
 738  function renderTag(Tag, props) {
 739    if (Tag === "button") {
 740      return /* @__PURE__ */ (0, import_react.createElement)("button", {
 741        type: "button",
 742        ...props,
 743        key: props.key
 744      });
 745    }
 746    if (Tag === "img") {
 747      return /* @__PURE__ */ (0, import_react.createElement)("img", {
 748        alt: "",
 749        ...props,
 750        key: props.key
 751      });
 752    }
 753    return /* @__PURE__ */ React4.createElement(Tag, props);
 754  }
 755  
 756  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/safeReact.mjs
 757  var React5 = __toESM(require_react(), 1);
 758  var SafeReact = {
 759    ...React5
 760  };
 761  
 762  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useStableCallback.mjs
 763  var useInsertionEffect = SafeReact.useInsertionEffect;
 764  var useSafeInsertionEffect = (
 765    // React 17 doesn't have useInsertionEffect.
 766    useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
 767    useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
 768  );
 769  function useStableCallback(callback) {
 770    const stable = useRefWithInit(createStableCallback).current;
 771    stable.next = callback;
 772    useSafeInsertionEffect(stable.effect);
 773    return stable.trampoline;
 774  }
 775  function createStableCallback() {
 776    const stable = {
 777      next: void 0,
 778      callback: assertNotCalled,
 779      trampoline: (...args) => stable.callback?.(...args),
 780      effect: () => {
 781        stable.callback = stable.next;
 782      }
 783    };
 784    return stable;
 785  }
 786  function assertNotCalled() {
 787    if (true) {
 788      throw (
 789        /* minify-error-disabled */
 790        new Error("Base UI: Cannot call an event handler while rendering.")
 791      );
 792    }
 793  }
 794  
 795  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
 796  var React6 = __toESM(require_react(), 1);
 797  var noop = () => {
 798  };
 799  var useIsoLayoutEffect = typeof document !== "undefined" ? React6.useLayoutEffect : noop;
 800  
 801  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
 802  var React8 = __toESM(require_react(), 1);
 803  
 804  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
 805  var ReactDOM = __toESM(require_react_dom(), 1);
 806  
 807  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useOnMount.mjs
 808  var React7 = __toESM(require_react(), 1);
 809  function useOnMount(fn) {
 810    React7.useEffect(fn, EMPTY_ARRAY);
 811  }
 812  
 813  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useAnimationFrame.mjs
 814  var EMPTY = null;
 815  var LAST_RAF = globalThis.requestAnimationFrame;
 816  var Scheduler = class {
 817    /* This implementation uses an array as a backing data-structure for frame callbacks.
 818     * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
 819     * never calls the native `cancelAnimationFrame` if there are no frames left. This can
 820     * be much more efficient if there is a call pattern that alterns as
 821     * "request-cancel-request-cancel-…".
 822     * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
 823     * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
 824    callbacks = [];
 825    callbacksCount = 0;
 826    nextId = 1;
 827    startId = 1;
 828    isScheduled = false;
 829    tick = (timestamp) => {
 830      this.isScheduled = false;
 831      const currentCallbacks = this.callbacks;
 832      const currentCallbacksCount = this.callbacksCount;
 833      this.callbacks = [];
 834      this.callbacksCount = 0;
 835      this.startId = this.nextId;
 836      if (currentCallbacksCount > 0) {
 837        for (let i = 0; i < currentCallbacks.length; i += 1) {
 838          currentCallbacks[i]?.(timestamp);
 839        }
 840      }
 841    };
 842    request(fn) {
 843      const id = this.nextId;
 844      this.nextId += 1;
 845      this.callbacks.push(fn);
 846      this.callbacksCount += 1;
 847      const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
 848      if (!this.isScheduled || didRAFChange) {
 849        requestAnimationFrame(this.tick);
 850        this.isScheduled = true;
 851      }
 852      return id;
 853    }
 854    cancel(id) {
 855      const index2 = id - this.startId;
 856      if (index2 < 0 || index2 >= this.callbacks.length) {
 857        return;
 858      }
 859      if (this.callbacks[index2] === null) {
 860        return;
 861      }
 862      this.callbacks[index2] = null;
 863      this.callbacksCount -= 1;
 864    }
 865  };
 866  var scheduler = new Scheduler();
 867  var AnimationFrame = class _AnimationFrame {
 868    static create() {
 869      return new _AnimationFrame();
 870    }
 871    static request(fn) {
 872      return scheduler.request(fn);
 873    }
 874    static cancel(id) {
 875      return scheduler.cancel(id);
 876    }
 877    currentId = EMPTY;
 878    /**
 879     * Executes `fn` after `delay`, clearing any previously scheduled call.
 880     */
 881    request(fn) {
 882      this.cancel();
 883      this.currentId = scheduler.request(() => {
 884        this.currentId = EMPTY;
 885        fn();
 886      });
 887    }
 888    cancel = () => {
 889      if (this.currentId !== EMPTY) {
 890        scheduler.cancel(this.currentId);
 891        this.currentId = EMPTY;
 892      }
 893    };
 894    disposeEffect = () => {
 895      return this.cancel;
 896    };
 897  };
 898  function useAnimationFrame() {
 899    const timeout = useRefWithInit(AnimationFrame.create).current;
 900    useOnMount(timeout.disposeEffect);
 901    return timeout;
 902  }
 903  
 904  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveRef.mjs
 905  function resolveRef(maybeRef) {
 906    if (maybeRef == null) {
 907      return maybeRef;
 908    }
 909    return "current" in maybeRef ? maybeRef.current : maybeRef;
 910  }
 911  
 912  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/getFiniteAnimations.mjs
 913  function getFiniteAnimations(element, options) {
 914    return element.getAnimations(options).filter((animation) => {
 915      const timing = animation.effect?.getTiming();
 916      return timing?.duration !== Infinity && timing?.iterations !== Infinity;
 917    });
 918  }
 919  
 920  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
 921  var startingStyle = "data-starting-style";
 922  var endingStyle = "data-ending-style";
 923  
 924  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
 925  var pendingCallbacks = null;
 926  function flushBeforePaint(fn) {
 927    if (!pendingCallbacks) {
 928      const callbacks = [];
 929      pendingCallbacks = callbacks;
 930      queueMicrotask(() => {
 931        pendingCallbacks = null;
 932        ReactDOM.flushSync(() => {
 933          for (const callback of callbacks) {
 934            callback();
 935          }
 936        });
 937      });
 938    }
 939    pendingCallbacks.push(fn);
 940  }
 941  function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) {
 942    const frame = useAnimationFrame();
 943    return useStableCallback((fnToExecute, signal = null) => {
 944      frame.cancel();
 945      const element = resolveRef(elementOrRef);
 946      if (element == null) {
 947        return;
 948      }
 949      const resolvedElement = element;
 950      const done = () => {
 951        if (!batch) {
 952          ReactDOM.flushSync(fnToExecute);
 953          return;
 954        }
 955        flushBeforePaint(() => {
 956          if (!signal?.aborted) {
 957            fnToExecute();
 958          }
 959        });
 960      };
 961      if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
 962        fnToExecute();
 963        return;
 964      }
 965      function exec() {
 966        Promise.all(getFiniteAnimations(resolvedElement).map((animation) => animation.finished.then(NOOP))).then(() => {
 967          if (!signal?.aborted) {
 968            done();
 969          }
 970        }, () => {
 971          if (signal?.aborted) {
 972            return;
 973          }
 974          const currentAnimations = getFiniteAnimations(resolvedElement);
 975          if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
 976            exec();
 977            return;
 978          }
 979          done();
 980        });
 981      }
 982      if (waitForStartingStyleRemoved) {
 983        const startingStyleAttribute = startingStyle;
 984        if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
 985          frame.request(exec);
 986          return;
 987        }
 988        const attributeObserver = new MutationObserver(() => {
 989          if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
 990            attributeObserver.disconnect();
 991            exec();
 992          }
 993        });
 994        attributeObserver.observe(resolvedElement, {
 995          attributes: true,
 996          attributeFilter: [startingStyleAttribute]
 997        });
 998        signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
 999          once: true
1000        });
1001        return;
1002      }
1003      frame.request(exec);
1004    });
1005  }
1006  
1007  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1008  function useOpenChangeComplete(parameters) {
1009    const {
1010      enabled = true,
1011      open: open2,
1012      ref,
1013      batch = false,
1014      onComplete: onCompleteParam
1015    } = parameters;
1016    const onComplete = useStableCallback(onCompleteParam);
1017    const runOnceAnimationsFinish = useAnimationsFinished(ref, open2, batch);
1018    React8.useEffect(() => {
1019      if (!enabled) {
1020        return void 0;
1021      }
1022      const abortController = new AbortController();
1023      runOnceAnimationsFinish(onComplete, abortController.signal);
1024      return () => {
1025        abortController.abort();
1026      };
1027    }, [enabled, open2, onComplete, runOnceAnimationsFinish]);
1028  }
1029  
1030  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
1031  var STARTING_HOOK = {
1032    [startingStyle]: ""
1033  };
1034  var ENDING_HOOK = {
1035    [endingStyle]: ""
1036  };
1037  var transitionStatusMapping = {
1038    transitionStatus(value) {
1039      if (value === "starting") {
1040        return STARTING_HOOK;
1041      }
1042      if (value === "ending") {
1043        return ENDING_HOOK;
1044      }
1045      return null;
1046    }
1047  };
1048  
1049  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1050  var React9 = __toESM(require_react(), 1);
1051  function useTransitionStatus(open2, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) {
1052    const [transitionStatus, setTransitionStatus] = React9.useState(open2 && enableIdleState ? "idle" : void 0);
1053    const [mounted, setMounted] = React9.useState(open2 && !animateInitialOpen);
1054    if (open2 && !mounted) {
1055      setMounted(true);
1056      setTransitionStatus("starting");
1057    }
1058    if (!open2 && mounted && transitionStatus !== "ending" && !deferEndingState) {
1059      setTransitionStatus("ending");
1060    }
1061    if (!open2 && !mounted && transitionStatus === "ending") {
1062      setTransitionStatus(void 0);
1063    }
1064    useIsoLayoutEffect(() => {
1065      if (!open2 && mounted && transitionStatus !== "ending" && deferEndingState) {
1066        const frame = AnimationFrame.request(() => {
1067          setTransitionStatus("ending");
1068        });
1069        return () => {
1070          AnimationFrame.cancel(frame);
1071        };
1072      }
1073      return void 0;
1074    }, [open2, mounted, transitionStatus, deferEndingState]);
1075    useIsoLayoutEffect(() => {
1076      if (!open2 || enableIdleState || transitionStatus === void 0) {
1077        return void 0;
1078      }
1079      const frame = AnimationFrame.request(() => {
1080        setTransitionStatus(void 0);
1081      });
1082      return () => {
1083        AnimationFrame.cancel(frame);
1084      };
1085    }, [enableIdleState, open2, transitionStatus]);
1086    useIsoLayoutEffect(() => {
1087      if (!open2 || !enableIdleState) {
1088        return void 0;
1089      }
1090      if (open2 && mounted && transitionStatus !== "idle") {
1091        setTransitionStatus("starting");
1092      }
1093      const frame = AnimationFrame.request(() => {
1094        setTransitionStatus("idle");
1095      });
1096      return () => {
1097        AnimationFrame.cancel(frame);
1098      };
1099    }, [enableIdleState, open2, mounted, transitionStatus]);
1100    return {
1101      mounted,
1102      setMounted,
1103      transitionStatus
1104    };
1105  }
1106  
1107  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useTimeout.mjs
1108  var EMPTY2 = 0;
1109  var Timeout = class _Timeout {
1110    static create() {
1111      return new _Timeout();
1112    }
1113    currentId = EMPTY2;
1114    /**
1115     * Executes `fn` after `delay`, clearing any previously scheduled call.
1116     */
1117    start(delay, fn) {
1118      this.clear();
1119      this.currentId = setTimeout(() => {
1120        this.currentId = EMPTY2;
1121        fn();
1122      }, delay);
1123    }
1124    isStarted() {
1125      return this.currentId !== EMPTY2;
1126    }
1127    clear = () => {
1128      if (this.currentId !== EMPTY2) {
1129        clearTimeout(this.currentId);
1130        this.currentId = EMPTY2;
1131      }
1132    };
1133    disposeEffect = () => {
1134      return this.clear;
1135    };
1136  };
1137  function useTimeout() {
1138    const timeout = useRefWithInit(Timeout.create).current;
1139    useOnMount(timeout.disposeEffect);
1140    return timeout;
1141  }
1142  
1143  // node_modules/.store/clsx@2.1.1-XOLP1vUL9vEGfpiXm37fAw/node_modules/clsx/dist/clsx.mjs
1144  function r(e) {
1145    var t, f, n = "";
1146    if ("string" == typeof e || "number" == typeof e) n += e;
1147    else if ("object" == typeof e) if (Array.isArray(e)) {
1148      var o = e.length;
1149      for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
1150    } else for (f in e) e[f] && (n && (n += " "), n += f);
1151    return n;
1152  }
1153  function clsx() {
1154    for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
1155    return n;
1156  }
1157  var clsx_default = clsx;
1158  
1159  // packages/ui/build-module/icon/icon.mjs
1160  var import_element = __toESM(require_element(), 1);
1161  var import_primitives = __toESM(require_primitives(), 1);
1162  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
1163  var Icon = (0, import_element.forwardRef)(
1164    function UnforwardedIcon({ icon, size: size4 = 24, style, ...restProps }, ref) {
1165      const mergedStyle = icon.props.style || style ? { ...icon.props.style, ...style } : void 0;
1166      return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1167        import_primitives.SVG,
1168        {
1169          ref,
1170          ...icon.props,
1171          ...restProps,
1172          ...mergedStyle ? { style: mergedStyle } : {},
1173          width: size4,
1174          height: size4
1175        }
1176      );
1177    }
1178  );
1179  
1180  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useId.mjs
1181  var React11 = __toESM(require_react(), 1);
1182  
1183  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useForcedRerendering.mjs
1184  var React10 = __toESM(require_react(), 1);
1185  function useForcedRerendering() {
1186    const [, setState] = React10.useState({});
1187    return React10.useCallback(() => {
1188      setState({});
1189    }, []);
1190  }
1191  
1192  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useId.mjs
1193  var globalId = 0;
1194  function useGlobalId(idOverride, prefix = "mui") {
1195    const defaultId = React11.useRef(void 0);
1196    const forceRerender = useForcedRerendering();
1197    const id = idOverride ?? defaultId.current;
1198    React11.useEffect(() => {
1199      if (defaultId.current == null) {
1200        globalId += 1;
1201        defaultId.current = `$prefix}-$globalId}`;
1202        if (idOverride == null) {
1203          forceRerender();
1204        }
1205      }
1206    }, [idOverride, prefix, forceRerender]);
1207    return id;
1208  }
1209  var maybeReactUseId = SafeReact.useId;
1210  function useId(idOverride, prefix) {
1211    if (maybeReactUseId !== void 0) {
1212      const reactId = maybeReactUseId();
1213      return idOverride ?? (prefix ? `$prefix}-$reactId}` : reactId);
1214    }
1215    return useGlobalId(idOverride, prefix);
1216  }
1217  
1218  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useBaseUiId.mjs
1219  function useBaseUiId(idOverride) {
1220    return useId(idOverride, "base-ui");
1221  }
1222  
1223  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
1224  function createChangeEventDetails(reason, event, trigger, customProperties) {
1225    let canceled = false;
1226    let allowPropagation = false;
1227    const custom = customProperties ?? EMPTY_OBJECT;
1228    const details = {
1229      reason,
1230      event: event ?? new Event("base-ui"),
1231      cancel() {
1232        canceled = true;
1233      },
1234      allowPropagation() {
1235        allowPropagation = true;
1236      },
1237      get isCanceled() {
1238        return canceled;
1239      },
1240      get isPropagationAllowed() {
1241        return allowPropagation;
1242      },
1243      trigger,
1244      ...custom
1245    };
1246    return details;
1247  }
1248  
1249  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/reason-parts.mjs
1250  var reason_parts_exports = {};
1251  __export(reason_parts_exports, {
1252    cancelOpen: () => cancelOpen,
1253    chipRemovePress: () => chipRemovePress,
1254    clearPress: () => clearPress,
1255    closePress: () => closePress,
1256    closeWatcher: () => closeWatcher,
1257    decrementPress: () => decrementPress,
1258    disabled: () => disabled,
1259    drag: () => drag,
1260    escapeKey: () => escapeKey,
1261    focusOut: () => focusOut,
1262    imperativeAction: () => imperativeAction,
1263    incrementPress: () => incrementPress,
1264    initial: () => initial,
1265    inputBlur: () => inputBlur,
1266    inputChange: () => inputChange,
1267    inputClear: () => inputClear,
1268    inputPaste: () => inputPaste,
1269    inputPress: () => inputPress,
1270    itemPress: () => itemPress,
1271    keyboard: () => keyboard,
1272    linkPress: () => linkPress,
1273    listNavigation: () => listNavigation,
1274    missing: () => missing,
1275    none: () => none,
1276    outsidePress: () => outsidePress,
1277    pointer: () => pointer,
1278    popupClose: () => popupClose,
1279    scrub: () => scrub,
1280    siblingOpen: () => siblingOpen,
1281    swipe: () => swipe,
1282    trackPress: () => trackPress,
1283    triggerFocus: () => triggerFocus,
1284    triggerHover: () => triggerHover,
1285    triggerPress: () => triggerPress,
1286    wheel: () => wheel,
1287    windowResize: () => windowResize
1288  });
1289  var none = "none";
1290  var triggerPress = "trigger-press";
1291  var triggerHover = "trigger-hover";
1292  var triggerFocus = "trigger-focus";
1293  var outsidePress = "outside-press";
1294  var itemPress = "item-press";
1295  var closePress = "close-press";
1296  var linkPress = "link-press";
1297  var clearPress = "clear-press";
1298  var chipRemovePress = "chip-remove-press";
1299  var trackPress = "track-press";
1300  var incrementPress = "increment-press";
1301  var decrementPress = "decrement-press";
1302  var inputChange = "input-change";
1303  var inputClear = "input-clear";
1304  var inputBlur = "input-blur";
1305  var inputPaste = "input-paste";
1306  var inputPress = "input-press";
1307  var focusOut = "focus-out";
1308  var escapeKey = "escape-key";
1309  var closeWatcher = "close-watcher";
1310  var listNavigation = "list-navigation";
1311  var keyboard = "keyboard";
1312  var pointer = "pointer";
1313  var drag = "drag";
1314  var wheel = "wheel";
1315  var scrub = "scrub";
1316  var popupClose = "popup-close";
1317  var cancelOpen = "cancel-open";
1318  var siblingOpen = "sibling-open";
1319  var disabled = "disabled";
1320  var missing = "missing";
1321  var initial = "initial";
1322  var imperativeAction = "imperative-action";
1323  var swipe = "swipe";
1324  var windowResize = "window-resize";
1325  
1326  // node_modules/.store/@floating-ui/utils@0.2.12-gOxTzMf36nCrbeHpEew-rw/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1327  function hasWindow() {
1328    return typeof window !== "undefined";
1329  }
1330  function getNodeName(node) {
1331    if (isNode(node)) {
1332      return (node.nodeName || "").toLowerCase();
1333    }
1334    return "#document";
1335  }
1336  function getWindow(node) {
1337    var _node$ownerDocument;
1338    return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1339  }
1340  function getDocumentElement(node) {
1341    var _ref;
1342    return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1343  }
1344  function isNode(value) {
1345    if (!hasWindow()) {
1346      return false;
1347    }
1348    return value instanceof Node || value instanceof getWindow(value).Node;
1349  }
1350  function isElement(value) {
1351    if (!hasWindow()) {
1352      return false;
1353    }
1354    return value instanceof Element || value instanceof getWindow(value).Element;
1355  }
1356  function isHTMLElement(value) {
1357    if (!hasWindow()) {
1358      return false;
1359    }
1360    return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1361  }
1362  function isShadowRoot(value) {
1363    if (!hasWindow() || typeof ShadowRoot === "undefined") {
1364      return false;
1365    }
1366    return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1367  }
1368  function isOverflowElement(element) {
1369    const {
1370      overflow,
1371      overflowX,
1372      overflowY,
1373      display
1374    } = getComputedStyle2(element);
1375    return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
1376  }
1377  function isTableElement(element) {
1378    return /^(table|td|th)$/.test(getNodeName(element));
1379  }
1380  function isTopLayer(element) {
1381    try {
1382      if (element.matches(":popover-open")) {
1383        return true;
1384      }
1385    } catch (_e) {
1386    }
1387    try {
1388      return element.matches(":modal");
1389    } catch (_e) {
1390      return false;
1391    }
1392  }
1393  var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1394  var containRe = /paint|layout|strict|content/;
1395  var isNotNone = (value) => !!value && value !== "none";
1396  var isWebKitValue;
1397  function isContainingBlock(elementOrCss) {
1398    const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
1399    return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
1400  }
1401  function getContainingBlock(element) {
1402    let currentNode = getParentNode(element);
1403    while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1404      if (isContainingBlock(currentNode)) {
1405        return currentNode;
1406      } else if (isTopLayer(currentNode)) {
1407        return null;
1408      }
1409      currentNode = getParentNode(currentNode);
1410    }
1411    return null;
1412  }
1413  function isWebKit() {
1414    if (isWebKitValue == null) {
1415      isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
1416    }
1417    return isWebKitValue;
1418  }
1419  function isLastTraversableNode(node) {
1420    return /^(html|body|#document)$/.test(getNodeName(node));
1421  }
1422  function getComputedStyle2(element) {
1423    return getWindow(element).getComputedStyle(element);
1424  }
1425  function getNodeScroll(element) {
1426    if (isElement(element)) {
1427      return {
1428        scrollLeft: element.scrollLeft,
1429        scrollTop: element.scrollTop
1430      };
1431    }
1432    return {
1433      scrollLeft: element.scrollX,
1434      scrollTop: element.scrollY
1435    };
1436  }
1437  function getParentNode(node) {
1438    if (getNodeName(node) === "html") {
1439      return node;
1440    }
1441    const result = (
1442      // Step into the shadow DOM of the parent of a slotted node.
1443      node.assignedSlot || // DOM Element detected.
1444      node.parentNode || // ShadowRoot detected.
1445      isShadowRoot(node) && node.host || // Fallback.
1446      getDocumentElement(node)
1447    );
1448    return isShadowRoot(result) ? result.host : result;
1449  }
1450  function getNearestOverflowAncestor(node) {
1451    const parentNode = getParentNode(node);
1452    if (isLastTraversableNode(parentNode)) {
1453      return (node.ownerDocument || node).body;
1454    }
1455    if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1456      return parentNode;
1457    }
1458    return getNearestOverflowAncestor(parentNode);
1459  }
1460  function getOverflowAncestors(node, list, traverseIframes) {
1461    var _node$ownerDocument2;
1462    if (list === void 0) {
1463      list = [];
1464    }
1465    if (traverseIframes === void 0) {
1466      traverseIframes = true;
1467    }
1468    const scrollableAncestor = getNearestOverflowAncestor(node);
1469    const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1470    const win = getWindow(scrollableAncestor);
1471    if (isBody) {
1472      const frameElement = getFrameElement(win);
1473      return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1474    } else {
1475      return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1476    }
1477  }
1478  function getFrameElement(win) {
1479    return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1480  }
1481  
1482  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/owner.mjs
1483  function ownerDocument(node) {
1484    return node?.ownerDocument || document;
1485  }
1486  
1487  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/addEventListener.mjs
1488  function addEventListener(target, type, listener, options) {
1489    target.addEventListener(type, listener, options);
1490    return () => {
1491      target.removeEventListener(type, listener, options);
1492    };
1493  }
1494  
1495  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useValueAsRef.mjs
1496  function useValueAsRef(value) {
1497    const latest = useRefWithInit(createLatestRef, value).current;
1498    latest.next = value;
1499    useIsoLayoutEffect(latest.effect);
1500    return latest;
1501  }
1502  function createLatestRef(value) {
1503    const latest = {
1504      current: value,
1505      next: value,
1506      effect: () => {
1507        latest.current = latest.next;
1508      }
1509    };
1510    return latest;
1511  }
1512  
1513  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/parts.mjs
1514  var parts_exports = {};
1515  __export(parts_exports, {
1516    engine: () => engine_exports,
1517    env: () => env_exports,
1518    mediaQuery: () => media_query_exports,
1519    os: () => os_exports,
1520    screenReader: () => screen_reader_exports
1521  });
1522  
1523  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/os.mjs
1524  var os_exports = {};
1525  __export(os_exports, {
1526    android: () => android,
1527    apple: () => apple,
1528    ios: () => ios,
1529    linux: () => linux,
1530    mac: () => mac,
1531    windows: () => windows
1532  });
1533  
1534  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/shared.mjs
1535  function readRawData() {
1536    if (typeof navigator === "undefined") {
1537      return {
1538        userAgent: "",
1539        platform: "",
1540        maxTouchPoints: 0
1541      };
1542    }
1543    if (true) {
1544      const uaData = navigator.userAgentData;
1545      if (uaData && Array.isArray(uaData.brands)) {
1546        return {
1547          userAgent: uaData.brands.map(({
1548            brand,
1549            version: version2
1550          }) => `$brand}/$version2}`).join(" "),
1551          platform: uaData.platform ?? navigator.platform ?? "",
1552          maxTouchPoints: navigator.maxTouchPoints ?? 0
1553        };
1554      }
1555    }
1556    return {
1557      userAgent: navigator.userAgent,
1558      platform: navigator.platform ?? "",
1559      maxTouchPoints: navigator.maxTouchPoints ?? 0
1560    };
1561  }
1562  var {
1563    userAgent,
1564    platform,
1565    maxTouchPoints
1566  } = readRawData();
1567  var lowerUserAgent = userAgent.toLowerCase();
1568  var lowerPlatform = platform.toLowerCase();
1569  
1570  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/os.mjs
1571  var ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1;
1572  var ANDROID_STRING = "android";
1573  var android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
1574  var mac = !ios && lowerPlatform.startsWith("mac");
1575  var windows = lowerPlatform.startsWith("win");
1576  var linux = !android && /^(linux|chrome os)/.test(lowerPlatform);
1577  var apple = mac || ios;
1578  
1579  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/engine.mjs
1580  var engine_exports = {};
1581  __export(engine_exports, {
1582    blink: () => blink,
1583    gecko: () => gecko,
1584    webkit: () => webkit
1585  });
1586  var webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none");
1587  var gecko = !webkit && lowerUserAgent.includes("firefox");
1588  var blink = !webkit && lowerUserAgent.includes("chrom");
1589  
1590  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/screen-reader.mjs
1591  var screen_reader_exports = {};
1592  __export(screen_reader_exports, {
1593    voiceOver: () => voiceOver
1594  });
1595  var voiceOver = apple;
1596  
1597  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/env.mjs
1598  var env_exports = {};
1599  __export(env_exports, {
1600    jsdom: () => jsdom
1601  });
1602  var jsdom = /jsdom|happydom/.test(lowerUserAgent);
1603  
1604  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/media-query.mjs
1605  var media_query_exports = {};
1606  __export(media_query_exports, {
1607    iOS: () => iOS
1608  });
1609  var iOS = "@supports (-webkit-touch-callout: none)";
1610  
1611  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1612  var React12 = __toESM(require_react(), 1);
1613  
1614  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
1615  function isReactEvent(event) {
1616    return "nativeEvent" in event;
1617  }
1618  function isVirtualClick(event) {
1619    if (event.pointerType === "" && event.isTrusted) {
1620      return true;
1621    }
1622    if (parts_exports.os.android && event.pointerType) {
1623      return event.type === "click" && event.buttons === 1;
1624    }
1625    return event.detail === 0 && !event.pointerType;
1626  }
1627  function isMouseLikePointerType(pointerType, strict) {
1628    const values = ["mouse", "pen"];
1629    if (!strict) {
1630      values.push("", void 0);
1631    }
1632    return values.includes(pointerType);
1633  }
1634  function isClickLikeEvent(event) {
1635    const type = event.type;
1636    return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
1637  }
1638  
1639  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/shadowDom.mjs
1640  function activeElement(doc) {
1641    let element = doc.activeElement;
1642    while (element?.shadowRoot?.activeElement != null) {
1643      element = element.shadowRoot.activeElement;
1644    }
1645    return element;
1646  }
1647  function contains(parent, child) {
1648    if (!parent || !child) {
1649      return false;
1650    }
1651    const rootNode = child.getRootNode?.();
1652    if (parent.contains(child)) {
1653      return true;
1654    }
1655    if (rootNode && isShadowRoot(rootNode)) {
1656      let next = child;
1657      while (next) {
1658        if (parent === next) {
1659          return true;
1660        }
1661        next = next.parentNode || next.host;
1662      }
1663    }
1664    return false;
1665  }
1666  function closest(node, selector) {
1667    let current = node;
1668    while (current) {
1669      if (isElement(current) && current.matches(selector)) {
1670        return current;
1671      }
1672      current = current.assignedSlot ?? current.parentNode ?? (isShadowRoot(current) ? current.host : null);
1673    }
1674    return null;
1675  }
1676  function getTarget(event) {
1677    if ("composedPath" in event) {
1678      return event.composedPath()[0] ?? event.target;
1679    }
1680    return event.target;
1681  }
1682  
1683  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
1684  var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
1685  var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
1686  
1687  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs
1688  var open = "data-open";
1689  var closed = "data-closed";
1690  var anchorHidden = "data-anchor-hidden";
1691  
1692  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonTriggerDataAttributes.mjs
1693  var CommonTriggerDataAttributes_exports = {};
1694  __export(CommonTriggerDataAttributes_exports, {
1695    popupOpen: () => popupOpen,
1696    pressed: () => pressed
1697  });
1698  var popupOpen = "data-popup-open";
1699  var pressed = "data-pressed";
1700  
1701  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popupStateMapping.mjs
1702  var TRIGGER_HOOK = {
1703    [popupOpen]: ""
1704  };
1705  var PRESSABLE_TRIGGER_HOOK = {
1706    [popupOpen]: "",
1707    [pressed]: ""
1708  };
1709  var POPUP_OPEN_HOOK = {
1710    [open]: ""
1711  };
1712  var POPUP_CLOSED_HOOK = {
1713    [closed]: ""
1714  };
1715  var ANCHOR_HIDDEN_HOOK = {
1716    [anchorHidden]: ""
1717  };
1718  var triggerOpenStateMapping = {
1719    open(value) {
1720      if (value) {
1721        return TRIGGER_HOOK;
1722      }
1723      return null;
1724    }
1725  };
1726  var popupStateMapping = {
1727    open(value) {
1728      if (value) {
1729        return POPUP_OPEN_HOOK;
1730      }
1731      return POPUP_CLOSED_HOOK;
1732    },
1733    anchorHidden(value) {
1734      if (value) {
1735        return ANCHOR_HIDDEN_HOOK;
1736      }
1737      return null;
1738    }
1739  };
1740  var popupTransitionStateMapping = {
1741    ...popupStateMapping,
1742    ...transitionStatusMapping
1743  };
1744  
1745  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/trigger/TooltipTriggerDataAttributes.mjs
1746  var popupOpen2 = CommonTriggerDataAttributes_exports.popupOpen;
1747  var triggerDisabled = "data-trigger-disabled";
1748  
1749  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
1750  function isTargetInsideEnabledTrigger(target, triggerElements) {
1751    if (!isElement(target)) {
1752      return false;
1753    }
1754    const targetElement = target;
1755    if (triggerElements.hasElement(targetElement)) {
1756      return !targetElement.hasAttribute(triggerDisabled);
1757    }
1758    for (const [, trigger] of triggerElements.entries()) {
1759      if (contains(trigger, targetElement)) {
1760        return !trigger.hasAttribute(triggerDisabled);
1761      }
1762    }
1763    return false;
1764  }
1765  function isEventTargetWithin(event, node) {
1766    if (node == null) {
1767      return false;
1768    }
1769    if ("composedPath" in event) {
1770      return event.composedPath().includes(node);
1771    }
1772    const eventAgain = event;
1773    return eventAgain.target != null && node.contains(eventAgain.target);
1774  }
1775  function isRootElement(element) {
1776    return element.matches("html,body");
1777  }
1778  function isTypeableElement(element) {
1779    return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
1780  }
1781  function isInteractiveElement(element) {
1782    return closest(element, `button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),$TYPEABLE_SELECTOR}`) != null;
1783  }
1784  function matchesFocusVisible(element) {
1785    if (!element || parts_exports.env.jsdom) {
1786      return true;
1787    }
1788    try {
1789      return element.matches(":focus-visible");
1790    } catch (_e) {
1791      return true;
1792    }
1793  }
1794  
1795  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs
1796  function resolveValue(value, pointerType) {
1797    if (pointerType != null && !isMouseLikePointerType(pointerType)) {
1798      return 0;
1799    }
1800    if (typeof value === "function") {
1801      return value();
1802    }
1803    return value;
1804  }
1805  function getDelay(value, prop, pointerType) {
1806    const result = resolveValue(value, pointerType);
1807    if (typeof result === "number") {
1808      return result;
1809    }
1810    return result?.[prop];
1811  }
1812  function getRestMs(value) {
1813    if (typeof value === "function") {
1814      return value();
1815    }
1816    return value;
1817  }
1818  function isClickLikeOpenEvent(openEventType, interactedInside) {
1819    return interactedInside || openEventType === "click" || openEventType === "mousedown";
1820  }
1821  function isHoverOpenEvent(openEventType) {
1822    return openEventType?.includes("mouse") && openEventType !== "mousedown";
1823  }
1824  
1825  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1826  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
1827  var FloatingDelayGroupContext = /* @__PURE__ */ React12.createContext({
1828    hasProvider: false,
1829    timeoutMs: 0,
1830    delayRef: {
1831      current: 0
1832    },
1833    initialDelayRef: {
1834      current: 0
1835    },
1836    timeout: new Timeout(),
1837    currentIdRef: {
1838      current: null
1839    },
1840    currentContextRef: {
1841      current: null
1842    }
1843  });
1844  if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
1845  function resetDelayRef(delayRef, initialDelayRef) {
1846    delayRef.current = initialDelayRef.current;
1847  }
1848  function FloatingDelayGroup(props) {
1849    const {
1850      children,
1851      delay,
1852      timeoutMs = 0
1853    } = props;
1854    const delayRef = React12.useRef(delay);
1855    const initialDelayRef = React12.useRef(delay);
1856    const currentIdRef = React12.useRef(null);
1857    const currentContextRef = React12.useRef(null);
1858    const timeout = useTimeout();
1859    useIsoLayoutEffect(() => {
1860      initialDelayRef.current = delay;
1861      if (!currentIdRef.current) {
1862        delayRef.current = delay;
1863        return;
1864      }
1865      delayRef.current = {
1866        open: getDelay(delayRef.current, "open"),
1867        close: getDelay(delay, "close")
1868      };
1869    }, [delay, currentIdRef, delayRef, initialDelayRef]);
1870    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FloatingDelayGroupContext.Provider, {
1871      value: React12.useMemo(() => ({
1872        hasProvider: true,
1873        delayRef,
1874        initialDelayRef,
1875        currentIdRef,
1876        timeoutMs,
1877        currentContextRef,
1878        timeout
1879      }), [timeoutMs, timeout]),
1880      children
1881    });
1882  }
1883  function useDelayGroup(store, options = {
1884    open: false
1885  }) {
1886    const {
1887      open: open2
1888    } = options;
1889    const floatingId = store.useState("floatingId");
1890    const groupContext = React12.useContext(FloatingDelayGroupContext);
1891    const {
1892      currentIdRef,
1893      delayRef,
1894      timeoutMs,
1895      initialDelayRef,
1896      currentContextRef,
1897      hasProvider,
1898      timeout
1899    } = groupContext;
1900    const [isInstantPhase, setIsInstantPhase] = React12.useState(false);
1901    const openRef = React12.useRef(open2);
1902    useIsoLayoutEffect(() => {
1903      openRef.current = open2;
1904    }, [open2]);
1905    useIsoLayoutEffect(() => {
1906      function unset() {
1907        currentContextRef.current?.setIsInstantPhase(false);
1908        currentIdRef.current = null;
1909        currentContextRef.current = null;
1910        delayRef.current = initialDelayRef.current;
1911        timeout.clear();
1912      }
1913      if (!currentIdRef.current) {
1914        return void 0;
1915      }
1916      if (!open2 && currentIdRef.current === floatingId) {
1917        setIsInstantPhase(false);
1918        if (timeoutMs) {
1919          const closingId = floatingId;
1920          timeout.start(timeoutMs, () => {
1921            if (store.select("open") || currentIdRef.current && currentIdRef.current !== closingId) {
1922              return;
1923            }
1924            unset();
1925          });
1926          return () => {
1927            if (openRef.current || currentIdRef.current !== closingId) {
1928              timeout.clear();
1929            }
1930          };
1931        }
1932        unset();
1933      }
1934      return void 0;
1935    }, [open2, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store]);
1936    useIsoLayoutEffect(() => {
1937      if (!open2) {
1938        return;
1939      }
1940      const prevContext = currentContextRef.current;
1941      const prevId = currentIdRef.current;
1942      timeout.clear();
1943      currentContextRef.current = {
1944        onOpenChange: store.setOpen,
1945        setIsInstantPhase
1946      };
1947      currentIdRef.current = floatingId;
1948      delayRef.current = {
1949        open: 0,
1950        close: getDelay(initialDelayRef.current, "close")
1951      };
1952      if (prevId !== null && prevId !== floatingId) {
1953        setIsInstantPhase(true);
1954        prevContext?.setIsInstantPhase(true);
1955        prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none));
1956      } else {
1957        setIsInstantPhase(false);
1958        prevContext?.setIsInstantPhase(false);
1959      }
1960    }, [open2, floatingId, store, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]);
1961    useIsoLayoutEffect(() => {
1962      return () => {
1963        if (currentIdRef.current === floatingId) {
1964          currentContextRef.current = null;
1965          if (!openRef.current) {
1966            return;
1967          }
1968          currentIdRef.current = null;
1969          resetDelayRef(delayRef, initialDelayRef);
1970          timeout.clear();
1971        }
1972      };
1973    }, [currentContextRef, currentIdRef, delayRef, floatingId, initialDelayRef, timeout]);
1974    return React12.useMemo(() => ({
1975      activeIdRef: currentIdRef,
1976      hasProvider,
1977      delayRef,
1978      isInstantPhase
1979    }), [currentIdRef, hasProvider, delayRef, isInstantPhase]);
1980  }
1981  
1982  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/mergeCleanups.mjs
1983  function mergeCleanups(...cleanups) {
1984    return () => {
1985      for (let i = 0; i < cleanups.length; i += 1) {
1986        const cleanup = cleanups[i];
1987        if (cleanup) {
1988          cleanup();
1989        }
1990      }
1991    };
1992  }
1993  
1994  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/FocusGuard.mjs
1995  var React13 = __toESM(require_react(), 1);
1996  
1997  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/visuallyHidden.mjs
1998  var visuallyHiddenBase = {
1999    clipPath: "inset(50%)",
2000    overflow: "hidden",
2001    whiteSpace: "nowrap",
2002    border: 0,
2003    padding: 0,
2004    width: 1,
2005    height: 1,
2006    margin: -1
2007  };
2008  var visuallyHidden = {
2009    ...visuallyHiddenBase,
2010    position: "fixed",
2011    margin: 0,
2012    top: 0,
2013    left: 0
2014  };
2015  var visuallyHiddenInput = {
2016    ...visuallyHiddenBase,
2017    position: "absolute"
2018  };
2019  
2020  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/FocusGuard.mjs
2021  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
2022  var FocusGuard = /* @__PURE__ */ React13.forwardRef(function FocusGuard2(props, ref) {
2023    const [role, setRole] = React13.useState();
2024    useIsoLayoutEffect(() => {
2025      if (parts_exports.screenReader.voiceOver && parts_exports.engine.webkit) {
2026        setRole("button");
2027      }
2028    }, []);
2029    const restProps = {
2030      tabIndex: 0,
2031      // Role is only for VoiceOver
2032      role
2033    };
2034    return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {
2035      ...props,
2036      ref,
2037      style: visuallyHidden,
2038      "aria-hidden": role ? void 0 : true,
2039      ...restProps,
2040      "data-base-ui-focus-guard": ""
2041    });
2042  });
2043  if (true) FocusGuard.displayName = "FocusGuard";
2044  
2045  // node_modules/.store/@floating-ui/utils@0.2.12-gOxTzMf36nCrbeHpEew-rw/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
2046  var min = Math.min;
2047  var max = Math.max;
2048  var round = Math.round;
2049  var floor = Math.floor;
2050  var createCoords = (v) => ({
2051    x: v,
2052    y: v
2053  });
2054  var oppositeSideMap = {
2055    left: "right",
2056    right: "left",
2057    bottom: "top",
2058    top: "bottom"
2059  };
2060  function clamp(start, value, end) {
2061    return max(start, min(value, end));
2062  }
2063  function evaluate(value, param) {
2064    return typeof value === "function" ? value(param) : value;
2065  }
2066  function getSide(placement) {
2067    return placement.split("-")[0];
2068  }
2069  function getAlignment(placement) {
2070    return placement.split("-")[1];
2071  }
2072  function getOppositeAxis(axis) {
2073    return axis === "x" ? "y" : "x";
2074  }
2075  function getAxisLength(axis) {
2076    return axis === "y" ? "height" : "width";
2077  }
2078  function getSideAxis(placement) {
2079    const firstChar = placement[0];
2080    return firstChar === "t" || firstChar === "b" ? "y" : "x";
2081  }
2082  function getAlignmentAxis(placement) {
2083    return getOppositeAxis(getSideAxis(placement));
2084  }
2085  function getAlignmentSides(placement, rects, rtl) {
2086    if (rtl === void 0) {
2087      rtl = false;
2088    }
2089    const alignment = getAlignment(placement);
2090    const alignmentAxis = getAlignmentAxis(placement);
2091    const length = getAxisLength(alignmentAxis);
2092    let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
2093    if (rects.reference[length] > rects.floating[length]) {
2094      mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
2095    }
2096    return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
2097  }
2098  function getExpandedPlacements(placement) {
2099    const oppositePlacement = getOppositePlacement(placement);
2100    return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
2101  }
2102  function getOppositeAlignmentPlacement(placement) {
2103    return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
2104  }
2105  var lrPlacement = ["left", "right"];
2106  var rlPlacement = ["right", "left"];
2107  var tbPlacement = ["top", "bottom"];
2108  var btPlacement = ["bottom", "top"];
2109  function getSideList(side, isStart, rtl) {
2110    switch (side) {
2111      case "top":
2112      case "bottom":
2113        if (rtl) return isStart ? rlPlacement : lrPlacement;
2114        return isStart ? lrPlacement : rlPlacement;
2115      case "left":
2116      case "right":
2117        return isStart ? tbPlacement : btPlacement;
2118      default:
2119        return [];
2120    }
2121  }
2122  function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
2123    const alignment = getAlignment(placement);
2124    let list = getSideList(getSide(placement), direction === "start", rtl);
2125    if (alignment) {
2126      list = list.map((side) => side + "-" + alignment);
2127      if (flipAlignment) {
2128        list = list.concat(list.map(getOppositeAlignmentPlacement));
2129      }
2130    }
2131    return list;
2132  }
2133  function getOppositePlacement(placement) {
2134    const side = getSide(placement);
2135    return oppositeSideMap[side] + placement.slice(side.length);
2136  }
2137  function expandPaddingObject(padding) {
2138    var _padding$top, _padding$right, _padding$bottom, _padding$left;
2139    return {
2140      top: (_padding$top = padding.top) != null ? _padding$top : 0,
2141      right: (_padding$right = padding.right) != null ? _padding$right : 0,
2142      bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
2143      left: (_padding$left = padding.left) != null ? _padding$left : 0
2144    };
2145  }
2146  function getPaddingObject(padding) {
2147    return typeof padding !== "number" ? expandPaddingObject(padding) : {
2148      top: padding,
2149      right: padding,
2150      bottom: padding,
2151      left: padding
2152    };
2153  }
2154  function rectToClientRect(rect) {
2155    const {
2156      x,
2157      y,
2158      width,
2159      height
2160    } = rect;
2161    return {
2162      width,
2163      height,
2164      top: y,
2165      left: x,
2166      right: x + width,
2167      bottom: y + height,
2168      x,
2169      y
2170    };
2171  }
2172  
2173  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
2174  function isHiddenByStyles(styles) {
2175    return styles.visibility === "hidden" || styles.visibility === "collapse";
2176  }
2177  function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) {
2178    if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
2179      return false;
2180    }
2181    if (typeof element.checkVisibility === "function") {
2182      return element.checkVisibility();
2183    }
2184    return styles.display !== "none" && styles.display !== "contents";
2185  }
2186  
2187  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs
2188  var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
2189  function getParentElement(element) {
2190    const assignedSlot = element.assignedSlot;
2191    if (assignedSlot) {
2192      return assignedSlot;
2193    }
2194    if (element.parentElement) {
2195      return element.parentElement;
2196    }
2197    const rootNode = element.getRootNode();
2198    return isShadowRoot(rootNode) ? rootNode.host : null;
2199  }
2200  function getDetailsSummary(details) {
2201    for (const child of Array.from(details.children)) {
2202      if (getNodeName(child) === "summary") {
2203        return child;
2204      }
2205    }
2206    return null;
2207  }
2208  function isWithinOpenDetailsSummary(element, details) {
2209    const summary = getDetailsSummary(details);
2210    return !!summary && (element === summary || contains(summary, element));
2211  }
2212  function isFocusableCandidate(element) {
2213    const nodeName = element ? getNodeName(element) : "";
2214    return element != null && element.matches(CANDIDATE_SELECTOR) && (nodeName !== "summary" || element.parentElement != null && getNodeName(element.parentElement) === "details" && getDetailsSummary(element.parentElement) === element) && (nodeName !== "details" || getDetailsSummary(element) == null) && (nodeName !== "input" || element.type !== "hidden");
2215  }
2216  function isFocusableElement(element) {
2217    if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) {
2218      return false;
2219    }
2220    for (let current = element; current; current = getParentElement(current)) {
2221      const isAncestor = current !== element;
2222      const isSlot = getNodeName(current) === "slot";
2223      if (current.hasAttribute("inert")) {
2224        return false;
2225      }
2226      if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {
2227        return false;
2228      }
2229    }
2230    return true;
2231  }
2232  function isVisibleInTabbableTree(element, isAncestor) {
2233    const styles = getComputedStyle2(element);
2234    if (!isAncestor) {
2235      return isElementVisible(element, styles);
2236    }
2237    return styles.display !== "none";
2238  }
2239  function getTabIndex(element) {
2240    const tabIndex = element.tabIndex;
2241    if (tabIndex < 0) {
2242      const nodeName = getNodeName(element);
2243      if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) {
2244        return 0;
2245      }
2246    }
2247    return tabIndex;
2248  }
2249  function getNamedRadioInput(element) {
2250    if (getNodeName(element) !== "input") {
2251      return null;
2252    }
2253    const input = element;
2254    return input.type === "radio" && input.name !== "" ? input : null;
2255  }
2256  function isTabbableRadio(element, candidates) {
2257    const input = getNamedRadioInput(element);
2258    if (!input) {
2259      return true;
2260    }
2261    const checkedRadio = candidates.find((candidate) => {
2262      const radio = getNamedRadioInput(candidate);
2263      return radio?.name === input.name && radio.form === input.form && radio.checked;
2264    });
2265    if (checkedRadio) {
2266      return checkedRadio === input;
2267    }
2268    return candidates.find((candidate) => {
2269      const radio = getNamedRadioInput(candidate);
2270      return radio?.name === input.name && radio.form === input.form;
2271    }) === input;
2272  }
2273  function getComposedChildren(container) {
2274    if (isHTMLElement(container) && getNodeName(container) === "slot") {
2275      const assignedElements = container.assignedElements({
2276        flatten: true
2277      });
2278      if (assignedElements.length > 0) {
2279        return assignedElements;
2280      }
2281    }
2282    if (isHTMLElement(container) && container.shadowRoot) {
2283      return Array.from(container.shadowRoot.children);
2284    }
2285    return Array.from(container.children);
2286  }
2287  function appendCandidates(container, list) {
2288    getComposedChildren(container).forEach((child) => {
2289      if (isFocusableCandidate(child)) {
2290        list.push(child);
2291      }
2292      appendCandidates(child, list);
2293    });
2294  }
2295  function appendMatchingElements(container, selector, list) {
2296    getComposedChildren(container).forEach((child) => {
2297      if (isHTMLElement(child) && child.matches(selector)) {
2298        list.push(child);
2299      }
2300      appendMatchingElements(child, selector, list);
2301    });
2302  }
2303  function focusable(container) {
2304    const candidates = [];
2305    appendCandidates(container, candidates);
2306    return candidates.filter(isFocusableElement);
2307  }
2308  function tabbable(container) {
2309    const candidates = focusable(container);
2310    return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
2311  }
2312  function getTabbableIn(container, dir) {
2313    const list = tabbable(container);
2314    const len = list.length;
2315    if (len === 0) {
2316      return void 0;
2317    }
2318    const active = activeElement(ownerDocument(container));
2319    const index2 = list.indexOf(active);
2320    const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir;
2321    return list[nextIndex];
2322  }
2323  function getNextTabbable(referenceElement) {
2324    return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
2325  }
2326  function getPreviousTabbable(referenceElement) {
2327    return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
2328  }
2329  function isOutsideEvent(event, container) {
2330    const containerElement = container || event.currentTarget;
2331    const relatedTarget = event.relatedTarget;
2332    return !relatedTarget || !contains(containerElement, relatedTarget);
2333  }
2334  function disableFocusInside(container) {
2335    const tabbableElements = tabbable(container);
2336    tabbableElements.forEach((element) => {
2337      element.dataset.tabindex = element.getAttribute("tabindex") || "";
2338      element.setAttribute("tabindex", "-1");
2339    });
2340  }
2341  function enableFocusInside(container) {
2342    const elements = [];
2343    appendMatchingElements(container, "[data-tabindex]", elements);
2344    elements.forEach((element) => {
2345      const tabindex = element.dataset.tabindex;
2346      delete element.dataset.tabindex;
2347      if (tabindex) {
2348        element.setAttribute("tabindex", tabindex);
2349      } else {
2350        element.removeAttribute("tabindex");
2351      }
2352    });
2353  }
2354  
2355  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs
2356  function getNodeChildren(nodes, id, onlyOpenChildren = true) {
2357    const directChildren = nodes.filter((node) => node.parentId === id);
2358    return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
2359  }
2360  
2361  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs
2362  function createAttribute(name) {
2363    return `data-base-ui-$name}`;
2364  }
2365  
2366  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2367  var React14 = __toESM(require_react(), 1);
2368  var ReactDOM2 = __toESM(require_react_dom(), 1);
2369  
2370  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/constants.mjs
2371  var DISABLED_TRANSITIONS_STYLE = {
2372    style: {
2373      transition: "none"
2374    }
2375  };
2376  var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
2377  var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
2378  var BASE_UI_SWIPE_IGNORE_SELECTOR = `[$BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
2379  var LEGACY_SWIPE_IGNORE_SELECTOR = `[$LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
2380  var POPUP_COLLISION_AVOIDANCE = {
2381    fallbackAxisSide: "end"
2382  };
2383  var ownerVisuallyHidden = {
2384    clipPath: "inset(50%)",
2385    position: "fixed",
2386    top: 0,
2387    left: 0
2388  };
2389  
2390  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2391  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
2392  var PortalContext = /* @__PURE__ */ React14.createContext(null);
2393  if (true) PortalContext.displayName = "PortalContext";
2394  var usePortalContext = () => React14.useContext(PortalContext);
2395  var attr = createAttribute("portal");
2396  function useFloatingPortalNode(props = {}) {
2397    const {
2398      ref,
2399      container: containerProp,
2400      componentProps = EMPTY_OBJECT,
2401      elementProps
2402    } = props;
2403    const uniqueId = useId();
2404    const portalContext = usePortalContext();
2405    const parentPortalNode = portalContext?.portalNode;
2406    const [containerElement, setContainerElement] = React14.useState(null);
2407    const [portalNode, setPortalNode] = React14.useState(null);
2408    const setPortalNodeRef = useStableCallback((node) => {
2409      if (node !== null) {
2410        setPortalNode(node);
2411      }
2412    });
2413    const containerRef = React14.useRef(null);
2414    useIsoLayoutEffect(() => {
2415      if (containerProp === null) {
2416        if (containerRef.current) {
2417          containerRef.current = null;
2418          setPortalNode(null);
2419          setContainerElement(null);
2420        }
2421        return;
2422      }
2423      const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
2424      if (resolvedContainer == null) {
2425        if (containerRef.current) {
2426          containerRef.current = null;
2427          setPortalNode(null);
2428          setContainerElement(null);
2429        }
2430        return;
2431      }
2432      if (containerRef.current !== resolvedContainer) {
2433        containerRef.current = resolvedContainer;
2434        setPortalNode(null);
2435        setContainerElement(resolvedContainer);
2436      }
2437    }, [containerProp, parentPortalNode]);
2438    const portalElement = useRenderElement("div", componentProps, {
2439      ref: [ref, setPortalNodeRef],
2440      props: [{
2441        id: uniqueId,
2442        [attr]: ""
2443      }, elementProps]
2444    });
2445    const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null;
2446    return {
2447      node: portalNode,
2448      // `id` and `render` props can override or remove the generated ID. Use the exact
2449      // rendered value so `aria-owns` never points at an ID absent from the DOM.
2450      nodeId: /* @__PURE__ */ React14.isValidElement(portalElement) ? portalElement.props.id : void 0,
2451      subtree: portalSubtree
2452    };
2453  }
2454  var FloatingPortal = /* @__PURE__ */ React14.forwardRef(function FloatingPortal2(componentProps, forwardedRef) {
2455    const {
2456      render,
2457      className,
2458      style,
2459      children,
2460      container,
2461      portalOwnerRole,
2462      ...elementProps
2463    } = componentProps;
2464    const {
2465      node: portalNode,
2466      nodeId: portalNodeId,
2467      subtree: portalSubtree
2468    } = useFloatingPortalNode({
2469      container,
2470      ref: forwardedRef,
2471      componentProps,
2472      elementProps
2473    });
2474    const beforeOutsideRef = React14.useRef(null);
2475    const afterOutsideRef = React14.useRef(null);
2476    const beforeInsideRef = React14.useRef(null);
2477    const afterInsideRef = React14.useRef(null);
2478    const [focusManagerState, setFocusManagerState] = React14.useState(null);
2479    const focusInsideDisabledRef = React14.useRef(false);
2480    const modal = focusManagerState?.modal;
2481    const open2 = focusManagerState?.open;
2482    const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;
2483    React14.useEffect(() => {
2484      if (!portalNode || modal) {
2485        return void 0;
2486      }
2487      function onFocus(event) {
2488        if (portalNode && event.relatedTarget && isOutsideEvent(event)) {
2489          if (event.type === "focusin") {
2490            if (focusInsideDisabledRef.current) {
2491              enableFocusInside(portalNode);
2492              focusInsideDisabledRef.current = false;
2493            }
2494          } else {
2495            disableFocusInside(portalNode);
2496            focusInsideDisabledRef.current = true;
2497          }
2498        }
2499      }
2500      return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true));
2501    }, [portalNode, modal]);
2502    useIsoLayoutEffect(() => {
2503      if (!portalNode || open2 !== true || !focusInsideDisabledRef.current) {
2504        return;
2505      }
2506      enableFocusInside(portalNode);
2507      focusInsideDisabledRef.current = false;
2508    }, [open2, portalNode]);
2509    const portalContextValue = React14.useMemo(() => ({
2510      beforeOutsideRef,
2511      afterOutsideRef,
2512      beforeInsideRef,
2513      afterInsideRef,
2514      portalNode,
2515      setFocusManagerState
2516    }), [portalNode]);
2517    return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(React14.Fragment, {
2518      children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(PortalContext.Provider, {
2519        value: portalContextValue,
2520        children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FocusGuard, {
2521          "data-type": "outside",
2522          ref: beforeOutsideRef,
2523          onFocus: (event) => {
2524            if (isOutsideEvent(event, portalNode)) {
2525              beforeInsideRef.current?.focus();
2526            } else {
2527              const domReference = focusManagerState ? focusManagerState.domReference : null;
2528              const prevTabbable = getPreviousTabbable(domReference);
2529              prevTabbable?.focus();
2530            }
2531          }
2532        }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", {
2533          role: portalOwnerRole,
2534          "aria-owns": portalNodeId,
2535          style: ownerVisuallyHidden
2536        }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FocusGuard, {
2537          "data-type": "outside",
2538          ref: afterOutsideRef,
2539          onFocus: (event) => {
2540            if (isOutsideEvent(event, portalNode)) {
2541              afterInsideRef.current?.focus();
2542            } else {
2543              const domReference = focusManagerState ? focusManagerState.domReference : null;
2544              const nextTabbable = getNextTabbable(domReference);
2545              nextTabbable?.focus();
2546              if (focusManagerState?.closeOnFocusOut) {
2547                focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent));
2548              }
2549            }
2550          }
2551        })]
2552      })]
2553    });
2554  });
2555  if (true) FloatingPortal.displayName = "FloatingPortal";
2556  
2557  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2558  var React15 = __toESM(require_react(), 1);
2559  
2560  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs
2561  function createEventEmitter() {
2562    const map = /* @__PURE__ */ new Map();
2563    return {
2564      emit(event, data) {
2565        map.get(event)?.forEach((listener) => listener(data));
2566      },
2567      on(event, listener) {
2568        if (!map.has(event)) {
2569          map.set(event, /* @__PURE__ */ new Set());
2570        }
2571        map.get(event).add(listener);
2572      },
2573      off(event, listener) {
2574        map.get(event)?.delete(listener);
2575      }
2576    };
2577  }
2578  
2579  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2580  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
2581  var FloatingNodeContext = /* @__PURE__ */ React15.createContext(null);
2582  if (true) FloatingNodeContext.displayName = "FloatingNodeContext";
2583  var FloatingTreeContext = /* @__PURE__ */ React15.createContext(null);
2584  if (true) FloatingTreeContext.displayName = "FloatingTreeContext";
2585  var useFloatingParentNodeId = () => React15.useContext(FloatingNodeContext)?.id || null;
2586  var useFloatingTree = (externalTree) => {
2587    const contextTree = React15.useContext(FloatingTreeContext);
2588    return externalTree ?? contextTree;
2589  };
2590  
2591  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useClientPoint.mjs
2592  var React16 = __toESM(require_react(), 1);
2593  function createVirtualElement(domElement, data) {
2594    let offsetX = null;
2595    let offsetY = null;
2596    let isAutoUpdateEvent = false;
2597    return {
2598      contextElement: domElement || void 0,
2599      getBoundingClientRect() {
2600        const domRect = domElement?.getBoundingClientRect() || {
2601          width: 0,
2602          height: 0,
2603          x: 0,
2604          y: 0
2605        };
2606        const isXAxis = data.axis === "x" || data.axis === "both";
2607        const isYAxis = data.axis === "y" || data.axis === "both";
2608        const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch";
2609        const width = data.axis === "y" ? domRect.width : 0;
2610        const height = data.axis === "x" ? domRect.height : 0;
2611        let x = domRect.x;
2612        let y = domRect.y;
2613        if (offsetX == null && data.x && isXAxis) {
2614          offsetX = domRect.x - data.x;
2615        }
2616        if (offsetY == null && data.y && isYAxis) {
2617          offsetY = domRect.y - data.y;
2618        }
2619        x -= offsetX || 0;
2620        y -= offsetY || 0;
2621        if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {
2622          x = isXAxis && data.x != null ? data.x : x;
2623          y = isYAxis && data.y != null ? data.y : y;
2624        }
2625        isAutoUpdateEvent = true;
2626        return {
2627          width,
2628          height,
2629          x,
2630          y,
2631          top: y,
2632          right: x + width,
2633          bottom: y + height,
2634          left: x
2635        };
2636      }
2637    };
2638  }
2639  function isMouseBasedEvent(event) {
2640    return event != null && event.clientX != null;
2641  }
2642  function useClientPoint(store, props = {}) {
2643    const {
2644      enabled = true,
2645      axis = "both"
2646    } = props;
2647    const open2 = store.useState("open");
2648    const floating = store.useState("floatingElement");
2649    const domReference = store.useState("domReferenceElement");
2650    const dataRef = store.context.dataRef;
2651    const initialRef = React16.useRef(false);
2652    const cleanupListenerRef = React16.useRef(null);
2653    const [pointerType, setPointerType] = React16.useState();
2654    const [reactive, setReactive] = React16.useState([]);
2655    const resetReference = useStableCallback((reference2) => {
2656      store.set("positionReference", reference2);
2657    });
2658    const setReference = useStableCallback((newX, newY, referenceElement) => {
2659      if (initialRef.current) {
2660        return;
2661      }
2662      if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {
2663        return;
2664      }
2665      store.set("positionReference", createVirtualElement(referenceElement ?? domReference, {
2666        x: newX,
2667        y: newY,
2668        axis,
2669        dataRef,
2670        pointerType
2671      }));
2672    });
2673    const handleReferenceEnterOrMove = useStableCallback((event) => {
2674      if (!open2) {
2675        setReference(event.clientX, event.clientY, event.currentTarget);
2676      } else if (!cleanupListenerRef.current) {
2677        setReference(event.clientX, event.clientY, event.currentTarget);
2678        setReactive([]);
2679      }
2680    });
2681    const openCheck = isMouseLikePointerType(pointerType) ? floating : open2;
2682    React16.useEffect(() => {
2683      if (!enabled) {
2684        resetReference(domReference);
2685        return void 0;
2686      }
2687      if (!openCheck) {
2688        return void 0;
2689      }
2690      function cleanupListener() {
2691        cleanupListenerRef.current?.();
2692        cleanupListenerRef.current = null;
2693      }
2694      const win = getWindow(floating);
2695      function handleMouseMove(event) {
2696        const target = getTarget(event);
2697        if (!contains(floating, target)) {
2698          setReference(event.clientX, event.clientY);
2699        } else {
2700          cleanupListener();
2701        }
2702      }
2703      if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {
2704        cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove);
2705      } else {
2706        resetReference(domReference);
2707      }
2708      return cleanupListener;
2709    }, [openCheck, enabled, floating, dataRef, domReference, store, setReference, resetReference, reactive]);
2710    React16.useEffect(() => () => {
2711      store.set("positionReference", null);
2712    }, [store]);
2713    React16.useEffect(() => {
2714      if (enabled && !floating) {
2715        initialRef.current = false;
2716      }
2717    }, [enabled, floating]);
2718    React16.useEffect(() => {
2719      if (!enabled && open2) {
2720        initialRef.current = true;
2721      }
2722    }, [enabled, open2]);
2723    const reference = React16.useMemo(() => {
2724      function setPointerTypeRef(event) {
2725        setPointerType(event.pointerType);
2726      }
2727      return {
2728        onPointerDown: setPointerTypeRef,
2729        onPointerEnter: setPointerTypeRef,
2730        onMouseMove: handleReferenceEnterOrMove,
2731        onMouseEnter: handleReferenceEnterOrMove
2732      };
2733    }, [handleReferenceEnterOrMove]);
2734    return React16.useMemo(() => enabled ? {
2735      reference,
2736      trigger: reference
2737    } : {}, [enabled, reference]);
2738  }
2739  
2740  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs
2741  var React17 = __toESM(require_react(), 1);
2742  function alwaysFalse() {
2743    return false;
2744  }
2745  function normalizeProp(normalizable) {
2746    return {
2747      escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false,
2748      outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true
2749    };
2750  }
2751  function useDismiss(store, props = {}) {
2752    const {
2753      enabled = true,
2754      escapeKey: escapeKey2 = true,
2755      outsidePress: outsidePressProp = true,
2756      outsidePressEvent = "sloppy",
2757      referencePress = alwaysFalse,
2758      bubbles,
2759      externalTree
2760    } = props;
2761    const open2 = store.useState("open");
2762    const floatingElement = store.useState("floatingElement");
2763    const {
2764      dataRef,
2765      events
2766    } = store.context;
2767    const tree = useFloatingTree(externalTree);
2768    const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false);
2769    const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp;
2770    const outsidePressEnabled = outsidePress2 !== false;
2771    const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);
2772    const {
2773      escapeKey: escapeKeyBubbles,
2774      outsidePress: outsidePressBubbles
2775    } = normalizeProp(bubbles);
2776    const pressStartedInsideRef = React17.useRef(false);
2777    const pressStartPreventedRef = React17.useRef(false);
2778    const suppressNextOutsideClickRef = React17.useRef(false);
2779    const sawPressWhileOpenRef = React17.useRef(false);
2780    const isComposingRef = React17.useRef(false);
2781    const currentPointerTypeRef = React17.useRef("");
2782    const touchStateRef = React17.useRef(null);
2783    const cancelDismissOnEndTimeout = useTimeout();
2784    const clearInsideReactTreeTimeout = useTimeout();
2785    const compositionTimeout = useTimeout();
2786    const clearInsideReactTree = useStableCallback(() => {
2787      clearInsideReactTreeTimeout.clear();
2788      dataRef.current.insideReactTree = false;
2789    });
2790    const hasBlockingChild = useStableCallback((bubbleKey) => {
2791      const nodeId = dataRef.current.floatingContext?.nodeId;
2792      const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];
2793      return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]);
2794    });
2795    const isEventWithinOwnElements = useStableCallback((event) => {
2796      return isEventTargetWithin(event, store.select("floatingElement")) || isEventTargetWithin(event, store.select("domReferenceElement"));
2797    });
2798    const closeOnReferencePress = useStableCallback((event) => {
2799      if (!referencePress()) {
2800        return;
2801      }
2802      store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent));
2803    });
2804    const closeOnEscapeKeyDown = useStableCallback((event) => {
2805      if (!open2 || !enabled || !escapeKey2 || event.key !== "Escape") {
2806        return;
2807      }
2808      const native = isReactEvent(event) ? event.nativeEvent : event;
2809      if (isComposingRef.current || native.isComposing) {
2810        return;
2811      }
2812      if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) {
2813        return;
2814      }
2815      const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native);
2816      store.setOpen(false, eventDetails);
2817      if (!eventDetails.isCanceled) {
2818        event.preventDefault();
2819      }
2820      if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {
2821        event.stopPropagation();
2822      }
2823    });
2824    const markInsideReactTree = useStableCallback(() => {
2825      dataRef.current.insideReactTree = true;
2826      clearInsideReactTreeTimeout.start(0, clearInsideReactTree);
2827    });
2828    const markPressStartedInsideReactTree = useStableCallback((event) => {
2829      if (!open2 || !enabled || event.button !== 0) {
2830        return;
2831      }
2832      const target = getTarget(event.nativeEvent);
2833      if (!contains(store.select("floatingElement"), target)) {
2834        return;
2835      }
2836      if (!pressStartedInsideRef.current) {
2837        pressStartedInsideRef.current = true;
2838        pressStartPreventedRef.current = false;
2839      }
2840    });
2841    const markInsidePressStartPrevented = useStableCallback((event) => {
2842      if (!open2 || !enabled) {
2843        return;
2844      }
2845      if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {
2846        return;
2847      }
2848      if (pressStartedInsideRef.current) {
2849        pressStartPreventedRef.current = true;
2850      }
2851    });
2852    React17.useEffect(() => {
2853      function handleOpenChange(details) {
2854        if (!details.open) {
2855          sawPressWhileOpenRef.current = false;
2856        }
2857      }
2858      events.on("openchange", handleOpenChange);
2859      return () => {
2860        events.off("openchange", handleOpenChange);
2861      };
2862    }, [events]);
2863    React17.useEffect(() => clearInsideReactTree, [clearInsideReactTree]);
2864    React17.useEffect(() => {
2865      if (!open2 || !enabled) {
2866        if (!open2) {
2867          sawPressWhileOpenRef.current = false;
2868          isComposingRef.current = false;
2869          currentPointerTypeRef.current = "";
2870          touchStateRef.current = null;
2871        }
2872        return clearInsideReactTree;
2873      }
2874      dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;
2875      dataRef.current.__outsidePressBubbles = outsidePressBubbles;
2876      const preventedPressSuppressionTimeout = new Timeout();
2877      const doc = ownerDocument(floatingElement);
2878      function handleCompositionStart() {
2879        compositionTimeout.clear();
2880        isComposingRef.current = true;
2881      }
2882      function handleCompositionEnd() {
2883        isComposingRef.current = true;
2884        compositionTimeout.start(
2885          // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
2886          // Only apply to WebKit for the test to remain 0ms.
2887          parts_exports.engine.webkit ? 5 : 0,
2888          () => {
2889            isComposingRef.current = false;
2890          }
2891        );
2892      }
2893      function suppressImmediateOutsideClickAfterPreventedStart() {
2894        suppressNextOutsideClickRef.current = true;
2895        preventedPressSuppressionTimeout.start(0, () => {
2896          suppressNextOutsideClickRef.current = false;
2897        });
2898      }
2899      function resetPressStartState() {
2900        pressStartedInsideRef.current = false;
2901        pressStartPreventedRef.current = false;
2902      }
2903      function getOutsidePressEvent() {
2904        const type = currentPointerTypeRef.current;
2905        const computedType = type === "pen" || !type ? "mouse" : type;
2906        const outsidePressEventValue = getOutsidePressEventProp();
2907        const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue;
2908        if (typeof resolved === "string") {
2909          return resolved;
2910        }
2911        return resolved[computedType];
2912      }
2913      function shouldIgnoreEvent(event) {
2914        const computedOutsidePressEvent = getOutsidePressEvent();
2915        return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click";
2916      }
2917      function isEventWithinFloatingTree(event) {
2918        const nodeId = dataRef.current.floatingContext?.nodeId;
2919        const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating));
2920        return isEventWithinOwnElements(event) || targetIsInsideChildren;
2921      }
2922      function closeOnPressOutside(event) {
2923        if (shouldIgnoreEvent(event)) {
2924          if (event.type !== "click" && !isEventWithinOwnElements(event)) {
2925            preventedPressSuppressionTimeout.clear();
2926            suppressNextOutsideClickRef.current = false;
2927          }
2928          clearInsideReactTree();
2929          return;
2930        }
2931        if (dataRef.current.insideReactTree) {
2932          clearInsideReactTree();
2933          return;
2934        }
2935        const target = getTarget(event);
2936        const inertSelector = `[$createAttribute("inert")}]`;
2937        const targetRoot = isElement(target) ? target.getRootNode() : null;
2938        const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store.select("floatingElement"))).querySelectorAll(inertSelector));
2939        const triggers = store.context.triggerElements;
2940        if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) {
2941          return;
2942        }
2943        let targetRootAncestor = isElement(target) ? target : null;
2944        while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
2945          const nextParent = getParentNode(targetRootAncestor);
2946          if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {
2947            break;
2948          }
2949          targetRootAncestor = nextParent;
2950        }
2951        if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2952        !contains(target, store.select("floatingElement")) && // If the target root element contains none of the markers, then the
2953        // element was injected after the floating element rendered.
2954        markers.every((marker) => !contains(targetRootAncestor, marker))) {
2955          return;
2956        }
2957        if (isHTMLElement(target) && !("touches" in event)) {
2958          const lastTraversableNode = isLastTraversableNode(target);
2959          const style = getComputedStyle2(target);
2960          const scrollRe = /auto|scroll/;
2961          const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);
2962          const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);
2963          const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;
2964          const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;
2965          const isRTL3 = style.direction === "rtl";
2966          const pressedVerticalScrollbar = canScrollY && (isRTL3 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);
2967          const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;
2968          if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {
2969            return;
2970          }
2971        }
2972        if (isEventWithinFloatingTree(event)) {
2973          return;
2974        }
2975        if (getOutsidePressEvent() === "intentional") {
2976          if (event.detail !== 0 && !isVirtualClick(event) && !sawPressWhileOpenRef.current) {
2977            return;
2978          }
2979          if (suppressNextOutsideClickRef.current) {
2980            preventedPressSuppressionTimeout.clear();
2981            suppressNextOutsideClickRef.current = false;
2982            return;
2983          }
2984        }
2985        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
2986          return;
2987        }
2988        if (hasBlockingChild("__outsidePressBubbles")) {
2989          return;
2990        }
2991        store.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event));
2992        clearInsideReactTree();
2993      }
2994      function handlePointerDown(event) {
2995        if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store.select("open") || !enabled || isEventWithinOwnElements(event)) {
2996          return;
2997        }
2998        closeOnPressOutside(event);
2999      }
3000      function handleTouchStart(event) {
3001        if (getOutsidePressEvent() !== "sloppy" || !store.select("open") || !enabled || isEventWithinOwnElements(event)) {
3002          return;
3003        }
3004        const touch = event.touches[0];
3005        if (touch) {
3006          touchStateRef.current = {
3007            startTime: Date.now(),
3008            startX: touch.clientX,
3009            startY: touch.clientY,
3010            dismissOnTouchEnd: false,
3011            dismissOnMouseDown: true
3012          };
3013          cancelDismissOnEndTimeout.start(1e3, () => {
3014            if (touchStateRef.current) {
3015              touchStateRef.current.dismissOnTouchEnd = false;
3016              touchStateRef.current.dismissOnMouseDown = false;
3017            }
3018          });
3019        }
3020      }
3021      function addTargetEventListenerOnce(event, listener) {
3022        const target = getTarget(event);
3023        if (!target) {
3024          return;
3025        }
3026        const unsubscribe2 = addEventListener(target, event.type, () => {
3027          listener(event);
3028          unsubscribe2();
3029        });
3030      }
3031      function handleTouchStartCapture(event) {
3032        currentPointerTypeRef.current = "touch";
3033        addTargetEventListenerOnce(event, handleTouchStart);
3034      }
3035      function closeOnPressOutsideCapture(event) {
3036        cancelDismissOnEndTimeout.clear();
3037        if (event.type === "pointerdown") {
3038          if (event.button === 0) {
3039            sawPressWhileOpenRef.current = true;
3040          }
3041          currentPointerTypeRef.current = event.pointerType;
3042        }
3043        if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {
3044          return;
3045        }
3046        addTargetEventListenerOnce(event, (targetEvent) => {
3047          if (targetEvent.type === "pointerdown") {
3048            handlePointerDown(targetEvent);
3049          } else {
3050            closeOnPressOutside(targetEvent);
3051          }
3052        });
3053      }
3054      function handlePressEndCapture(event) {
3055        if (event.type === "pointercancel") {
3056          sawPressWhileOpenRef.current = false;
3057        }
3058        if (!pressStartedInsideRef.current) {
3059          return;
3060        }
3061        const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;
3062        resetPressStartState();
3063        if (getOutsidePressEvent() !== "intentional") {
3064          return;
3065        }
3066        if (event.type === "pointercancel") {
3067          if (pressStartedInsideDefaultPrevented) {
3068            suppressImmediateOutsideClickAfterPreventedStart();
3069          }
3070          return;
3071        }
3072        if (isEventWithinFloatingTree(event)) {
3073          return;
3074        }
3075        if (pressStartedInsideDefaultPrevented) {
3076          suppressImmediateOutsideClickAfterPreventedStart();
3077          return;
3078        }
3079        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3080          return;
3081        }
3082        preventedPressSuppressionTimeout.clear();
3083        suppressNextOutsideClickRef.current = true;
3084        clearInsideReactTree();
3085      }
3086      function handleTouchMove(event) {
3087        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3088          return;
3089        }
3090        const touch = event.touches[0];
3091        if (!touch) {
3092          return;
3093        }
3094        const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);
3095        const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);
3096        const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
3097        if (distance > 5) {
3098          touchStateRef.current.dismissOnTouchEnd = true;
3099        }
3100        if (distance > 10) {
3101          closeOnPressOutside(event);
3102          cancelDismissOnEndTimeout.clear();
3103          touchStateRef.current = null;
3104        }
3105      }
3106      function handleTouchMoveCapture(event) {
3107        addTargetEventListenerOnce(event, handleTouchMove);
3108      }
3109      function handleTouchEnd(event) {
3110        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3111          return;
3112        }
3113        if (touchStateRef.current.dismissOnTouchEnd) {
3114          closeOnPressOutside(event);
3115        }
3116        cancelDismissOnEndTimeout.clear();
3117        touchStateRef.current = null;
3118      }
3119      function handleTouchEndCapture(event) {
3120        addTargetEventListenerOnce(event, handleTouchEnd);
3121      }
3122      const unsubscribe = mergeCleanups(escapeKey2 && mergeCleanups(addEventListener(doc, "keydown", closeOnEscapeKeyDown), addEventListener(doc, "compositionstart", handleCompositionStart), addEventListener(doc, "compositionend", handleCompositionEnd)), outsidePressEnabled && mergeCleanups(addEventListener(doc, "click", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerdown", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerup", handlePressEndCapture, true), addEventListener(doc, "pointercancel", handlePressEndCapture, true), addEventListener(doc, "mousedown", closeOnPressOutsideCapture, true), addEventListener(doc, "mouseup", handlePressEndCapture, true), addEventListener(doc, "touchstart", handleTouchStartCapture, {
3123        capture: true,
3124        passive: true
3125      }), addEventListener(doc, "touchmove", handleTouchMoveCapture, {
3126        capture: true,
3127        passive: true
3128      }), addEventListener(doc, "touchend", handleTouchEndCapture, {
3129        capture: true,
3130        passive: true
3131      })));
3132      return () => {
3133        unsubscribe();
3134        preventedPressSuppressionTimeout.clear();
3135        resetPressStartState();
3136        suppressNextOutsideClickRef.current = false;
3137      };
3138    }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open2, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store, cancelDismissOnEndTimeout, compositionTimeout]);
3139    const reference = React17.useMemo(() => ({
3140      onKeyDown: closeOnEscapeKeyDown,
3141      onPointerDown: closeOnReferencePress,
3142      onClick: closeOnReferencePress
3143    }), [closeOnEscapeKeyDown, closeOnReferencePress]);
3144    const floating = React17.useMemo(() => ({
3145      onKeyDown: closeOnEscapeKeyDown,
3146      // `onMouseDown` may be blocked if `event.preventDefault()` is called in
3147      // `onPointerDown`, such as with <NumberField.ScrubArea>.
3148      // See https://github.com/mui/base-ui/pull/3379
3149      onPointerDown: markInsidePressStartPrevented,
3150      onMouseDown: markInsidePressStartPrevented,
3151      onClickCapture: markInsideReactTree,
3152      onMouseDownCapture(event) {
3153        markInsideReactTree();
3154        markPressStartedInsideReactTree(event);
3155      },
3156      onPointerDownCapture(event) {
3157        markInsideReactTree();
3158        markPressStartedInsideReactTree(event);
3159      },
3160      onMouseUpCapture: markInsideReactTree,
3161      onTouchEndCapture: markInsideReactTree,
3162      onTouchMoveCapture: markInsideReactTree
3163    }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);
3164    return React17.useMemo(() => enabled ? {
3165      reference,
3166      floating,
3167      trigger: reference
3168    } : {}, [enabled, reference, floating]);
3169  }
3170  
3171  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/popupHandle.mjs
3172  var BasePopupHandle = class {
3173    /**
3174     * Stores of every root currently using this handle, in attach order. A handle is meant to be used
3175     * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
3176     * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
3177     * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
3178     */
3179    attachedStores = [];
3180    /**
3181     * Store of the root that currently controls the handle: the most recently attached one still
3182     * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
3183     */
3184    attachedStoreValue = null;
3185    /**
3186     * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
3187     */
3188    storeListeners = /* @__PURE__ */ new Set();
3189    /**
3190     * Creates a handle backed by the store used while no root is attached.
3191     *
3192     * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
3193     * so they can render and register without a mounted root. Triggers register into whichever store
3194     * `store` currently resolves to, so while detached they live in this store's trigger map and
3195     * migrate themselves to the root's store (and back) as it attaches/detaches.
3196     * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
3197     * `MenuHandle.open()` in warning text.
3198     * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
3199     * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
3200     * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
3201     */
3202    constructor(fallbackStore, componentName, throwOnMissingTrigger = true) {
3203      this.fallbackStore = fallbackStore;
3204      this.componentName = componentName;
3205      this.throwOnMissingTrigger = throwOnMissingTrigger;
3206    }
3207    get attachedStore() {
3208      return this.attachedStoreValue;
3209    }
3210    /**
3211     * Store that detached triggers read from: the attached root's store, or an inert fallback store
3212     * used while no root is attached.
3213     * @internal
3214     */
3215    get store() {
3216      return this.attachedStoreValue ?? this.fallbackStore;
3217    }
3218    /**
3219     * Stable fallback store used for server rendering and hydration. Root stores cannot be recorded on
3220     * the handle during render because a handle can be shared by concurrent server-rendered requests.
3221     * @internal
3222     */
3223    get serverStore() {
3224      return this.fallbackStore;
3225    }
3226    /**
3227     * Subscribes to changes of the attached store pointer so detached triggers re-render and re-bind
3228     * when a root attaches or detaches. Returns a function that removes the listener.
3229     * @internal
3230     */
3231    subscribeStore(listener) {
3232      this.storeListeners.add(listener);
3233      return () => {
3234        this.storeListeners.delete(listener);
3235      };
3236    }
3237    /**
3238     * Points the handle at a root's store and notifies subscribers so detached triggers re-render and
3239     * re-register into it (their registration effect migrates them when the store pointer changes).
3240     * Returns a cleanup function that detaches the store again.
3241     * @internal
3242     */
3243    attachStore(newStore) {
3244      this.attachedStores.push(newStore);
3245      this.setActiveStore(newStore);
3246      if (true) {
3247        if (this.attachedStores.length > 1) {
3248          const dev = this;
3249          (dev.overlapWarningFrame ??= AnimationFrame.create()).request(() => {
3250            if (this.attachedStores.length > 1) {
3251              console.warn("Base UI: A handle is attached to more than one mounted root at the same time. The most recently mounted root takes over and the previous one stops being controlled by the handle. A handle should be used by a single root that stays mounted for the lifetime of the handle.");
3252            }
3253          });
3254        }
3255      }
3256      return () => {
3257        const index2 = this.attachedStores.lastIndexOf(newStore);
3258        if (index2 !== -1) {
3259          this.attachedStores.splice(index2, 1);
3260        }
3261        this.setActiveStore(this.attachedStores[this.attachedStores.length - 1] ?? null);
3262      };
3263    }
3264    /**
3265     * Sets the store that currently controls the handle and notifies subscribers when it changes, so
3266     * detached triggers re-render and migrate their registration to the new store.
3267     */
3268    setActiveStore(store) {
3269      if (this.attachedStoreValue !== store) {
3270        this.attachedStoreValue = store;
3271        this.storeListeners.forEach((listener) => {
3272          listener();
3273        });
3274      }
3275    }
3276    /**
3277     * Opens the attached root's store and associates it with the trigger with the given id, or a
3278     * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
3279     * `open()` method, which only narrows the parameter type.
3280     *
3281     * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
3282     * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
3283     *
3284     * This method should only be called in an event handler or an effect (not during rendering).
3285     *
3286     * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
3287     * without associating any trigger.
3288     */
3289    openByTrigger(triggerId) {
3290      const attachedStore = this.attachedStore;
3291      if (attachedStore === null) {
3292        if (true) {
3293          console.warn(`Base UI: $this.componentName}Handle.open() was called while no root using this handle is mounted. The call was ignored; mount a root with this handle before opening it imperatively.`);
3294        }
3295        return;
3296      }
3297      let triggerElement;
3298      if (triggerId) {
3299        for (let i = this.attachedStores.length - 1; i >= 0 && !triggerElement; i -= 1) {
3300          triggerElement = this.attachedStores[i].context.triggerElements.getById(triggerId);
3301        }
3302        triggerElement ??= this.fallbackStore.context.triggerElements.getById(triggerId);
3303      }
3304      if (triggerId && !triggerElement) {
3305        if (this.throwOnMissingTrigger) {
3306          throw new Error(true ? `Base UI: $this.componentName}Handle.open() was called with the trigger id "$triggerId}", but no matching trigger is registered with this handle. An anchored popup cannot open without a trigger to anchor to. Pass the id of a mounted $this.componentName}.Trigger that has this handle set on its "handle" prop.` : formatErrorMessage_default(99, this.componentName, triggerId, this.componentName));
3307        }
3308        if (true) {
3309          console.warn(`Base UI: $this.componentName}Handle.open: No trigger found with id "$triggerId}". The popup will open, but the trigger will not be associated with it.`);
3310        }
3311      }
3312      attachedStore.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement));
3313    }
3314    /**
3315     * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
3316     * while no root is attached. Shared by every concrete handle's public `close()` method.
3317     *
3318     * This method should only be called in an event handler or an effect (not during rendering).
3319     */
3320    closePopup() {
3321      const attachedStore = this.attachedStore;
3322      if (attachedStore === null) {
3323        if (true) {
3324          console.warn(`Base UI: $this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`);
3325        }
3326        return;
3327      }
3328      attachedStore.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction));
3329    }
3330  };
3331  
3332  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
3333  var React19 = __toESM(require_react(), 1);
3334  var ReactDOM3 = __toESM(require_react_dom(), 1);
3335  
3336  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
3337  function useSyncedFloatingRootContext(options) {
3338    const {
3339      popupStore,
3340      treatPopupAsFloatingElement = false,
3341      floatingRootContext: store,
3342      floatingId,
3343      nested,
3344      onOpenChange
3345    } = options;
3346    const open2 = popupStore.useState("open");
3347    const referenceElement = popupStore.useState("activeTriggerElement");
3348    const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
3349    const handleOpenChange = onOpenChange;
3350    popupStore.useSyncedValue("floatingId", floatingId);
3351    useIsoLayoutEffect(() => {
3352      const valuesToSync = {
3353        open: open2,
3354        floatingId,
3355        referenceElement,
3356        floatingElement
3357      };
3358      if (isElement(referenceElement)) {
3359        valuesToSync.domReferenceElement = referenceElement;
3360      }
3361      if (store.state.positionReference === store.state.referenceElement) {
3362        valuesToSync.positionReference = referenceElement;
3363      }
3364      store.update(valuesToSync);
3365    }, [open2, floatingId, referenceElement, floatingElement, store]);
3366    store.context.onOpenChange = handleOpenChange;
3367    store.context.nested = nested;
3368    return store;
3369  }
3370  
3371  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useUnmountAfterClose.mjs
3372  var React18 = __toESM(require_react(), 1);
3373  function useUnmountAfterClose(parameters) {
3374    const {
3375      open: open2,
3376      ref,
3377      preventUnmountOnClose,
3378      setPreventUnmountOnClose: setPreventUnmountOnCloseParam,
3379      onUnmount,
3380      animateInitialOpen
3381    } = parameters;
3382    const setPreventUnmountOnClose = useStableCallback(setPreventUnmountOnCloseParam);
3383    const {
3384      mounted,
3385      setMounted,
3386      transitionStatus
3387    } = useTransitionStatus(open2, false, false, animateInitialOpen);
3388    const preventUnmountingOnClose = open2 ? false : preventUnmountOnClose;
3389    useIsoLayoutEffect(() => {
3390      if (open2) {
3391        setPreventUnmountOnClose(false);
3392      }
3393    }, [open2, setPreventUnmountOnClose]);
3394    const mountedRef = React18.useRef(mounted);
3395    const pendingUnmountRef = React18.useRef(false);
3396    const rerender = useForcedRerendering();
3397    const unmount = () => {
3398      mountedRef.current = false;
3399      setMounted(false);
3400      onUnmount();
3401    };
3402    useIsoLayoutEffect(() => {
3403      mountedRef.current = mounted;
3404      if (pendingUnmountRef.current) {
3405        pendingUnmountRef.current = false;
3406        if (!open2 && mounted) {
3407          unmount();
3408        }
3409      }
3410    });
3411    const forceUnmount = useStableCallback(() => {
3412      if (!mountedRef.current) {
3413        return;
3414      }
3415      if (open2) {
3416        pendingUnmountRef.current = true;
3417        rerender();
3418        return;
3419      }
3420      unmount();
3421    });
3422    useOpenChangeComplete({
3423      enabled: mounted && !open2 && !preventUnmountingOnClose,
3424      open: open2,
3425      ref,
3426      onComplete() {
3427        if (!open2) {
3428          forceUnmount();
3429        }
3430      }
3431    });
3432    return {
3433      mounted,
3434      transitionStatus,
3435      preventUnmountingOnClose,
3436      forceUnmount
3437    };
3438  }
3439  
3440  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
3441  var FOCUSABLE_POPUP_PROPS = {
3442    tabIndex: -1,
3443    [FOCUSABLE_ATTRIBUTE]: ""
3444  };
3445  function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) {
3446    const floatingId = useId();
3447    const nested = useFloatingParentNodeId() != null;
3448    const store = useRefWithInit(() => createStore(floatingId, nested)).current;
3449    useSyncedFloatingRootContext({
3450      popupStore: store,
3451      treatPopupAsFloatingElement,
3452      floatingRootContext: store.state.floatingRootContext,
3453      floatingId,
3454      nested,
3455      onOpenChange: store.setOpen
3456    });
3457    return store;
3458  }
3459  function PopupHandleAttachment({
3460    handle,
3461    store
3462  }) {
3463    useIsoLayoutEffect(() => {
3464      return handle.attachStore(store);
3465    }, [handle, store]);
3466    return null;
3467  }
3468  function syncTriggerCount(store) {
3469    const triggerCount = store.context.triggerElements.size;
3470    if (store.select("open") && store.state.triggerCount !== triggerCount) {
3471      store.set("triggerCount", triggerCount);
3472    }
3473  }
3474  function useTriggerRegistration(id, store) {
3475    const registrationRef = React19.useRef(null);
3476    return useStableCallback((element) => {
3477      const registration = registrationRef.current;
3478      if (registration !== null) {
3479        if (registration.element === element && registration.store === store && registration.id === id) {
3480          return;
3481        }
3482        registrationRef.current = null;
3483        const registeredStore = registration.store;
3484        if (registeredStore.context.triggerElements.getById(registration.id) === registration.element) {
3485          registeredStore.context.triggerElements.delete(registration.id);
3486          syncTriggerCount(registeredStore);
3487        }
3488      }
3489      if (element !== null && id !== void 0) {
3490        registrationRef.current = {
3491          store,
3492          id,
3493          element
3494        };
3495        store.context.triggerElements.add(id, element);
3496        syncTriggerCount(store);
3497      }
3498    });
3499  }
3500  function createPopupOpenState(state, open2, trigger, preventUnmountOnClose = false) {
3501    let preventUnmountingOnClose = state.preventUnmountingOnClose;
3502    if (open2) {
3503      preventUnmountingOnClose = false;
3504    } else if (preventUnmountOnClose) {
3505      preventUnmountingOnClose = true;
3506    }
3507    const triggerId = trigger?.id ?? null;
3508    let activeTriggerId = state.activeTriggerId;
3509    let activeTriggerElement = state.activeTriggerElement;
3510    if (triggerId || open2) {
3511      activeTriggerId = triggerId;
3512      activeTriggerElement = trigger ?? null;
3513    }
3514    return {
3515      open: open2,
3516      preventUnmountingOnClose,
3517      activeTriggerId,
3518      activeTriggerElement,
3519      // An open request without a trigger (a handle's `open(null)` or `openWithPayload()`) must not
3520      // be reassociated with a lone registered trigger later on. Controlled and default opens never
3521      // pass through here, so they keep claiming a lone trigger. A close request keeps the flag: a
3522      // controlled root may decline it and stay open, so the Root clears the flag only once the
3523      // popup is effectively closed.
3524      openedWithoutTrigger: open2 ? trigger == null : state.openedWithoutTrigger
3525    };
3526  }
3527  function attachPreventUnmountOnClose(eventDetails) {
3528    let preventUnmountOnClose = false;
3529    eventDetails.preventUnmountOnClose = () => {
3530      preventUnmountOnClose = true;
3531    };
3532    return () => preventUnmountOnClose;
3533  }
3534  function applyPopupOpenChange(store, nextOpen, eventDetails, options = {}) {
3535    const reason = eventDetails.reason;
3536    const isHover = reason === reason_parts_exports.triggerHover;
3537    const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus;
3538    const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey);
3539    const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);
3540    store.context.onOpenChange?.(nextOpen, eventDetails);
3541    if (eventDetails.isCanceled) {
3542      return;
3543    }
3544    options.onBeforeDispatch?.();
3545    store.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
3546    const changeState = () => {
3547      const popupOpenState = createPopupOpenState(store.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
3548      const updatedState = {
3549        ...options.extraState,
3550        ...popupOpenState
3551      };
3552      if (isFocusOpen) {
3553        updatedState.instantType = "focus";
3554      } else if (isDismissClose) {
3555        updatedState.instantType = "dismiss";
3556      } else if (isHover) {
3557        updatedState.instantType = void 0;
3558      }
3559      store.update(updatedState);
3560    };
3561    if (isHover) {
3562      ReactDOM3.flushSync(changeState);
3563    } else {
3564      changeState();
3565    }
3566  }
3567  function useTriggerDataForwarding(triggerId, triggerElementRef, store, stateUpdates) {
3568    const isMountedByThisTrigger = store.useState("isMountedByTrigger", triggerId);
3569    const baseRegisterTrigger = useTriggerRegistration(triggerId, store);
3570    const applyTriggerData = useStableCallback((element) => {
3571      const open2 = store.select("open");
3572      const activeTriggerId = store.select("activeTriggerId");
3573      if (activeTriggerId === triggerId) {
3574        const changes = {
3575          activeTriggerElement: element,
3576          ...open2 ? stateUpdates : null
3577        };
3578        store.update(changes);
3579        return;
3580      }
3581      if (activeTriggerId == null && open2 && !store.state.openedWithoutTrigger) {
3582        const changes = {
3583          activeTriggerId: triggerId ?? null,
3584          activeTriggerElement: element,
3585          ...stateUpdates
3586        };
3587        store.update(changes);
3588      }
3589    });
3590    const registerTrigger = useStableCallback((element) => {
3591      baseRegisterTrigger(element);
3592      if (element) {
3593        applyTriggerData(element);
3594      }
3595    });
3596    useIsoLayoutEffect(() => {
3597      registerTrigger(triggerElementRef.current);
3598      return () => registerTrigger(null);
3599    }, [registerTrigger, triggerElementRef, store, triggerId]);
3600    useIsoLayoutEffect(() => {
3601      if (isMountedByThisTrigger) {
3602        const changes = {
3603          activeTriggerElement: triggerElementRef.current,
3604          ...stateUpdates
3605        };
3606        store.update(changes);
3607      }
3608    }, [isMountedByThisTrigger, store, triggerElementRef, ...Object.values(stateUpdates)]);
3609    return {
3610      registerTrigger,
3611      isMountedByThisTrigger
3612    };
3613  }
3614  function useImplicitActiveTrigger(store, options = {}) {
3615    const {
3616      closeOnActiveTriggerUnmount = false
3617    } = options;
3618    const resolvedActiveTriggerIdRef = React19.useRef(null);
3619    const open2 = store.useState("open");
3620    const reactiveTriggerCount = store.useState("triggerCount");
3621    const activeTriggerId = store.useState("activeTriggerId");
3622    const reactiveActiveTriggerElement = store.useState("activeTriggerElement");
3623    useIsoLayoutEffect(() => {
3624      if (!open2) {
3625        resolvedActiveTriggerIdRef.current = null;
3626        if (store.state.triggerCount !== 0) {
3627          store.set("triggerCount", 0);
3628        }
3629        if (store.state.openedWithoutTrigger) {
3630          store.set("openedWithoutTrigger", false);
3631        }
3632        return;
3633      }
3634      const triggerCount = store.context.triggerElements.size;
3635      const stateUpdates = {};
3636      if (store.state.triggerCount !== triggerCount) {
3637        stateUpdates.triggerCount = triggerCount;
3638      }
3639      const currentActiveTriggerId = store.select("activeTriggerId");
3640      let lostActiveTriggerId = null;
3641      if (currentActiveTriggerId) {
3642        const activeTriggerElement = store.context.triggerElements.getById(currentActiveTriggerId);
3643        if (!activeTriggerElement) {
3644          for (const [triggerId, triggerElement] of store.context.triggerElements.entries()) {
3645            if (triggerElement === store.state.activeTriggerElement) {
3646              stateUpdates.activeTriggerId = triggerId;
3647              stateUpdates.activeTriggerElement = triggerElement;
3648              resolvedActiveTriggerIdRef.current = triggerId;
3649              break;
3650            }
3651          }
3652          if (stateUpdates.activeTriggerId === void 0) {
3653            if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) {
3654              lostActiveTriggerId = currentActiveTriggerId;
3655            } else {
3656              resolvedActiveTriggerIdRef.current = null;
3657            }
3658          }
3659        } else {
3660          resolvedActiveTriggerIdRef.current = currentActiveTriggerId;
3661          if (activeTriggerElement !== store.state.activeTriggerElement) {
3662            stateUpdates.activeTriggerElement = activeTriggerElement;
3663          }
3664        }
3665      } else {
3666        resolvedActiveTriggerIdRef.current = null;
3667      }
3668      if (!lostActiveTriggerId && !currentActiveTriggerId && !store.state.openedWithoutTrigger && triggerCount === 1) {
3669        const iteratorResult = store.context.triggerElements.entries().next();
3670        if (!iteratorResult.done) {
3671          const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;
3672          stateUpdates.activeTriggerId = implicitTriggerId;
3673          stateUpdates.activeTriggerElement = implicitTriggerElement;
3674          resolvedActiveTriggerIdRef.current = implicitTriggerId;
3675        }
3676      }
3677      if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0 || stateUpdates.activeTriggerElement !== void 0) {
3678        store.update(stateUpdates);
3679      }
3680      if (lostActiveTriggerId) {
3681        if (closeOnActiveTriggerUnmount) {
3682          queueMicrotask(() => {
3683            if (store.select("open") && store.select("activeTriggerId") === lostActiveTriggerId && !store.context.triggerElements.getById(lostActiveTriggerId)) {
3684              const eventDetails = createChangeEventDetails(reason_parts_exports.none);
3685              store.setOpen(false, eventDetails);
3686              if (!eventDetails.isCanceled) {
3687                store.update({
3688                  activeTriggerId: null,
3689                  activeTriggerElement: null
3690                });
3691              }
3692            }
3693          });
3694        }
3695      }
3696    }, [open2, store, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]);
3697  }
3698  function useOpenStateTransitions(open2, store, onUnmount, animateInitialOpen) {
3699    const {
3700      mounted,
3701      transitionStatus,
3702      forceUnmount
3703    } = useUnmountAfterClose({
3704      open: open2,
3705      ref: store.context.popupRef,
3706      preventUnmountOnClose: store.useState("preventUnmountingOnClose"),
3707      setPreventUnmountOnClose: (preventUnmountOnClose) => store.set("preventUnmountingOnClose", preventUnmountOnClose),
3708      animateInitialOpen,
3709      onUnmount() {
3710        store.update({
3711          activeTriggerId: null,
3712          activeTriggerElement: null,
3713          mounted: false,
3714          preventUnmountingOnClose: false
3715        });
3716        onUnmount?.();
3717        store.context.onOpenChangeComplete?.(false);
3718      }
3719    });
3720    useRefWithInit(() => {
3721      store.set("mounted", mounted);
3722      return null;
3723    });
3724    store.useSyncedValues({
3725      mounted,
3726      transitionStatus
3727    });
3728    return {
3729      forceUnmount,
3730      transitionStatus
3731    };
3732  }
3733  function usePopupInteractionProps(store, statePart) {
3734    store.useSyncedValues(statePart);
3735    useIsoLayoutEffect(() => () => {
3736      store.update({
3737        activeTriggerProps: EMPTY_OBJECT,
3738        inactiveTriggerProps: EMPTY_OBJECT,
3739        popupProps: EMPTY_OBJECT
3740      });
3741    }, [store]);
3742  }
3743  
3744  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs
3745  var devElementIdsByMap;
3746  function getDevElementIds(map) {
3747    devElementIdsByMap ??= /* @__PURE__ */ new WeakMap();
3748    let elementIds = devElementIdsByMap.get(map);
3749    if (!elementIds) {
3750      elementIds = /* @__PURE__ */ new WeakMap();
3751      devElementIdsByMap.set(map, elementIds);
3752    }
3753    return elementIds;
3754  }
3755  var PopupTriggerMap = class {
3756    idMap = /* @__PURE__ */ new Map();
3757    /**
3758     * Adds a trigger element with the given ID.
3759     *
3760     * Note: The provided element is assumed to not be registered under multiple IDs.
3761     */
3762    add(id, element) {
3763      if (true) {
3764        const elementIds = getDevElementIds(this);
3765        const existingId = elementIds.get(element);
3766        if (existingId !== void 0 && existingId !== id) {
3767          throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
3768        }
3769        const previousElement = this.idMap.get(id);
3770        if (previousElement !== void 0 && previousElement !== element) {
3771          elementIds.delete(previousElement);
3772        }
3773        elementIds.set(element, id);
3774      }
3775      this.idMap.set(id, element);
3776    }
3777    /**
3778     * Removes the trigger element with the given ID.
3779     */
3780    delete(id) {
3781      if (true) {
3782        const element = this.idMap.get(id);
3783        if (element !== void 0) {
3784          devElementIdsByMap?.get(this)?.delete(element);
3785        }
3786      }
3787      this.idMap.delete(id);
3788    }
3789    /**
3790     * Whether the given element is registered as a trigger.
3791     */
3792    hasElement(element) {
3793      for (const registered of this.idMap.values()) {
3794        if (registered === element) {
3795          return true;
3796        }
3797      }
3798      return false;
3799    }
3800    /**
3801     * Whether there is a registered trigger element matching the given predicate.
3802     */
3803    hasMatchingElement(predicate) {
3804      for (const element of this.idMap.values()) {
3805        if (predicate(element)) {
3806          return true;
3807        }
3808      }
3809      return false;
3810    }
3811    /**
3812     * Returns the trigger element associated with the given ID, or undefined if no such element exists.
3813     */
3814    getById(id) {
3815      return this.idMap.get(id);
3816    }
3817    /**
3818     * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
3819     */
3820    entries() {
3821      return this.idMap.entries();
3822    }
3823    /**
3824     * Returns an iterable of all registered trigger elements.
3825     */
3826    elements() {
3827      return this.idMap.values();
3828    }
3829    /**
3830     * Returns the number of registered trigger elements.
3831     */
3832    get size() {
3833      return this.idMap.size;
3834    }
3835  };
3836  
3837  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/store/useStore.mjs
3838  var React21 = __toESM(require_react(), 1);
3839  var import_shim = __toESM(require_shim(), 1);
3840  var import_with_selector = __toESM(require_with_selector(), 1);
3841  
3842  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/fastHooks.mjs
3843  var React20 = __toESM(require_react(), 1);
3844  var hooks = [];
3845  var currentInstance = void 0;
3846  function getInstance() {
3847    return currentInstance;
3848  }
3849  function register(hook) {
3850    hooks.push(hook);
3851  }
3852  function fastComponent(fn) {
3853    const FastComponent = (props, forwardedRef) => {
3854      const instance = useRefWithInit(createInstance).current;
3855      let result;
3856      try {
3857        currentInstance = instance;
3858        for (const hook of hooks) {
3859          hook.before(instance);
3860        }
3861        result = fn(props, forwardedRef);
3862        for (const hook of hooks) {
3863          hook.after(instance);
3864        }
3865        instance.didInitialize = true;
3866      } finally {
3867        currentInstance = void 0;
3868      }
3869      return result;
3870    };
3871    FastComponent.displayName = fn.displayName || fn.name;
3872    return FastComponent;
3873  }
3874  function fastComponentRef(fn) {
3875    return /* @__PURE__ */ React20.forwardRef(fastComponent(fn));
3876  }
3877  function createInstance() {
3878    return {
3879      didInitialize: false
3880    };
3881  }
3882  
3883  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/store/useStore.mjs
3884  var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19);
3885  var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy;
3886  function useStore(store, selector, a1, a2, a3) {
3887    return useStoreImplementation(store, selector, a1, a2, a3);
3888  }
3889  function useStoreR19(store, selector, a1, a2, a3) {
3890    const getSelection = React21.useCallback(() => selector(store.getSnapshot(), a1, a2, a3), [store, selector, a1, a2, a3]);
3891    return (0, import_shim.useSyncExternalStore)(store.subscribe, getSelection, getSelection);
3892  }
3893  register({
3894    before(instance) {
3895      instance.syncIndex = 0;
3896      if (!instance.didInitialize) {
3897        instance.syncTick = 1;
3898        instance.syncHooks = [];
3899        instance.didChangeStore = true;
3900        instance.getSnapshot = () => {
3901          let didChange2 = false;
3902          for (let i = 0; i < instance.syncHooks.length; i += 1) {
3903            const hook = instance.syncHooks[i];
3904            const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
3905            if (!Object.is(hook.value, value)) {
3906              didChange2 = true;
3907              hook.value = value;
3908            }
3909          }
3910          if (didChange2) {
3911            instance.syncTick += 1;
3912          }
3913          return instance.syncTick;
3914        };
3915      }
3916    },
3917    after(instance) {
3918      if (instance.syncHooks.length > 0) {
3919        if (instance.didChangeStore) {
3920          instance.didChangeStore = false;
3921          instance.subscribe = (onStoreChange) => {
3922            const stores = /* @__PURE__ */ new Set();
3923            for (const hook of instance.syncHooks) {
3924              stores.add(hook.store);
3925            }
3926            const unsubscribes = [];
3927            for (const store of stores) {
3928              unsubscribes.push(store.subscribe(onStoreChange));
3929            }
3930            return () => {
3931              for (const unsubscribe of unsubscribes) {
3932                unsubscribe();
3933              }
3934            };
3935          };
3936        }
3937        (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
3938      }
3939    }
3940  });
3941  function useStoreFast(store, selector, a1, a2, a3) {
3942    const instance = getInstance();
3943    if (!instance) {
3944      return useStoreR19(store, selector, a1, a2, a3);
3945    }
3946    const index2 = instance.syncIndex;
3947    instance.syncIndex += 1;
3948    let hook;
3949    if (!instance.didInitialize) {
3950      hook = {
3951        store,
3952        selector,
3953        a1,
3954        a2,
3955        a3,
3956        value: selector(store.getSnapshot(), a1, a2, a3)
3957      };
3958      instance.syncHooks.push(hook);
3959    } else {
3960      hook = instance.syncHooks[index2];
3961      if (hook.store !== store || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
3962        if (hook.store !== store) {
3963          instance.didChangeStore = true;
3964        }
3965        hook.store = store;
3966        hook.selector = selector;
3967        hook.a1 = a1;
3968        hook.a2 = a2;
3969        hook.a3 = a3;
3970        hook.value = selector(store.getSnapshot(), a1, a2, a3);
3971      }
3972    }
3973    return hook.value;
3974  }
3975  function useStoreLegacy(store, selector, a1, a2, a3) {
3976    return (0, import_with_selector.useSyncExternalStoreWithSelector)(store.subscribe, store.getSnapshot, store.getSnapshot, (state) => selector(state, a1, a2, a3));
3977  }
3978  
3979  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/store/Store.mjs
3980  var Store = class {
3981    /**
3982     * Creates a store with the given initial state, constructing the class it is called on.
3983     * Calling it on a generic base class (e.g. `ReactStore.create(...)`) constructs that
3984     * class but degrades the inferred instance type to `Store`; use `new` there instead.
3985     */
3986    static create(state) {
3987      return new this(state);
3988    }
3989    /**
3990     * The current state of the store.
3991     * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
3992     * To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).
3993     * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
3994     *
3995     * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
3996     */
3997    // Internal state to handle recursive `setState()` calls
3998    constructor(state) {
3999      this.state = state;
4000      this.listeners = /* @__PURE__ */ new Set();
4001      this.updateTick = 0;
4002    }
4003    /**
4004     * Registers a listener that will be called whenever the store's state changes.
4005     *
4006     * @param fn The listener function to be called on state changes.
4007     * @returns A function to unsubscribe the listener.
4008     */
4009    subscribe = (fn) => {
4010      this.listeners.add(fn);
4011      return () => {
4012        this.listeners.delete(fn);
4013      };
4014    };
4015    /**
4016     * Returns the current state of the store.
4017     */
4018    getSnapshot = () => {
4019      return this.state;
4020    };
4021    /**
4022     * Updates the entire store's state and notifies all registered listeners.
4023     *
4024     * @param newState The new state to set for the store.
4025     */
4026    setState(newState) {
4027      if (this.state === newState) {
4028        return;
4029      }
4030      this.state = newState;
4031      this.updateTick += 1;
4032      const currentTick = this.updateTick;
4033      for (const listener of this.listeners) {
4034        if (currentTick !== this.updateTick) {
4035          return;
4036        }
4037        listener(newState);
4038      }
4039    }
4040    /**
4041     * Merges the provided changes into the current state and notifies listeners if there are changes.
4042     * Each value must match its state key. Pass an exact known subset rather than a broad
4043     * `Partial<State>`, which may contain `undefined` for required state fields.
4044     *
4045     * @param changes An object containing the changes to apply to the current state.
4046     */
4047    update(changes) {
4048      for (const key in changes) {
4049        if (!Object.is(this.state[key], changes[key])) {
4050          this.setState({
4051            ...this.state,
4052            ...changes
4053          });
4054          return;
4055        }
4056      }
4057    }
4058    /**
4059     * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
4060     *
4061     * @param key The key in the store's state to update.
4062     * @param value The new value to set for the specified key.
4063     */
4064    set(key, value) {
4065      if (!Object.is(this.state[key], value)) {
4066        this.setState({
4067          ...this.state,
4068          [key]: value
4069        });
4070      }
4071    }
4072    /**
4073     * Gives the state a new reference and updates all registered listeners.
4074     */
4075    notifyAll() {
4076      const newState = {
4077        ...this.state
4078      };
4079      this.setState(newState);
4080    }
4081    use(selector, a1, a2, a3) {
4082      return useStore(this, selector, a1, a2, a3);
4083    }
4084  };
4085  
4086  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/store/ReactStore.mjs
4087  var React22 = __toESM(require_react(), 1);
4088  var ReactStore = class extends Store {
4089    /**
4090     * Creates a new ReactStore instance.
4091     *
4092     * @param state Initial state of the store.
4093     * @param context Non-reactive context values.
4094     * @param selectors Optional selectors for use with `useState`.
4095     */
4096    constructor(state, context = {}, selectors3) {
4097      super(state);
4098      this.context = context;
4099      this.selectors = selectors3;
4100    }
4101    /**
4102     * Non-reactive values such as refs, callbacks, etc.
4103     */
4104    /**
4105     * Synchronizes a single external value into the store.
4106     *
4107     * Note that the while the value in `state` is updated immediately, the value returned
4108     * by `useState` is updated before the next render (similarly to React's `useState`).
4109     */
4110    useSyncedValue(key, value) {
4111      React22.useDebugValue(key);
4112      const store = this;
4113      useIsoLayoutEffect(() => {
4114        if (store.state[key] !== value) {
4115          store.set(key, value);
4116        }
4117      }, [store, key, value]);
4118    }
4119    /**
4120     * Synchronizes a single external value into the store and
4121     * cleans it up (sets to `undefined`) on unmount.
4122     *
4123     * Note that the while the value in `state` is updated immediately, the value returned
4124     * by `useState` is updated before the next render (similarly to React's `useState`).
4125     */
4126    useSyncedValueWithCleanup(key, value) {
4127      const store = this;
4128      useIsoLayoutEffect(() => {
4129        if (store.state[key] !== value) {
4130          store.set(key, value);
4131        }
4132        return () => {
4133          store.set(key, void 0);
4134        };
4135      }, [store, key, value]);
4136    }
4137    /**
4138     * Synchronizes multiple external values into the store.
4139     * Each value must match its state key. Pass an exact known subset rather than a broad
4140     * `Partial<State>`, which may contain `undefined` for required state fields.
4141     *
4142     * Note that the while the values in `state` are updated immediately, the values returned
4143     * by `useState` are updated before the next render (similarly to React's `useState`).
4144     *
4145     * @param statePart An exact subset of state fields to synchronize. Unknown keys are not accepted.
4146     */
4147    useSyncedValues(statePart) {
4148      const store = this;
4149      if (true) {
4150        React22.useDebugValue(statePart, (p) => Object.keys(p));
4151        const keys = React22.useRef(Object.keys(statePart)).current;
4152        const nextKeys = Object.keys(statePart);
4153        if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) {
4154          console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
4155        }
4156      }
4157      const dependencies = Object.values(statePart);
4158      useIsoLayoutEffect(() => {
4159        store.update(statePart);
4160      }, [store, ...dependencies]);
4161    }
4162    /**
4163     * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
4164     * is non-undefined, the store's state at `key` is updated to match `controlled`.
4165     */
4166    useControlledProp(key, controlled) {
4167      React22.useDebugValue(key);
4168      const store = this;
4169      const isControlled = controlled !== void 0;
4170      useIsoLayoutEffect(() => {
4171        if (isControlled && !Object.is(store.state[key], controlled)) {
4172          store.setState({
4173            ...store.state,
4174            [key]: controlled
4175          });
4176        }
4177      }, [store, key, controlled, isControlled]);
4178      if (true) {
4179        const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
4180        if (!cache.has(key)) {
4181          cache.set(key, isControlled);
4182        }
4183        const previouslyControlled = cache.get(key);
4184        if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) {
4185          console.error(`A component is changing the $previouslyControlled ? "" : "un"}controlled state of $key.toString()} to be $previouslyControlled ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
4186        }
4187      }
4188    }
4189    /** Gets the current value from the store using a selector with the provided key.
4190     *
4191     * @param key Key of the selector to use.
4192     */
4193    select(key, a1, a2, a3) {
4194      const selector = this.selectors[key];
4195      return selector(this.state, a1, a2, a3);
4196    }
4197    /**
4198     * Returns a value from the store's state using a selector function.
4199     * Used to subscribe to specific parts of the state.
4200     * This methods causes a rerender whenever the selected state changes.
4201     *
4202     * @param key Key of the selector to use.
4203     */
4204    useState(key, a1, a2, a3) {
4205      React22.useDebugValue(key);
4206      return useStore(this, this.selectors[key], a1, a2, a3);
4207    }
4208    /**
4209     * Wraps a function with `useStableCallback` to ensure it has a stable reference
4210     * and assigns it to the context.
4211     *
4212     * @param key Key of the event callback. Must be a function in the context.
4213     * @param fn Function to assign.
4214     */
4215    useContextCallback(key, fn) {
4216      React22.useDebugValue(key);
4217      const stableFunction = useStableCallback(fn ?? NOOP);
4218      this.context[key] = stableFunction;
4219    }
4220    /**
4221     * Returns a stable setter function for a specific key in the store's state.
4222     * It's commonly used to pass as a ref callback to React elements.
4223     *
4224     * @param key Key of the state to set.
4225     */
4226    useStateSetter(key) {
4227      const ref = React22.useRef(void 0);
4228      if (ref.current === void 0) {
4229        ref.current = (value) => {
4230          this.set(key, value);
4231        };
4232      }
4233      return ref.current;
4234    }
4235    /**
4236     * Observes changes derived from the store's selectors and calls the listener when the selected value changes.
4237     *
4238     * @param key Key of the selector to observe.
4239     * @param listener Listener function called when the selector result changes.
4240     */
4241    observe(selector, listener) {
4242      let selectFn;
4243      if (typeof selector === "function") {
4244        selectFn = selector;
4245      } else {
4246        selectFn = this.selectors[selector];
4247      }
4248      let prevValue = selectFn(this.state);
4249      listener(prevValue, prevValue, this);
4250      return this.subscribe((nextState) => {
4251        const nextValue = selectFn(nextState);
4252        if (!Object.is(prevValue, nextValue)) {
4253          const oldValue = prevValue;
4254          prevValue = nextValue;
4255          listener(nextValue, oldValue, this);
4256        }
4257      });
4258    }
4259  };
4260  
4261  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
4262  var selectors = {
4263    open: (state) => state.open,
4264    transitionStatus: (state) => state.transitionStatus,
4265    domReferenceElement: (state) => state.domReferenceElement,
4266    referenceElement: (state) => state.positionReference ?? state.referenceElement,
4267    floatingElement: (state) => state.floatingElement,
4268    floatingId: (state) => state.floatingId
4269  };
4270  var FloatingRootStore = class extends ReactStore {
4271    constructor(options) {
4272      const {
4273        syncOnly,
4274        nested,
4275        onOpenChange,
4276        triggerElements,
4277        ...initialState
4278      } = options;
4279      super({
4280        ...initialState,
4281        positionReference: initialState.referenceElement,
4282        domReferenceElement: initialState.referenceElement
4283      }, {
4284        onOpenChange,
4285        dataRef: {
4286          current: {}
4287        },
4288        events: createEventEmitter(),
4289        nested,
4290        triggerElements
4291      }, selectors);
4292      this.syncOnly = syncOnly;
4293    }
4294    /**
4295     * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
4296     */
4297    syncOpenEvent = (newOpen, event) => {
4298      if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
4299      // click events to upgrade a hover-open.
4300      event != null && isClickLikeEvent(event)) {
4301        this.context.dataRef.current.openEvent = newOpen ? event : void 0;
4302      }
4303    };
4304    /**
4305     * Runs the root-owned side effects for an open state change.
4306     */
4307    dispatchOpenChange = (newOpen, eventDetails) => {
4308      this.syncOpenEvent(newOpen, eventDetails.event);
4309      const details = {
4310        open: newOpen,
4311        reason: eventDetails.reason,
4312        nativeEvent: eventDetails.event,
4313        nested: this.context.nested,
4314        triggerElement: eventDetails.trigger
4315      };
4316      this.context.events.emit("openchange", details);
4317    };
4318    /**
4319     * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
4320     *
4321     * @param newOpen The new open state.
4322     * @param eventDetails Details about the event that triggered the open state change.
4323     */
4324    setOpen = (newOpen, eventDetails) => {
4325      if (this.syncOnly) {
4326        this.context.onOpenChange?.(newOpen, eventDetails);
4327        return;
4328      }
4329      this.dispatchOpenChange(newOpen, eventDetails);
4330      this.context.onOpenChange?.(newOpen, eventDetails);
4331    };
4332  };
4333  
4334  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/store.mjs
4335  function createInitialPopupStoreState(triggerElements, floatingId, nested = false) {
4336    return {
4337      open: false,
4338      openProp: void 0,
4339      mounted: false,
4340      transitionStatus: void 0,
4341      floatingRootContext: new FloatingRootStore({
4342        open: false,
4343        transitionStatus: void 0,
4344        floatingElement: null,
4345        referenceElement: null,
4346        triggerElements,
4347        floatingId,
4348        syncOnly: true,
4349        nested,
4350        onOpenChange: void 0
4351      }),
4352      floatingId,
4353      triggerCount: 0,
4354      preventUnmountingOnClose: false,
4355      payload: void 0,
4356      activeTriggerId: null,
4357      activeTriggerElement: null,
4358      openedWithoutTrigger: false,
4359      triggerIdProp: void 0,
4360      popupElement: null,
4361      positionerElement: null,
4362      activeTriggerProps: EMPTY_OBJECT,
4363      inactiveTriggerProps: EMPTY_OBJECT,
4364      popupProps: EMPTY_OBJECT
4365    };
4366  }
4367  var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId;
4368  var openSelector = (state) => state.openProp ?? state.open;
4369  var popupIdSelector = (state) => {
4370    const popupId = state.popupElement?.id ?? state.floatingId;
4371    return popupId || void 0;
4372  };
4373  function triggerOwnsOpenPopup(state, triggerId) {
4374    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
4375  }
4376  function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
4377    if (triggerOwnsOpenPopup(state, triggerId)) {
4378      return true;
4379    }
4380    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && !state.openedWithoutTrigger && state.triggerCount === 1;
4381  }
4382  var popupStoreSelectors = {
4383    open: openSelector,
4384    mounted: (state) => state.mounted,
4385    // `open` is written synchronously on an open change; `mounted`/`transitionStatus` sync in a
4386    // layout effect. Match useTransitionStatus so a retained popup does not miss its starting phase.
4387    transitionStatus: (state) => openSelector(state) && !state.mounted ? "starting" : state.transitionStatus,
4388    floatingRootContext: (state) => state.floatingRootContext,
4389    triggerCount: (state) => state.triggerCount,
4390    preventUnmountingOnClose: (state) => state.preventUnmountingOnClose,
4391    payload: (state) => state.payload,
4392    activeTriggerId: activeTriggerIdSelector,
4393    activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null,
4394    popupId: popupIdSelector,
4395    /**
4396     * Whether the trigger with the given ID was used to open the popup.
4397     */
4398    isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId,
4399    /**
4400     * Whether the popup is open and was activated by a trigger with the given ID.
4401     */
4402    isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),
4403    /**
4404     * Whether the popup is mounted and was activated by a trigger with the given ID.
4405     */
4406    isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted,
4407    triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,
4408    /**
4409     * Popup id for the trigger that currently owns the open popup.
4410     */
4411    triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0,
4412    popupProps: (state) => state.popupProps,
4413    popupElement: (state) => state.popupElement,
4414    positionerElement: (state) => state.positionerElement
4415  };
4416  
4417  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs
4418  var React23 = __toESM(require_react(), 1);
4419  var import_shim2 = __toESM(require_shim(), 1);
4420  function usePopupHandleStore(handle) {
4421    const subscribe = React23.useCallback((listener) => {
4422      if (handle === void 0) {
4423        return NOOP;
4424      }
4425      return handle.subscribeStore(listener);
4426    }, [handle]);
4427    const getSnapshot = React23.useCallback(() => {
4428      return handle === void 0 ? void 0 : handle.store;
4429    }, [handle]);
4430    return (0, import_shim2.useSyncExternalStore)(subscribe, getSnapshot, () => handle?.serverStore);
4431  }
4432  
4433  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs
4434  var React24 = __toESM(require_react(), 1);
4435  var isMacSafari = parts_exports.os.mac && parts_exports.engine.webkit;
4436  function useFocus(store, props = {}) {
4437    const {
4438      enabled = true,
4439      delay
4440    } = props;
4441    const {
4442      events,
4443      dataRef
4444    } = store.context;
4445    const blockFocusRef = React24.useRef(false);
4446    const blockedReferenceRef = React24.useRef(null);
4447    const keyboardModalityRef = React24.useRef(true);
4448    const timeout = useTimeout();
4449    React24.useEffect(() => {
4450      const domReference = store.select("domReferenceElement");
4451      if (!enabled) {
4452        return void 0;
4453      }
4454      const win = getWindow(domReference);
4455      function onBlur() {
4456        const currentDomReference = store.select("domReferenceElement");
4457        if (!store.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {
4458          blockFocusRef.current = true;
4459          blockedReferenceRef.current = currentDomReference;
4460        }
4461      }
4462      function onKeyDown() {
4463        keyboardModalityRef.current = true;
4464      }
4465      function onPointerDown() {
4466        keyboardModalityRef.current = false;
4467      }
4468      return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true));
4469    }, [store, enabled]);
4470    React24.useEffect(() => {
4471      if (!enabled) {
4472        return void 0;
4473      }
4474      function onOpenChangeLocal(details) {
4475        if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) {
4476          const referenceElement = store.select("domReferenceElement");
4477          if (isElement(referenceElement)) {
4478            blockedReferenceRef.current = referenceElement;
4479            blockFocusRef.current = true;
4480          }
4481        }
4482      }
4483      events.on("openchange", onOpenChangeLocal);
4484      return () => {
4485        events.off("openchange", onOpenChangeLocal);
4486      };
4487    }, [events, enabled, store]);
4488    const reference = React24.useMemo(() => {
4489      function resetBlockedFocus() {
4490        blockFocusRef.current = false;
4491        blockedReferenceRef.current = null;
4492      }
4493      return {
4494        onMouseLeave() {
4495          resetBlockedFocus();
4496        },
4497        onFocus(event) {
4498          const focusTarget = event.currentTarget;
4499          if (blockFocusRef.current) {
4500            if (blockedReferenceRef.current === focusTarget) {
4501              return;
4502            }
4503            resetBlockedFocus();
4504          }
4505          const target = getTarget(event.nativeEvent);
4506          if (isElement(target)) {
4507            if (isMacSafari && !event.relatedTarget) {
4508              if (!keyboardModalityRef.current && !isTypeableElement(target)) {
4509                return;
4510              }
4511            } else if (!matchesFocusVisible(target)) {
4512              return;
4513            }
4514          }
4515          const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements);
4516          const {
4517            nativeEvent,
4518            currentTarget
4519          } = event;
4520          if (store.select("open") && movedFromOtherEnabledTrigger || !delay) {
4521            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
4522            return;
4523          }
4524          timeout.start(delay, () => {
4525            if (blockFocusRef.current) {
4526              return;
4527            }
4528            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
4529          });
4530        },
4531        onBlur(event) {
4532          resetBlockedFocus();
4533          const relatedTarget = event.relatedTarget;
4534          const nativeEvent = event.nativeEvent;
4535          const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside";
4536          timeout.start(0, () => {
4537            const domReference = store.select("domReferenceElement");
4538            const activeEl = activeElement(ownerDocument(domReference));
4539            if (!relatedTarget && activeEl === domReference) {
4540              return;
4541            }
4542            if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {
4543              return;
4544            }
4545            const nextFocusedElement = relatedTarget ?? activeEl;
4546            if (isTargetInsideEnabledTrigger(nextFocusedElement, store.context.triggerElements)) {
4547              return;
4548            }
4549            store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent));
4550          });
4551        }
4552      };
4553    }, [dataRef, delay, store, timeout]);
4554    return React24.useMemo(() => enabled ? {
4555      reference,
4556      trigger: reference
4557    } : {}, [enabled, reference]);
4558  }
4559  
4560  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
4561  var React25 = __toESM(require_react(), 1);
4562  
4563  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs
4564  var HoverInteraction = class _HoverInteraction {
4565    pointerType = void 0;
4566    interactedInside = false;
4567    handler = void 0;
4568    blockMouseMove = true;
4569    performedPointerEventsMutation = false;
4570    pointerEventsScopeElement = null;
4571    pointerEventsReferenceElement = null;
4572    pointerEventsFloatingElement = null;
4573    restTimeoutPending = false;
4574    openChangeTimeout = new Timeout();
4575    restTimeout = new Timeout();
4576    handleCloseOptions = void 0;
4577    static create() {
4578      return new _HoverInteraction();
4579    }
4580    dispose = () => {
4581      this.openChangeTimeout.clear();
4582      this.restTimeout.clear();
4583    };
4584    disposeEffect = () => {
4585      return this.dispose;
4586    };
4587  };
4588  var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap();
4589  function clearSafePolygonPointerEventsMutation(instance) {
4590    if (!instance.performedPointerEventsMutation) {
4591      return;
4592    }
4593    const scopeElement = instance.pointerEventsScopeElement;
4594    if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {
4595      instance.pointerEventsScopeElement?.style.removeProperty("pointer-events");
4596      instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events");
4597      instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events");
4598      pointerEventsMutationOwnerByScopeElement.delete(scopeElement);
4599    }
4600    instance.performedPointerEventsMutation = false;
4601    instance.pointerEventsScopeElement = null;
4602    instance.pointerEventsReferenceElement = null;
4603    instance.pointerEventsFloatingElement = null;
4604  }
4605  function applySafePolygonPointerEventsMutation(instance, options) {
4606    const {
4607      scopeElement,
4608      referenceElement,
4609      floatingElement
4610    } = options;
4611    const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);
4612    if (existingOwner && existingOwner !== instance) {
4613      clearSafePolygonPointerEventsMutation(existingOwner);
4614    }
4615    clearSafePolygonPointerEventsMutation(instance);
4616    instance.performedPointerEventsMutation = true;
4617    instance.pointerEventsScopeElement = scopeElement;
4618    instance.pointerEventsReferenceElement = referenceElement;
4619    instance.pointerEventsFloatingElement = floatingElement;
4620    pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);
4621    scopeElement.style.pointerEvents = "none";
4622    referenceElement.style.pointerEvents = "auto";
4623    floatingElement.style.pointerEvents = "auto";
4624  }
4625  function useHoverInteractionSharedState(store) {
4626    const data = store.context.dataRef.current;
4627    const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;
4628    if (!data.hoverInteractionState) {
4629      data.hoverInteractionState = instance;
4630    }
4631    useOnMount(data.hoverInteractionState.disposeEffect);
4632    return data.hoverInteractionState;
4633  }
4634  
4635  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
4636  function useHoverFloatingInteraction(store, parameters = {}) {
4637    const {
4638      enabled = true,
4639      closeDelay: closeDelayProp = 0,
4640      nodeId: nodeIdProp
4641    } = parameters;
4642    const open2 = store.useState("open");
4643    const floatingElement = store.useState("floatingElement");
4644    const domReferenceElement = store.useState("domReferenceElement");
4645    const {
4646      dataRef
4647    } = store.context;
4648    const tree = useFloatingTree();
4649    const parentId = useFloatingParentNodeId();
4650    const instance = useHoverInteractionSharedState(store);
4651    const childClosedTimeout = useTimeout();
4652    const isClickLikeOpenEvent2 = useStableCallback(() => {
4653      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
4654    });
4655    const isHoverOpen = useStableCallback(() => {
4656      return isHoverOpenEvent(dataRef.current.openEvent?.type);
4657    });
4658    const clearPointerEvents = useStableCallback(() => {
4659      clearSafePolygonPointerEventsMutation(instance);
4660    });
4661    useIsoLayoutEffect(() => {
4662      if (!open2) {
4663        instance.pointerType = void 0;
4664        instance.restTimeoutPending = false;
4665        instance.interactedInside = false;
4666        clearPointerEvents();
4667      }
4668    }, [open2, instance, clearPointerEvents]);
4669    React25.useEffect(() => {
4670      return clearPointerEvents;
4671    }, [clearPointerEvents]);
4672    useIsoLayoutEffect(() => {
4673      if (!enabled) {
4674        return void 0;
4675      }
4676      if (open2 && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {
4677        const ref = domReferenceElement;
4678        const floatingEl = floatingElement;
4679        const doc = ownerDocument(floatingElement);
4680        const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating;
4681        if (parentFloating) {
4682          parentFloating.style.pointerEvents = "";
4683        }
4684        const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;
4685        const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;
4686        const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? closest(ref, "[data-rootownerid]") ?? doc.body;
4687        applySafePolygonPointerEventsMutation(instance, {
4688          scopeElement,
4689          referenceElement: ref,
4690          floatingElement: floatingEl
4691        });
4692        return () => {
4693          clearPointerEvents();
4694        };
4695      }
4696      return void 0;
4697    }, [enabled, open2, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);
4698    React25.useEffect(() => {
4699      if (!enabled) {
4700        return void 0;
4701      }
4702      function hasParentChildren() {
4703        return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);
4704      }
4705      function closeWithDelay(event) {
4706        const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType);
4707        const close = () => {
4708          store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
4709          tree?.events.emit("floating.closed", event);
4710        };
4711        if (closeDelay) {
4712          instance.openChangeTimeout.start(closeDelay, close);
4713        } else {
4714          instance.openChangeTimeout.clear();
4715          close();
4716        }
4717      }
4718      function handleInteractInside(event) {
4719        const target = getTarget(event);
4720        if (!isInteractiveElement(target)) {
4721          instance.interactedInside = false;
4722          return;
4723        }
4724        instance.interactedInside = closest(target, "[aria-haspopup]") != null;
4725      }
4726      function onFloatingMouseEnter() {
4727        instance.openChangeTimeout.clear();
4728        childClosedTimeout.clear();
4729        tree?.events.off("floating.closed", onNodeClosed);
4730        clearPointerEvents();
4731      }
4732      function onFloatingMouseLeave(event) {
4733        if (hasParentChildren() && tree) {
4734          tree.events.on("floating.closed", onNodeClosed);
4735          return;
4736        }
4737        if (isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) {
4738          return;
4739        }
4740        const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;
4741        const relatedTarget = event.relatedTarget;
4742        const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget));
4743        if (isMovingIntoDescendantFloating) {
4744          return;
4745        }
4746        if (instance.handler) {
4747          instance.handler(event);
4748          return;
4749        }
4750        clearPointerEvents();
4751        if (isHoverOpen() && !isClickLikeOpenEvent2()) {
4752          closeWithDelay(event);
4753        }
4754      }
4755      function onNodeClosed(event) {
4756        if (!tree || !parentId || hasParentChildren()) {
4757          return;
4758        }
4759        childClosedTimeout.start(0, () => {
4760          tree.events.off("floating.closed", onNodeClosed);
4761          store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
4762          tree.events.emit("floating.closed", event);
4763        });
4764      }
4765      const floating = floatingElement;
4766      return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => {
4767        tree?.events.off("floating.closed", onNodeClosed);
4768      });
4769    }, [enabled, floatingElement, store, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);
4770  }
4771  
4772  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs
4773  var React26 = __toESM(require_react(), 1);
4774  var ReactDOM4 = __toESM(require_react_dom(), 1);
4775  var EMPTY_REF = {
4776    current: null
4777  };
4778  function useHoverReferenceInteraction(store, props = {}) {
4779    const {
4780      enabled = true,
4781      delay = 0,
4782      handleClose = null,
4783      mouseOnly = false,
4784      restMs = 0,
4785      move = true,
4786      triggerElementRef = EMPTY_REF,
4787      externalTree,
4788      isActiveTrigger = true,
4789      getHandleCloseContext,
4790      isClosing,
4791      shouldOpen: shouldOpenProp,
4792      guardStaleOpen = false
4793    } = props;
4794    const {
4795      dataRef,
4796      events
4797    } = store.context;
4798    const tree = useFloatingTree(externalTree);
4799    const instance = useHoverInteractionSharedState(store);
4800    const isHoverCloseActiveRef = React26.useRef(false);
4801    const handleCloseRef = useValueAsRef(handleClose);
4802    const delayRef = useValueAsRef(delay);
4803    const restMsRef = useValueAsRef(restMs);
4804    const enabledRef = useValueAsRef(enabled);
4805    const shouldOpenRef = useValueAsRef(shouldOpenProp);
4806    const isClosingRef = useValueAsRef(isClosing);
4807    const isClickLikeOpenEvent2 = useStableCallback(() => {
4808      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
4809    });
4810    const checkShouldOpen = useStableCallback(() => {
4811      return shouldOpenRef.current?.() !== false;
4812    });
4813    const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {
4814      const allTriggers = store.context.triggerElements;
4815      if (allTriggers.hasElement(currentTarget)) {
4816        return !currentDomReference || !contains(currentDomReference, currentTarget);
4817      }
4818      if (!isElement(target)) {
4819        return false;
4820      }
4821      const targetElement = target;
4822      return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));
4823    });
4824    const cleanupMouseMoveHandler = useStableCallback(() => {
4825      if (!instance.handler) {
4826        return;
4827      }
4828      const doc = ownerDocument(store.select("domReferenceElement"));
4829      doc.removeEventListener("mousemove", instance.handler);
4830      instance.handler = void 0;
4831    });
4832    const clearPointerEvents = useStableCallback(() => {
4833      clearSafePolygonPointerEventsMutation(instance);
4834    });
4835    if (isActiveTrigger) {
4836      instance.handleCloseOptions = handleClose?.__options;
4837    }
4838    React26.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);
4839    React26.useEffect(() => {
4840      if (!enabled) {
4841        return void 0;
4842      }
4843      function onOpenChangeLocal(details) {
4844        if (!details.open) {
4845          isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover;
4846          cleanupMouseMoveHandler();
4847          instance.openChangeTimeout.clear();
4848          instance.restTimeout.clear();
4849          instance.blockMouseMove = true;
4850          instance.restTimeoutPending = false;
4851        } else {
4852          isHoverCloseActiveRef.current = false;
4853        }
4854      }
4855      events.on("openchange", onOpenChangeLocal);
4856      return () => {
4857        events.off("openchange", onOpenChangeLocal);
4858      };
4859    }, [enabled, events, instance, cleanupMouseMoveHandler]);
4860    React26.useEffect(() => {
4861      if (!enabled) {
4862        return void 0;
4863      }
4864      function closeWithDelay(event, runElseBranch = true) {
4865        const closeDelay = getDelay(delayRef.current, "close", instance.pointerType);
4866        if (closeDelay) {
4867          instance.openChangeTimeout.start(closeDelay, () => {
4868            store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
4869            tree?.events.emit("floating.closed", event);
4870          });
4871        } else if (runElseBranch) {
4872          instance.openChangeTimeout.clear();
4873          store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
4874          tree?.events.emit("floating.closed", event);
4875        }
4876      }
4877      const trigger = triggerElementRef.current ?? (isActiveTrigger ? store.select("domReferenceElement") : null);
4878      if (!isElement(trigger)) {
4879        return void 0;
4880      }
4881      function onMouseEnter(event) {
4882        instance.openChangeTimeout.clear();
4883        instance.blockMouseMove = false;
4884        if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
4885          return;
4886        }
4887        const restMsValue = getRestMs(restMsRef.current);
4888        const openDelay = getDelay(delayRef.current, "open", instance.pointerType);
4889        const eventTarget = getTarget(event);
4890        const currentTarget = event.currentTarget ?? null;
4891        const currentDomReference = store.select("domReferenceElement");
4892        let triggerNode = currentTarget;
4893        if (isElement(eventTarget) && !store.context.triggerElements.hasElement(eventTarget)) {
4894          for (const triggerElement of store.context.triggerElements.elements()) {
4895            if (contains(triggerElement, eventTarget)) {
4896              triggerNode = triggerElement;
4897              break;
4898            }
4899          }
4900        }
4901        if (isElement(currentTarget) && isElement(currentDomReference) && !store.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {
4902          triggerNode = currentDomReference;
4903        }
4904        const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);
4905        const isOpen = store.select("open");
4906        const isInClosingTransition = isClosingRef.current?.() ?? store.select("transitionStatus") === "ending";
4907        const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;
4908        const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;
4909        const isRestOnlyDelay = restMsValue > 0 && !openDelay;
4910        const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;
4911        const shouldOpen = !isOpen || isOverInactive;
4912        if (shouldOpenImmediately) {
4913          if (checkShouldOpen()) {
4914            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
4915          }
4916          return;
4917        }
4918        if (isRestOnlyDelay) {
4919          return;
4920        }
4921        if (openDelay) {
4922          instance.openChangeTimeout.start(openDelay, () => {
4923            if (shouldOpen && checkShouldOpen()) {
4924              store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
4925            }
4926          });
4927        } else if (shouldOpen) {
4928          if (checkShouldOpen()) {
4929            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
4930          }
4931        }
4932      }
4933      function onMouseLeave(event) {
4934        if (isClickLikeOpenEvent2()) {
4935          clearPointerEvents();
4936          return;
4937        }
4938        cleanupMouseMoveHandler();
4939        const domReferenceElement = store.select("domReferenceElement");
4940        const doc = ownerDocument(domReferenceElement);
4941        instance.restTimeout.clear();
4942        instance.restTimeoutPending = false;
4943        const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();
4944        if (isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) {
4945          return;
4946        }
4947        if (handleCloseRef.current && handleCloseContextBase) {
4948          if (!store.select("open")) {
4949            instance.openChangeTimeout.clear();
4950          }
4951          const currentTrigger = triggerElementRef.current;
4952          instance.handler = handleCloseRef.current({
4953            ...handleCloseContextBase,
4954            tree,
4955            x: event.clientX,
4956            y: event.clientY,
4957            onClose() {
4958              clearPointerEvents();
4959              cleanupMouseMoveHandler();
4960              if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store.select("domReferenceElement")) {
4961                closeWithDelay(event, true);
4962              }
4963            }
4964          });
4965          doc.addEventListener("mousemove", instance.handler);
4966          instance.handler(event);
4967          return;
4968        }
4969        const shouldClose = instance.pointerType === "touch" ? !contains(store.select("floatingElement"), event.relatedTarget) : true;
4970        if (shouldClose) {
4971          closeWithDelay(event);
4972        }
4973      }
4974      function onMouseOut(event) {
4975        if (contains(trigger, event.relatedTarget)) {
4976          return;
4977        }
4978        instance.openChangeTimeout.clear();
4979        instance.restTimeout.clear();
4980        instance.restTimeoutPending = false;
4981      }
4982      const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, "mouseout", onMouseOut) : void 0;
4983      if (move) {
4984        return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, {
4985          once: true
4986        }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
4987      }
4988      return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
4989    }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]);
4990    return React26.useMemo(() => {
4991      if (!enabled) {
4992        return void 0;
4993      }
4994      function setPointerRef(event) {
4995        instance.pointerType = event.pointerType;
4996      }
4997      return {
4998        onPointerDown: setPointerRef,
4999        onPointerEnter: setPointerRef,
5000        onMouseMove(event) {
5001          const {
5002            nativeEvent
5003          } = event;
5004          const trigger = event.currentTarget;
5005          const currentDomReference = store.select("domReferenceElement");
5006          const currentOpen = store.select("open");
5007          const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);
5008          if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
5009            return;
5010          }
5011          if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {
5012            const floatingElement = store.select("floatingElement");
5013            if (floatingElement) {
5014              const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;
5015              applySafePolygonPointerEventsMutation(instance, {
5016                scopeElement,
5017                referenceElement: trigger,
5018                floatingElement
5019              });
5020            }
5021          }
5022          const restMsValue = getRestMs(restMsRef.current);
5023          if (currentOpen && !isOverInactive || restMsValue === 0) {
5024            return;
5025          }
5026          if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {
5027            return;
5028          }
5029          instance.restTimeout.clear();
5030          function handleMouseMove() {
5031            instance.restTimeoutPending = false;
5032            if (isClickLikeOpenEvent2()) {
5033              return;
5034            }
5035            const latestOpen = store.select("open");
5036            if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {
5037              store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger));
5038            }
5039          }
5040          if (instance.pointerType === "touch") {
5041            ReactDOM4.flushSync(() => {
5042              handleMouseMove();
5043            });
5044          } else if (isOverInactive && currentOpen) {
5045            handleMouseMove();
5046          } else {
5047            instance.restTimeoutPending = true;
5048            instance.restTimeout.start(restMsValue, handleMouseMove);
5049          }
5050        }
5051      };
5052    }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store, restMsRef, checkShouldOpen]);
5053  }
5054  
5055  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs
5056  var CURSOR_SPEED_THRESHOLD = 0.1;
5057  var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;
5058  var POLYGON_BUFFER = 0.5;
5059  function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {
5060    return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;
5061  }
5062  function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {
5063    let isInsideValue = false;
5064    if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {
5065      isInsideValue = !isInsideValue;
5066    }
5067    if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {
5068      isInsideValue = !isInsideValue;
5069    }
5070    if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {
5071      isInsideValue = !isInsideValue;
5072    }
5073    if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {
5074      isInsideValue = !isInsideValue;
5075    }
5076    return isInsideValue;
5077  }
5078  function isInsideRect(pointX, pointY, rect) {
5079    return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;
5080  }
5081  function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {
5082    const minX = Math.min(x1, x2);
5083    const maxX = Math.max(x1, x2);
5084    const minY = Math.min(y1, y2);
5085    const maxY = Math.max(y1, y2);
5086    return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;
5087  }
5088  function safePolygon(options = {}) {
5089    const {
5090      blockPointerEvents = false
5091    } = options;
5092    const timeout = new Timeout();
5093    const fn = ({
5094      x,
5095      y,
5096      placement,
5097      elements,
5098      onClose,
5099      nodeId,
5100      tree
5101    }) => {
5102      const side = placement?.split("-")[0];
5103      let hasLanded = false;
5104      let lastX = null;
5105      let lastY = null;
5106      let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0;
5107      function isCursorMovingSlowly(nextX, nextY) {
5108        const currentTime = performance.now();
5109        const elapsedTime = currentTime - lastCursorTime;
5110        if (lastX === null || lastY === null || elapsedTime === 0) {
5111          lastX = nextX;
5112          lastY = nextY;
5113          lastCursorTime = currentTime;
5114          return false;
5115        }
5116        const deltaX = nextX - lastX;
5117        const deltaY = nextY - lastY;
5118        const distanceSquared = deltaX * deltaX + deltaY * deltaY;
5119        const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;
5120        lastX = nextX;
5121        lastY = nextY;
5122        lastCursorTime = currentTime;
5123        return distanceSquared < thresholdSquared;
5124      }
5125      function close() {
5126        timeout.clear();
5127        onClose();
5128      }
5129      return function onMouseMove(event) {
5130        timeout.clear();
5131        const domReference = elements.domReference;
5132        const floating = elements.floating;
5133        if (!domReference || !floating || side == null || x == null || y == null) {
5134          return void 0;
5135        }
5136        const {
5137          clientX,
5138          clientY
5139        } = event;
5140        const target = getTarget(event);
5141        const isLeave = event.type === "mouseleave";
5142        const isOverFloatingEl = contains(floating, target);
5143        const isOverReferenceEl = contains(domReference, target);
5144        if (isOverFloatingEl) {
5145          hasLanded = true;
5146          if (!isLeave) {
5147            return void 0;
5148          }
5149        }
5150        if (isOverReferenceEl) {
5151          hasLanded = false;
5152          if (!isLeave) {
5153            hasLanded = true;
5154            return void 0;
5155          }
5156        }
5157        if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {
5158          return void 0;
5159        }
5160        function hasOpenChildNode() {
5161          return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);
5162        }
5163        function closeIfNoOpenChild() {
5164          if (!hasOpenChildNode()) {
5165            close();
5166          }
5167        }
5168        if (hasOpenChildNode()) {
5169          return void 0;
5170        }
5171        const refRect = domReference.getBoundingClientRect();
5172        const rect = floating.getBoundingClientRect();
5173        const cursorLeaveFromRight = x > rect.right - rect.width / 2;
5174        const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;
5175        const isFloatingWider = rect.width > refRect.width;
5176        const isFloatingTaller = rect.height > refRect.height;
5177        const left = (isFloatingWider ? refRect : rect).left;
5178        const right = (isFloatingWider ? refRect : rect).right;
5179        const top = (isFloatingTaller ? refRect : rect).top;
5180        const bottom = (isFloatingTaller ? refRect : rect).bottom;
5181        if (side === "top" && y >= refRect.bottom - 1 || side === "bottom" && y <= refRect.top + 1 || side === "left" && x >= refRect.right - 1 || side === "right" && x <= refRect.left + 1) {
5182          closeIfNoOpenChild();
5183          return void 0;
5184        }
5185        let isInsideTroughRect = false;
5186        switch (side) {
5187          case "top":
5188            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);
5189            break;
5190          case "bottom":
5191            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);
5192            break;
5193          case "left":
5194            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);
5195            break;
5196          case "right":
5197            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);
5198            break;
5199          default:
5200        }
5201        if (isInsideTroughRect) {
5202          return void 0;
5203        }
5204        if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {
5205          closeIfNoOpenChild();
5206          return void 0;
5207        }
5208        if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {
5209          closeIfNoOpenChild();
5210          return void 0;
5211        }
5212        let isInsidePolygon = false;
5213        switch (side) {
5214          case "top": {
5215            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
5216            const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
5217            const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
5218            const cursorPointY = y + POLYGON_BUFFER + 1;
5219            const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;
5220            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;
5221            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
5222            break;
5223          }
5224          case "bottom": {
5225            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
5226            const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
5227            const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
5228            const cursorPointY = y - POLYGON_BUFFER;
5229            const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;
5230            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;
5231            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
5232            break;
5233          }
5234          case "left": {
5235            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
5236            const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
5237            const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
5238            const cursorPointX = x + POLYGON_BUFFER + 1;
5239            const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;
5240            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;
5241            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);
5242            break;
5243          }
5244          case "right": {
5245            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
5246            const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
5247            const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
5248            const cursorPointX = x - POLYGON_BUFFER;
5249            const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;
5250            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;
5251            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);
5252            break;
5253          }
5254          default:
5255        }
5256        if (!isInsidePolygon) {
5257          closeIfNoOpenChild();
5258        } else if (!hasLanded) {
5259          timeout.start(40, closeIfNoOpenChild);
5260        }
5261        return void 0;
5262      };
5263    };
5264    fn.__options = {
5265      ...options,
5266      blockPointerEvents
5267    };
5268    return fn;
5269  }
5270  
5271  // node_modules/.store/@floating-ui/core@1.8.0-3V8aS7jJHHGcsCINjP9-5A/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
5272  function computeCoordsFromPlacement(_ref, placement, rtl) {
5273    let {
5274      reference,
5275      floating
5276    } = _ref;
5277    const sideAxis = getSideAxis(placement);
5278    const alignmentAxis = getAlignmentAxis(placement);
5279    const alignLength = getAxisLength(alignmentAxis);
5280    const side = getSide(placement);
5281    const isVertical = sideAxis === "y";
5282    const commonX = reference.x + reference.width / 2 - floating.width / 2;
5283    const commonY = reference.y + reference.height / 2 - floating.height / 2;
5284    const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
5285    let coords;
5286    switch (side) {
5287      case "top":
5288        coords = {
5289          x: commonX,
5290          y: reference.y - floating.height
5291        };
5292        break;
5293      case "bottom":
5294        coords = {
5295          x: commonX,
5296          y: reference.y + reference.height
5297        };
5298        break;
5299      case "right":
5300        coords = {
5301          x: reference.x + reference.width,
5302          y: commonY
5303        };
5304        break;
5305      case "left":
5306        coords = {
5307          x: reference.x - floating.width,
5308          y: commonY
5309        };
5310        break;
5311      default:
5312        coords = {
5313          x: reference.x,
5314          y: reference.y
5315        };
5316    }
5317    const alignment = getAlignment(placement);
5318    if (alignment) {
5319      coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1);
5320    }
5321    return coords;
5322  }
5323  async function detectOverflow(state, options) {
5324    var _await$platform$isEle;
5325    if (options === void 0) {
5326      options = {};
5327    }
5328    const {
5329      x,
5330      y,
5331      platform: platform3,
5332      rects,
5333      elements,
5334      strategy
5335    } = state;
5336    const {
5337      boundary = "clippingAncestors",
5338      rootBoundary = "viewport",
5339      elementContext = "floating",
5340      altBoundary = false,
5341      padding = 0
5342    } = evaluate(options, state);
5343    const paddingObject = getPaddingObject(padding);
5344    const altContext = elementContext === "floating" ? "reference" : "floating";
5345    const element = elements[altBoundary ? altContext : elementContext];
5346    const clippingClientRect = rectToClientRect(await platform3.getClippingRect({
5347      element: ((_await$platform$isEle = await (platform3.isElement == null ? void 0 : platform3.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform3.getDocumentElement == null ? void 0 : platform3.getDocumentElement(elements.floating)),
5348      boundary,
5349      rootBoundary,
5350      strategy
5351    }));
5352    const rect = elementContext === "floating" ? {
5353      x,
5354      y,
5355      width: rects.floating.width,
5356      height: rects.floating.height
5357    } : rects.reference;
5358    const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements.floating));
5359    const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) && await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || {
5360      x: 1,
5361      y: 1
5362    };
5363    const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({
5364      elements,
5365      rect,
5366      offsetParent,
5367      strategy
5368    }) : rect);
5369    return {
5370      top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
5371      bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
5372      left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
5373      right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
5374    };
5375  }
5376  var MAX_RESET_COUNT = 50;
5377  var computePosition = async (reference, floating, config) => {
5378    const {
5379      placement = "bottom",
5380      strategy = "absolute",
5381      middleware = [],
5382      platform: platform3
5383    } = config;
5384    const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : {
5385      ...platform3,
5386      detectOverflow
5387    };
5388    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating));
5389    let rects = await platform3.getElementRects({
5390      reference,
5391      floating,
5392      strategy
5393    });
5394    let {
5395      x,
5396      y
5397    } = computeCoordsFromPlacement(rects, placement, rtl);
5398    let statefulPlacement = placement;
5399    let resetCount = 0;
5400    const middlewareData = {};
5401    for (let i = 0; i < middleware.length; i++) {
5402      const currentMiddleware = middleware[i];
5403      if (!currentMiddleware) {
5404        continue;
5405      }
5406      const {
5407        name,
5408        fn
5409      } = currentMiddleware;
5410      const {
5411        x: nextX,
5412        y: nextY,
5413        data,
5414        reset
5415      } = await fn({
5416        x,
5417        y,
5418        initialPlacement: placement,
5419        placement: statefulPlacement,
5420        strategy,
5421        middlewareData,
5422        rects,
5423        platform: platformWithDetectOverflow,
5424        elements: {
5425          reference,
5426          floating
5427        }
5428      });
5429      x = nextX != null ? nextX : x;
5430      y = nextY != null ? nextY : y;
5431      middlewareData[name] = {
5432        ...middlewareData[name],
5433        ...data
5434      };
5435      if (reset && resetCount < MAX_RESET_COUNT) {
5436        resetCount++;
5437        if (typeof reset === "object") {
5438          if (reset.placement) {
5439            statefulPlacement = reset.placement;
5440          }
5441          if (reset.rects) {
5442            rects = reset.rects === true ? await platform3.getElementRects({
5443              reference,
5444              floating,
5445              strategy
5446            }) : reset.rects;
5447          }
5448          ({
5449            x,
5450            y
5451          } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
5452        }
5453        i = -1;
5454      }
5455    }
5456    return {
5457      x,
5458      y,
5459      placement: statefulPlacement,
5460      strategy,
5461      middlewareData
5462    };
5463  };
5464  var flip = function(options) {
5465    if (options === void 0) {
5466      options = {};
5467    }
5468    return {
5469      name: "flip",
5470      options,
5471      async fn(state) {
5472        var _middlewareData$arrow, _middlewareData$flip;
5473        const {
5474          placement,
5475          middlewareData,
5476          rects,
5477          initialPlacement,
5478          platform: platform3,
5479          elements
5480        } = state;
5481        const {
5482          mainAxis: checkMainAxis = true,
5483          crossAxis: checkCrossAxis = true,
5484          fallbackPlacements: specifiedFallbackPlacements,
5485          fallbackStrategy = "bestFit",
5486          fallbackAxisSideDirection = "none",
5487          flipAlignment = true,
5488          ...detectOverflowOptions
5489        } = evaluate(options, state);
5490        if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
5491          return {};
5492        }
5493        const side = getSide(placement);
5494        const initialSideAxis = getSideAxis(initialPlacement);
5495        const isBasePlacement = getSide(initialPlacement) === initialPlacement;
5496        const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
5497        const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
5498        const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
5499        if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
5500          fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
5501        }
5502        const placements2 = [initialPlacement, ...fallbackPlacements];
5503        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
5504        const overflows = [];
5505        let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
5506        if (checkMainAxis) {
5507          overflows.push(overflow[side]);
5508        }
5509        if (checkCrossAxis) {
5510          const sides2 = getAlignmentSides(placement, rects, rtl);
5511          overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
5512        }
5513        overflowsData = [...overflowsData, {
5514          placement,
5515          overflows
5516        }];
5517        if (!overflows.every((side2) => side2 <= 0)) {
5518          var _middlewareData$flip2, _overflowsData$filter;
5519          const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
5520          const nextPlacement = placements2[nextIndex];
5521          if (nextPlacement) {
5522            const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
5523            if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
5524            // overflows the main axis.
5525            overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
5526              return {
5527                data: {
5528                  index: nextIndex,
5529                  overflows: overflowsData
5530                },
5531                reset: {
5532                  placement: nextPlacement
5533                }
5534              };
5535            }
5536          }
5537          let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
5538          if (!resetPlacement) {
5539            switch (fallbackStrategy) {
5540              case "bestFit": {
5541                var _overflowsData$filter2;
5542                const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
5543                  if (hasFallbackAxisSideDirection) {
5544                    const currentSideAxis = getSideAxis(d.placement);
5545                    return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
5546                    // reading directions favoring greater width.
5547                    currentSideAxis === "y";
5548                  }
5549                  return true;
5550                }).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
5551                if (placement2) {
5552                  resetPlacement = placement2;
5553                }
5554                break;
5555              }
5556              case "initialPlacement":
5557                resetPlacement = initialPlacement;
5558                break;
5559            }
5560          }
5561          if (placement !== resetPlacement) {
5562            return {
5563              reset: {
5564                placement: resetPlacement
5565              }
5566            };
5567          }
5568        }
5569        return {};
5570      }
5571    };
5572  };
5573  var originSides = /* @__PURE__ */ new Set(["left", "top"]);
5574  async function convertValueToCoords(state, options) {
5575    const {
5576      placement,
5577      platform: platform3,
5578      elements
5579    } = state;
5580    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
5581    const side = getSide(placement);
5582    const alignment = getAlignment(placement);
5583    const isVertical = getSideAxis(placement) === "y";
5584    const mainAxisMulti = originSides.has(side) ? -1 : 1;
5585    const crossAxisMulti = rtl && isVertical ? -1 : 1;
5586    const rawValue = evaluate(options, state);
5587    let {
5588      mainAxis,
5589      crossAxis,
5590      alignmentAxis
5591    } = typeof rawValue === "number" ? {
5592      mainAxis: rawValue,
5593      crossAxis: 0,
5594      alignmentAxis: null
5595    } : {
5596      mainAxis: rawValue.mainAxis || 0,
5597      crossAxis: rawValue.crossAxis || 0,
5598      alignmentAxis: rawValue.alignmentAxis
5599    };
5600    if (alignment && typeof alignmentAxis === "number") {
5601      crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
5602    }
5603    return isVertical ? {
5604      x: crossAxis * crossAxisMulti,
5605      y: mainAxis * mainAxisMulti
5606    } : {
5607      x: mainAxis * mainAxisMulti,
5608      y: crossAxis * crossAxisMulti
5609    };
5610  }
5611  var offset = function(options) {
5612    if (options === void 0) {
5613      options = 0;
5614    }
5615    return {
5616      name: "offset",
5617      options,
5618      async fn(state) {
5619        var _middlewareData$offse, _middlewareData$arrow;
5620        const {
5621          x,
5622          y,
5623          placement,
5624          middlewareData
5625        } = state;
5626        const diffCoords = await convertValueToCoords(state, options);
5627        if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
5628          return {};
5629        }
5630        return {
5631          x: x + diffCoords.x,
5632          y: y + diffCoords.y,
5633          data: {
5634            ...diffCoords,
5635            placement
5636          }
5637        };
5638      }
5639    };
5640  };
5641  var shift = function(options) {
5642    if (options === void 0) {
5643      options = {};
5644    }
5645    return {
5646      name: "shift",
5647      options,
5648      async fn(state) {
5649        const {
5650          x,
5651          y,
5652          placement,
5653          platform: platform3
5654        } = state;
5655        const {
5656          mainAxis: checkMainAxis = true,
5657          crossAxis: checkCrossAxis = false,
5658          limiter = {
5659            fn: (_ref) => {
5660              let {
5661                x: x2,
5662                y: y2
5663              } = _ref;
5664              return {
5665                x: x2,
5666                y: y2
5667              };
5668            }
5669          },
5670          ...detectOverflowOptions
5671        } = evaluate(options, state);
5672        const coords = {
5673          x,
5674          y
5675        };
5676        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
5677        const crossAxis = getSideAxis(placement);
5678        const mainAxis = getOppositeAxis(crossAxis);
5679        let mainAxisCoord = coords[mainAxis];
5680        let crossAxisCoord = coords[crossAxis];
5681        const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]);
5682        if (checkMainAxis) {
5683          mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
5684        }
5685        if (checkCrossAxis) {
5686          crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
5687        }
5688        const limitedCoords = limiter.fn({
5689          ...state,
5690          [mainAxis]: mainAxisCoord,
5691          [crossAxis]: crossAxisCoord
5692        });
5693        return {
5694          ...limitedCoords,
5695          data: {
5696            x: limitedCoords.x - x,
5697            y: limitedCoords.y - y,
5698            enabled: {
5699              [mainAxis]: checkMainAxis,
5700              [crossAxis]: checkCrossAxis
5701            }
5702          }
5703        };
5704      }
5705    };
5706  };
5707  var limitShift = function(options) {
5708    if (options === void 0) {
5709      options = {};
5710    }
5711    return {
5712      options,
5713      fn(state) {
5714        var _rawOffset$mainAxis, _rawOffset$crossAxis;
5715        const {
5716          x,
5717          y,
5718          placement,
5719          rects,
5720          middlewareData
5721        } = state;
5722        const {
5723          offset: offset4 = 0,
5724          mainAxis: checkMainAxis = true,
5725          crossAxis: checkCrossAxis = true
5726        } = evaluate(options, state);
5727        const coords = {
5728          x,
5729          y
5730        };
5731        const crossAxis = getSideAxis(placement);
5732        const mainAxis = getOppositeAxis(crossAxis);
5733        let mainAxisCoord = coords[mainAxis];
5734        let crossAxisCoord = coords[crossAxis];
5735        const rawOffset = evaluate(offset4, state);
5736        const computedOffset = typeof rawOffset === "number" ? {
5737          mainAxis: rawOffset,
5738          crossAxis: 0
5739        } : {
5740          mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
5741          crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
5742        };
5743        if (checkMainAxis) {
5744          const len = mainAxis === "y" ? "height" : "width";
5745          const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
5746          const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
5747          if (mainAxisCoord < limitMin) {
5748            mainAxisCoord = limitMin;
5749          } else if (mainAxisCoord > limitMax) {
5750            mainAxisCoord = limitMax;
5751          }
5752        }
5753        if (checkCrossAxis) {
5754          var _middlewareData$offse, _middlewareData$offse2;
5755          const len = mainAxis === "y" ? "width" : "height";
5756          const isOriginSide = originSides.has(getSide(placement));
5757          const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
5758          const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
5759          if (crossAxisCoord < limitMin) {
5760            crossAxisCoord = limitMin;
5761          } else if (crossAxisCoord > limitMax) {
5762            crossAxisCoord = limitMax;
5763          }
5764        }
5765        return {
5766          [mainAxis]: mainAxisCoord,
5767          [crossAxis]: crossAxisCoord
5768        };
5769      }
5770    };
5771  };
5772  var size = function(options) {
5773    if (options === void 0) {
5774      options = {};
5775    }
5776    return {
5777      name: "size",
5778      options,
5779      async fn(state) {
5780        const {
5781          placement,
5782          rects,
5783          platform: platform3,
5784          elements
5785        } = state;
5786        const {
5787          apply = () => {
5788          },
5789          ...detectOverflowOptions
5790        } = evaluate(options, state);
5791        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
5792        const side = getSide(placement);
5793        const alignment = getAlignment(placement);
5794        const isYAxis = getSideAxis(placement) === "y";
5795        const {
5796          width,
5797          height
5798        } = rects.floating;
5799        let heightSide;
5800        let widthSide;
5801        if (side === "top" || side === "bottom") {
5802          heightSide = side;
5803          widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
5804        } else {
5805          widthSide = side;
5806          heightSide = alignment === "end" ? "top" : "bottom";
5807        }
5808        const maximumClippingHeight = height - overflow.top - overflow.bottom;
5809        const maximumClippingWidth = width - overflow.left - overflow.right;
5810        const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
5811        const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
5812        const shiftData = state.middlewareData.shift;
5813        const noShift = !shiftData;
5814        let availableHeight2 = overflowAvailableHeight;
5815        let availableWidth2 = overflowAvailableWidth;
5816        if (shiftData != null && shiftData.enabled.x) {
5817          availableWidth2 = maximumClippingWidth;
5818        }
5819        if (shiftData != null && shiftData.enabled.y) {
5820          availableHeight2 = maximumClippingHeight;
5821        }
5822        if (noShift && !alignment) {
5823          if (isYAxis) {
5824            availableWidth2 = width - 2 * max(overflow.left, overflow.right);
5825          } else {
5826            availableHeight2 = height - 2 * max(overflow.top, overflow.bottom);
5827          }
5828        }
5829        await apply({
5830          ...state,
5831          availableWidth: availableWidth2,
5832          availableHeight: availableHeight2
5833        });
5834        const nextDimensions = await platform3.getDimensions(elements.floating);
5835        if (width !== nextDimensions.width || height !== nextDimensions.height) {
5836          return {
5837            reset: {
5838              rects: true
5839            }
5840          };
5841        }
5842        return {};
5843      }
5844    };
5845  };
5846  
5847  // node_modules/.store/@floating-ui/dom@1.8.0-vHXcr4FgWneV0cgwFw-d7A/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
5848  function getCssDimensions(element) {
5849    const css = getComputedStyle2(element);
5850    let width = parseFloat(css.width) || 0;
5851    let height = parseFloat(css.height) || 0;
5852    const hasOffset = isHTMLElement(element);
5853    const offsetWidth = hasOffset ? element.offsetWidth : width;
5854    const offsetHeight = hasOffset ? element.offsetHeight : height;
5855    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
5856    if (shouldFallback) {
5857      width = offsetWidth;
5858      height = offsetHeight;
5859    }
5860    return {
5861      width,
5862      height,
5863      $: shouldFallback
5864    };
5865  }
5866  function unwrapElement(element) {
5867    return !isElement(element) ? element.contextElement : element;
5868  }
5869  function getScale(element) {
5870    const domElement = unwrapElement(element);
5871    if (!isHTMLElement(domElement)) {
5872      return createCoords(1);
5873    }
5874    const rect = domElement.getBoundingClientRect();
5875    const {
5876      width,
5877      height,
5878      $
5879    } = getCssDimensions(domElement);
5880    let x = ($ ? round(rect.width) : rect.width) / width;
5881    let y = ($ ? round(rect.height) : rect.height) / height;
5882    if (!x || !Number.isFinite(x)) {
5883      x = 1;
5884    }
5885    if (!y || !Number.isFinite(y)) {
5886      y = 1;
5887    }
5888    return {
5889      x,
5890      y
5891    };
5892  }
5893  var noOffsets = /* @__PURE__ */ createCoords(0);
5894  function getVisualOffsets(element) {
5895    const win = getWindow(element);
5896    if (!isWebKit() || !win.visualViewport) {
5897      return noOffsets;
5898    }
5899    return {
5900      x: win.visualViewport.offsetLeft,
5901      y: win.visualViewport.offsetTop
5902    };
5903  }
5904  function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
5905    if (isFixed === void 0) {
5906      isFixed = false;
5907    }
5908    return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
5909  }
5910  function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
5911    if (includeScale === void 0) {
5912      includeScale = false;
5913    }
5914    if (isFixedStrategy === void 0) {
5915      isFixedStrategy = false;
5916    }
5917    const clientRect = element.getBoundingClientRect();
5918    const domElement = unwrapElement(element);
5919    let scale = createCoords(1);
5920    if (includeScale) {
5921      if (offsetParent) {
5922        if (isElement(offsetParent)) {
5923          scale = getScale(offsetParent);
5924        }
5925      } else {
5926        scale = getScale(element);
5927      }
5928    }
5929    const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
5930    let x = (clientRect.left + visualOffsets.x) / scale.x;
5931    let y = (clientRect.top + visualOffsets.y) / scale.y;
5932    let width = clientRect.width / scale.x;
5933    let height = clientRect.height / scale.y;
5934    if (domElement && offsetParent) {
5935      const win = getWindow(domElement);
5936      const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
5937      let currentWin = win;
5938      let currentIFrame = getFrameElement(currentWin);
5939      while (currentIFrame && offsetWin !== currentWin) {
5940        const iframeScale = getScale(currentIFrame);
5941        const iframeRect = currentIFrame.getBoundingClientRect();
5942        const css = getComputedStyle2(currentIFrame);
5943        const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
5944        const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
5945        x *= iframeScale.x;
5946        y *= iframeScale.y;
5947        width *= iframeScale.x;
5948        height *= iframeScale.y;
5949        x += left;
5950        y += top;
5951        currentWin = getWindow(currentIFrame);
5952        currentIFrame = getFrameElement(currentWin);
5953      }
5954    }
5955    return rectToClientRect({
5956      width,
5957      height,
5958      x,
5959      y
5960    });
5961  }
5962  function getWindowScrollBarX(element, rect) {
5963    const leftScroll = getNodeScroll(element).scrollLeft;
5964    if (!rect) {
5965      return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
5966    }
5967    return rect.left + leftScroll;
5968  }
5969  function getHTMLOffset(documentElement, scroll) {
5970    const htmlRect = documentElement.getBoundingClientRect();
5971    const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
5972    const y = htmlRect.top + scroll.scrollTop;
5973    return {
5974      x,
5975      y
5976    };
5977  }
5978  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
5979    let {
5980      elements,
5981      rect,
5982      offsetParent,
5983      strategy
5984    } = _ref;
5985    const isFixed = strategy === "fixed";
5986    const documentElement = getDocumentElement(offsetParent);
5987    const topLayer = elements ? isTopLayer(elements.floating) : false;
5988    if (offsetParent === documentElement || topLayer && isFixed) {
5989      return rect;
5990    }
5991    let scroll = {
5992      scrollLeft: 0,
5993      scrollTop: 0
5994    };
5995    let scale = createCoords(1);
5996    const offsets = createCoords(0);
5997    const isOffsetParentAnElement = isHTMLElement(offsetParent);
5998    if (isOffsetParentAnElement || !isFixed) {
5999      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
6000        scroll = getNodeScroll(offsetParent);
6001      }
6002      if (isOffsetParentAnElement) {
6003        const offsetRect = getBoundingClientRect(offsetParent);
6004        scale = getScale(offsetParent);
6005        offsets.x = offsetRect.x + offsetParent.clientLeft;
6006        offsets.y = offsetRect.y + offsetParent.clientTop;
6007      }
6008    }
6009    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
6010    return {
6011      width: rect.width * scale.x,
6012      height: rect.height * scale.y,
6013      x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
6014      y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
6015    };
6016  }
6017  function getClientRects(element) {
6018    return element.getClientRects ? Array.from(element.getClientRects()) : [];
6019  }
6020  function getDocumentRect(html) {
6021    const scroll = getNodeScroll(html);
6022    const body = html.ownerDocument.body;
6023    const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
6024    const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
6025    let x = -scroll.scrollLeft + getWindowScrollBarX(html);
6026    const y = -scroll.scrollTop;
6027    if (getComputedStyle2(body).direction === "rtl") {
6028      x += max(html.clientWidth, body.clientWidth) - width;
6029    }
6030    return {
6031      width,
6032      height,
6033      x,
6034      y
6035    };
6036  }
6037  var SCROLLBAR_MAX = 25;
6038  function getViewportRect(element, strategy, rootBoundary) {
6039    if (rootBoundary === void 0) {
6040      rootBoundary = "viewport";
6041    }
6042    const isLayoutViewport = rootBoundary === "layoutViewport";
6043    const win = getWindow(element);
6044    const html = getDocumentElement(element);
6045    const visualViewport = win.visualViewport;
6046    let width = html.clientWidth;
6047    let height = html.clientHeight;
6048    let x = 0;
6049    let y = 0;
6050    if (visualViewport) {
6051      const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed";
6052      if (isLayoutViewport) {
6053        if (!layoutRelativeClientCoords) {
6054          x = -visualViewport.offsetLeft;
6055          y = -visualViewport.offsetTop;
6056        }
6057      } else {
6058        width = visualViewport.width;
6059        height = visualViewport.height;
6060        if (layoutRelativeClientCoords) {
6061          x = visualViewport.offsetLeft;
6062          y = visualViewport.offsetTop;
6063        }
6064      }
6065    }
6066    const windowScrollbarX = getWindowScrollBarX(html);
6067    if (windowScrollbarX <= 0) {
6068      const doc = html.ownerDocument;
6069      const body = doc.body;
6070      const bodyStyles = getComputedStyle(body);
6071      const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
6072      const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
6073      const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth;
6074      if (gutter <= SCROLLBAR_MAX) {
6075        width -= gutter;
6076      }
6077    }
6078    return {
6079      width,
6080      height,
6081      x,
6082      y
6083    };
6084  }
6085  function getInnerBoundingClientRect(element, strategy) {
6086    const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
6087    const top = clientRect.top + element.clientTop;
6088    const left = clientRect.left + element.clientLeft;
6089    const scale = getScale(element);
6090    const width = element.clientWidth * scale.x;
6091    const height = element.clientHeight * scale.y;
6092    const x = left * scale.x;
6093    const y = top * scale.y;
6094    return {
6095      width,
6096      height,
6097      x,
6098      y
6099    };
6100  }
6101  function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
6102    let rect;
6103    if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") {
6104      rect = getViewportRect(element, strategy, clippingAncestor);
6105    } else if (clippingAncestor === "document") {
6106      rect = getDocumentRect(getDocumentElement(element));
6107    } else if (isElement(clippingAncestor)) {
6108      rect = getInnerBoundingClientRect(clippingAncestor, strategy);
6109    } else {
6110      const visualOffsets = getVisualOffsets(element);
6111      rect = {
6112        x: clippingAncestor.x - visualOffsets.x,
6113        y: clippingAncestor.y - visualOffsets.y,
6114        width: clippingAncestor.width,
6115        height: clippingAncestor.height
6116      };
6117    }
6118    return rectToClientRect(rect);
6119  }
6120  function getClippingElementAncestors(element, cache) {
6121    const cachedResult = cache.get(element);
6122    if (cachedResult) {
6123      return cachedResult;
6124    }
6125    let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
6126    let lastKeptComputedStyle = null;
6127    const elementIsFixed = getComputedStyle2(element).position === "fixed";
6128    let currentNode = elementIsFixed ? getParentNode(element) : element;
6129    while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
6130      const computedStyle = getComputedStyle2(currentNode);
6131      const currentNodeIsContaining = isContainingBlock(currentNode);
6132      const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : "";
6133      const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static");
6134      if (shouldDropCurrentNode) {
6135        result = result.filter((ancestor) => ancestor !== currentNode);
6136      } else {
6137        lastKeptComputedStyle = computedStyle;
6138      }
6139      currentNode = getParentNode(currentNode);
6140    }
6141    cache.set(element, result);
6142    return result;
6143  }
6144  function getClippingRect(_ref) {
6145    let {
6146      element,
6147      boundary,
6148      rootBoundary,
6149      strategy
6150    } = _ref;
6151    const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
6152    const clippingAncestors = [...elementClippingAncestors, rootBoundary];
6153    const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
6154    let top = firstRect.top;
6155    let right = firstRect.right;
6156    let bottom = firstRect.bottom;
6157    let left = firstRect.left;
6158    for (let i = 1; i < clippingAncestors.length; i++) {
6159      const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
6160      top = max(rect.top, top);
6161      right = min(rect.right, right);
6162      bottom = min(rect.bottom, bottom);
6163      left = max(rect.left, left);
6164    }
6165    return {
6166      width: right - left,
6167      height: bottom - top,
6168      x: left,
6169      y: top
6170    };
6171  }
6172  function getDimensions(element) {
6173    const {
6174      width,
6175      height
6176    } = getCssDimensions(element);
6177    return {
6178      width,
6179      height
6180    };
6181  }
6182  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
6183    const isOffsetParentAnElement = isHTMLElement(offsetParent);
6184    const documentElement = getDocumentElement(offsetParent);
6185    const isFixed = strategy === "fixed";
6186    const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
6187    let scroll = {
6188      scrollLeft: 0,
6189      scrollTop: 0
6190    };
6191    const offsets = createCoords(0);
6192    if (isOffsetParentAnElement || !isFixed) {
6193      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
6194        scroll = getNodeScroll(offsetParent);
6195      }
6196      if (isOffsetParentAnElement) {
6197        const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
6198        offsets.x = offsetRect.x + offsetParent.clientLeft;
6199        offsets.y = offsetRect.y + offsetParent.clientTop;
6200      }
6201    }
6202    if (!isOffsetParentAnElement && documentElement) {
6203      offsets.x = getWindowScrollBarX(documentElement);
6204    }
6205    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
6206    const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
6207    const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
6208    return {
6209      x,
6210      y,
6211      width: rect.width,
6212      height: rect.height
6213    };
6214  }
6215  function isStaticPositioned(element) {
6216    return getComputedStyle2(element).position === "static";
6217  }
6218  function getTrueOffsetParent(element, polyfill) {
6219    if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
6220      return null;
6221    }
6222    if (polyfill) {
6223      return polyfill(element);
6224    }
6225    let rawOffsetParent = element.offsetParent;
6226    if (getDocumentElement(element) === rawOffsetParent) {
6227      rawOffsetParent = rawOffsetParent.ownerDocument.body;
6228    }
6229    return rawOffsetParent;
6230  }
6231  function getOffsetParent(element, polyfill) {
6232    const win = getWindow(element);
6233    if (isTopLayer(element)) {
6234      return win;
6235    }
6236    if (!isHTMLElement(element)) {
6237      let svgOffsetParent = getParentNode(element);
6238      while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
6239        if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
6240          return svgOffsetParent;
6241        }
6242        svgOffsetParent = getParentNode(svgOffsetParent);
6243      }
6244      return win;
6245    }
6246    let offsetParent = getTrueOffsetParent(element, polyfill);
6247    while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
6248      offsetParent = getTrueOffsetParent(offsetParent, polyfill);
6249    }
6250    if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
6251      return win;
6252    }
6253    return offsetParent || getContainingBlock(element) || win;
6254  }
6255  var getElementRects = async function(data) {
6256    const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
6257    const getDimensionsFn = this.getDimensions;
6258    const floatingDimensions = await getDimensionsFn(data.floating);
6259    return {
6260      reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
6261      floating: {
6262        x: 0,
6263        y: 0,
6264        width: floatingDimensions.width,
6265        height: floatingDimensions.height
6266      }
6267    };
6268  };
6269  function isRTL(element) {
6270    return getComputedStyle2(element).direction === "rtl";
6271  }
6272  var platform2 = {
6273    convertOffsetParentRelativeRectToViewportRelativeRect,
6274    getDocumentElement,
6275    getClippingRect,
6276    getOffsetParent,
6277    getElementRects,
6278    getClientRects,
6279    getDimensions,
6280    getScale,
6281    isElement,
6282    isRTL
6283  };
6284  function rectsAreEqual(a, b) {
6285    return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
6286  }
6287  function observeMove(element, onMove, ancestorResize) {
6288    let io = null;
6289    let timeoutId;
6290    const root = getDocumentElement(element);
6291    function cleanup() {
6292      var _io;
6293      clearTimeout(timeoutId);
6294      (_io = io) == null || _io.disconnect();
6295      io = null;
6296    }
6297    function refresh(skip, threshold) {
6298      if (skip === void 0) {
6299        skip = false;
6300      }
6301      if (threshold === void 0) {
6302        threshold = 1;
6303      }
6304      cleanup();
6305      const elementRectForRootMargin = element.getBoundingClientRect();
6306      const {
6307        left,
6308        top,
6309        width,
6310        height
6311      } = elementRectForRootMargin;
6312      if (!skip) {
6313        onMove();
6314      }
6315      if (!width || !height) {
6316        return;
6317      }
6318      const insetTop = floor(top);
6319      const insetRight = floor(root.clientWidth - (left + width));
6320      const insetBottom = floor(root.clientHeight - (top + height));
6321      const insetLeft = floor(left);
6322      const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
6323      const options = {
6324        rootMargin,
6325        threshold: max(0, min(1, threshold)) || 1
6326      };
6327      let isFirstUpdate = true;
6328      function handleObserve(entries) {
6329        const ratio = entries[0].intersectionRatio;
6330        if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
6331          return refresh();
6332        }
6333        if (ratio !== threshold) {
6334          if (!isFirstUpdate) {
6335            return refresh();
6336          }
6337          if (!ratio) {
6338            timeoutId = setTimeout(() => {
6339              refresh(false, 1e-7);
6340            }, 1e3);
6341          } else {
6342            refresh(false, ratio);
6343          }
6344        }
6345        isFirstUpdate = false;
6346      }
6347      try {
6348        io = new IntersectionObserver(handleObserve, {
6349          ...options,
6350          // Handle <iframe>s
6351          root: root.ownerDocument
6352        });
6353      } catch (_e) {
6354        io = new IntersectionObserver(handleObserve, options);
6355      }
6356      io.observe(element);
6357    }
6358    const win = getWindow(element);
6359    const handleResize = () => refresh(ancestorResize);
6360    win.addEventListener("resize", handleResize);
6361    refresh(true);
6362    return () => {
6363      win.removeEventListener("resize", handleResize);
6364      cleanup();
6365    };
6366  }
6367  function autoUpdate(reference, floating, update2, options) {
6368    if (options === void 0) {
6369      options = {};
6370    }
6371    const {
6372      ancestorScroll = true,
6373      ancestorResize = true,
6374      elementResize = typeof ResizeObserver === "function",
6375      layoutShift = typeof IntersectionObserver === "function",
6376      animationFrame = false
6377    } = options;
6378    const referenceEl = unwrapElement(reference);
6379    const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
6380    ancestors.forEach((ancestor) => {
6381      ancestorScroll && ancestor.addEventListener("scroll", update2);
6382      ancestorResize && ancestor.addEventListener("resize", update2);
6383    });
6384    const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2, ancestorResize) : null;
6385    let reobserveFrame = -1;
6386    let resizeObserver = null;
6387    if (elementResize) {
6388      resizeObserver = new ResizeObserver((_ref) => {
6389        let [firstEntry] = _ref;
6390        if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
6391          resizeObserver.unobserve(floating);
6392          cancelAnimationFrame(reobserveFrame);
6393          reobserveFrame = requestAnimationFrame(() => {
6394            var _resizeObserver;
6395            (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
6396          });
6397        }
6398        update2();
6399      });
6400      if (referenceEl && !animationFrame) {
6401        resizeObserver.observe(referenceEl);
6402      }
6403      if (floating) {
6404        resizeObserver.observe(floating);
6405      }
6406    }
6407    let frameId;
6408    let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
6409    if (animationFrame) {
6410      frameLoop();
6411    }
6412    function frameLoop() {
6413      const nextRefRect = getBoundingClientRect(reference);
6414      if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
6415        update2();
6416      }
6417      prevRefRect = nextRefRect;
6418      frameId = requestAnimationFrame(frameLoop);
6419    }
6420    update2();
6421    return () => {
6422      var _resizeObserver2;
6423      ancestors.forEach((ancestor) => {
6424        ancestorScroll && ancestor.removeEventListener("scroll", update2);
6425        ancestorResize && ancestor.removeEventListener("resize", update2);
6426      });
6427      cleanupIo == null || cleanupIo();
6428      (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
6429      resizeObserver = null;
6430      if (animationFrame) {
6431        cancelAnimationFrame(frameId);
6432      }
6433    };
6434  }
6435  var offset2 = offset;
6436  var shift2 = shift;
6437  var flip2 = flip;
6438  var size2 = size;
6439  var limitShift2 = limitShift;
6440  var computePosition2 = (reference, floating, options) => {
6441    const cache = /* @__PURE__ */ new Map();
6442    const mergedOptions = options != null ? options : {};
6443    const platformWithCache = {
6444      ...platform2,
6445      ...mergedOptions.platform,
6446      _c: cache
6447    };
6448    return computePosition(reference, floating, {
6449      ...mergedOptions,
6450      platform: platformWithCache
6451    });
6452  };
6453  
6454  // node_modules/.store/@floating-ui/react-dom@2.1.9-AxWcAwqlMfOrAFOinFKSVg/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
6455  var React27 = __toESM(require_react(), 1);
6456  var import_react2 = __toESM(require_react(), 1);
6457  var ReactDOM5 = __toESM(require_react_dom(), 1);
6458  var isClient = typeof document !== "undefined";
6459  var noop2 = function noop3() {
6460  };
6461  var index = isClient ? import_react2.useLayoutEffect : noop2;
6462  function deepEqual(a, b) {
6463    if (a === b) {
6464      return true;
6465    }
6466    if (typeof a !== typeof b) {
6467      return false;
6468    }
6469    if (typeof a === "function" && a.toString() === b.toString()) {
6470      return true;
6471    }
6472    let length;
6473    let i;
6474    let keys;
6475    if (a && b && typeof a === "object") {
6476      if (Array.isArray(a)) {
6477        length = a.length;
6478        if (length !== b.length) return false;
6479        for (i = length; i-- !== 0; ) {
6480          if (!deepEqual(a[i], b[i])) {
6481            return false;
6482          }
6483        }
6484        return true;
6485      }
6486      keys = Object.keys(a);
6487      length = keys.length;
6488      if (length !== Object.keys(b).length) {
6489        return false;
6490      }
6491      for (i = length; i-- !== 0; ) {
6492        if (!{}.hasOwnProperty.call(b, keys[i])) {
6493          return false;
6494        }
6495      }
6496      for (i = length; i-- !== 0; ) {
6497        const key = keys[i];
6498        if (key === "_owner" && a.$$typeof) {
6499          continue;
6500        }
6501        if (!deepEqual(a[key], b[key])) {
6502          return false;
6503        }
6504      }
6505      return true;
6506    }
6507    return a !== a && b !== b;
6508  }
6509  function getDPR(element) {
6510    if (typeof window === "undefined") {
6511      return 1;
6512    }
6513    const win = element.ownerDocument.defaultView || window;
6514    return win.devicePixelRatio || 1;
6515  }
6516  function roundByDPR(element, value) {
6517    const dpr = getDPR(element);
6518    return Math.round(value * dpr) / dpr;
6519  }
6520  function useLatestRef(value) {
6521    const ref = React27.useRef(value);
6522    index(() => {
6523      ref.current = value;
6524    });
6525    return ref;
6526  }
6527  function useFloating(options) {
6528    if (options === void 0) {
6529      options = {};
6530    }
6531    const {
6532      placement = "bottom",
6533      strategy = "absolute",
6534      middleware = [],
6535      platform: platform3,
6536      elements: {
6537        reference: externalReference,
6538        floating: externalFloating
6539      } = {},
6540      transform = true,
6541      whileElementsMounted,
6542      open: open2
6543    } = options;
6544    const [data, setData] = React27.useState({
6545      x: 0,
6546      y: 0,
6547      strategy,
6548      placement,
6549      middlewareData: {},
6550      isPositioned: false
6551    });
6552    const [latestMiddleware, setLatestMiddleware] = React27.useState(middleware);
6553    if (!deepEqual(latestMiddleware, middleware)) {
6554      setLatestMiddleware(middleware);
6555    }
6556    const [_reference, _setReference] = React27.useState(null);
6557    const [_floating, _setFloating] = React27.useState(null);
6558    const setReference = React27.useCallback((node) => {
6559      if (node !== referenceRef.current) {
6560        referenceRef.current = node;
6561        _setReference(node);
6562      }
6563    }, []);
6564    const setFloating = React27.useCallback((node) => {
6565      if (node !== floatingRef.current) {
6566        floatingRef.current = node;
6567        _setFloating(node);
6568      }
6569    }, []);
6570    const referenceEl = externalReference || _reference;
6571    const floatingEl = externalFloating || _floating;
6572    const referenceRef = React27.useRef(null);
6573    const floatingRef = React27.useRef(null);
6574    const dataRef = React27.useRef(data);
6575    const hasWhileElementsMounted = whileElementsMounted != null;
6576    const whileElementsMountedRef = useLatestRef(whileElementsMounted);
6577    const platformRef = useLatestRef(platform3);
6578    const openRef = useLatestRef(open2);
6579    const update2 = React27.useCallback(() => {
6580      if (!referenceRef.current || !floatingRef.current) {
6581        return;
6582      }
6583      const config = {
6584        placement,
6585        strategy,
6586        middleware: latestMiddleware
6587      };
6588      if (platformRef.current) {
6589        config.platform = platformRef.current;
6590      }
6591      computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
6592        const fullData = {
6593          ...data2,
6594          // The floating element's position may be recomputed while it's closed
6595          // but still mounted (such as when transitioning out). To ensure
6596          // `isPositioned` will be `false` initially on the next open, avoid
6597          // setting it to `true` when `open === false` (must be specified).
6598          isPositioned: openRef.current !== false
6599        };
6600        if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
6601          dataRef.current = fullData;
6602          ReactDOM5.flushSync(() => {
6603            setData(fullData);
6604          });
6605        }
6606      });
6607    }, [latestMiddleware, placement, strategy, platformRef, openRef]);
6608    index(() => {
6609      if (open2 === false && dataRef.current.isPositioned) {
6610        dataRef.current.isPositioned = false;
6611        setData((data2) => ({
6612          ...data2,
6613          isPositioned: false
6614        }));
6615      }
6616    }, [open2]);
6617    const isMountedRef = React27.useRef(false);
6618    index(() => {
6619      isMountedRef.current = true;
6620      return () => {
6621        isMountedRef.current = false;
6622      };
6623    }, []);
6624    index(() => {
6625      if (referenceEl) referenceRef.current = referenceEl;
6626      if (floatingEl) floatingRef.current = floatingEl;
6627      if (referenceEl && floatingEl) {
6628        if (whileElementsMountedRef.current) {
6629          return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
6630        }
6631        update2();
6632      }
6633    }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
6634    const refs = React27.useMemo(() => ({
6635      reference: referenceRef,
6636      floating: floatingRef,
6637      setReference,
6638      setFloating
6639    }), [setReference, setFloating]);
6640    const elements = React27.useMemo(() => ({
6641      reference: referenceEl,
6642      floating: floatingEl
6643    }), [referenceEl, floatingEl]);
6644    const floatingStyles = React27.useMemo(() => {
6645      const initialStyles = {
6646        position: strategy,
6647        left: 0,
6648        top: 0
6649      };
6650      if (!elements.floating) {
6651        return initialStyles;
6652      }
6653      const x = roundByDPR(elements.floating, data.x);
6654      const y = roundByDPR(elements.floating, data.y);
6655      if (transform) {
6656        return {
6657          ...initialStyles,
6658          transform: "translate(" + x + "px, " + y + "px)",
6659          ...getDPR(elements.floating) >= 1.5 && {
6660            willChange: "transform"
6661          }
6662        };
6663      }
6664      return {
6665        position: strategy,
6666        left: x,
6667        top: y
6668      };
6669    }, [strategy, transform, elements.floating, data.x, data.y]);
6670    return React27.useMemo(() => ({
6671      ...data,
6672      update: update2,
6673      refs,
6674      elements,
6675      floatingStyles
6676    }), [data, update2, refs, elements, floatingStyles]);
6677  }
6678  var offset3 = (options, deps) => {
6679    const result = offset2(options);
6680    return {
6681      name: result.name,
6682      fn: result.fn,
6683      options: [options, deps]
6684    };
6685  };
6686  var shift3 = (options, deps) => {
6687    const result = shift2(options);
6688    return {
6689      name: result.name,
6690      fn: result.fn,
6691      options: [options, deps]
6692    };
6693  };
6694  var limitShift3 = (options, deps) => {
6695    const result = limitShift2(options);
6696    return {
6697      fn: result.fn,
6698      options: [options, deps]
6699    };
6700  };
6701  var flip3 = (options, deps) => {
6702    const result = flip2(options);
6703    return {
6704      name: result.name,
6705      fn: result.fn,
6706      options: [options, deps]
6707    };
6708  };
6709  var size3 = (options, deps) => {
6710    const result = size2(options);
6711    return {
6712      name: result.name,
6713      fn: result.fn,
6714      options: [options, deps]
6715    };
6716  };
6717  
6718  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/NullStore.mjs
6719  var NullStore = class extends ReactStore {
6720    // `update`/`set`/`notifyAll` funnel through `setState` in the base `Store`, so overriding
6721    // `setState` alone would neutralize them today. They are overridden explicitly so the store stays
6722    // inert even if a future base-class change stops routing a mutator through `setState`.
6723    setState(_newState) {
6724    }
6725    update(_changes) {
6726    }
6727    set(_key, _value) {
6728    }
6729    notifyAll() {
6730    }
6731  };
6732  
6733  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/inertValue.mjs
6734  function inertValue(value) {
6735    if (isReactVersionAtLeast(19)) {
6736      return value;
6737    }
6738    return value ? "true" : void 0;
6739  }
6740  
6741  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
6742  var React28 = __toESM(require_react(), 1);
6743  var DirectionContext = /* @__PURE__ */ React28.createContext(void 0);
6744  if (true) DirectionContext.displayName = "DirectionContext";
6745  function useDirection() {
6746    const context = React28.useContext(DirectionContext);
6747    return context?.direction ?? "ltr";
6748  }
6749  
6750  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
6751  var React30 = __toESM(require_react(), 1);
6752  
6753  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
6754  var React29 = __toESM(require_react(), 1);
6755  function useBaseUIFloating(options) {
6756    const {
6757      nodeId,
6758      externalTree,
6759      rootContext: store
6760    } = options;
6761    const referenceElement = store.useState("referenceElement");
6762    const floatingElement = store.useState("floatingElement");
6763    const domReferenceElement = store.useState("domReferenceElement");
6764    const open2 = store.useState("open");
6765    const floatingId = store.useState("floatingId");
6766    const [positionReference, setPositionReferenceRaw] = React29.useState(null);
6767    const domReferenceRef = React29.useRef(null);
6768    const tree = useFloatingTree(externalTree);
6769    const storeElements = React29.useMemo(() => ({
6770      reference: referenceElement,
6771      floating: floatingElement,
6772      domReference: domReferenceElement
6773    }), [referenceElement, floatingElement, domReferenceElement]);
6774    const position = useFloating({
6775      ...options,
6776      elements: {
6777        ...storeElements,
6778        ...positionReference && {
6779          reference: positionReference
6780        }
6781      }
6782    });
6783    const setPositionReference = React29.useCallback((node) => {
6784      const computedPositionReference = isElement(node) ? {
6785        getBoundingClientRect: () => node.getBoundingClientRect(),
6786        getClientRects: () => node.getClientRects(),
6787        contextElement: node
6788      } : node;
6789      setPositionReferenceRaw(computedPositionReference);
6790      position.refs.setReference(computedPositionReference);
6791    }, [position.refs]);
6792    const refs = React29.useMemo(() => ({
6793      ...position.refs,
6794      setPositionReference,
6795      domReference: domReferenceRef
6796    }), [position.refs, setPositionReference]);
6797    const elements = React29.useMemo(() => ({
6798      ...position.elements,
6799      domReference: domReferenceElement
6800    }), [position.elements, domReferenceElement]);
6801    const context = React29.useMemo(() => ({
6802      ...position,
6803      dataRef: store.context.dataRef,
6804      open: open2,
6805      onOpenChange: store.setOpen,
6806      events: store.context.events,
6807      floatingId,
6808      refs,
6809      elements,
6810      nodeId,
6811      rootStore: store
6812    }), [position, refs, elements, nodeId, store, open2, floatingId]);
6813    useIsoLayoutEffect(() => {
6814      if (domReferenceElement) {
6815        domReferenceRef.current = domReferenceElement;
6816      }
6817    }, [domReferenceElement]);
6818    useIsoLayoutEffect(() => {
6819      store.context.dataRef.current.floatingContext = context;
6820      const node = tree?.nodesRef.current.find((n) => n.id === nodeId);
6821      if (node) {
6822        node.context = context;
6823      }
6824    });
6825    return React29.useMemo(() => ({
6826      ...position,
6827      context,
6828      refs,
6829      elements,
6830      rootStore: store
6831    }), [position, refs, elements, context, store]);
6832  }
6833  
6834  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs
6835  var baseArrow = (options) => ({
6836    name: "arrow",
6837    options,
6838    async fn(state) {
6839      const {
6840        x,
6841        y,
6842        placement,
6843        rects,
6844        platform: platform3,
6845        elements,
6846        middlewareData
6847      } = state;
6848      const {
6849        element,
6850        padding = 0
6851      } = evaluate(options, state) || {};
6852      if (element == null) {
6853        return {};
6854      }
6855      const paddingObject = getPaddingObject(padding);
6856      const coords = {
6857        x,
6858        y
6859      };
6860      const axis = getAlignmentAxis(placement);
6861      const length = getAxisLength(axis);
6862      const arrowDimensions = await platform3.getDimensions(element);
6863      const isYAxis = axis === "y";
6864      const minProp = isYAxis ? "top" : "left";
6865      const maxProp = isYAxis ? "bottom" : "right";
6866      const clientProp = isYAxis ? "clientHeight" : "clientWidth";
6867      const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
6868      const startDiff = coords[axis] - rects.reference[axis];
6869      const clientSize = elements.floating[clientProp] || rects.floating[length];
6870      const centerToReference = endDiff / 2 - startDiff / 2;
6871      const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
6872      const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);
6873      const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);
6874      const min2 = minPadding;
6875      const max2 = clientSize - arrowDimensions[length] - maxPadding;
6876      const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
6877      const offset4 = clamp(min2, center, max2);
6878      const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
6879      const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0;
6880      return {
6881        [axis]: coords[axis] + alignmentOffset,
6882        data: {
6883          [axis]: offset4,
6884          centerOffset: center - offset4 - alignmentOffset,
6885          ...shouldAddOffset && {
6886            alignmentOffset
6887          }
6888        },
6889        reset: shouldAddOffset
6890      };
6891    }
6892  });
6893  var arrow4 = (options, deps) => {
6894    const {
6895      name,
6896      fn
6897    } = baseArrow(options);
6898    return {
6899      name,
6900      fn,
6901      options: [options, deps]
6902    };
6903  };
6904  
6905  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/hideMiddleware.mjs
6906  var hide4 = {
6907    name: "hide",
6908    async fn(state) {
6909      const {
6910        width,
6911        height,
6912        x,
6913        y
6914      } = state.rects.reference;
6915      const anchorHidden2 = width === 0 && height === 0 && x === 0 && y === 0;
6916      const overflow = await state.platform.detectOverflow(state, {
6917        elementContext: "reference"
6918      });
6919      const referenceHidden = overflow.top - height >= 0 || overflow.right - width >= 0 || overflow.bottom - height >= 0 || overflow.left - width >= 0;
6920      return {
6921        data: {
6922          referenceHidden: referenceHidden || anchorHidden2
6923        }
6924      };
6925    }
6926  };
6927  
6928  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs
6929  var DEFAULT_SIDES = {
6930    sideX: "left",
6931    sideY: "top"
6932  };
6933  
6934  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonPositionerCssVars.mjs
6935  var availableWidth = "--available-width";
6936  var availableHeight = "--available-height";
6937  var anchorWidth = "--anchor-width";
6938  var anchorHeight = "--anchor-height";
6939  var transformOrigin = "--transform-origin";
6940  var positionerWidth = "--positioner-width";
6941  var positionerHeight = "--positioner-height";
6942  
6943  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
6944  var AVAILABLE_WIDTH_VAR = availableWidth;
6945  var AVAILABLE_HEIGHT_VAR = availableHeight;
6946  function getLogicalSide(sideParam, renderedSide, isRtl) {
6947    const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end";
6948    const logicalRight = isRtl ? "inline-start" : "inline-end";
6949    const logicalLeft = isRtl ? "inline-end" : "inline-start";
6950    return {
6951      top: "top",
6952      right: isLogicalSideParam ? logicalRight : "right",
6953      bottom: "bottom",
6954      left: isLogicalSideParam ? logicalLeft : "left"
6955    }[renderedSide];
6956  }
6957  function getOffsetData(state, sideParam, isRtl) {
6958    const {
6959      rects,
6960      placement
6961    } = state;
6962    const data = {
6963      side: getLogicalSide(sideParam, getSide(placement), isRtl),
6964      align: getAlignment(placement) || "center",
6965      anchor: {
6966        width: rects.reference.width,
6967        height: rects.reference.height
6968      },
6969      positioner: {
6970        width: rects.floating.width,
6971        height: rects.floating.height
6972      }
6973    };
6974    return data;
6975  }
6976  function useAnchorPositioning(params) {
6977    return useAnchorPositioningWithHook(params, useBaseUIFloating);
6978  }
6979  function useAnchorPositioningWithHook(params, useFloatingHook) {
6980    const {
6981      // Public parameters
6982      anchor,
6983      positionMethod = "absolute",
6984      side: sideParam = "bottom",
6985      sideOffset = 0,
6986      align = "center",
6987      alignOffset = 0,
6988      collisionBoundary,
6989      collisionPadding: collisionPaddingParam = 5,
6990      sticky = false,
6991      arrowPadding = 5,
6992      disableAnchorTracking = false,
6993      inline: inlineMiddleware,
6994      // Private parameters
6995      keepMounted = false,
6996      floatingRootContext,
6997      mounted,
6998      collisionAvoidance,
6999      shift: shift4,
7000      nodeId,
7001      adaptiveOrigin: adaptiveOrigin2,
7002      lazyFlip = false,
7003      externalTree
7004    } = params;
7005    const collisionAvoidanceSide = collisionAvoidance.side || "flip";
7006    const collisionAvoidanceAlign = collisionAvoidance.align || "flip";
7007    const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end";
7008    const shiftCrossAxis = shift4?.crossAxis ?? false;
7009    const shiftRootBoundary = shift4?.rootBoundary;
7010    const anchorFn = typeof anchor === "function" ? anchor : void 0;
7011    const anchorFnCallback = useStableCallback(anchorFn);
7012    const anchorDep = anchorFn ? anchorFnCallback : anchor;
7013    const anchorValueRef = useValueAsRef(anchor);
7014    const mountedRef = useValueAsRef(mounted);
7015    const direction = useDirection();
7016    const isRtl = direction === "rtl";
7017    const [mountPlacement, setMountPlacement] = React30.useState(null);
7018    if (!mounted && mountPlacement !== null) {
7019      setMountPlacement(null);
7020    }
7021    const lockAlign = lazyFlip === "placement";
7022    const mountSide = mountPlacement ? getSide(mountPlacement) : null;
7023    const mountAlign = mountPlacement && lockAlign ? getAlignment(mountPlacement) || "center" : null;
7024    const side = mountSide || {
7025      top: "top",
7026      right: "right",
7027      bottom: "bottom",
7028      left: "left",
7029      "inline-end": isRtl ? "left" : "right",
7030      "inline-start": isRtl ? "right" : "left"
7031    }[sideParam];
7032    const placementAlign = mountAlign || align;
7033    const placement = placementAlign === "center" ? side : `$side}-$placementAlign}`;
7034    let collisionPadding = collisionPaddingParam;
7035    if (typeof collisionPadding === "number") {
7036      collisionPadding = {
7037        top: collisionPadding,
7038        right: collisionPadding,
7039        bottom: collisionPadding,
7040        left: collisionPadding
7041      };
7042    } else if (collisionPadding) {
7043      collisionPadding = {
7044        top: collisionPadding.top || 0,
7045        right: collisionPadding.right || 0,
7046        bottom: collisionPadding.bottom || 0,
7047        left: collisionPadding.left || 0
7048      };
7049    }
7050    const bias = 1;
7051    const biasTop = sideParam === "bottom" ? bias : 0;
7052    const biasBottom = sideParam === "top" ? bias : 0;
7053    const biasLeft = sideParam === "right" ? bias : 0;
7054    const biasRight = sideParam === "left" ? bias : 0;
7055    const commonCollisionProps = {
7056      boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary,
7057      padding: collisionPadding
7058    };
7059    const arrowRef = React30.useRef(null);
7060    const sideOffsetRef = useValueAsRef(sideOffset);
7061    const alignOffsetRef = useValueAsRef(alignOffset);
7062    const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0;
7063    const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0;
7064    const middleware = [];
7065    if (inlineMiddleware) {
7066      middleware.push(inlineMiddleware);
7067    }
7068    middleware.push(offset3((state) => {
7069      const data = getOffsetData(state, sideParam, isRtl);
7070      const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current;
7071      const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current;
7072      return {
7073        mainAxis: sideAxis,
7074        crossAxis: alignAxis,
7075        alignmentAxis: alignAxis
7076      };
7077    }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));
7078    const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift";
7079    const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift");
7080    const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({
7081      ...commonCollisionProps,
7082      // Ensure the popup flips if it's been limited by its --available-height and it resizes.
7083      // Since the size() padding is smaller than the flip() padding, flip() will take precedence.
7084      padding: {
7085        top: collisionPadding.top + bias + biasTop,
7086        right: collisionPadding.right + bias + biasRight,
7087        bottom: collisionPadding.bottom + bias + biasBottom,
7088        left: collisionPadding.left + bias + biasLeft
7089      },
7090      mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip",
7091      crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false,
7092      fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide
7093    });
7094    const shiftMiddleware = shiftDisabled ? null : shift3({
7095      ...commonCollisionProps,
7096      // Use the Layout Viewport to avoid shifting around when pinch-zooming.
7097      rootBoundary: shiftRootBoundary,
7098      mainAxis: collisionAvoidanceAlign !== "none",
7099      crossAxis: crossAxisShiftEnabled,
7100      limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => {
7101        if (!arrowRef.current) {
7102          return {};
7103        }
7104        const {
7105          width,
7106          height
7107        } = arrowRef.current.getBoundingClientRect();
7108        const sideAxis = getSideAxis(getSide(limitData.placement));
7109        const arrowSize = sideAxis === "y" ? width : height;
7110        const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;
7111        return {
7112          offset: arrowSize / 2 + offsetAmount / 2
7113        };
7114      })
7115    }, [commonCollisionProps, sticky, shiftCrossAxis, shiftRootBoundary, collisionPadding, collisionAvoidanceAlign]);
7116    if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || placementAlign === "center") {
7117      middleware.push(shiftMiddleware, flipMiddleware);
7118    } else {
7119      middleware.push(flipMiddleware, shiftMiddleware);
7120    }
7121    middleware.push(size3({
7122      ...commonCollisionProps,
7123      apply({
7124        elements: {
7125          floating
7126        },
7127        availableWidth: availableWidth2,
7128        availableHeight: availableHeight2,
7129        rects
7130      }) {
7131        if (!mountedRef.current) {
7132          return;
7133        }
7134        const floatingStyle = floating.style;
7135        floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `$availableWidth2}px`);
7136        floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `$availableHeight2}px`);
7137        const dpr = getWindow(floating).devicePixelRatio || 1;
7138        const {
7139          x: x2,
7140          y: y2,
7141          width,
7142          height
7143        } = rects.reference;
7144        const anchorWidth2 = (Math.round((x2 + width) * dpr) - Math.round(x2 * dpr)) / dpr;
7145        const anchorHeight2 = (Math.round((y2 + height) * dpr) - Math.round(y2 * dpr)) / dpr;
7146        floatingStyle.setProperty(anchorWidth, `$anchorWidth2}px`);
7147        floatingStyle.setProperty(anchorHeight, `$anchorHeight2}px`);
7148      }
7149    }), arrow4((state) => ({
7150      // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
7151      // we'll create a fake element.
7152      element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"),
7153      // No padding for the fake arrow: it would displace aligned popups on narrow anchors.
7154      padding: arrowRef.current ? arrowPadding : 0
7155    }), [arrowPadding]), {
7156      name: "transformOrigin",
7157      fn(state) {
7158        const {
7159          elements: {
7160            floating
7161          },
7162          middlewareData: middlewareData2,
7163          placement: renderedPlacement2,
7164          platform: platform3,
7165          rects,
7166          y: y2
7167        } = state;
7168        const renderedSide2 = getSide(renderedPlacement2);
7169        const renderedAlign2 = getAlignment(renderedPlacement2);
7170        const isVertical = getSideAxis(renderedSide2) === "y";
7171        const arrowEl = arrowRef.current;
7172        const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;
7173        let crossOrigin;
7174        if (!arrowEl && renderedAlign2 && Math.abs(isVertical ? middlewareData2.shift?.x || 0 : middlewareData2.shift?.y || 0) <= 1) {
7175          crossOrigin = renderedAlign2 === "start" === (isVertical && platform3.isRTL?.(floating) === true) ? "100%" : "0%";
7176        } else {
7177          const arrowOffset = isVertical ? middlewareData2.arrow?.x || 0 : middlewareData2.arrow?.y || 0;
7178          const arrowSize = isVertical ? arrowEl?.clientWidth || 0 : arrowEl?.clientHeight || 0;
7179          crossOrigin = `$arrowOffset + arrowSize / 2}px`;
7180        }
7181        let sideOrigin = renderedSide2 === "top" || renderedSide2 === "left" ? `calc(100% + $sideOffsetValue}px)` : `${-sideOffsetValue}px`;
7182        if (crossAxisShiftEnabled && isVertical && Math.abs(middlewareData2.shift?.y || 0) > sideOffsetValue) {
7183          sideOrigin = `$rects.reference.y + rects.reference.height / 2 - y2}px`;
7184        }
7185        floating.style.setProperty(transformOrigin, isVertical ? `$crossOrigin} $sideOrigin}` : `$sideOrigin} $crossOrigin}`);
7186        return {};
7187      }
7188    }, hide4, adaptiveOrigin2);
7189    useIsoLayoutEffect(() => {
7190      if (!mounted && floatingRootContext) {
7191        floatingRootContext.update({
7192          referenceElement: null,
7193          floatingElement: null,
7194          domReferenceElement: null,
7195          positionReference: null
7196        });
7197      }
7198    }, [mounted, floatingRootContext]);
7199    const autoUpdateOptions = React30.useMemo(() => ({
7200      ancestorScroll: !disableAnchorTracking,
7201      elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined",
7202      layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined"
7203    }), [disableAnchorTracking]);
7204    const {
7205      refs,
7206      elements,
7207      x,
7208      y,
7209      middlewareData,
7210      update: update2,
7211      placement: renderedPlacement,
7212      context,
7213      isPositioned,
7214      floatingStyles: originalFloatingStyles
7215    } = useFloatingHook({
7216      rootContext: floatingRootContext,
7217      open: keepMounted ? mounted : void 0,
7218      placement,
7219      middleware,
7220      strategy: positionMethod,
7221      whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions),
7222      nodeId,
7223      externalTree
7224    });
7225    const {
7226      sideX,
7227      sideY
7228    } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;
7229    const resolvedPosition = isPositioned ? positionMethod : "fixed";
7230    const floatingStyles = React30.useMemo(() => {
7231      let base;
7232      if (!isPositioned) {
7233        base = {
7234          position: resolvedPosition,
7235          top: 0,
7236          left: 0
7237        };
7238      } else if (adaptiveOrigin2) {
7239        base = {
7240          position: resolvedPosition,
7241          [sideX]: x,
7242          [sideY]: y
7243        };
7244      } else {
7245        base = {
7246          ...originalFloatingStyles,
7247          position: resolvedPosition
7248        };
7249      }
7250      base[AVAILABLE_WIDTH_VAR] = "100vw";
7251      base[AVAILABLE_HEIGHT_VAR] = "100vh";
7252      if (!isPositioned) {
7253        base.opacity = 0;
7254      }
7255      return base;
7256    }, [adaptiveOrigin2, resolvedPosition, sideX, x, sideY, y, originalFloatingStyles, isPositioned]);
7257    const registeredPositionReferenceRef = React30.useRef(null);
7258    useIsoLayoutEffect(() => {
7259      if (!mounted) {
7260        return;
7261      }
7262      const anchorValue = anchorValueRef.current;
7263      const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue;
7264      const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;
7265      const finalAnchor = unwrappedElement || null;
7266      if (finalAnchor !== registeredPositionReferenceRef.current) {
7267        refs.setPositionReference(finalAnchor);
7268        registeredPositionReferenceRef.current = finalAnchor;
7269      }
7270    }, [mounted, refs, anchorDep, anchorValueRef]);
7271    React30.useEffect(() => {
7272      if (!mounted) {
7273        return;
7274      }
7275      const anchorValue = anchorValueRef.current;
7276      if (typeof anchorValue === "function") {
7277        return;
7278      }
7279      if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {
7280        refs.setPositionReference(anchorValue.current);
7281        registeredPositionReferenceRef.current = anchorValue.current;
7282      }
7283    }, [mounted, refs, anchorDep, anchorValueRef]);
7284    React30.useEffect(() => {
7285      if (keepMounted && mounted && elements.reference && elements.floating) {
7286        return autoUpdate(elements.reference, elements.floating, update2, autoUpdateOptions);
7287      }
7288      return void 0;
7289    }, [keepMounted, mounted, elements, update2, autoUpdateOptions]);
7290    const renderedSide = getSide(renderedPlacement);
7291    const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);
7292    const renderedAlign = getAlignment(renderedPlacement) || "center";
7293    const anchorHidden2 = Boolean(middlewareData.hide?.referenceHidden);
7294    useIsoLayoutEffect(() => {
7295      if (lazyFlip && mounted && isPositioned && (renderedSide !== side || lockAlign && renderedAlign !== placementAlign)) {
7296        setMountPlacement(renderedPlacement);
7297      }
7298    }, [lazyFlip, lockAlign, mounted, isPositioned, renderedPlacement, renderedSide, renderedAlign, side, placementAlign]);
7299    const arrowStyles = React30.useMemo(() => ({
7300      position: "absolute",
7301      top: middlewareData.arrow?.y,
7302      left: middlewareData.arrow?.x
7303    }), [middlewareData.arrow]);
7304    const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;
7305    return React30.useMemo(() => ({
7306      positionerStyles: floatingStyles,
7307      arrowStyles,
7308      arrowRef,
7309      arrowUncentered,
7310      side: logicalRenderedSide,
7311      align: renderedAlign,
7312      physicalSide: renderedSide,
7313      anchorHidden: anchorHidden2,
7314      refs,
7315      context,
7316      isPositioned,
7317      update: update2
7318    }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden2, refs, context, isPositioned, update2]);
7319  }
7320  function isRef(param) {
7321    return param != null && "current" in param;
7322  }
7323  
7324  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/getDisabledMountTransitionStyles.mjs
7325  function getDisabledMountTransitionStyles(transitionStatus) {
7326    return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;
7327  }
7328  
7329  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePositioner.mjs
7330  function usePositioner(componentProps, state, {
7331    styles,
7332    transitionStatus,
7333    props,
7334    refs,
7335    hidden,
7336    inert = false
7337  }) {
7338    const style = {
7339      ...styles
7340    };
7341    if (inert) {
7342      style.pointerEvents = "none";
7343    }
7344    return useRenderElement("div", componentProps, {
7345      state,
7346      ref: refs,
7347      props: [{
7348        role: "presentation",
7349        hidden,
7350        style
7351      }, getDisabledMountTransitionStyles(transitionStatus), props],
7352      stateAttributesMapping: popupStateMapping
7353    });
7354  }
7355  
7356  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePopupViewport.mjs
7357  var React34 = __toESM(require_react(), 1);
7358  var ReactDOM6 = __toESM(require_react_dom(), 1);
7359  
7360  // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/usePreviousValue.mjs
7361  var React31 = __toESM(require_react(), 1);
7362  function usePreviousValue(value) {
7363    const [state, setState] = React31.useState({
7364      current: value,
7365      previous: null
7366    });
7367    if (!Object.is(value, state.current)) {
7368      setState({
7369        current: value,
7370        previous: state.current
7371      });
7372    }
7373    return state.previous;
7374  }
7375  
7376  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7377  var React32 = __toESM(require_react(), 1);
7378  
7379  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/getCssDimensions.mjs
7380  function getCssDimensions2(element) {
7381    const css = getComputedStyle2(element);
7382    let width = parseFloat(css.width) || 0;
7383    let height = parseFloat(css.height) || 0;
7384    const hasOffset = isHTMLElement(element);
7385    const offsetWidth = hasOffset ? element.offsetWidth : width;
7386    const offsetHeight = hasOffset ? element.offsetHeight : height;
7387    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
7388    if (shouldFallback) {
7389      width = offsetWidth;
7390      height = offsetHeight;
7391    }
7392    return {
7393      width,
7394      height
7395    };
7396  }
7397  
7398  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonPopupCssVars.mjs
7399  var popupWidth = "--popup-width";
7400  var popupHeight = "--popup-height";
7401  
7402  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7403  function usePopupAutoResize(parameters) {
7404    const {
7405      popupElement,
7406      positionerElement,
7407      content,
7408      mounted,
7409      onMeasureLayout: onMeasureLayoutParam,
7410      onMeasureLayoutComplete: onMeasureLayoutCompleteParam,
7411      side,
7412      direction
7413    } = parameters;
7414    const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true);
7415    const animationFrame = useAnimationFrame();
7416    const committedDimensionsRef = React32.useRef(null);
7417    const onMeasureLayout = useStableCallback(onMeasureLayoutParam);
7418    const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam);
7419    const anchoringStyles = React32.useMemo(() => getPopupAnchoringStyles(side, direction), [side, direction]);
7420    useIsoLayoutEffect(() => {
7421      if (!mounted) {
7422        committedDimensionsRef.current = null;
7423        return void 0;
7424      }
7425      if (!popupElement || !positionerElement) {
7426        return void 0;
7427      }
7428      const restoreAnchoringStyles = applyElementStyles(popupElement, anchoringStyles);
7429      setPopupCssSize(popupElement, "auto");
7430      const restorePopupPosition = overrideElementStyle(popupElement, "position", "static");
7431      const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none");
7432      const restorePopupScale = overrideElementStyle(popupElement, "scale", "1");
7433      const restorePositionerAvailableSize = applyElementStyles(positionerElement, {
7434        [availableWidth]: "max-content",
7435        [availableHeight]: "max-content"
7436      });
7437      function restoreMeasurementOverrides() {
7438        restorePopupPosition();
7439        restorePopupTransform();
7440        restorePositionerAvailableSize();
7441        restorePopupScale();
7442      }
7443      onMeasureLayout?.();
7444      if (committedDimensionsRef.current === null) {
7445        setPositionerCssSize(positionerElement, "max-content");
7446        const dimensions = getCssDimensions2(popupElement);
7447        committedDimensionsRef.current = dimensions;
7448        setPositionerCssSize(positionerElement, dimensions);
7449        restoreMeasurementOverrides();
7450        onMeasureLayoutComplete?.(null, dimensions);
7451        return restoreAnchoringStyles;
7452      }
7453      setPositionerCssSize(positionerElement, "max-content");
7454      const previousDimensions = committedDimensionsRef.current;
7455      const newDimensions = getCssDimensions2(popupElement);
7456      committedDimensionsRef.current = newDimensions;
7457      setPopupCssSize(popupElement, previousDimensions);
7458      restoreMeasurementOverrides();
7459      onMeasureLayoutComplete?.(previousDimensions, newDimensions);
7460      setPositionerCssSize(positionerElement, newDimensions);
7461      const abortController = new AbortController();
7462      animationFrame.request(() => {
7463        setPopupCssSize(popupElement, newDimensions);
7464        runOnceAnimationsFinish(() => {
7465          popupElement.style.setProperty(popupWidth, "auto");
7466          popupElement.style.setProperty(popupHeight, "auto");
7467        }, abortController.signal);
7468      });
7469      return () => {
7470        abortController.abort();
7471        animationFrame.cancel();
7472        restoreAnchoringStyles();
7473      };
7474    }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]);
7475  }
7476  function getPopupAnchoringStyles(side, direction) {
7477    const isPhysicalTop = side === "top";
7478    const isPhysicalLeft = side === "left" || side === (direction === "rtl" ? "inline-end" : "inline-start");
7479    if (!isPhysicalTop && !isPhysicalLeft) {
7480      return EMPTY_OBJECT;
7481    }
7482    return {
7483      position: "absolute",
7484      [isPhysicalTop ? "bottom" : "top"]: "0",
7485      [isPhysicalLeft ? "right" : "left"]: "0"
7486    };
7487  }
7488  function overrideElementStyle(element, property, value) {
7489    const originalValue = element.style.getPropertyValue(property);
7490    element.style.setProperty(property, value);
7491    return () => {
7492      element.style.setProperty(property, originalValue);
7493    };
7494  }
7495  function applyElementStyles(element, styles) {
7496    const restorers = [];
7497    for (const [key, value] of Object.entries(styles)) {
7498      restorers.push(overrideElementStyle(element, key, value));
7499    }
7500    return restorers.length ? () => {
7501      restorers.forEach((restore) => restore());
7502    } : NOOP;
7503  }
7504  function setPopupCssSize(popupElement, size4) {
7505    const width = size4 === "auto" ? "auto" : `$size4.width}px`;
7506    const height = size4 === "auto" ? "auto" : `$size4.height}px`;
7507    popupElement.style.setProperty(popupWidth, width);
7508    popupElement.style.setProperty(popupHeight, height);
7509  }
7510  function setPositionerCssSize(positionerElement, size4) {
7511    const width = size4 === "max-content" ? "max-content" : `$size4.width}px`;
7512    const height = size4 === "max-content" ? "max-content" : `$size4.height}px`;
7513    positionerElement.style.setProperty(positionerWidth, width);
7514    positionerElement.style.setProperty(positionerHeight, height);
7515  }
7516  
7517  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs
7518  var React33 = __toESM(require_react(), 1);
7519  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
7520  var DirectionProvider = function DirectionProvider2(props) {
7521    const {
7522      direction = "ltr"
7523    } = props;
7524    const contextValue = React33.useMemo(() => ({
7525      direction
7526    }), [direction]);
7527    return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DirectionContext.Provider, {
7528      value: contextValue,
7529      children: props.children
7530    });
7531  };
7532  if (true) DirectionProvider.displayName = "DirectionProvider";
7533  
7534  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/adaptiveOriginMiddleware.mjs
7535  var adaptiveOrigin = {
7536    name: "adaptiveOrigin",
7537    async fn(state) {
7538      const {
7539        x: rawX,
7540        y: rawY,
7541        rects: {
7542          floating: floatRect
7543        },
7544        elements: {
7545          floating
7546        },
7547        platform: platform3,
7548        strategy,
7549        placement
7550      } = state;
7551      const win = getWindow(floating);
7552      const styles = win.getComputedStyle(floating);
7553      const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== "";
7554      if (!hasTransition) {
7555        return {
7556          x: rawX,
7557          y: rawY,
7558          data: DEFAULT_SIDES
7559        };
7560      }
7561      const offsetParent = await platform3.getOffsetParent?.(floating);
7562      let offsetDimensions = {
7563        width: 0,
7564        height: 0
7565      };
7566      if (strategy === "fixed" && win?.visualViewport) {
7567        offsetDimensions = {
7568          width: win.visualViewport.width,
7569          height: win.visualViewport.height
7570        };
7571      } else if (offsetParent === win) {
7572        const doc = ownerDocument(floating);
7573        offsetDimensions = {
7574          width: doc.documentElement.clientWidth,
7575          height: doc.documentElement.clientHeight
7576        };
7577      } else if (await platform3.isElement?.(offsetParent)) {
7578        offsetDimensions = await platform3.getDimensions(offsetParent);
7579      }
7580      const currentSide = getSide(placement);
7581      let x = rawX;
7582      let y = rawY;
7583      if (currentSide === "left") {
7584        x = offsetDimensions.width - (rawX + floatRect.width);
7585      }
7586      if (currentSide === "top") {
7587        y = offsetDimensions.height - (rawY + floatRect.height);
7588      }
7589      const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX;
7590      const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY;
7591      return {
7592        x,
7593        y,
7594        data: {
7595          sideX,
7596          sideY
7597        }
7598      };
7599    }
7600  };
7601  
7602  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonViewportDataAttributes.mjs
7603  var activationDirection = "data-activation-direction";
7604  
7605  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePopupViewport.mjs
7606  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
7607  var popupViewportStateMapping = {
7608    activationDirection: (value) => value ? {
7609      [activationDirection]: value
7610    } : null
7611  };
7612  function usePopupViewport(parameters) {
7613    const {
7614      store,
7615      side,
7616      children
7617    } = parameters;
7618    const direction = useDirection();
7619    const activeTrigger = store.useState("activeTriggerElement");
7620    const activeTriggerId = store.useState("activeTriggerId");
7621    const open2 = store.useState("open");
7622    const payload = store.useState("payload");
7623    const mounted = store.useState("mounted");
7624    const popupElement = store.useState("popupElement");
7625    const positionerElement = store.useState("positionerElement");
7626    const previousActiveTrigger = usePreviousValue(open2 ? activeTrigger : null);
7627    const currentContentKey = usePopupContentKey(activeTriggerId, payload);
7628    const capturedNodeRef = React34.useRef(null);
7629    const [previousContentNode, setPreviousContentNode] = React34.useState(null);
7630    const [newTriggerOffset, setNewTriggerOffset] = React34.useState(null);
7631    const currentContainerRef = React34.useRef(null);
7632    const previousContainerRef = React34.useRef(null);
7633    const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true);
7634    const cleanupFrame = useAnimationFrame();
7635    const cleanupControllerRef = React34.useRef(null);
7636    const [previousContentDimensions, setPreviousContentDimensions] = React34.useState(null);
7637    const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React34.useState(false);
7638    useIsoLayoutEffect(() => {
7639      store.set("adaptiveOrigin", adaptiveOrigin);
7640      return () => {
7641        store.set("adaptiveOrigin", void 0);
7642      };
7643    }, [store]);
7644    const handleMeasureLayout = useStableCallback(() => {
7645      currentContainerRef.current?.style.setProperty("animation", "none");
7646      currentContainerRef.current?.style.setProperty("transition", "none");
7647      previousContainerRef.current?.style.setProperty("display", "none");
7648    });
7649    const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => {
7650      currentContainerRef.current?.style.removeProperty("animation");
7651      currentContainerRef.current?.style.removeProperty("transition");
7652      previousContainerRef.current?.style.removeProperty("display");
7653      if (previousDimensions) {
7654        setPreviousContentDimensions(previousDimensions);
7655      }
7656    });
7657    const armViewportCleanup = useStableCallback(() => {
7658      cleanupControllerRef.current?.abort();
7659      const controller = new AbortController();
7660      cleanupControllerRef.current = controller;
7661      onAnimationsFinished(() => {
7662        setPreviousContentNode(null);
7663        setPreviousContentDimensions(null);
7664        capturedNodeRef.current = null;
7665      }, controller.signal);
7666    });
7667    const lastHandledTriggerRef = React34.useRef(null);
7668    useIsoLayoutEffect(() => {
7669      if (!open2 || !mounted) {
7670        lastHandledTriggerRef.current = null;
7671      }
7672    }, [open2, mounted]);
7673    useIsoLayoutEffect(() => {
7674      if (open2 && activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) {
7675        setPreviousContentNode(capturedNodeRef.current);
7676        setShowStartingStyleAttribute(true);
7677        const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger);
7678        setNewTriggerOffset(offset4);
7679        lastHandledTriggerRef.current = activeTrigger;
7680      }
7681    }, [open2, activeTrigger, previousActiveTrigger]);
7682    useIsoLayoutEffect(() => {
7683      if (previousContentNode == null) {
7684        return;
7685      }
7686      cleanupControllerRef.current?.abort();
7687      setShowStartingStyleAttribute(true);
7688      cleanupFrame.request(() => {
7689        ReactDOM6.flushSync(() => {
7690          setShowStartingStyleAttribute(false);
7691        });
7692        armViewportCleanup();
7693      });
7694    }, [currentContentKey, previousContentNode, armViewportCleanup, cleanupFrame]);
7695    useIsoLayoutEffect(() => {
7696      const source = currentContainerRef.current;
7697      if (!source) {
7698        return;
7699      }
7700      const wrapper = ownerDocument(source).createElement("div");
7701      for (const child of Array.from(source.childNodes)) {
7702        wrapper.appendChild(child.cloneNode(true));
7703      }
7704      capturedNodeRef.current = wrapper;
7705    });
7706    const isTransitioning = previousContentNode != null;
7707    let childrenToRender;
7708    if (!isTransitioning) {
7709      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {
7710        "data-current": true,
7711        ref: currentContainerRef,
7712        children
7713      }, currentContentKey);
7714    } else {
7715      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(React34.Fragment, {
7716        children: [/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {
7717          "data-previous": true,
7718          inert: inertValue(true),
7719          ref: previousContainerRef,
7720          style: {
7721            ...previousContentDimensions ? {
7722              [popupWidth]: `$previousContentDimensions.width}px`,
7723              [popupHeight]: `$previousContentDimensions.height}px`
7724            } : null,
7725            position: "absolute"
7726          },
7727          "data-ending-style": showStartingStyleAttribute ? void 0 : ""
7728        }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {
7729          "data-current": true,
7730          ref: currentContainerRef,
7731          "data-starting-style": showStartingStyleAttribute ? "" : void 0,
7732          children
7733        }, currentContentKey)]
7734      });
7735    }
7736    useIsoLayoutEffect(() => {
7737      const container = previousContainerRef.current;
7738      if (!container || !previousContentNode) {
7739        return;
7740      }
7741      container.replaceChildren(...Array.from(previousContentNode.childNodes));
7742    }, [previousContentNode]);
7743    usePopupAutoResize({
7744      popupElement,
7745      positionerElement,
7746      mounted,
7747      content: payload,
7748      onMeasureLayout: handleMeasureLayout,
7749      onMeasureLayoutComplete: handleMeasureLayoutComplete,
7750      side,
7751      direction
7752    });
7753    const state = {
7754      activationDirection: getActivationDirection(newTriggerOffset),
7755      transitioning: isTransitioning
7756    };
7757    return {
7758      children: childrenToRender,
7759      state
7760    };
7761  }
7762  function getActivationDirection(offset4) {
7763    if (!offset4) {
7764      return void 0;
7765    }
7766    return `$getValueWithTolerance(offset4.horizontal, 5, "right", "left")} $getValueWithTolerance(offset4.vertical, 5, "down", "up")}`;
7767  }
7768  function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) {
7769    if (value > tolerance) {
7770      return positiveLabel;
7771    }
7772    if (value < -tolerance) {
7773      return negativeLabel;
7774    }
7775    return "";
7776  }
7777  function calculateRelativePosition(from, to) {
7778    const fromRect = from.getBoundingClientRect();
7779    const toRect = to.getBoundingClientRect();
7780    const fromCenter = {
7781      x: fromRect.left + fromRect.width / 2,
7782      y: fromRect.top + fromRect.height / 2
7783    };
7784    const toCenter = {
7785      x: toRect.left + toRect.width / 2,
7786      y: toRect.top + toRect.height / 2
7787    };
7788    return {
7789      horizontal: toCenter.x - fromCenter.x,
7790      vertical: toCenter.y - fromCenter.y
7791    };
7792  }
7793  function usePopupContentKey(activeTriggerId, payload) {
7794    const [contentKey, setContentKey] = React34.useState(0);
7795    const previousActiveTriggerIdRef = React34.useRef(activeTriggerId);
7796    const previousPayloadRef = React34.useRef(payload);
7797    const pendingPayloadUpdateRef = React34.useRef(false);
7798    useIsoLayoutEffect(() => {
7799      const previousActiveTriggerId = previousActiveTriggerIdRef.current;
7800      const previousPayload = previousPayloadRef.current;
7801      const triggerIdChanged = activeTriggerId !== previousActiveTriggerId;
7802      const payloadChanged = payload !== previousPayload;
7803      if (triggerIdChanged) {
7804        setContentKey((value) => value + 1);
7805        pendingPayloadUpdateRef.current = !payloadChanged;
7806      } else if (pendingPayloadUpdateRef.current && payloadChanged) {
7807        setContentKey((value) => value + 1);
7808        pendingPayloadUpdateRef.current = false;
7809      }
7810      previousActiveTriggerIdRef.current = activeTriggerId;
7811      previousPayloadRef.current = payload;
7812    }, [activeTriggerId, payload]);
7813    return `$activeTriggerId ?? "current"}-$contentKey}`;
7814  }
7815  
7816  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/FloatingPortalLite.mjs
7817  var React35 = __toESM(require_react(), 1);
7818  var ReactDOM7 = __toESM(require_react_dom(), 1);
7819  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
7820  var FloatingPortalLite = /* @__PURE__ */ React35.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) {
7821    const {
7822      children,
7823      container,
7824      className,
7825      render,
7826      style,
7827      ...elementProps
7828    } = componentProps;
7829    const {
7830      node: portalNode,
7831      subtree: portalSubtree
7832    } = useFloatingPortalNode({
7833      container,
7834      ref: forwardedRef,
7835      componentProps,
7836      elementProps
7837    });
7838    if (!portalSubtree && !portalNode) {
7839      return null;
7840    }
7841    return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(React35.Fragment, {
7842      children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM7.createPortal(children, portalNode)]
7843    });
7844  });
7845  if (true) FloatingPortalLite.displayName = "FloatingPortalLite";
7846  
7847  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/index.parts.mjs
7848  var index_parts_exports = {};
7849  __export(index_parts_exports, {
7850    Arrow: () => TooltipArrow,
7851    Handle: () => TooltipHandle,
7852    Popup: () => TooltipPopup,
7853    Portal: () => TooltipPortal,
7854    Positioner: () => TooltipPositioner,
7855    Provider: () => TooltipProvider,
7856    Root: () => TooltipRoot,
7857    Trigger: () => TooltipTrigger,
7858    Viewport: () => TooltipViewport,
7859    createHandle: () => createTooltipHandle
7860  });
7861  
7862  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
7863  var React38 = __toESM(require_react(), 1);
7864  
7865  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/root/TooltipRootContext.mjs
7866  var React36 = __toESM(require_react(), 1);
7867  var TooltipRootContext = /* @__PURE__ */ React36.createContext(void 0);
7868  if (true) TooltipRootContext.displayName = "TooltipRootContext";
7869  function useTooltipRootContext(optional) {
7870    const context = React36.useContext(TooltipRootContext);
7871    if (context === void 0 && !optional) {
7872      throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72));
7873    }
7874    return context;
7875  }
7876  
7877  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/store/TooltipStore.mjs
7878  var React37 = __toESM(require_react(), 1);
7879  var selectors2 = {
7880    ...popupStoreSelectors,
7881    disabled: (state) => state.disabled,
7882    instantType: (state) => state.instantType,
7883    isInstantPhase: (state) => state.isInstantPhase,
7884    trackCursorAxis: (state) => state.trackCursorAxis,
7885    disableHoverablePopup: (state) => state.disableHoverablePopup,
7886    lastOpenChangeReason: (state) => state.openChangeReason,
7887    closeOnClick: (state) => state.closeOnClick,
7888    // Active and inactive trigger props are the same object, so a constant for triggers that discard
7889    // them keeps those triggers from re-rendering when the props change.
7890    appliedTriggerProps: (state, apply) => apply ? state.activeTriggerProps : void 0,
7891    closeDelay: (state) => state.closeDelay,
7892    adaptiveOrigin: (state) => state.adaptiveOrigin
7893  };
7894  var TooltipStore = class extends ReactStore {
7895    constructor(initialState, floatingId, nested) {
7896      const triggerElements = new PopupTriggerMap();
7897      super(createInitialState(initialState, triggerElements, floatingId, nested), createInitialContext(triggerElements), selectors2);
7898    }
7899    setOpen = (nextOpen, eventDetails) => {
7900      applyPopupOpenChange(this, nextOpen, eventDetails, {
7901        extraState: {
7902          openChangeReason: eventDetails.reason
7903        }
7904      });
7905    };
7906    // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change.
7907    cancelPendingOpen(event) {
7908      this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event));
7909    }
7910  };
7911  function createNullTooltipStore() {
7912    const triggerElements = new PopupTriggerMap();
7913    const store = new NullStore(Object.freeze(createInitialState(void 0, triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors2);
7914    return Object.assign(store, {
7915      setOpen: NOOP,
7916      cancelPendingOpen: NOOP
7917    });
7918  }
7919  function createInitialState(initialState, triggerElements, floatingId, nested = false) {
7920    const state = {
7921      ...createInitialPopupStoreState(triggerElements, floatingId, nested),
7922      disabled: false,
7923      instantType: void 0,
7924      isInstantPhase: false,
7925      trackCursorAxis: "none",
7926      disableHoverablePopup: false,
7927      openChangeReason: null,
7928      closeOnClick: true,
7929      closeDelay: 0,
7930      adaptiveOrigin: void 0,
7931      ...initialState
7932    };
7933    return state;
7934  }
7935  function createInitialContext(triggerElements) {
7936    return {
7937      popupRef: /* @__PURE__ */ React37.createRef(),
7938      onOpenChange: void 0,
7939      onOpenChangeComplete: void 0,
7940      triggerElements
7941    };
7942  }
7943  
7944  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
7945  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
7946  var TooltipRoot = fastComponent(function TooltipRoot2(props) {
7947    const {
7948      disabled: disabled2 = false,
7949      defaultOpen = false,
7950      open: openProp,
7951      disableHoverablePopup = false,
7952      trackCursorAxis = "none",
7953      actionsRef,
7954      onOpenChange,
7955      onOpenChangeComplete,
7956      handle,
7957      triggerId: triggerIdProp,
7958      defaultTriggerId: defaultTriggerIdProp = null,
7959      children
7960    } = props;
7961    const store = usePopupRootStore((floatingId, nested) => new TooltipStore({
7962      open: defaultOpen,
7963      openProp,
7964      activeTriggerId: defaultTriggerIdProp,
7965      triggerIdProp
7966    }, floatingId, nested));
7967    store.useControlledProp("openProp", openProp);
7968    store.useControlledProp("triggerIdProp", triggerIdProp);
7969    store.useContextCallback("onOpenChange", onOpenChange);
7970    store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
7971    const openState = store.useState("open");
7972    const open2 = !disabled2 && openState;
7973    const activeTriggerId = store.useState("activeTriggerId");
7974    const mounted = store.useState("mounted");
7975    const payload = store.useState("payload");
7976    store.useSyncedValues({
7977      trackCursorAxis,
7978      disableHoverablePopup,
7979      disabled: disabled2
7980    });
7981    useImplicitActiveTrigger(store, {
7982      closeOnActiveTriggerUnmount: true
7983    });
7984    const {
7985      forceUnmount,
7986      transitionStatus
7987    } = useOpenStateTransitions(open2, store);
7988    const isInstantPhase = store.useState("isInstantPhase");
7989    const instantType = store.useState("instantType");
7990    const lastOpenChangeReason = store.useState("lastOpenChangeReason");
7991    const previousInstantTypeRef = React38.useRef(null);
7992    useIsoLayoutEffect(() => {
7993      if (openState && disabled2) {
7994        store.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled));
7995      }
7996    }, [openState, disabled2, store]);
7997    useIsoLayoutEffect(() => {
7998      if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) {
7999        if (instantType !== "delay") {
8000          previousInstantTypeRef.current = instantType;
8001        }
8002        store.set("instantType", "delay");
8003      } else if (previousInstantTypeRef.current !== null) {
8004        store.set("instantType", previousInstantTypeRef.current);
8005        previousInstantTypeRef.current = null;
8006      }
8007    }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store]);
8008    useIsoLayoutEffect(() => {
8009      if (open2) {
8010        if (activeTriggerId == null) {
8011          store.set("payload", void 0);
8012        }
8013      }
8014    }, [store, activeTriggerId, open2]);
8015    React38.useImperativeHandle(actionsRef, () => ({
8016      unmount: forceUnmount,
8017      close: () => store.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction))
8018    }), [forceUnmount, store]);
8019    const shouldRenderInteractions = open2 || mounted || !disabled2 && trackCursorAxis !== "none";
8020    return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(TooltipRootContext.Provider, {
8021      value: store,
8022      children: [handle && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PopupHandleAttachment, {
8023        handle,
8024        store
8025      }), shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TooltipInteractions, {
8026        store,
8027        disabled: disabled2,
8028        trackCursorAxis
8029      }), typeof children === "function" ? children({
8030        payload
8031      }) : children]
8032    });
8033  });
8034  if (true) TooltipRoot.displayName = "TooltipRoot";
8035  function TooltipInteractions({
8036    store,
8037    disabled: disabled2,
8038    trackCursorAxis
8039  }) {
8040    const floatingRootContext = store.useState("floatingRootContext");
8041    const dismiss = useDismiss(floatingRootContext, {
8042      enabled: !disabled2,
8043      referencePress: () => store.select("closeOnClick")
8044    });
8045    const clientPoint = useClientPoint(floatingRootContext, {
8046      enabled: !disabled2 && trackCursorAxis !== "none",
8047      axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis
8048    });
8049    const triggerProps = React38.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]);
8050    usePopupInteractionProps(store, {
8051      activeTriggerProps: triggerProps,
8052      inactiveTriggerProps: triggerProps,
8053      popupProps: dismiss.floating ?? EMPTY_OBJECT
8054    });
8055    return null;
8056  }
8057  
8058  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8059  var React40 = __toESM(require_react(), 1);
8060  
8061  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/provider/TooltipProviderContext.mjs
8062  var React39 = __toESM(require_react(), 1);
8063  var TooltipProviderContext = /* @__PURE__ */ React39.createContext(void 0);
8064  if (true) TooltipProviderContext.displayName = "TooltipProviderContext";
8065  function useTooltipProviderContext() {
8066    return React39.useContext(TooltipProviderContext);
8067  }
8068  
8069  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/utils/constants.mjs
8070  var OPEN_DELAY = 600;
8071  
8072  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8073  var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger";
8074  function getTargetElement(event) {
8075    const target = getTarget(event);
8076    return isElement(target) ? target : null;
8077  }
8078  var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) {
8079    const {
8080      render,
8081      className,
8082      style,
8083      handle,
8084      payload,
8085      disabled: disabledProp,
8086      delay,
8087      closeOnClick = true,
8088      closeDelay,
8089      id: idProp,
8090      ...elementProps
8091    } = componentProps;
8092    const rootContext = useTooltipRootContext(true);
8093    const handleStore = usePopupHandleStore(handle);
8094    const store = handleStore ?? rootContext;
8095    if (!store) {
8096      throw new Error(true ? "Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle." : formatErrorMessage_default(82));
8097    }
8098    const thisTriggerId = useBaseUiId(idProp);
8099    const isTriggerActive = store.useState("isTriggerActive", thisTriggerId);
8100    const isOpenedByThisTrigger = store.useState("isOpenedByTrigger", thisTriggerId);
8101    const floatingRootContext = store.useState("floatingRootContext");
8102    const triggerElementRef = React40.useRef(null);
8103    const closeDelayWithDefault = closeDelay ?? 0;
8104    const {
8105      registerTrigger,
8106      isMountedByThisTrigger
8107    } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, {
8108      payload,
8109      closeOnClick,
8110      closeDelay: closeDelayWithDefault
8111    });
8112    const providerDelay = useTooltipProviderContext();
8113    const {
8114      activeIdRef,
8115      delayRef,
8116      isInstantPhase,
8117      hasProvider
8118    } = useDelayGroup(floatingRootContext, {
8119      open: isOpenedByThisTrigger
8120    });
8121    const hoverInteraction = useHoverInteractionSharedState(floatingRootContext);
8122    store.useSyncedValue("isInstantPhase", isInstantPhase);
8123    const rootDisabled = store.useState("disabled");
8124    const disabled2 = disabledProp ?? rootDisabled;
8125    const disabledRef = useValueAsRef(disabled2);
8126    const trackCursorAxis = store.useState("trackCursorAxis");
8127    const disableHoverablePopup = store.useState("disableHoverablePopup");
8128    const isNestedTriggerHoveredRef = React40.useRef(false);
8129    const nestedTriggerOpenTimeout = useTimeout();
8130    const pointerTypeRef = React40.useRef(void 0);
8131    function getOpenDelay() {
8132      if (hasProvider && activeIdRef.current != null) {
8133        return 0;
8134      }
8135      return delay ?? providerDelay ?? OPEN_DELAY;
8136    }
8137    function isEnabledNestedTriggerTarget(target) {
8138      const triggerEl = triggerElementRef.current;
8139      if (!triggerEl || !target) {
8140        return false;
8141      }
8142      const nearestTrigger = closest(target, `[$TOOLTIP_TRIGGER_IDENTIFIER}]`);
8143      return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger);
8144    }
8145    function detectNestedTriggerHover(target) {
8146      const nestedTriggerHovered = isEnabledNestedTriggerTarget(target);
8147      isNestedTriggerHoveredRef.current = nestedTriggerHovered;
8148      if (nestedTriggerHovered) {
8149        hoverInteraction.openChangeTimeout.clear();
8150        hoverInteraction.restTimeout.clear();
8151        hoverInteraction.restTimeoutPending = false;
8152        nestedTriggerOpenTimeout.clear();
8153      }
8154      return nestedTriggerHovered;
8155    }
8156    const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
8157      enabled: !disabled2,
8158      mouseOnly: true,
8159      move: false,
8160      handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null,
8161      restMs: getOpenDelay,
8162      delay() {
8163        if (closeDelay == null && hasProvider) {
8164          return {
8165            close: getDelay(delayRef.current, "close")
8166          };
8167        }
8168        return {
8169          close: closeDelayWithDefault
8170        };
8171      },
8172      triggerElementRef,
8173      isActiveTrigger: isTriggerActive,
8174      isClosing: () => store.select("transitionStatus") === "ending",
8175      shouldOpen() {
8176        return !isNestedTriggerHoveredRef.current;
8177      }
8178    });
8179    const focusProps = useFocus(floatingRootContext, {
8180      enabled: !disabled2
8181    }).reference;
8182    const handleNestedTriggerHover = (event) => {
8183      const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current;
8184      const target = getTargetElement(event);
8185      const nestedTriggerHovered = detectNestedTriggerHover(target);
8186      const triggerEl = triggerElementRef.current;
8187      const targetInsideTrigger = triggerEl && target && contains(triggerEl, target);
8188      if (nestedTriggerHovered && store.select("open") && store.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) {
8189        store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
8190        return;
8191      }
8192      if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences.
8193      isMouseLikePointerType(pointerTypeRef.current)) {
8194        const open2 = () => {
8195          if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store.select("open")) {
8196            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl));
8197          }
8198        };
8199        const openDelay = getOpenDelay();
8200        if (openDelay === 0) {
8201          nestedTriggerOpenTimeout.clear();
8202          open2();
8203        } else {
8204          nestedTriggerOpenTimeout.start(openDelay, open2);
8205        }
8206      }
8207    };
8208    const rootTriggerProps = store.useState("appliedTriggerProps", isMountedByThisTrigger || trackCursorAxis !== "none");
8209    const state = {
8210      open: isOpenedByThisTrigger
8211    };
8212    const element = useRenderElement("button", componentProps, {
8213      state,
8214      ref: [forwardedRef, registerTrigger, triggerElementRef],
8215      props: [hoverProps, focusProps, rootTriggerProps, {
8216        onMouseOver(event) {
8217          handleNestedTriggerHover(event.nativeEvent);
8218        },
8219        onFocus(event) {
8220          if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) {
8221            event.preventBaseUIHandler();
8222          }
8223        },
8224        onMouseLeave() {
8225          isNestedTriggerHoveredRef.current = false;
8226          nestedTriggerOpenTimeout.clear();
8227          pointerTypeRef.current = void 0;
8228        },
8229        onPointerEnter(event) {
8230          pointerTypeRef.current = event.pointerType;
8231        },
8232        onPointerDown(event) {
8233          pointerTypeRef.current = event.pointerType;
8234          store.set("closeOnClick", closeOnClick);
8235          if (closeOnClick && !store.select("open")) {
8236            store.cancelPendingOpen(event.nativeEvent);
8237          }
8238        },
8239        onClick(event) {
8240          if (closeOnClick && !store.select("open")) {
8241            store.cancelPendingOpen(event.nativeEvent);
8242          }
8243        },
8244        id: thisTriggerId,
8245        [triggerDisabled]: disabled2 ? "" : void 0,
8246        [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : ""
8247      }, elementProps],
8248      stateAttributesMapping: triggerOpenStateMapping
8249    });
8250    return element;
8251  });
8252  if (true) TooltipTrigger.displayName = "TooltipTrigger";
8253  
8254  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8255  var React42 = __toESM(require_react(), 1);
8256  
8257  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/portal/TooltipPortalContext.mjs
8258  var React41 = __toESM(require_react(), 1);
8259  var TooltipPortalContext = /* @__PURE__ */ React41.createContext(void 0);
8260  if (true) TooltipPortalContext.displayName = "TooltipPortalContext";
8261  function useTooltipPortalContext() {
8262    const value = React41.useContext(TooltipPortalContext);
8263    if (value === void 0) {
8264      throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70));
8265    }
8266    return value;
8267  }
8268  
8269  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8270  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
8271  var TooltipPortal = /* @__PURE__ */ React42.forwardRef(function TooltipPortal2(props, forwardedRef) {
8272    const {
8273      keepMounted = false,
8274      ...portalProps
8275    } = props;
8276    const store = useTooltipRootContext();
8277    const mounted = store.useState("mounted");
8278    const shouldRender = mounted || keepMounted;
8279    if (!shouldRender) {
8280      return null;
8281    }
8282    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TooltipPortalContext.Provider, {
8283      value: keepMounted,
8284      children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FloatingPortalLite, {
8285        ref: forwardedRef,
8286        ...portalProps
8287      })
8288    });
8289  });
8290  if (true) TooltipPortal.displayName = "TooltipPortal";
8291  
8292  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8293  var React44 = __toESM(require_react(), 1);
8294  
8295  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/positioner/TooltipPositionerContext.mjs
8296  var React43 = __toESM(require_react(), 1);
8297  var TooltipPositionerContext = /* @__PURE__ */ React43.createContext(void 0);
8298  if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext";
8299  function useTooltipPositionerContext() {
8300    const context = React43.useContext(TooltipPositionerContext);
8301    if (context === void 0) {
8302      throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71));
8303    }
8304    return context;
8305  }
8306  
8307  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8308  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
8309  var TooltipPositioner = /* @__PURE__ */ React44.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) {
8310    const {
8311      render,
8312      className,
8313      anchor,
8314      positionMethod = "absolute",
8315      side = "top",
8316      align = "center",
8317      sideOffset = 0,
8318      alignOffset = 0,
8319      collisionBoundary = "clipping-ancestors",
8320      collisionPadding = 5,
8321      arrowPadding = 5,
8322      sticky = false,
8323      disableAnchorTracking = false,
8324      collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
8325      style,
8326      ...elementProps
8327    } = componentProps;
8328    const store = useTooltipRootContext();
8329    const keepMounted = useTooltipPortalContext();
8330    const open2 = store.useState("open");
8331    const mounted = store.useState("mounted");
8332    const trackCursorAxis = store.useState("trackCursorAxis");
8333    const disableHoverablePopup = store.useState("disableHoverablePopup");
8334    const floatingRootContext = store.useState("floatingRootContext");
8335    const instantType = store.useState("instantType");
8336    const transitionStatus = store.useState("transitionStatus");
8337    const adaptiveOrigin2 = store.useState("adaptiveOrigin");
8338    const positioning = useAnchorPositioning({
8339      anchor,
8340      positionMethod,
8341      floatingRootContext,
8342      mounted,
8343      side,
8344      sideOffset,
8345      align,
8346      alignOffset,
8347      collisionBoundary,
8348      collisionPadding,
8349      sticky,
8350      arrowPadding,
8351      disableAnchorTracking,
8352      keepMounted,
8353      collisionAvoidance,
8354      adaptiveOrigin: adaptiveOrigin2
8355    });
8356    const state = React44.useMemo(() => ({
8357      open: open2,
8358      side: positioning.side,
8359      align: positioning.align,
8360      anchorHidden: positioning.anchorHidden,
8361      instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType
8362    }), [open2, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]);
8363    const element = usePositioner(componentProps, state, {
8364      styles: positioning.positionerStyles,
8365      transitionStatus,
8366      props: elementProps,
8367      refs: [forwardedRef, store.useStateSetter("positionerElement")],
8368      hidden: !mounted,
8369      inert: !open2 || trackCursorAxis === "both" || disableHoverablePopup
8370    });
8371    return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipPositionerContext.Provider, {
8372      value: positioning,
8373      children: element
8374    });
8375  });
8376  if (true) TooltipPositioner.displayName = "TooltipPositioner";
8377  
8378  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/popup/TooltipPopup.mjs
8379  var React45 = __toESM(require_react(), 1);
8380  var TooltipPopup = /* @__PURE__ */ React45.forwardRef(function TooltipPopup2(componentProps, forwardedRef) {
8381    const {
8382      render,
8383      className,
8384      style,
8385      ...elementProps
8386    } = componentProps;
8387    const store = useTooltipRootContext();
8388    const {
8389      side,
8390      align
8391    } = useTooltipPositionerContext();
8392    const open2 = store.useState("open");
8393    const instantType = store.useState("instantType");
8394    const transitionStatus = store.useState("transitionStatus");
8395    const popupProps = store.useState("popupProps");
8396    const floatingContext = store.useState("floatingRootContext");
8397    const disabled2 = store.useState("disabled");
8398    const closeDelay = store.useState("closeDelay");
8399    useOpenChangeComplete({
8400      open: open2,
8401      ref: store.context.popupRef,
8402      onComplete() {
8403        if (open2) {
8404          store.context.onOpenChangeComplete?.(true);
8405        }
8406      }
8407    });
8408    useHoverFloatingInteraction(floatingContext, {
8409      enabled: !disabled2,
8410      closeDelay
8411    });
8412    const setPopupElement = store.useStateSetter("popupElement");
8413    const state = {
8414      open: open2,
8415      side,
8416      align,
8417      instant: instantType,
8418      transitionStatus
8419    };
8420    const element = useRenderElement("div", componentProps, {
8421      state,
8422      ref: [forwardedRef, store.context.popupRef, setPopupElement],
8423      props: [FOCUSABLE_POPUP_PROPS, popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps],
8424      stateAttributesMapping: popupTransitionStateMapping
8425    });
8426    return element;
8427  });
8428  if (true) TooltipPopup.displayName = "TooltipPopup";
8429  
8430  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/arrow/TooltipArrow.mjs
8431  var React46 = __toESM(require_react(), 1);
8432  var TooltipArrow = /* @__PURE__ */ React46.forwardRef(function TooltipArrow2(componentProps, forwardedRef) {
8433    const {
8434      render,
8435      className,
8436      style,
8437      ...elementProps
8438    } = componentProps;
8439    const store = useTooltipRootContext();
8440    const {
8441      arrowRef,
8442      side,
8443      align,
8444      arrowUncentered,
8445      arrowStyles
8446    } = useTooltipPositionerContext();
8447    const open2 = store.useState("open");
8448    const instantType = store.useState("instantType");
8449    const state = {
8450      open: open2,
8451      side,
8452      align,
8453      uncentered: arrowUncentered,
8454      instant: instantType
8455    };
8456    const element = useRenderElement("div", componentProps, {
8457      state,
8458      ref: [forwardedRef, arrowRef],
8459      props: [{
8460        style: arrowStyles,
8461        "aria-hidden": true
8462      }, elementProps],
8463      stateAttributesMapping: popupStateMapping
8464    });
8465    return element;
8466  });
8467  if (true) TooltipArrow.displayName = "TooltipArrow";
8468  
8469  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/provider/TooltipProvider.mjs
8470  var React47 = __toESM(require_react(), 1);
8471  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
8472  var TooltipProvider = function TooltipProvider2(props) {
8473    const {
8474      delay,
8475      closeDelay,
8476      timeout = 400
8477    } = props;
8478    const delayValue = React47.useMemo(() => ({
8479      open: delay,
8480      close: closeDelay
8481    }), [delay, closeDelay]);
8482    return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipProviderContext.Provider, {
8483      value: delay,
8484      children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FloatingDelayGroup, {
8485        delay: delayValue,
8486        timeoutMs: timeout,
8487        children: props.children
8488      })
8489    });
8490  };
8491  if (true) TooltipProvider.displayName = "TooltipProvider";
8492  
8493  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs
8494  var React48 = __toESM(require_react(), 1);
8495  var TooltipViewport = /* @__PURE__ */ React48.forwardRef(function TooltipViewport2(componentProps, forwardedRef) {
8496    const {
8497      render,
8498      className,
8499      style,
8500      children,
8501      ...elementProps
8502    } = componentProps;
8503    const store = useTooltipRootContext();
8504    const positioner = useTooltipPositionerContext();
8505    const instantType = store.useState("instantType");
8506    const {
8507      children: childrenToRender,
8508      state: viewportState
8509    } = usePopupViewport({
8510      store,
8511      side: positioner.side,
8512      children
8513    });
8514    const state = {
8515      activationDirection: viewportState.activationDirection,
8516      transitioning: viewportState.transitioning,
8517      instant: instantType
8518    };
8519    return useRenderElement("div", componentProps, {
8520      state,
8521      ref: forwardedRef,
8522      props: [elementProps, {
8523        children: childrenToRender
8524      }],
8525      stateAttributesMapping: popupViewportStateMapping
8526    });
8527  });
8528  if (true) TooltipViewport.displayName = "TooltipViewport";
8529  
8530  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/store/TooltipHandle.mjs
8531  var TooltipHandle = class extends BasePopupHandle {
8532    constructor() {
8533      super(createNullTooltipStore(), "Tooltip");
8534    }
8535    /**
8536     * Opens the tooltip and associates it with the trigger with the given id.
8537     *
8538     * This method should only be called in an event handler or an effect (not during rendering).
8539     *
8540     * @param triggerId ID of the trigger to associate with the tooltip. The trigger must be a matching
8541     * `Tooltip.Trigger` with this handle passed as a prop.
8542     */
8543    open(triggerId) {
8544      this.openByTrigger(triggerId);
8545    }
8546    /**
8547     * Closes the tooltip.
8548     *
8549     * This method should only be called in an event handler or an effect (not during rendering).
8550     */
8551    close() {
8552      this.closePopup();
8553    }
8554    /**
8555     * Whether the tooltip is currently open. Returns `false` while no root is attached to the handle.
8556     */
8557    get isOpen() {
8558      return this.attachedStore?.select("open") ?? false;
8559    }
8560  };
8561  function createTooltipHandle() {
8562    return new TooltipHandle();
8563  }
8564  
8565  // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/use-render/useRender.mjs
8566  function useRender(params) {
8567    return useRenderElement(params.defaultTagName ?? "div", params, params);
8568  }
8569  
8570  // packages/ui/build-module/text/text.mjs
8571  var import_element11 = __toESM(require_element(), 1);
8572  var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
8573  function getRuntime() {
8574    const globalScope = globalThis;
8575    if (globalScope.__wpStyleRuntime) {
8576      return globalScope.__wpStyleRuntime;
8577    }
8578    globalScope.__wpStyleRuntime = {
8579      documents: /* @__PURE__ */ new Map(),
8580      styles: /* @__PURE__ */ new Map(),
8581      injectedStyles: /* @__PURE__ */ new WeakMap()
8582    };
8583    if (typeof document !== "undefined") {
8584      registerDocument(document);
8585    }
8586    return globalScope.__wpStyleRuntime;
8587  }
8588  function documentContainsStyleHash(targetDocument, hash) {
8589    if (!targetDocument.head) {
8590      return false;
8591    }
8592    for (const style of targetDocument.head.querySelectorAll(
8593      `style[$STYLE_HASH_ATTRIBUTE}]`
8594    )) {
8595      if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
8596        return true;
8597      }
8598    }
8599    return false;
8600  }
8601  function injectStyle(targetDocument, hash, css) {
8602    if (!targetDocument.head) {
8603      return;
8604    }
8605    const runtime = getRuntime();
8606    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8607    if (!injectedStyles) {
8608      injectedStyles = /* @__PURE__ */ new Set();
8609      runtime.injectedStyles.set(targetDocument, injectedStyles);
8610    }
8611    if (injectedStyles.has(hash)) {
8612      return;
8613    }
8614    if (documentContainsStyleHash(targetDocument, hash)) {
8615      injectedStyles.add(hash);
8616      return;
8617    }
8618    const style = targetDocument.createElement("style");
8619    style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
8620    style.appendChild(targetDocument.createTextNode(css));
8621    targetDocument.head.appendChild(style);
8622    injectedStyles.add(hash);
8623  }
8624  function registerDocument(targetDocument) {
8625    const runtime = getRuntime();
8626    runtime.documents.set(
8627      targetDocument,
8628      (runtime.documents.get(targetDocument) ?? 0) + 1
8629    );
8630    for (const [hash, css] of runtime.styles) {
8631      injectStyle(targetDocument, hash, css);
8632    }
8633    return () => {
8634      const count = runtime.documents.get(targetDocument);
8635      if (count === void 0) {
8636        return;
8637      }
8638      if (count <= 1) {
8639        runtime.documents.delete(targetDocument);
8640        return;
8641      }
8642      runtime.documents.set(targetDocument, count - 1);
8643    };
8644  }
8645  function registerStyle(hash, css) {
8646    const runtime = getRuntime();
8647    runtime.styles.set(hash, css);
8648    for (const targetDocument of runtime.documents.keys()) {
8649      injectStyle(targetDocument, hash, css);
8650    }
8651  }
8652  if (typeof process === "undefined" || true) {
8653    registerStyle("3167e7d116", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{text-wrap:pretty;margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
8654  }
8655  var style_default = { "text": "_83ed8a8da5dd50ea__text", "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" };
8656  if (typeof process === "undefined" || true) {
8657    registerStyle("abb19c3171", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}[role=treeitem] span._400bf7ee0c6061a9__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}");
8658  }
8659  var global_css_defense_default = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li", "span": "_400bf7ee0c6061a9__span" };
8660  var Text = (0, import_element11.forwardRef)(
8661    function UnforwardedText({ variant = "body-md", render, className, ...props }, ref) {
8662      const element = useRender({
8663        render,
8664        defaultTagName: "span",
8665        ref,
8666        props: mergeProps(props, {
8667          className: clsx_default(
8668            style_default.text,
8669            global_css_defense_default.heading,
8670            global_css_defense_default.p,
8671            style_default[variant],
8672            className
8673          )
8674        })
8675      });
8676      return element;
8677    }
8678  );
8679  
8680  // packages/icons/build-module/library/audio.mjs
8681  var import_primitives2 = __toESM(require_primitives(), 1);
8682  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
8683  var audio_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
8684    /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives2.Path, { d: "M13.25 16.5C13.25 18.0188 12.0188 19.25 10.5 19.25C8.98122 19.25 7.75 18.0188 7.75 16.5C7.75 14.9812 8.98122 13.75 10.5 13.75C12.0188 13.75 13.25 14.9812 13.25 16.5Z", fill: "currentColor", stroke: "none" }),
8685    /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives2.Path, { d: "M10.5 19.25C12.0188 19.25 13.25 18.0188 13.25 16.5C13.25 14.9812 12.0188 13.75 10.5 13.75C8.98122 13.75 7.75 14.9812 7.75 16.5C7.75 18.0188 8.98122 19.25 10.5 19.25ZM10.5 19.25C13.4867 19.25 13.75 16.5 13.75 15.1379V7.99998C13.75 4.9108 16.4 5.00254 18 5.00233" })
8686  ] });
8687  
8688  // packages/icons/build-module/library/comment-author-avatar.mjs
8689  var import_primitives3 = __toESM(require_primitives(), 1);
8690  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
8691  var comment_author_avatar_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
8692    /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives3.Path, { d: "M8 18.0476V16C8 14.8954 8.89543 14 10 14H14C15.1046 14 16 14.8954 16 16V18.0476" }),
8693    /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives3.Path, { d: "M12 4.75C7.99594 4.75 4.75 7.99593 4.75 12C4.75 16.0041 7.99593 19.25 12 19.25C16.0041 19.25 19.25 16.0041 19.25 12C19.25 7.99594 16.0041 4.75 12 4.75Z", strokeLinejoin: "round" }),
8694    /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives3.Path, { d: "M13.75 10C13.75 10.9665 12.9665 11.75 12 11.75C11.0335 11.75 10.25 10.9665 10.25 10C10.25 9.0335 11.0335 8.25 12 8.25C12.9665 8.25 13.75 9.0335 13.75 10Z" })
8695  ] });
8696  
8697  // packages/icons/build-module/library/file.mjs
8698  var import_primitives4 = __toESM(require_primitives(), 1);
8699  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
8700  var file_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives4.Path, { d: "M3.75 6V17.5C3.75 18.1904 4.30964 18.75 5 18.75H19C19.6904 18.75 20.25 18.1904 20.25 17.5V8.5C20.25 7.80964 19.6904 7.25 19 7.25H13.3463C12.8352 7.25 12.3755 6.93881 12.1857 6.46424L11.8143 5.53576C11.6245 5.06119 11.1648 4.75 10.6537 4.75H5C4.30964 4.75 3.75 5.30964 3.75 6Z" }) });
8701  
8702  // packages/icons/build-module/library/image.mjs
8703  var import_primitives5 = __toESM(require_primitives(), 1);
8704  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
8705  var image_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives5.Path, { d: "M19.25 14.2513L16.0707 11.0707C16.0317 11.0317 15.9683 11.0317 15.9293 11.0707L12.0584 14.9416C12.0245 14.9755 11.9713 14.9806 11.9316 14.9537L8.65791 12.7392C8.62313 12.7156 8.57736 12.7163 8.54332 12.7409L4.75 15.4808M19.25 14.2513V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V15.4808M19.25 14.2513V18C19.25 18.6904 18.6904 19.25 18 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V15.4808" }) });
8706  
8707  // packages/icons/build-module/library/video.mjs
8708  var import_primitives6 = __toESM(require_primitives(), 1);
8709  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
8710  var video_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
8711    /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives6.Path, { d: "M10 15L15 12L10 9V15Z", fill: "currentColor", stroke: "none" }),
8712    /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives6.Path, { d: "M4.75 6C4.75 5.30964 5.30964 4.75 6 4.75H18C18.6904 4.75 19.25 5.30964 19.25 6V18C19.25 18.6904 18.6904 19.25 18 19.25H6C5.30964 19.25 4.75 18.6904 4.75 18V6Z" })
8713  ] });
8714  
8715  // packages/ui/build-module/utils/render-slot-with-children.mjs
8716  var import_element12 = __toESM(require_element(), 1);
8717  function renderSlotWithChildren(slot, defaultSlot, children) {
8718    return (0, import_element12.cloneElement)(
8719      slot ?? defaultSlot,
8720      { children }
8721    );
8722  }
8723  
8724  // packages/ui/build-module/utils/wp-compat-overlay-slot.mjs
8725  var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
8726  function getRuntime2() {
8727    const globalScope = globalThis;
8728    if (globalScope.__wpStyleRuntime) {
8729      return globalScope.__wpStyleRuntime;
8730    }
8731    globalScope.__wpStyleRuntime = {
8732      documents: /* @__PURE__ */ new Map(),
8733      styles: /* @__PURE__ */ new Map(),
8734      injectedStyles: /* @__PURE__ */ new WeakMap()
8735    };
8736    if (typeof document !== "undefined") {
8737      registerDocument2(document);
8738    }
8739    return globalScope.__wpStyleRuntime;
8740  }
8741  function documentContainsStyleHash2(targetDocument, hash) {
8742    if (!targetDocument.head) {
8743      return false;
8744    }
8745    for (const style of targetDocument.head.querySelectorAll(
8746      `style[$STYLE_HASH_ATTRIBUTE2}]`
8747    )) {
8748      if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
8749        return true;
8750      }
8751    }
8752    return false;
8753  }
8754  function injectStyle2(targetDocument, hash, css) {
8755    if (!targetDocument.head) {
8756      return;
8757    }
8758    const runtime = getRuntime2();
8759    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8760    if (!injectedStyles) {
8761      injectedStyles = /* @__PURE__ */ new Set();
8762      runtime.injectedStyles.set(targetDocument, injectedStyles);
8763    }
8764    if (injectedStyles.has(hash)) {
8765      return;
8766    }
8767    if (documentContainsStyleHash2(targetDocument, hash)) {
8768      injectedStyles.add(hash);
8769      return;
8770    }
8771    const style = targetDocument.createElement("style");
8772    style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
8773    style.appendChild(targetDocument.createTextNode(css));
8774    targetDocument.head.appendChild(style);
8775    injectedStyles.add(hash);
8776  }
8777  function registerDocument2(targetDocument) {
8778    const runtime = getRuntime2();
8779    runtime.documents.set(
8780      targetDocument,
8781      (runtime.documents.get(targetDocument) ?? 0) + 1
8782    );
8783    for (const [hash, css] of runtime.styles) {
8784      injectStyle2(targetDocument, hash, css);
8785    }
8786    return () => {
8787      const count = runtime.documents.get(targetDocument);
8788      if (count === void 0) {
8789        return;
8790      }
8791      if (count <= 1) {
8792        runtime.documents.delete(targetDocument);
8793        return;
8794      }
8795      runtime.documents.set(targetDocument, count - 1);
8796    };
8797  }
8798  function registerStyle2(hash, css) {
8799    const runtime = getRuntime2();
8800    runtime.styles.set(hash, css);
8801    for (const targetDocument of runtime.documents.keys()) {
8802      injectStyle2(targetDocument, hash, css);
8803    }
8804  }
8805  if (typeof process === "undefined" || true) {
8806    registerStyle2("be37f31c1e", "._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");
8807  }
8808  var wp_compat_overlay_slot_default = { "slot": "_11fc52b637ff8a7e__slot" };
8809  var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot";
8810  function resolveOwnerDocument() {
8811    return typeof document === "undefined" ? null : document;
8812  }
8813  function isInWordPressEnvironment() {
8814    let topWp;
8815    try {
8816      topWp = window.top?.wp;
8817    } catch {
8818    }
8819    const wp = topWp ?? window.wp;
8820    return typeof wp?.components === "object" && wp.components !== null;
8821  }
8822  var cachedSlot = null;
8823  function ensureSlotIsAccessible(element) {
8824    element.setAttribute("aria-hidden", "false");
8825    return element;
8826  }
8827  function createSlot(ownerDocument2) {
8828    const element = ownerDocument2.createElement("div");
8829    element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, "");
8830    if (wp_compat_overlay_slot_default.slot) {
8831      element.classList.add(wp_compat_overlay_slot_default.slot);
8832    }
8833    ownerDocument2.body.appendChild(element);
8834    return element;
8835  }
8836  function getWpCompatOverlaySlot() {
8837    if (typeof window === "undefined") {
8838      return void 0;
8839    }
8840    if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) {
8841      return void 0;
8842    }
8843    const ownerDocument2 = resolveOwnerDocument();
8844    if (!ownerDocument2 || !ownerDocument2.body) {
8845      return void 0;
8846    }
8847    if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) {
8848      return ensureSlotIsAccessible(cachedSlot);
8849    }
8850    const existing = ownerDocument2.querySelector(
8851      `[$WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]`
8852    );
8853    if (existing instanceof HTMLDivElement) {
8854      cachedSlot = ensureSlotIsAccessible(existing);
8855      return cachedSlot;
8856    }
8857    if (cachedSlot?.isConnected) {
8858      cachedSlot.remove();
8859    }
8860    cachedSlot = ensureSlotIsAccessible(createSlot(ownerDocument2));
8861    return cachedSlot;
8862  }
8863  
8864  // packages/ui/build-module/utils/direction-provider.mjs
8865  var import_i18n = __toESM(require_i18n(), 1);
8866  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
8867  function DirectionProvider3({ children }) {
8868    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DirectionProvider, { direction: (0, import_i18n.isRTL)() ? "rtl" : "ltr", children });
8869  }
8870  
8871  // packages/ui/build-module/tooltip/index.mjs
8872  var tooltip_exports = {};
8873  __export(tooltip_exports, {
8874    Popup: () => Popup,
8875    Portal: () => Portal,
8876    Positioner: () => Positioner,
8877    Provider: () => Provider,
8878    Root: () => Root,
8879    Trigger: () => Trigger
8880  });
8881  
8882  // packages/ui/build-module/tooltip/popup.mjs
8883  var import_element15 = __toESM(require_element(), 1);
8884  
8885  // packages/ui/build-module/tooltip/portal.mjs
8886  var import_element13 = __toESM(require_element(), 1);
8887  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
8888  var Portal = (0, import_element13.forwardRef)(
8889    function TooltipPortal3({ container, ...restProps }, ref) {
8890      return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
8891        index_parts_exports.Portal,
8892        {
8893          container: container === void 0 ? getWpCompatOverlaySlot() : container,
8894          ...restProps,
8895          ref
8896        }
8897      );
8898    }
8899  );
8900  
8901  // packages/ui/build-module/tooltip/positioner.mjs
8902  var import_element14 = __toESM(require_element(), 1);
8903  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
8904  var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
8905  function getRuntime3() {
8906    const globalScope = globalThis;
8907    if (globalScope.__wpStyleRuntime) {
8908      return globalScope.__wpStyleRuntime;
8909    }
8910    globalScope.__wpStyleRuntime = {
8911      documents: /* @__PURE__ */ new Map(),
8912      styles: /* @__PURE__ */ new Map(),
8913      injectedStyles: /* @__PURE__ */ new WeakMap()
8914    };
8915    if (typeof document !== "undefined") {
8916      registerDocument3(document);
8917    }
8918    return globalScope.__wpStyleRuntime;
8919  }
8920  function documentContainsStyleHash3(targetDocument, hash) {
8921    if (!targetDocument.head) {
8922      return false;
8923    }
8924    for (const style of targetDocument.head.querySelectorAll(
8925      `style[$STYLE_HASH_ATTRIBUTE3}]`
8926    )) {
8927      if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
8928        return true;
8929      }
8930    }
8931    return false;
8932  }
8933  function injectStyle3(targetDocument, hash, css) {
8934    if (!targetDocument.head) {
8935      return;
8936    }
8937    const runtime = getRuntime3();
8938    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8939    if (!injectedStyles) {
8940      injectedStyles = /* @__PURE__ */ new Set();
8941      runtime.injectedStyles.set(targetDocument, injectedStyles);
8942    }
8943    if (injectedStyles.has(hash)) {
8944      return;
8945    }
8946    if (documentContainsStyleHash3(targetDocument, hash)) {
8947      injectedStyles.add(hash);
8948      return;
8949    }
8950    const style = targetDocument.createElement("style");
8951    style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
8952    style.appendChild(targetDocument.createTextNode(css));
8953    targetDocument.head.appendChild(style);
8954    injectedStyles.add(hash);
8955  }
8956  function registerDocument3(targetDocument) {
8957    const runtime = getRuntime3();
8958    runtime.documents.set(
8959      targetDocument,
8960      (runtime.documents.get(targetDocument) ?? 0) + 1
8961    );
8962    for (const [hash, css] of runtime.styles) {
8963      injectStyle3(targetDocument, hash, css);
8964    }
8965    return () => {
8966      const count = runtime.documents.get(targetDocument);
8967      if (count === void 0) {
8968        return;
8969      }
8970      if (count <= 1) {
8971        runtime.documents.delete(targetDocument);
8972        return;
8973      }
8974      runtime.documents.set(targetDocument, count - 1);
8975    };
8976  }
8977  function registerStyle3(hash, css) {
8978    const runtime = getRuntime3();
8979    runtime.styles.set(hash, css);
8980    for (const targetDocument of runtime.documents.keys()) {
8981      injectStyle3(targetDocument, hash, css);
8982    }
8983  }
8984  if (typeof process === "undefined" || true) {
8985    registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
8986  }
8987  var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
8988  if (typeof process === "undefined" || true) {
8989    registerStyle3("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');
8990  }
8991  var style_default2 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
8992  var Positioner = (0, import_element14.forwardRef)(
8993    function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) {
8994      return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
8995        index_parts_exports.Positioner,
8996        {
8997          ref,
8998          align,
8999          side,
9000          sideOffset,
9001          ...props,
9002          className: clsx_default(
9003            resets_default["box-sizing"],
9004            style_default2.positioner,
9005            className
9006          )
9007        }
9008      );
9009    }
9010  );
9011  
9012  // packages/ui/build-module/utils/theme-provider.mjs
9013  var theme = __toESM(require_theme(), 1);
9014  
9015  // packages/ui/build-module/lock-unlock.mjs
9016  var import_private_apis = __toESM(require_private_apis(), 1);
9017  var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
9018    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
9019    "@wordpress/ui"
9020  );
9021  
9022  // packages/ui/build-module/utils/theme-provider.mjs
9023  function getThemeProvider() {
9024    const themePackage = theme;
9025    if (themePackage.ThemeProvider) {
9026      return themePackage.ThemeProvider;
9027    }
9028    if (!themePackage.privateApis) {
9029      throw new Error(
9030        "@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`."
9031      );
9032    }
9033    return unlock(
9034      themePackage.privateApis
9035    ).ThemeProvider;
9036  }
9037  var ThemeProvider = getThemeProvider();
9038  
9039  // packages/ui/build-module/tooltip/popup.mjs
9040  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
9041  var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
9042  function getRuntime4() {
9043    const globalScope = globalThis;
9044    if (globalScope.__wpStyleRuntime) {
9045      return globalScope.__wpStyleRuntime;
9046    }
9047    globalScope.__wpStyleRuntime = {
9048      documents: /* @__PURE__ */ new Map(),
9049      styles: /* @__PURE__ */ new Map(),
9050      injectedStyles: /* @__PURE__ */ new WeakMap()
9051    };
9052    if (typeof document !== "undefined") {
9053      registerDocument4(document);
9054    }
9055    return globalScope.__wpStyleRuntime;
9056  }
9057  function documentContainsStyleHash4(targetDocument, hash) {
9058    if (!targetDocument.head) {
9059      return false;
9060    }
9061    for (const style of targetDocument.head.querySelectorAll(
9062      `style[$STYLE_HASH_ATTRIBUTE4}]`
9063    )) {
9064      if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
9065        return true;
9066      }
9067    }
9068    return false;
9069  }
9070  function injectStyle4(targetDocument, hash, css) {
9071    if (!targetDocument.head) {
9072      return;
9073    }
9074    const runtime = getRuntime4();
9075    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9076    if (!injectedStyles) {
9077      injectedStyles = /* @__PURE__ */ new Set();
9078      runtime.injectedStyles.set(targetDocument, injectedStyles);
9079    }
9080    if (injectedStyles.has(hash)) {
9081      return;
9082    }
9083    if (documentContainsStyleHash4(targetDocument, hash)) {
9084      injectedStyles.add(hash);
9085      return;
9086    }
9087    const style = targetDocument.createElement("style");
9088    style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
9089    style.appendChild(targetDocument.createTextNode(css));
9090    targetDocument.head.appendChild(style);
9091    injectedStyles.add(hash);
9092  }
9093  function registerDocument4(targetDocument) {
9094    const runtime = getRuntime4();
9095    runtime.documents.set(
9096      targetDocument,
9097      (runtime.documents.get(targetDocument) ?? 0) + 1
9098    );
9099    for (const [hash, css] of runtime.styles) {
9100      injectStyle4(targetDocument, hash, css);
9101    }
9102    return () => {
9103      const count = runtime.documents.get(targetDocument);
9104      if (count === void 0) {
9105        return;
9106      }
9107      if (count <= 1) {
9108        runtime.documents.delete(targetDocument);
9109        return;
9110      }
9111      runtime.documents.set(targetDocument, count - 1);
9112    };
9113  }
9114  function registerStyle4(hash, css) {
9115    const runtime = getRuntime4();
9116    runtime.styles.set(hash, css);
9117    for (const targetDocument of runtime.documents.keys()) {
9118      injectStyle4(targetDocument, hash, css);
9119    }
9120  }
9121  if (typeof process === "undefined" || true) {
9122    registerStyle4("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');
9123  }
9124  var style_default3 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9125  var POPUP_COLOR = { background: "#1e1e1e" };
9126  var Popup = (0, import_element15.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) {
9127    const popupContent = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9128      index_parts_exports.Popup,
9129      {
9130        ref,
9131        className: clsx_default(style_default3.popup, className),
9132        ...props,
9133        children
9134      }
9135    ) });
9136    const positionedPopup = renderSlotWithChildren(
9137      positioner,
9138      /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Positioner, {}),
9139      popupContent
9140    );
9141    return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Portal, {}), positionedPopup);
9142  });
9143  
9144  // packages/ui/build-module/tooltip/trigger.mjs
9145  var import_element16 = __toESM(require_element(), 1);
9146  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
9147  var Trigger = (0, import_element16.forwardRef)(
9148    function TooltipTrigger3(props, ref) {
9149      return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(index_parts_exports.Trigger, { ref, ...props });
9150    }
9151  );
9152  
9153  // packages/ui/build-module/tooltip/root.mjs
9154  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
9155  function Root(props) {
9156    return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(index_parts_exports.Root, { ...props }) });
9157  }
9158  
9159  // packages/ui/build-module/tooltip/provider.mjs
9160  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
9161  function Provider({ ...props }) {
9162    return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(index_parts_exports.Provider, { ...props });
9163  }
9164  
9165  // packages/ui/build-module/link/link.mjs
9166  var import_element17 = __toESM(require_element(), 1);
9167  var import_i18n2 = __toESM(require_i18n(), 1);
9168  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
9169  var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
9170  function getRuntime5() {
9171    const globalScope = globalThis;
9172    if (globalScope.__wpStyleRuntime) {
9173      return globalScope.__wpStyleRuntime;
9174    }
9175    globalScope.__wpStyleRuntime = {
9176      documents: /* @__PURE__ */ new Map(),
9177      styles: /* @__PURE__ */ new Map(),
9178      injectedStyles: /* @__PURE__ */ new WeakMap()
9179    };
9180    if (typeof document !== "undefined") {
9181      registerDocument5(document);
9182    }
9183    return globalScope.__wpStyleRuntime;
9184  }
9185  function documentContainsStyleHash5(targetDocument, hash) {
9186    if (!targetDocument.head) {
9187      return false;
9188    }
9189    for (const style of targetDocument.head.querySelectorAll(
9190      `style[$STYLE_HASH_ATTRIBUTE5}]`
9191    )) {
9192      if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
9193        return true;
9194      }
9195    }
9196    return false;
9197  }
9198  function injectStyle5(targetDocument, hash, css) {
9199    if (!targetDocument.head) {
9200      return;
9201    }
9202    const runtime = getRuntime5();
9203    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9204    if (!injectedStyles) {
9205      injectedStyles = /* @__PURE__ */ new Set();
9206      runtime.injectedStyles.set(targetDocument, injectedStyles);
9207    }
9208    if (injectedStyles.has(hash)) {
9209      return;
9210    }
9211    if (documentContainsStyleHash5(targetDocument, hash)) {
9212      injectedStyles.add(hash);
9213      return;
9214    }
9215    const style = targetDocument.createElement("style");
9216    style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
9217    style.appendChild(targetDocument.createTextNode(css));
9218    targetDocument.head.appendChild(style);
9219    injectedStyles.add(hash);
9220  }
9221  function registerDocument5(targetDocument) {
9222    const runtime = getRuntime5();
9223    runtime.documents.set(
9224      targetDocument,
9225      (runtime.documents.get(targetDocument) ?? 0) + 1
9226    );
9227    for (const [hash, css] of runtime.styles) {
9228      injectStyle5(targetDocument, hash, css);
9229    }
9230    return () => {
9231      const count = runtime.documents.get(targetDocument);
9232      if (count === void 0) {
9233        return;
9234      }
9235      if (count <= 1) {
9236        runtime.documents.delete(targetDocument);
9237        return;
9238      }
9239      runtime.documents.set(targetDocument, count - 1);
9240    };
9241  }
9242  function registerStyle5(hash, css) {
9243    const runtime = getRuntime5();
9244    runtime.styles.set(hash, css);
9245    for (const targetDocument of runtime.documents.keys()) {
9246      injectStyle5(targetDocument, hash, css);
9247    }
9248  }
9249  if (typeof process === "undefined" || true) {
9250    registerStyle5("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9251  }
9252  var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9253  if (typeof process === "undefined" || true) {
9254    registerStyle5("7c3267f794", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
9255  }
9256  var focus_module_default = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
9257  if (typeof process === "undefined" || true) {
9258    registerStyle5("888e86d20a", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);border-radius:var(--wpds-border-radius-sm,2px);text-decoration-thickness:from-font;text-underline-offset:.2em}.f037c632480d4e11__link-with-icon{text-decoration-line:none}._8dc7567f9ff415bf__link-contents{text-decoration:inherit;text-decoration-line:underline}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-border-radius:0;--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2060\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2060\\2196"}}}');
9259  }
9260  var style_default4 = { "link": "d4250949359b05ce__link", "link-with-icon": "f037c632480d4e11__link-with-icon", "link-contents": "_8dc7567f9ff415bf__link-contents", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
9261  if (typeof process === "undefined" || true) {
9262    registerStyle5("abb19c3171", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}[role=treeitem] span._400bf7ee0c6061a9__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}");
9263  }
9264  var global_css_defense_default2 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li", "span": "_400bf7ee0c6061a9__span" };
9265  var Link = (0, import_element17.forwardRef)(
9266    function UnforwardedLink({
9267      children,
9268      variant = "default",
9269      tone = "brand",
9270      openInNewTab = false,
9271      target,
9272      render,
9273      className,
9274      ...props
9275    }, ref) {
9276      const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? "");
9277      const element = useRender({
9278        render,
9279        defaultTagName: "a",
9280        ref,
9281        props: mergeProps(props, {
9282          className: clsx_default(
9283            global_css_defense_default2.a,
9284            resets_default2["box-sizing"],
9285            focus_module_default["outset-ring--focus-except-active"],
9286            variant !== "unstyled" && style_default4.link,
9287            variant !== "unstyled" && shouldShowNewTabIndicator && style_default4["link-with-icon"],
9288            variant !== "unstyled" && style_default4[`is-$tone}`],
9289            variant === "unstyled" && style_default4["is-unstyled"],
9290            className
9291          ),
9292          target: target ?? (openInNewTab ? "_blank" : void 0),
9293          children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
9294            shouldShowNewTabIndicator && variant !== "unstyled" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: style_default4["link-contents"], children }) : children,
9295            shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
9296              "span",
9297              {
9298                className: style_default4["link-icon"],
9299                role: "img",
9300                "aria-label": (
9301                  /* translators: accessibility text appended to link text */
9302                  (0, import_i18n2.__)("(opens in a new tab)")
9303                )
9304              }
9305            )
9306          ] })
9307        })
9308      });
9309      return element;
9310    }
9311  );
9312  
9313  // packages/ui/build-module/stack/stack.mjs
9314  var import_element18 = __toESM(require_element(), 1);
9315  var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
9316  function getRuntime6() {
9317    const globalScope = globalThis;
9318    if (globalScope.__wpStyleRuntime) {
9319      return globalScope.__wpStyleRuntime;
9320    }
9321    globalScope.__wpStyleRuntime = {
9322      documents: /* @__PURE__ */ new Map(),
9323      styles: /* @__PURE__ */ new Map(),
9324      injectedStyles: /* @__PURE__ */ new WeakMap()
9325    };
9326    if (typeof document !== "undefined") {
9327      registerDocument6(document);
9328    }
9329    return globalScope.__wpStyleRuntime;
9330  }
9331  function documentContainsStyleHash6(targetDocument, hash) {
9332    if (!targetDocument.head) {
9333      return false;
9334    }
9335    for (const style of targetDocument.head.querySelectorAll(
9336      `style[$STYLE_HASH_ATTRIBUTE6}]`
9337    )) {
9338      if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
9339        return true;
9340      }
9341    }
9342    return false;
9343  }
9344  function injectStyle6(targetDocument, hash, css) {
9345    if (!targetDocument.head) {
9346      return;
9347    }
9348    const runtime = getRuntime6();
9349    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9350    if (!injectedStyles) {
9351      injectedStyles = /* @__PURE__ */ new Set();
9352      runtime.injectedStyles.set(targetDocument, injectedStyles);
9353    }
9354    if (injectedStyles.has(hash)) {
9355      return;
9356    }
9357    if (documentContainsStyleHash6(targetDocument, hash)) {
9358      injectedStyles.add(hash);
9359      return;
9360    }
9361    const style = targetDocument.createElement("style");
9362    style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
9363    style.appendChild(targetDocument.createTextNode(css));
9364    targetDocument.head.appendChild(style);
9365    injectedStyles.add(hash);
9366  }
9367  function registerDocument6(targetDocument) {
9368    const runtime = getRuntime6();
9369    runtime.documents.set(
9370      targetDocument,
9371      (runtime.documents.get(targetDocument) ?? 0) + 1
9372    );
9373    for (const [hash, css] of runtime.styles) {
9374      injectStyle6(targetDocument, hash, css);
9375    }
9376    return () => {
9377      const count = runtime.documents.get(targetDocument);
9378      if (count === void 0) {
9379        return;
9380      }
9381      if (count <= 1) {
9382        runtime.documents.delete(targetDocument);
9383        return;
9384      }
9385      runtime.documents.set(targetDocument, count - 1);
9386    };
9387  }
9388  function registerStyle6(hash, css) {
9389    const runtime = getRuntime6();
9390    runtime.styles.set(hash, css);
9391    for (const targetDocument of runtime.documents.keys()) {
9392      injectStyle6(targetDocument, hash, css);
9393    }
9394  }
9395  if (typeof process === "undefined" || true) {
9396    registerStyle6("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
9397  }
9398  var style_default5 = { "stack": "_19ce0419607e1896__stack" };
9399  var gapTokens = {
9400    xs: "var(--wpds-dimension-gap-xs, 4px)",
9401    sm: "var(--wpds-dimension-gap-sm, 8px)",
9402    md: "var(--wpds-dimension-gap-md, 12px)",
9403    lg: "var(--wpds-dimension-gap-lg, 16px)",
9404    xl: "var(--wpds-dimension-gap-xl, 24px)",
9405    "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
9406    "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
9407  };
9408  var Stack = (0, import_element18.forwardRef)(
9409    function UnforwardedStack({ direction, gap, align, justify, wrap, render, ...props }, ref) {
9410      const style = {
9411        gap: gap && gapTokens[gap],
9412        alignItems: align,
9413        justifyContent: justify,
9414        flexDirection: direction,
9415        flexWrap: wrap
9416      };
9417      const element = useRender({
9418        render,
9419        ref,
9420        props: mergeProps(props, {
9421          style,
9422          className: style_default5.stack
9423        })
9424      });
9425      return element;
9426    }
9427  );
9428  
9429  // packages/core-fields/build-module/attachment/alt_text/field.mjs
9430  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
9431  var fieldExtensions = {
9432    description: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
9433      /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9434        Link,
9435        {
9436          href: (
9437            // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
9438            (0, import_i18n3.__)(
9439              "https://www.w3.org/WAI/tutorials/images/decision-tree/"
9440            )
9441          ),
9442          openInNewTab: true,
9443          children: (0, import_i18n3.__)("Describe the purpose of the image.")
9444        }
9445      ),
9446      /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("br", {}),
9447      (0, import_i18n3.__)("Leave empty if decorative.")
9448    ] }),
9449    // Only images have an alternative text.
9450    isVisible: (item) => item?.media_type === "image",
9451    render: ({ item }) => item?.alt_text || "-"
9452  };
9453  
9454  // packages/core-fields/build-module/attachment/attached_to/edit.mjs
9455  var import_core_data = __toESM(require_core_data(), 1);
9456  var import_components = __toESM(require_components(), 1);
9457  var import_i18n4 = __toESM(require_i18n(), 1);
9458  var import_element19 = __toESM(require_element(), 1);
9459  var import_compose = __toESM(require_compose(), 1);
9460  var import_data = __toESM(require_data(), 1);
9461  
9462  // packages/core-fields/build-module/attachment/get-rendered-content.mjs
9463  function getRenderedContent(content) {
9464    if (!content) {
9465      return "";
9466    }
9467    if (typeof content === "string") {
9468      return content;
9469    }
9470    if (typeof content === "object") {
9471      return content.rendered || content.raw || "";
9472    }
9473    return "";
9474  }
9475  
9476  // packages/core-fields/build-module/attachment/attached_to/edit.mjs
9477  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
9478  var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
9479  function getRuntime7() {
9480    const globalScope = globalThis;
9481    if (globalScope.__wpStyleRuntime) {
9482      return globalScope.__wpStyleRuntime;
9483    }
9484    globalScope.__wpStyleRuntime = {
9485      documents: /* @__PURE__ */ new Map(),
9486      styles: /* @__PURE__ */ new Map(),
9487      injectedStyles: /* @__PURE__ */ new WeakMap()
9488    };
9489    if (typeof document !== "undefined") {
9490      registerDocument7(document);
9491    }
9492    return globalScope.__wpStyleRuntime;
9493  }
9494  function documentContainsStyleHash7(targetDocument, hash) {
9495    if (!targetDocument.head) {
9496      return false;
9497    }
9498    for (const style of targetDocument.head.querySelectorAll(
9499      `style[$STYLE_HASH_ATTRIBUTE7}]`
9500    )) {
9501      if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
9502        return true;
9503      }
9504    }
9505    return false;
9506  }
9507  function injectStyle7(targetDocument, hash, css) {
9508    if (!targetDocument.head) {
9509      return;
9510    }
9511    const runtime = getRuntime7();
9512    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9513    if (!injectedStyles) {
9514      injectedStyles = /* @__PURE__ */ new Set();
9515      runtime.injectedStyles.set(targetDocument, injectedStyles);
9516    }
9517    if (injectedStyles.has(hash)) {
9518      return;
9519    }
9520    if (documentContainsStyleHash7(targetDocument, hash)) {
9521      injectedStyles.add(hash);
9522      return;
9523    }
9524    const style = targetDocument.createElement("style");
9525    style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
9526    style.appendChild(targetDocument.createTextNode(css));
9527    targetDocument.head.appendChild(style);
9528    injectedStyles.add(hash);
9529  }
9530  function registerDocument7(targetDocument) {
9531    const runtime = getRuntime7();
9532    runtime.documents.set(
9533      targetDocument,
9534      (runtime.documents.get(targetDocument) ?? 0) + 1
9535    );
9536    for (const [hash, css] of runtime.styles) {
9537      injectStyle7(targetDocument, hash, css);
9538    }
9539    return () => {
9540      const count = runtime.documents.get(targetDocument);
9541      if (count === void 0) {
9542        return;
9543      }
9544      if (count <= 1) {
9545        runtime.documents.delete(targetDocument);
9546        return;
9547      }
9548      runtime.documents.set(targetDocument, count - 1);
9549    };
9550  }
9551  function registerStyle7(hash, css) {
9552    const runtime = getRuntime7();
9553    runtime.styles.set(hash, css);
9554    for (const targetDocument of runtime.documents.keys()) {
9555      injectStyle7(targetDocument, hash, css);
9556    }
9557  }
9558  if (typeof process === "undefined" || true) {
9559    registerStyle7("4e04a505ae", ".components-popover__content:has(.f69ff91766e2fd2f__attached-to){margin-block-end:96px}.components-popover__content:has(.f69ff91766e2fd2f__attached-to):has(.components-form-token-field__suggestions-list){margin-block-end:0}.components-popover__content:has(.f69ff91766e2fd2f__attached-to)\n.components-form-token-field__suggestions-list{block-size:96px;max-block-size:none}");
9560  }
9561  var style_default6 = { "attached-to": "f69ff91766e2fd2f__attached-to" };
9562  function MediaAttachedToEdit({
9563    data,
9564    onChange
9565  }) {
9566    const defaultPost = !!data.post && !!data?._embedded?.["wp:attached-to"]?.[0] ? [
9567      {
9568        label: getRenderedContent(
9569          data._embedded?.["wp:attached-to"]?.[0]?.title
9570        ),
9571        value: data.post.toString()
9572      }
9573    ] : [];
9574    const [options, setOptions] = (0, import_element19.useState)(defaultPost);
9575    const [searchResults, setSearchResults] = (0, import_element19.useState)(
9576      []
9577    );
9578    const [isLoading, setIsLoading] = (0, import_element19.useState)(false);
9579    const [value, setValue] = (0, import_element19.useState)(
9580      data?.post?.toString() ?? null
9581    );
9582    const postTypes = (0, import_data.useSelect)(
9583      (select) => select(import_core_data.store).getPostTypes(),
9584      []
9585    );
9586    const handleDetach = () => {
9587      onChange({
9588        post: 0,
9589        _embedded: { ...data?._embedded, "wp:attached-to": void 0 }
9590      });
9591      setValue(null);
9592    };
9593    const onValueChange = async (filterValue) => {
9594      setIsLoading(true);
9595      const results = await (0, import_core_data.__experimentalFetchLinkSuggestions)(
9596        filterValue,
9597        /*
9598         * @TODO `fetchLinkSuggestions()` should accept `perPage` as an option argument.
9599         * `isInitialSuggestions` limits the result to 3, otherwise it's hardcoded to 20.
9600         */
9601        { type: "post", isInitialSuggestions: true },
9602        {}
9603      );
9604      setSearchResults(results);
9605      const suggestions = results.map((result) => {
9606        return {
9607          label: result.title,
9608          value: result.id.toString()
9609        };
9610      });
9611      const includeCurrent = !filterValue && suggestions.findIndex((s) => s.value === value) === -1;
9612      setOptions(suggestions.concat(includeCurrent ? defaultPost : []));
9613      setIsLoading(false);
9614    };
9615    const debouncedValueChange = (0, import_compose.useDebounce)((0, import_compose.useEvent)(onValueChange), 300);
9616    const handleSelectOption = (selectedPostId) => {
9617      if (!selectedPostId) {
9618        handleDetach();
9619        return;
9620      }
9621      setValue(selectedPostId);
9622      if (selectedPostId) {
9623        const selectedPost = searchResults.find(
9624          (result) => result.id === Number(selectedPostId)
9625        );
9626        if (selectedPost && postTypes) {
9627          const postType = postTypes.find(
9628            (_postType) => _postType.slug === selectedPost?.type
9629          );
9630          const attachedTo = {
9631            ...postType && { type: postType.slug },
9632            id: Number(selectedPostId),
9633            title: {
9634              raw: selectedPost.title,
9635              rendered: selectedPost.title
9636            }
9637          };
9638          onChange({
9639            post: Number(selectedPostId),
9640            _embedded: {
9641              ...data?._embedded,
9642              "wp:attached-to": [attachedTo]
9643            }
9644          });
9645        }
9646      }
9647    };
9648    return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
9649      import_components.ComboboxControl,
9650      {
9651        className: style_default6["attached-to"],
9652        isLoading,
9653        label: (0, import_i18n4.__)("Attached to"),
9654        help: (0, import_i18n4.__)("Attach this file to a single post or page."),
9655        value,
9656        options,
9657        onFilterValueChange: (filterValue) => debouncedValueChange(filterValue),
9658        onChange: handleSelectOption,
9659        hideLabelFromVision: true,
9660        expandOnFocus: false
9661      }
9662    );
9663  }
9664  
9665  // packages/core-fields/build-module/attachment/attached_to/view.mjs
9666  var import_element20 = __toESM(require_element(), 1);
9667  var import_i18n5 = __toESM(require_i18n(), 1);
9668  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
9669  function MediaAttachedToView({ item }) {
9670    const [attachedPostTitle, setAttachedPostTitle] = (0, import_element20.useState)(null);
9671    const parentId = item.post;
9672    const embeddedPostId = item._embedded?.["wp:attached-to"]?.[0]?.id;
9673    const embeddedPostTitle = item._embedded?.["wp:attached-to"]?.[0]?.title;
9674    (0, import_element20.useEffect)(() => {
9675      if (!!parentId && parentId === embeddedPostId) {
9676        setAttachedPostTitle(
9677          getRenderedContent(embeddedPostTitle) || (0, import_i18n5.__)("(no title)")
9678        );
9679      }
9680      if (!parentId) {
9681        setAttachedPostTitle((0, import_i18n5.__)("(Unattached)"));
9682      }
9683    }, [parentId, embeddedPostId, embeddedPostTitle]);
9684    return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_jsx_runtime28.Fragment, { children: attachedPostTitle });
9685  }
9686  
9687  // packages/core-fields/build-module/attachment/attached_to/field.mjs
9688  var fieldExtensions2 = {
9689    Edit: MediaAttachedToEdit,
9690    render: MediaAttachedToView
9691  };
9692  
9693  // packages/core-fields/build-module/attachment/author/field.mjs
9694  var import_data2 = __toESM(require_data(), 1);
9695  var import_core_data2 = __toESM(require_core_data(), 1);
9696  
9697  // packages/core-fields/build-module/attachment/author/view.mjs
9698  var import_i18n6 = __toESM(require_i18n(), 1);
9699  var import_element21 = __toESM(require_element(), 1);
9700  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
9701  var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
9702  function getRuntime8() {
9703    const globalScope = globalThis;
9704    if (globalScope.__wpStyleRuntime) {
9705      return globalScope.__wpStyleRuntime;
9706    }
9707    globalScope.__wpStyleRuntime = {
9708      documents: /* @__PURE__ */ new Map(),
9709      styles: /* @__PURE__ */ new Map(),
9710      injectedStyles: /* @__PURE__ */ new WeakMap()
9711    };
9712    if (typeof document !== "undefined") {
9713      registerDocument8(document);
9714    }
9715    return globalScope.__wpStyleRuntime;
9716  }
9717  function documentContainsStyleHash8(targetDocument, hash) {
9718    if (!targetDocument.head) {
9719      return false;
9720    }
9721    for (const style of targetDocument.head.querySelectorAll(
9722      `style[$STYLE_HASH_ATTRIBUTE8}]`
9723    )) {
9724      if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
9725        return true;
9726      }
9727    }
9728    return false;
9729  }
9730  function injectStyle8(targetDocument, hash, css) {
9731    if (!targetDocument.head) {
9732      return;
9733    }
9734    const runtime = getRuntime8();
9735    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9736    if (!injectedStyles) {
9737      injectedStyles = /* @__PURE__ */ new Set();
9738      runtime.injectedStyles.set(targetDocument, injectedStyles);
9739    }
9740    if (injectedStyles.has(hash)) {
9741      return;
9742    }
9743    if (documentContainsStyleHash8(targetDocument, hash)) {
9744      injectedStyles.add(hash);
9745      return;
9746    }
9747    const style = targetDocument.createElement("style");
9748    style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
9749    style.appendChild(targetDocument.createTextNode(css));
9750    targetDocument.head.appendChild(style);
9751    injectedStyles.add(hash);
9752  }
9753  function registerDocument8(targetDocument) {
9754    const runtime = getRuntime8();
9755    runtime.documents.set(
9756      targetDocument,
9757      (runtime.documents.get(targetDocument) ?? 0) + 1
9758    );
9759    for (const [hash, css] of runtime.styles) {
9760      injectStyle8(targetDocument, hash, css);
9761    }
9762    return () => {
9763      const count = runtime.documents.get(targetDocument);
9764      if (count === void 0) {
9765        return;
9766      }
9767      if (count <= 1) {
9768        runtime.documents.delete(targetDocument);
9769        return;
9770      }
9771      runtime.documents.set(targetDocument, count - 1);
9772    };
9773  }
9774  function registerStyle8(hash, css) {
9775    const runtime = getRuntime8();
9776    runtime.styles.set(hash, css);
9777    for (const targetDocument of runtime.documents.keys()) {
9778      injectStyle8(targetDocument, hash, css);
9779    }
9780  }
9781  if (typeof process === "undefined" || true) {
9782    registerStyle8("0a7219ef54", ".f538a139de526526__avatar{align-items:center;block-size:24px;display:flex;flex-shrink:0;inline-size:24px;justify-content:start;overflow:hidden}.f538a139de526526__avatar img{block-size:16px;border-radius:100%;inline-size:16px;object-fit:cover;opacity:1}@media not (prefers-reduced-motion){._376e868d5ce17756__is-loading img,._86ee87153607c328__is-loaded img{transition:opacity .1s linear}}._376e868d5ce17756__is-loading img{opacity:0}._86ee87153607c328__is-loaded img{opacity:1}._559568e925bff556__icon{block-size:24px;display:flex;flex-shrink:0;inline-size:24px}._559568e925bff556__icon svg{fill:currentColor;margin-inline-start:-4px}._756368e82f9dfc25__name{overflow:hidden;text-overflow:ellipsis}");
9783  }
9784  var style_default7 = { "avatar": "f538a139de526526__avatar", "is-loading": "_376e868d5ce17756__is-loading", "is-loaded": "_86ee87153607c328__is-loaded", "icon": "_559568e925bff556__icon", "name": "_756368e82f9dfc25__name" };
9785  function AuthorView({ item }) {
9786    const author = item?._embedded?.author?.[0];
9787    const text = author?.name;
9788    const imageUrl = author?.avatar_urls?.[48];
9789    const [loadingState, setLoadingState] = (0, import_element21.useState)("loading");
9790    (0, import_element21.useEffect)(() => {
9791      setLoadingState("loading");
9792    }, [imageUrl]);
9793    const imgRef = (0, import_element21.useCallback)((img) => {
9794      if (img?.complete) {
9795        setLoadingState("instant");
9796      }
9797    }, []);
9798    const handleLoad = () => {
9799      if (loadingState === "loading") {
9800        setLoadingState("loaded");
9801      }
9802    };
9803    return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Stack, { direction: "row", align: "center", justify: "flex-start", children: [
9804      !!imageUrl && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
9805        "div",
9806        {
9807          className: clsx_default(style_default7.avatar, {
9808            [style_default7["is-loading"]]: loadingState === "loading",
9809            [style_default7["is-loaded"]]: loadingState === "loaded"
9810          }),
9811          children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
9812            "img",
9813            {
9814              ref: imgRef,
9815              onLoad: handleLoad,
9816              alt: (0, import_i18n6.__)("Author avatar"),
9817              src: imageUrl
9818            }
9819          )
9820        }
9821      ),
9822      !imageUrl && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: style_default7.icon, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { icon: comment_author_avatar_default }) }),
9823      /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: style_default7.name, children: text })
9824    ] });
9825  }
9826  
9827  // packages/core-fields/build-module/attachment/author/field.mjs
9828  var fieldExtensions3 = {
9829    getElements: async () => {
9830      const authors = await (0, import_data2.resolveSelect)(import_core_data2.store).getEntityRecords(
9831        "root",
9832        "user",
9833        {
9834          per_page: -1,
9835          who: "authors",
9836          _fields: "id,name",
9837          context: "view"
9838        }
9839      ) ?? [];
9840      return authors.map(({ id, name }) => ({
9841        value: id,
9842        label: name
9843      }));
9844    },
9845    render: AuthorView
9846  };
9847  
9848  // packages/core-fields/build-module/attachment/get-raw-content.mjs
9849  function getRawContent(content) {
9850    if (!content) {
9851      return "";
9852    }
9853    if (typeof content === "string") {
9854      return content;
9855    }
9856    if (typeof content === "object" && "raw" in content) {
9857      return content.raw || "";
9858    }
9859    return "";
9860  }
9861  
9862  // packages/core-fields/build-module/attachment/caption/field.mjs
9863  var fieldExtensions4 = {
9864    getValue: ({ item }) => getRawContent(item?.caption),
9865    render: ({ item }) => getRawContent(item?.caption) || "-"
9866  };
9867  
9868  // packages/core-fields/build-module/attachment/description/field.mjs
9869  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
9870  var fieldExtensions5 = {
9871    getValue: ({ item }) => getRawContent(item?.description),
9872    render: ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { children: getRawContent(item?.description) || "-" })
9873  };
9874  
9875  // packages/core-fields/build-module/attachment/filename/field.mjs
9876  var import_url2 = __toESM(require_url(), 1);
9877  
9878  // packages/core-fields/build-module/attachment/filename/view.mjs
9879  var import_element22 = __toESM(require_element(), 1);
9880  var import_url = __toESM(require_url(), 1);
9881  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
9882  var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
9883  function getRuntime9() {
9884    const globalScope = globalThis;
9885    if (globalScope.__wpStyleRuntime) {
9886      return globalScope.__wpStyleRuntime;
9887    }
9888    globalScope.__wpStyleRuntime = {
9889      documents: /* @__PURE__ */ new Map(),
9890      styles: /* @__PURE__ */ new Map(),
9891      injectedStyles: /* @__PURE__ */ new WeakMap()
9892    };
9893    if (typeof document !== "undefined") {
9894      registerDocument9(document);
9895    }
9896    return globalScope.__wpStyleRuntime;
9897  }
9898  function documentContainsStyleHash9(targetDocument, hash) {
9899    if (!targetDocument.head) {
9900      return false;
9901    }
9902    for (const style of targetDocument.head.querySelectorAll(
9903      `style[$STYLE_HASH_ATTRIBUTE9}]`
9904    )) {
9905      if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
9906        return true;
9907      }
9908    }
9909    return false;
9910  }
9911  function injectStyle9(targetDocument, hash, css) {
9912    if (!targetDocument.head) {
9913      return;
9914    }
9915    const runtime = getRuntime9();
9916    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9917    if (!injectedStyles) {
9918      injectedStyles = /* @__PURE__ */ new Set();
9919      runtime.injectedStyles.set(targetDocument, injectedStyles);
9920    }
9921    if (injectedStyles.has(hash)) {
9922      return;
9923    }
9924    if (documentContainsStyleHash9(targetDocument, hash)) {
9925      injectedStyles.add(hash);
9926      return;
9927    }
9928    const style = targetDocument.createElement("style");
9929    style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
9930    style.appendChild(targetDocument.createTextNode(css));
9931    targetDocument.head.appendChild(style);
9932    injectedStyles.add(hash);
9933  }
9934  function registerDocument9(targetDocument) {
9935    const runtime = getRuntime9();
9936    runtime.documents.set(
9937      targetDocument,
9938      (runtime.documents.get(targetDocument) ?? 0) + 1
9939    );
9940    for (const [hash, css] of runtime.styles) {
9941      injectStyle9(targetDocument, hash, css);
9942    }
9943    return () => {
9944      const count = runtime.documents.get(targetDocument);
9945      if (count === void 0) {
9946        return;
9947      }
9948      if (count <= 1) {
9949        runtime.documents.delete(targetDocument);
9950        return;
9951      }
9952      runtime.documents.set(targetDocument, count - 1);
9953    };
9954  }
9955  function registerStyle9(hash, css) {
9956    const runtime = getRuntime9();
9957    runtime.styles.set(hash, css);
9958    for (const targetDocument of runtime.documents.keys()) {
9959      injectStyle9(targetDocument, hash, css);
9960    }
9961  }
9962  if (typeof process === "undefined" || true) {
9963    registerStyle9("272b600f1c", ".dataviews-view-grid ._3f05eb69106ae604__filename,.dataviews-view-list ._3f05eb69106ae604__filename,.dataviews-view-table ._3f05eb69106ae604__filename{display:inline-block;max-inline-size:15ch;overflow:hidden;text-overflow:ellipsis;vertical-align:top;white-space:nowrap}");
9964  }
9965  var style_default8 = { "filename": "_3f05eb69106ae604__filename" };
9966  var TRUNCATE_LENGTH = 15;
9967  function FileNameView({ item }) {
9968    const fileName = (0, import_element22.useMemo)(
9969      () => item?.source_url ? (0, import_url.getFilename)(item.source_url) : null,
9970      [item?.source_url]
9971    );
9972    if (!fileName) {
9973      return "";
9974    }
9975    if (fileName.length <= TRUNCATE_LENGTH) {
9976      return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: style_default8.filename, children: fileName });
9977    }
9978    return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(tooltip_exports.Root, { children: [
9979      /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
9980        tooltip_exports.Trigger,
9981        {
9982          render: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: style_default8.filename, children: fileName })
9983        }
9984      ),
9985      /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(tooltip_exports.Popup, { children: fileName })
9986    ] });
9987  }
9988  
9989  // packages/core-fields/build-module/attachment/filename/field.mjs
9990  var fieldExtensions6 = {
9991    getValue: ({ item }) => (0, import_url2.getFilename)(item?.source_url || ""),
9992    render: FileNameView
9993  };
9994  
9995  // packages/core-fields/build-module/attachment/filesize/field.mjs
9996  var import_i18n7 = __toESM(require_i18n(), 1);
9997  var KB_IN_BYTES = 1024;
9998  var MB_IN_BYTES = 1024 * KB_IN_BYTES;
9999  var GB_IN_BYTES = 1024 * MB_IN_BYTES;
10000  var TB_IN_BYTES = 1024 * GB_IN_BYTES;
10001  var PB_IN_BYTES = 1024 * TB_IN_BYTES;
10002  var EB_IN_BYTES = 1024 * PB_IN_BYTES;
10003  var ZB_IN_BYTES = 1024 * EB_IN_BYTES;
10004  var YB_IN_BYTES = 1024 * ZB_IN_BYTES;
10005  function getBytesString(bytes, unitSymbol, decimals = 2) {
10006    return (0, import_i18n7.sprintf)(
10007      // translators: 1: Actual bytes of a file. 2: The unit symbol (e.g. MB).
10008      (0, import_i18n7._x)("%1$s %2$s", "file size"),
10009      bytes.toLocaleString(void 0, {
10010        minimumFractionDigits: 0,
10011        maximumFractionDigits: decimals
10012      }),
10013      unitSymbol
10014    );
10015  }
10016  function formatFileSize(bytes, decimals = 2) {
10017    if (bytes === 0) {
10018      return getBytesString(0, (0, import_i18n7._x)("B", "unit symbol"), decimals);
10019    }
10020    const quant = {
10021      /* translators: Unit symbol for yottabyte. */
10022      [(0, import_i18n7._x)("YB", "unit symbol")]: YB_IN_BYTES,
10023      /* translators: Unit symbol for zettabyte. */
10024      [(0, import_i18n7._x)("ZB", "unit symbol")]: ZB_IN_BYTES,
10025      /* translators: Unit symbol for exabyte. */
10026      [(0, import_i18n7._x)("EB", "unit symbol")]: EB_IN_BYTES,
10027      /* translators: Unit symbol for petabyte. */
10028      [(0, import_i18n7._x)("PB", "unit symbol")]: PB_IN_BYTES,
10029      /* translators: Unit symbol for terabyte. */
10030      [(0, import_i18n7._x)("TB", "unit symbol")]: TB_IN_BYTES,
10031      /* translators: Unit symbol for gigabyte. */
10032      [(0, import_i18n7._x)("GB", "unit symbol")]: GB_IN_BYTES,
10033      /* translators: Unit symbol for megabyte. */
10034      [(0, import_i18n7._x)("MB", "unit symbol")]: MB_IN_BYTES,
10035      /* translators: Unit symbol for kilobyte. */
10036      [(0, import_i18n7._x)("KB", "unit symbol")]: KB_IN_BYTES,
10037      /* translators: Unit symbol for byte. */
10038      [(0, import_i18n7._x)("B", "unit symbol")]: 1
10039    };
10040    for (const [unit, mag] of Object.entries(quant)) {
10041      if (bytes >= mag) {
10042        return getBytesString(bytes / mag, unit, decimals);
10043      }
10044    }
10045    return "";
10046  }
10047  var fieldExtensions7 = {
10048    getValue: ({ item }) => item?.media_details?.filesize ? formatFileSize(item.media_details.filesize) : "",
10049    isVisible: (item) => !!item?.media_details?.filesize
10050  };
10051  
10052  // packages/core-fields/build-module/attachment/media_dimensions/field.mjs
10053  var import_i18n8 = __toESM(require_i18n(), 1);
10054  var fieldExtensions8 = {
10055    getValue: ({ item }) => item?.media_details?.width && item?.media_details?.height ? (0, import_i18n8.sprintf)(
10056      // translators: 1: Width. 2: Height.
10057      (0, import_i18n8._x)("%1$s × %2$s", "image dimensions"),
10058      item.media_details.width.toString(),
10059      item.media_details.height.toString()
10060    ) : "",
10061    isVisible: (item) => !!(item?.media_details?.width && item?.media_details?.height)
10062  };
10063  
10064  // packages/core-fields/build-module/attachment/media_thumbnail/view.mjs
10065  var import_data3 = __toESM(require_data(), 1);
10066  var import_core_data3 = __toESM(require_core_data(), 1);
10067  var import_element23 = __toESM(require_element(), 1);
10068  var import_url3 = __toESM(require_url(), 1);
10069  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
10070  var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
10071  function getRuntime10() {
10072    const globalScope = globalThis;
10073    if (globalScope.__wpStyleRuntime) {
10074      return globalScope.__wpStyleRuntime;
10075    }
10076    globalScope.__wpStyleRuntime = {
10077      documents: /* @__PURE__ */ new Map(),
10078      styles: /* @__PURE__ */ new Map(),
10079      injectedStyles: /* @__PURE__ */ new WeakMap()
10080    };
10081    if (typeof document !== "undefined") {
10082      registerDocument10(document);
10083    }
10084    return globalScope.__wpStyleRuntime;
10085  }
10086  function documentContainsStyleHash10(targetDocument, hash) {
10087    if (!targetDocument.head) {
10088      return false;
10089    }
10090    for (const style of targetDocument.head.querySelectorAll(
10091      `style[$STYLE_HASH_ATTRIBUTE10}]`
10092    )) {
10093      if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
10094        return true;
10095      }
10096    }
10097    return false;
10098  }
10099  function injectStyle10(targetDocument, hash, css) {
10100    if (!targetDocument.head) {
10101      return;
10102    }
10103    const runtime = getRuntime10();
10104    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10105    if (!injectedStyles) {
10106      injectedStyles = /* @__PURE__ */ new Set();
10107      runtime.injectedStyles.set(targetDocument, injectedStyles);
10108    }
10109    if (injectedStyles.has(hash)) {
10110      return;
10111    }
10112    if (documentContainsStyleHash10(targetDocument, hash)) {
10113      injectedStyles.add(hash);
10114      return;
10115    }
10116    const style = targetDocument.createElement("style");
10117    style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
10118    style.appendChild(targetDocument.createTextNode(css));
10119    targetDocument.head.appendChild(style);
10120    injectedStyles.add(hash);
10121  }
10122  function registerDocument10(targetDocument) {
10123    const runtime = getRuntime10();
10124    runtime.documents.set(
10125      targetDocument,
10126      (runtime.documents.get(targetDocument) ?? 0) + 1
10127    );
10128    for (const [hash, css] of runtime.styles) {
10129      injectStyle10(targetDocument, hash, css);
10130    }
10131    return () => {
10132      const count = runtime.documents.get(targetDocument);
10133      if (count === void 0) {
10134        return;
10135      }
10136      if (count <= 1) {
10137        runtime.documents.delete(targetDocument);
10138        return;
10139      }
10140      runtime.documents.set(targetDocument, count - 1);
10141    };
10142  }
10143  function registerStyle10(hash, css) {
10144    const runtime = getRuntime10();
10145    runtime.styles.set(hash, css);
10146    for (const targetDocument of runtime.documents.keys()) {
10147      injectStyle10(targetDocument, hash, css);
10148    }
10149  }
10150  if (typeof process === "undefined" || true) {
10151    registerStyle10("9e9e67bfcb", ".a5573827939dc2c3__thumbnail{align-items:center;block-size:100%;display:flex;position:relative}@media not (prefers-reduced-motion){._6fa3496f8f761fb4__is-loaded img,.ecb1bb1e5dae60dd__is-loading img{transition:opacity .1s linear}}.ecb1bb1e5dae60dd__is-loading img{opacity:0}._6fa3496f8f761fb4__is-loaded img{opacity:1}._14cb8abe92d168fb__image{block-size:100%;display:block;inline-size:100%;object-fit:cover}._6dd292598801073e__stack{block-size:100%;box-sizing:border-box;color:var(--wpds-color-foreground-content-neutral-weak,#707070);inline-size:100%}._6240e0c912f5e4b6__icon{fill:currentColor}._571e4c08c213eea5__filename{box-sizing:border-box;container-type:inline-size;inline-size:100%;padding:0 var(--wpds-dimension-padding-lg,16px);text-align:center}._4929be4f938dd46f__filename-text{display:block;margin-block-start:var(--wpds-dimension-gap-xs,4px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container (max-width: 90px){._4929be4f938dd46f__filename-text{display:none}}");
10152  }
10153  var style_default9 = { "thumbnail": "a5573827939dc2c3__thumbnail", "is-loading": "ecb1bb1e5dae60dd__is-loading", "is-loaded": "_6fa3496f8f761fb4__is-loaded", "image": "_14cb8abe92d168fb__image", "stack": "_6dd292598801073e__stack", "icon": "_6240e0c912f5e4b6__icon", "filename": "_571e4c08c213eea5__filename", "filename-text": "_4929be4f938dd46f__filename-text" };
10154  function getMediaTypeIcon(mimeType) {
10155    if (mimeType.startsWith("image/")) {
10156      return image_default;
10157    }
10158    if (mimeType.startsWith("video/")) {
10159      return video_default;
10160    }
10161    if (mimeType.startsWith("audio/")) {
10162      return audio_default;
10163    }
10164    return file_default;
10165  }
10166  function getBestImageUrl(media, configSizes) {
10167    const sizes = media?.media_details?.sizes;
10168    if (!sizes) {
10169      return media.source_url;
10170    }
10171    const targetWidth = configSizes ? parseInt(configSizes, 10) : NaN;
10172    if (Number.isNaN(targetWidth)) {
10173      return media.source_url;
10174    }
10175    const sorted = Object.values(sizes).filter(
10176      (size4) => typeof size4.width === "number" && !Number.isNaN(size4.width)
10177    ).toSorted((a, b) => a.width - b.width);
10178    if (!sorted.length) {
10179      return media.source_url;
10180    }
10181    const match = sorted.find((size4) => size4.width >= targetWidth) ?? sorted[sorted.length - 1];
10182    return match.source_url;
10183  }
10184  function FallbackView({
10185    item,
10186    filename
10187  }) {
10188    return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: style_default9.thumbnail, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
10189      Stack,
10190      {
10191        direction: "column",
10192        justify: "center",
10193        align: "center",
10194        className: style_default9.stack,
10195        children: [
10196          /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
10197            Icon,
10198            {
10199              className: style_default9.icon,
10200              icon: getMediaTypeIcon(item.mime_type || ""),
10201              size: 24
10202            }
10203          ),
10204          !!filename && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: style_default9.filename, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
10205            Text,
10206            {
10207              variant: "body-sm",
10208              className: style_default9["filename-text"],
10209              children: filename
10210            }
10211          ) })
10212        ]
10213      }
10214    ) });
10215  }
10216  function ImageView({
10217    item,
10218    configSizes,
10219    onError
10220  }) {
10221    const imageUrl = getBestImageUrl(item, configSizes);
10222    const title = typeof item.title === "string" ? item.title : item.title?.raw;
10223    const [loadingState, setLoadingState] = (0, import_element23.useState)("loading");
10224    (0, import_element23.useEffect)(() => {
10225      setLoadingState("loading");
10226    }, [imageUrl]);
10227    const imgRef = (0, import_element23.useCallback)((img) => {
10228      if (img?.complete) {
10229        setLoadingState("instant");
10230      }
10231    }, []);
10232    const handleLoad = () => {
10233      if (loadingState === "loading") {
10234        setLoadingState("loaded");
10235      }
10236    };
10237    return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
10238      "div",
10239      {
10240        className: clsx_default(style_default9.thumbnail, {
10241          [style_default9["is-loading"]]: loadingState === "loading",
10242          [style_default9["is-loaded"]]: loadingState === "loaded"
10243        }),
10244        children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
10245          "img",
10246          {
10247            ref: imgRef,
10248            className: style_default9.image,
10249            src: imageUrl,
10250            alt: item.alt_text || title,
10251            onLoad: handleLoad,
10252            onError,
10253            loading: "lazy"
10254          }
10255        )
10256      }
10257    );
10258  }
10259  function MediaThumbnailView({
10260    item,
10261    config
10262  }) {
10263    const [imageError, setImageError] = (0, import_element23.useState)(false);
10264    const _featuredMedia = (0, import_data3.useSelect)(
10265      (select) => {
10266        if (!item.featured_media) {
10267          return;
10268        }
10269        return select(import_core_data3.store).getEntityRecord(
10270          "postType",
10271          "attachment",
10272          item.featured_media
10273        );
10274      },
10275      [item.featured_media]
10276    );
10277    const featuredMedia = item.featured_media ? _featuredMedia : item;
10278    if (!featuredMedia) {
10279      return null;
10280    }
10281    const filename = (0, import_url3.getFilename)(featuredMedia.source_url || "");
10282    if (imageError || !(featuredMedia.mime_type || "").startsWith("image/")) {
10283      return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(FallbackView, { item: featuredMedia, filename: filename || "" });
10284    }
10285    return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
10286      ImageView,
10287      {
10288        item: featuredMedia,
10289        configSizes: config?.sizes,
10290        onError: () => setImageError(true)
10291      }
10292    );
10293  }
10294  
10295  // packages/core-fields/build-module/attachment/media_thumbnail/field.mjs
10296  var fieldExtensions9 = {
10297    render: MediaThumbnailView
10298  };
10299  
10300  // packages/core-fields/build-module/attachment/mime_type/field.mjs
10301  var fieldExtensions10 = {
10302    getValue: ({ item }) => item?.mime_type || "",
10303    render: ({ item }) => item?.mime_type || "-"
10304  };
10305  
10306  // packages/core-fields/build-module/shared/title/get-item-title.mjs
10307  var import_html_entities = __toESM(require_html_entities(), 1);
10308  var import_i18n9 = __toESM(require_i18n(), 1);
10309  function getItemTitle(item, fallback = (0, import_i18n9.__)("(no title)")) {
10310    let title = "";
10311    if (typeof item.title === "string") {
10312      title = (0, import_html_entities.decodeEntities)(item.title);
10313    } else if (item.title && "rendered" in item.title) {
10314      title = (0, import_html_entities.decodeEntities)(item.title.rendered ?? "");
10315    } else if (item.title && "raw" in item.title) {
10316      title = (0, import_html_entities.decodeEntities)(item.title.raw ?? "");
10317    }
10318    return title || fallback;
10319  }
10320  
10321  // packages/core-fields/build-module/shared/title/view.mjs
10322  var import_i18n10 = __toESM(require_i18n(), 1);
10323  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
10324  var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
10325  function getRuntime11() {
10326    const globalScope = globalThis;
10327    if (globalScope.__wpStyleRuntime) {
10328      return globalScope.__wpStyleRuntime;
10329    }
10330    globalScope.__wpStyleRuntime = {
10331      documents: /* @__PURE__ */ new Map(),
10332      styles: /* @__PURE__ */ new Map(),
10333      injectedStyles: /* @__PURE__ */ new WeakMap()
10334    };
10335    if (typeof document !== "undefined") {
10336      registerDocument11(document);
10337    }
10338    return globalScope.__wpStyleRuntime;
10339  }
10340  function documentContainsStyleHash11(targetDocument, hash) {
10341    if (!targetDocument.head) {
10342      return false;
10343    }
10344    for (const style of targetDocument.head.querySelectorAll(
10345      `style[$STYLE_HASH_ATTRIBUTE11}]`
10346    )) {
10347      if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
10348        return true;
10349      }
10350    }
10351    return false;
10352  }
10353  function injectStyle11(targetDocument, hash, css) {
10354    if (!targetDocument.head) {
10355      return;
10356    }
10357    const runtime = getRuntime11();
10358    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10359    if (!injectedStyles) {
10360      injectedStyles = /* @__PURE__ */ new Set();
10361      runtime.injectedStyles.set(targetDocument, injectedStyles);
10362    }
10363    if (injectedStyles.has(hash)) {
10364      return;
10365    }
10366    if (documentContainsStyleHash11(targetDocument, hash)) {
10367      injectedStyles.add(hash);
10368      return;
10369    }
10370    const style = targetDocument.createElement("style");
10371    style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
10372    style.appendChild(targetDocument.createTextNode(css));
10373    targetDocument.head.appendChild(style);
10374    injectedStyles.add(hash);
10375  }
10376  function registerDocument11(targetDocument) {
10377    const runtime = getRuntime11();
10378    runtime.documents.set(
10379      targetDocument,
10380      (runtime.documents.get(targetDocument) ?? 0) + 1
10381    );
10382    for (const [hash, css] of runtime.styles) {
10383      injectStyle11(targetDocument, hash, css);
10384    }
10385    return () => {
10386      const count = runtime.documents.get(targetDocument);
10387      if (count === void 0) {
10388        return;
10389      }
10390      if (count <= 1) {
10391        runtime.documents.delete(targetDocument);
10392        return;
10393      }
10394      runtime.documents.set(targetDocument, count - 1);
10395    };
10396  }
10397  function registerStyle11(hash, css) {
10398    const runtime = getRuntime11();
10399    runtime.styles.set(hash, css);
10400    for (const targetDocument of runtime.documents.keys()) {
10401      injectStyle11(targetDocument, hash, css);
10402    }
10403  }
10404  if (typeof process === "undefined" || true) {
10405    registerStyle11("cd9f81046b", ".f17c7d5418aade3c__title>span:first-child{display:block;flex-grow:0;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}._86b9872383a1ab5e__pattern-title>span:first-child{flex:1}");
10406  }
10407  var style_default10 = { "title": "f17c7d5418aade3c__title", "pattern-title": "_86b9872383a1ab5e__pattern-title" };
10408  function BaseTitleView({
10409    item,
10410    className,
10411    children
10412  }) {
10413    const renderedTitle = getItemTitle(item);
10414    return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
10415      Stack,
10416      {
10417        direction: "row",
10418        align: "center",
10419        justify: "flex-start",
10420        gap: "sm",
10421        className: clsx_default("fields-field__title", style_default10.title, className),
10422        children: [
10423          /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: renderedTitle || (0, import_i18n10.__)("(no title)") }),
10424          children
10425        ]
10426      }
10427    );
10428  }
10429  function TitleView({ item }) {
10430    return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(BaseTitleView, { item });
10431  }
10432  
10433  // packages/core-fields/build-module/attachment/title/field.mjs
10434  var fieldExtensions11 = {
10435    getValue: ({ item }) => getItemTitle(item),
10436    render: TitleView
10437  };
10438  
10439  // packages/core-fields/build-module/attachment/index.mjs
10440  var fields = {
10441    alt_text: fieldExtensions,
10442    attached_to: fieldExtensions2,
10443    author: fieldExtensions3,
10444    caption: fieldExtensions4,
10445    description: fieldExtensions5,
10446    filename: fieldExtensions6,
10447    filesize: fieldExtensions7,
10448    media_dimensions: fieldExtensions8,
10449    media_thumbnail: fieldExtensions9,
10450    mime_type: fieldExtensions10,
10451    title: fieldExtensions11
10452  };
10453  var attachment_default = fields;
10454  export {
10455    attachment_default as default
10456  };
10457  /*! Bundled license information:
10458  
10459  use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
10460    (**
10461     * @license React
10462     * use-sync-external-store-shim.development.js
10463     *
10464     * Copyright (c) Meta Platforms, Inc. and affiliates.
10465     *
10466     * This source code is licensed under the MIT license found in the
10467     * LICENSE file in the root directory of this source tree.
10468     *)
10469  
10470  use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
10471    (**
10472     * @license React
10473     * use-sync-external-store-shim/with-selector.development.js
10474     *
10475     * Copyright (c) Meta Platforms, Inc. and affiliates.
10476     *
10477     * This source code is licensed under the MIT license found in the
10478     * LICENSE file in the root directory of this source tree.
10479     *)
10480  */


Generated : Wed Oct 21 08:20:34 2026 Cross-referenced by PHPXref