[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/build/routes/connectors-home/ -> content.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  // package-external:@wordpress/element
  39  var require_element = __commonJS({
  40    "package-external:@wordpress/element"(exports, module) {
  41      module.exports = window.wp.element;
  42    }
  43  });
  44  
  45  // vendor-external:react
  46  var require_react = __commonJS({
  47    "vendor-external:react"(exports, module) {
  48      module.exports = window.React;
  49    }
  50  });
  51  
  52  // vendor-external:react/jsx-runtime
  53  var require_jsx_runtime = __commonJS({
  54    "vendor-external:react/jsx-runtime"(exports, module) {
  55      module.exports = window.ReactJSXRuntime;
  56    }
  57  });
  58  
  59  // vendor-external:react-dom
  60  var require_react_dom = __commonJS({
  61    "vendor-external:react-dom"(exports, module) {
  62      module.exports = window.ReactDOM;
  63    }
  64  });
  65  
  66  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
  67  var require_use_sync_external_store_shim_development = __commonJS({
  68    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
  69      "use strict";
  70      (function() {
  71        function is(x, y) {
  72          return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
  73        }
  74        function useSyncExternalStore$2(subscribe, getSnapshot) {
  75          didWarnOld18Alpha || void 0 === React52.startTransition || (didWarnOld18Alpha = true, console.error(
  76            "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."
  77          ));
  78          var value = getSnapshot();
  79          if (!didWarnUncachedGetSnapshot) {
  80            var cachedValue = getSnapshot();
  81            objectIs(value, cachedValue) || (console.error(
  82              "The result of getSnapshot should be cached to avoid an infinite loop"
  83            ), didWarnUncachedGetSnapshot = true);
  84          }
  85          cachedValue = useState14({
  86            inst: { value, getSnapshot }
  87          });
  88          var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
  89          useLayoutEffect3(
  90            function() {
  91              inst.value = value;
  92              inst.getSnapshot = getSnapshot;
  93              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
  94            },
  95            [subscribe, value, getSnapshot]
  96          );
  97          useEffect15(
  98            function() {
  99              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 100              return subscribe(function() {
 101                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 102              });
 103            },
 104            [subscribe]
 105          );
 106          useDebugValue2(value);
 107          return value;
 108        }
 109        function checkIfSnapshotChanged(inst) {
 110          var latestGetSnapshot = inst.getSnapshot;
 111          inst = inst.value;
 112          try {
 113            var nextValue = latestGetSnapshot();
 114            return !objectIs(inst, nextValue);
 115          } catch (error2) {
 116            return true;
 117          }
 118        }
 119        function useSyncExternalStore$1(subscribe, getSnapshot) {
 120          return getSnapshot();
 121        }
 122        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 123        var React52 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState14 = React52.useState, useEffect15 = React52.useEffect, useLayoutEffect3 = React52.useLayoutEffect, useDebugValue2 = React52.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
 124        exports.useSyncExternalStore = void 0 !== React52.useSyncExternalStore ? React52.useSyncExternalStore : shim;
 125        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 126      })();
 127    }
 128  });
 129  
 130  // node_modules/use-sync-external-store/shim/index.js
 131  var require_shim = __commonJS({
 132    "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
 133      "use strict";
 134      if (false) {
 135        module.exports = null;
 136      } else {
 137        module.exports = require_use_sync_external_store_shim_development();
 138      }
 139    }
 140  });
 141  
 142  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
 143  var require_with_selector_development = __commonJS({
 144    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
 145      "use strict";
 146      (function() {
 147        function is(x, y) {
 148          return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
 149        }
 150        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 151        var React52 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore2 = shim.useSyncExternalStore, useRef22 = React52.useRef, useEffect15 = React52.useEffect, useMemo16 = React52.useMemo, useDebugValue2 = React52.useDebugValue;
 152        exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
 153          var instRef = useRef22(null);
 154          if (null === instRef.current) {
 155            var inst = { hasValue: false, value: null };
 156            instRef.current = inst;
 157          } else inst = instRef.current;
 158          instRef = useMemo16(
 159            function() {
 160              function memoizedSelector(nextSnapshot) {
 161                if (!hasMemo) {
 162                  hasMemo = true;
 163                  memoizedSnapshot = nextSnapshot;
 164                  nextSnapshot = selector(nextSnapshot);
 165                  if (void 0 !== isEqual && inst.hasValue) {
 166                    var currentSelection = inst.value;
 167                    if (isEqual(currentSelection, nextSnapshot))
 168                      return memoizedSelection = currentSelection;
 169                  }
 170                  return memoizedSelection = nextSnapshot;
 171                }
 172                currentSelection = memoizedSelection;
 173                if (objectIs(memoizedSnapshot, nextSnapshot))
 174                  return currentSelection;
 175                var nextSelection = selector(nextSnapshot);
 176                if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
 177                  return memoizedSnapshot = nextSnapshot, currentSelection;
 178                memoizedSnapshot = nextSnapshot;
 179                return memoizedSelection = nextSelection;
 180              }
 181              var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
 182              return [
 183                function() {
 184                  return memoizedSelector(getSnapshot());
 185                },
 186                null === maybeGetServerSnapshot ? void 0 : function() {
 187                  return memoizedSelector(maybeGetServerSnapshot());
 188                }
 189              ];
 190            },
 191            [getSnapshot, getServerSnapshot, selector, isEqual]
 192          );
 193          var value = useSyncExternalStore2(subscribe, instRef[0], instRef[1]);
 194          useEffect15(
 195            function() {
 196              inst.hasValue = true;
 197              inst.value = value;
 198            },
 199            [value]
 200          );
 201          useDebugValue2(value);
 202          return value;
 203        };
 204        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 205      })();
 206    }
 207  });
 208  
 209  // node_modules/use-sync-external-store/shim/with-selector.js
 210  var require_with_selector = __commonJS({
 211    "node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
 212      "use strict";
 213      if (false) {
 214        module.exports = null;
 215      } else {
 216        module.exports = require_with_selector_development();
 217      }
 218    }
 219  });
 220  
 221  // package-external:@wordpress/primitives
 222  var require_primitives = __commonJS({
 223    "package-external:@wordpress/primitives"(exports, module) {
 224      module.exports = window.wp.primitives;
 225    }
 226  });
 227  
 228  // package-external:@wordpress/theme
 229  var require_theme = __commonJS({
 230    "package-external:@wordpress/theme"(exports, module) {
 231      module.exports = window.wp.theme;
 232    }
 233  });
 234  
 235  // package-external:@wordpress/private-apis
 236  var require_private_apis = __commonJS({
 237    "package-external:@wordpress/private-apis"(exports, module) {
 238      module.exports = window.wp.privateApis;
 239    }
 240  });
 241  
 242  // package-external:@wordpress/components
 243  var require_components = __commonJS({
 244    "package-external:@wordpress/components"(exports, module) {
 245      module.exports = window.wp.components;
 246    }
 247  });
 248  
 249  // package-external:@wordpress/data
 250  var require_data = __commonJS({
 251    "package-external:@wordpress/data"(exports, module) {
 252      module.exports = window.wp.data;
 253    }
 254  });
 255  
 256  // package-external:@wordpress/core-data
 257  var require_core_data = __commonJS({
 258    "package-external:@wordpress/core-data"(exports, module) {
 259      module.exports = window.wp.coreData;
 260    }
 261  });
 262  
 263  // package-external:@wordpress/notices
 264  var require_notices = __commonJS({
 265    "package-external:@wordpress/notices"(exports, module) {
 266      module.exports = window.wp.notices;
 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  // node_modules/clsx/dist/clsx.mjs
 278  function r(e) {
 279    var t, f, n = "";
 280    if ("string" == typeof e || "number" == typeof e) n += e;
 281    else if ("object" == typeof e) if (Array.isArray(e)) {
 282      var o = e.length;
 283      for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
 284    } else for (f in e) e[f] && (n && (n += " "), n += f);
 285    return n;
 286  }
 287  function clsx() {
 288    for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
 289    return n;
 290  }
 291  var clsx_default = clsx;
 292  
 293  // packages/ui/build-module/badge/badge.mjs
 294  var import_element11 = __toESM(require_element(), 1);
 295  
 296  // node_modules/@base-ui/utils/error.mjs
 297  var set;
 298  if (true) {
 299    set = /* @__PURE__ */ new Set();
 300  }
 301  function error(...messages) {
 302    if (true) {
 303      const messageKey = messages.join(" ");
 304      if (!set.has(messageKey)) {
 305        set.add(messageKey);
 306        console.error(`Base UI: $messageKey}`);
 307      }
 308    }
 309  }
 310  
 311  // node_modules/@base-ui/utils/safeReact.mjs
 312  var React2 = __toESM(require_react(), 1);
 313  var SafeReact = {
 314    ...React2
 315  };
 316  
 317  // node_modules/@base-ui/utils/useRefWithInit.mjs
 318  var React3 = __toESM(require_react(), 1);
 319  var UNINITIALIZED = {};
 320  function useRefWithInit(init, initArg) {
 321    const ref = React3.useRef(UNINITIALIZED);
 322    if (ref.current === UNINITIALIZED) {
 323      ref.current = init(initArg);
 324    }
 325    return ref;
 326  }
 327  
 328  // node_modules/@base-ui/utils/useStableCallback.mjs
 329  var useInsertionEffect = SafeReact.useInsertionEffect;
 330  var useSafeInsertionEffect = (
 331    // React 17 doesn't have useInsertionEffect.
 332    useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
 333    useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
 334  );
 335  function useStableCallback(callback) {
 336    const stable = useRefWithInit(createStableCallback).current;
 337    stable.next = callback;
 338    useSafeInsertionEffect(stable.effect);
 339    return stable.trampoline;
 340  }
 341  function createStableCallback() {
 342    const stable = {
 343      next: void 0,
 344      callback: assertNotCalled,
 345      trampoline: (...args) => stable.callback?.(...args),
 346      effect: () => {
 347        stable.callback = stable.next;
 348      }
 349    };
 350    return stable;
 351  }
 352  function assertNotCalled() {
 353    if (true) {
 354      throw (
 355        /* minify-error-disabled */
 356        new Error("Base UI: Cannot call an event handler while rendering.")
 357      );
 358    }
 359  }
 360  
 361  // node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
 362  var React4 = __toESM(require_react(), 1);
 363  var noop = () => {
 364  };
 365  var useIsoLayoutEffect = typeof document !== "undefined" ? React4.useLayoutEffect : noop;
 366  
 367  // node_modules/@base-ui/utils/warn.mjs
 368  var set2;
 369  if (true) {
 370    set2 = /* @__PURE__ */ new Set();
 371  }
 372  function warn(...messages) {
 373    if (true) {
 374      const messageKey = messages.join(" ");
 375      if (!set2.has(messageKey)) {
 376        set2.add(messageKey);
 377        console.warn(`Base UI: $messageKey}`);
 378      }
 379    }
 380  }
 381  
 382  // node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
 383  var React5 = __toESM(require_react(), 1);
 384  var DirectionContext = /* @__PURE__ */ React5.createContext(void 0);
 385  if (true) DirectionContext.displayName = "DirectionContext";
 386  function useDirection() {
 387    const context = React5.useContext(DirectionContext);
 388    return context?.direction ?? "ltr";
 389  }
 390  
 391  // node_modules/@base-ui/react/internals/useRenderElement.mjs
 392  var React8 = __toESM(require_react(), 1);
 393  
 394  // node_modules/@base-ui/utils/useMergedRefs.mjs
 395  function useMergedRefs(a, b, c, d) {
 396    const forkRef = useRefWithInit(createForkRef).current;
 397    if (didChange(forkRef, a, b, c, d)) {
 398      update(forkRef, [a, b, c, d]);
 399    }
 400    return forkRef.callback;
 401  }
 402  function useMergedRefsN(refs) {
 403    const forkRef = useRefWithInit(createForkRef).current;
 404    if (didChangeN(forkRef, refs)) {
 405      update(forkRef, refs);
 406    }
 407    return forkRef.callback;
 408  }
 409  function createForkRef() {
 410    return {
 411      callback: null,
 412      cleanup: null,
 413      refs: []
 414    };
 415  }
 416  function didChange(forkRef, a, b, c, d) {
 417    return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
 418  }
 419  function didChangeN(forkRef, newRefs) {
 420    return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
 421  }
 422  function update(forkRef, refs) {
 423    forkRef.refs = refs;
 424    if (refs.every((ref) => ref == null)) {
 425      forkRef.callback = null;
 426      return;
 427    }
 428    forkRef.callback = (instance) => {
 429      if (forkRef.cleanup) {
 430        forkRef.cleanup();
 431        forkRef.cleanup = null;
 432      }
 433      if (instance != null) {
 434        const cleanupCallbacks = Array(refs.length).fill(null);
 435        for (let i = 0; i < refs.length; i += 1) {
 436          const ref = refs[i];
 437          if (ref == null) {
 438            continue;
 439          }
 440          switch (typeof ref) {
 441            case "function": {
 442              const refCleanup = ref(instance);
 443              if (typeof refCleanup === "function") {
 444                cleanupCallbacks[i] = refCleanup;
 445              }
 446              break;
 447            }
 448            case "object": {
 449              ref.current = instance;
 450              break;
 451            }
 452            default:
 453          }
 454        }
 455        forkRef.cleanup = () => {
 456          for (let i = 0; i < refs.length; i += 1) {
 457            const ref = refs[i];
 458            if (ref == null) {
 459              continue;
 460            }
 461            switch (typeof ref) {
 462              case "function": {
 463                const cleanupCallback = cleanupCallbacks[i];
 464                if (typeof cleanupCallback === "function") {
 465                  cleanupCallback();
 466                } else {
 467                  ref(null);
 468                }
 469                break;
 470              }
 471              case "object": {
 472                ref.current = null;
 473                break;
 474              }
 475              default:
 476            }
 477          }
 478        };
 479      }
 480    };
 481  }
 482  
 483  // node_modules/@base-ui/utils/getReactElementRef.mjs
 484  var React7 = __toESM(require_react(), 1);
 485  
 486  // node_modules/@base-ui/utils/reactVersion.mjs
 487  var React6 = __toESM(require_react(), 1);
 488  var majorVersion = parseInt(React6.version, 10);
 489  function isReactVersionAtLeast(reactVersionToCheck) {
 490    return majorVersion >= reactVersionToCheck;
 491  }
 492  
 493  // node_modules/@base-ui/utils/getReactElementRef.mjs
 494  function getReactElementRef(element) {
 495    if (!/* @__PURE__ */ React7.isValidElement(element)) {
 496      return null;
 497    }
 498    const reactElement = element;
 499    const propsWithRef = reactElement.props;
 500    return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
 501  }
 502  
 503  // node_modules/@base-ui/utils/mergeObjects.mjs
 504  function mergeObjects(a, b) {
 505    if (a && !b) {
 506      return a;
 507    }
 508    if (!a && b) {
 509      return b;
 510    }
 511    if (a || b) {
 512      return {
 513        ...a,
 514        ...b
 515      };
 516    }
 517    return void 0;
 518  }
 519  
 520  // node_modules/@base-ui/utils/empty.mjs
 521  function NOOP() {
 522  }
 523  var EMPTY_ARRAY = Object.freeze([]);
 524  var EMPTY_OBJECT = Object.freeze({});
 525  
 526  // node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
 527  function getStateAttributesProps(state, customMapping) {
 528    const props = {};
 529    for (const key in state) {
 530      const value = state[key];
 531      if (customMapping?.hasOwnProperty(key)) {
 532        const customProps = customMapping[key](value);
 533        if (customProps != null) {
 534          Object.assign(props, customProps);
 535        }
 536        continue;
 537      }
 538      if (value === true) {
 539        props[`data-$key.toLowerCase()}`] = "";
 540      } else if (value) {
 541        props[`data-$key.toLowerCase()}`] = value.toString();
 542      }
 543    }
 544    return props;
 545  }
 546  
 547  // node_modules/@base-ui/react/utils/resolveClassName.mjs
 548  function resolveClassName(className, state) {
 549    return typeof className === "function" ? className(state) : className;
 550  }
 551  
 552  // node_modules/@base-ui/react/utils/resolveStyle.mjs
 553  function resolveStyle(style, state) {
 554    return typeof style === "function" ? style(state) : style;
 555  }
 556  
 557  // node_modules/@base-ui/react/merge-props/mergeProps.mjs
 558  var EMPTY_PROPS = {};
 559  function mergeProps(a, b, c, d, e) {
 560    if (!c && !d && !e && !a) {
 561      return createInitialMergedProps(b);
 562    }
 563    let merged = createInitialMergedProps(a);
 564    if (b) {
 565      merged = mergeInto(merged, b);
 566    }
 567    if (c) {
 568      merged = mergeInto(merged, c);
 569    }
 570    if (d) {
 571      merged = mergeInto(merged, d);
 572    }
 573    if (e) {
 574      merged = mergeInto(merged, e);
 575    }
 576    return merged;
 577  }
 578  function mergePropsN(props) {
 579    if (props.length === 0) {
 580      return EMPTY_PROPS;
 581    }
 582    if (props.length === 1) {
 583      return createInitialMergedProps(props[0]);
 584    }
 585    let merged = createInitialMergedProps(props[0]);
 586    for (let i = 1; i < props.length; i += 1) {
 587      merged = mergeInto(merged, props[i]);
 588    }
 589    return merged;
 590  }
 591  function createInitialMergedProps(inputProps) {
 592    if (isPropsGetter(inputProps)) {
 593      return {
 594        ...resolvePropsGetter(inputProps, EMPTY_PROPS)
 595      };
 596    }
 597    return copyInitialProps(inputProps);
 598  }
 599  function mergeInto(merged, inputProps) {
 600    if (isPropsGetter(inputProps)) {
 601      return resolvePropsGetter(inputProps, merged);
 602    }
 603    return mutablyMergeInto(merged, inputProps);
 604  }
 605  function copyInitialProps(inputProps) {
 606    const copiedProps = {
 607      ...inputProps
 608    };
 609    for (const propName in copiedProps) {
 610      const propValue = copiedProps[propName];
 611      if (isEventHandler(propName, propValue)) {
 612        copiedProps[propName] = wrapEventHandler(propValue);
 613      }
 614    }
 615    return copiedProps;
 616  }
 617  function mutablyMergeInto(mergedProps, externalProps) {
 618    if (!externalProps) {
 619      return mergedProps;
 620    }
 621    for (const propName in externalProps) {
 622      const externalPropValue = externalProps[propName];
 623      switch (propName) {
 624        case "style": {
 625          mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
 626          break;
 627        }
 628        case "className": {
 629          mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
 630          break;
 631        }
 632        default: {
 633          if (isEventHandler(propName, externalPropValue)) {
 634            mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
 635          } else {
 636            mergedProps[propName] = externalPropValue;
 637          }
 638        }
 639      }
 640    }
 641    return mergedProps;
 642  }
 643  function isEventHandler(key, value) {
 644    const code0 = key.charCodeAt(0);
 645    const code1 = key.charCodeAt(1);
 646    const code2 = key.charCodeAt(2);
 647    return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
 648  }
 649  function isPropsGetter(inputProps) {
 650    return typeof inputProps === "function";
 651  }
 652  function resolvePropsGetter(inputProps, previousProps) {
 653    if (isPropsGetter(inputProps)) {
 654      return inputProps(previousProps);
 655    }
 656    return inputProps ?? EMPTY_PROPS;
 657  }
 658  function mergeEventHandlers(ourHandler, theirHandler) {
 659    if (!theirHandler) {
 660      return ourHandler;
 661    }
 662    if (!ourHandler) {
 663      return wrapEventHandler(theirHandler);
 664    }
 665    return (...args) => {
 666      const event = args[0];
 667      if (isSyntheticEvent(event)) {
 668        const baseUIEvent = event;
 669        makeEventPreventable(baseUIEvent);
 670        const result2 = theirHandler(...args);
 671        if (!baseUIEvent.baseUIHandlerPrevented) {
 672          ourHandler?.(...args);
 673        }
 674        return result2;
 675      }
 676      const result = theirHandler(...args);
 677      ourHandler?.(...args);
 678      return result;
 679    };
 680  }
 681  function wrapEventHandler(handler) {
 682    if (!handler) {
 683      return handler;
 684    }
 685    return (...args) => {
 686      const event = args[0];
 687      if (isSyntheticEvent(event)) {
 688        makeEventPreventable(event);
 689      }
 690      return handler(...args);
 691    };
 692  }
 693  function makeEventPreventable(event) {
 694    event.preventBaseUIHandler = () => {
 695      event.baseUIHandlerPrevented = true;
 696    };
 697    return event;
 698  }
 699  function mergeClassNames(ourClassName, theirClassName) {
 700    if (theirClassName) {
 701      if (ourClassName) {
 702        return theirClassName + " " + ourClassName;
 703      }
 704      return theirClassName;
 705    }
 706    return ourClassName;
 707  }
 708  function isSyntheticEvent(event) {
 709    return event != null && typeof event === "object" && "nativeEvent" in event;
 710  }
 711  
 712  // node_modules/@base-ui/react/internals/useRenderElement.mjs
 713  var import_react = __toESM(require_react(), 1);
 714  function useRenderElement(element, componentProps, params = {}) {
 715    const renderProp = componentProps.render;
 716    const outProps = useRenderElementProps(componentProps, params);
 717    if (params.enabled === false) {
 718      return null;
 719    }
 720    const state = params.state ?? EMPTY_OBJECT;
 721    return evaluateRenderProp(element, renderProp, outProps, state);
 722  }
 723  function useRenderElementProps(componentProps, params = {}) {
 724    const {
 725      className: classNameProp,
 726      style: styleProp,
 727      render: renderProp
 728    } = componentProps;
 729    const {
 730      state = EMPTY_OBJECT,
 731      ref,
 732      props,
 733      stateAttributesMapping: stateAttributesMapping3,
 734      enabled = true
 735    } = params;
 736    const className = enabled ? resolveClassName(classNameProp, state) : void 0;
 737    const style = enabled ? resolveStyle(styleProp, state) : void 0;
 738    const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping3) : EMPTY_OBJECT;
 739    const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
 740    const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
 741    if (typeof document !== "undefined") {
 742      if (!enabled) {
 743        useMergedRefs(null, null);
 744      } else if (Array.isArray(ref)) {
 745        outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
 746      } else {
 747        outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
 748      }
 749    }
 750    if (!enabled) {
 751      return EMPTY_OBJECT;
 752    }
 753    if (className !== void 0) {
 754      outProps.className = mergeClassNames(outProps.className, className);
 755    }
 756    if (style !== void 0) {
 757      outProps.style = mergeObjects(outProps.style, style);
 758    }
 759    return outProps;
 760  }
 761  function resolveRenderFunctionProps(props) {
 762    if (Array.isArray(props)) {
 763      return mergePropsN(props);
 764    }
 765    return mergeProps(void 0, props);
 766  }
 767  var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
 768  var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
 769  var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
 770  function evaluateRenderProp(element, render, props, state) {
 771    if (render) {
 772      if (typeof render === "function") {
 773        if (true) {
 774          warnIfRenderPropLooksLikeComponent(render);
 775        }
 776        return render(props, state);
 777      }
 778      const mergedProps = mergeProps(props, render.props);
 779      mergedProps.ref = props.ref;
 780      let newElement = render;
 781      if (newElement?.$$typeof === REACT_LAZY_TYPE) {
 782        const children = React8.Children.toArray(render);
 783        newElement = children[0];
 784      }
 785      if (true) {
 786        if (!/* @__PURE__ */ React8.isValidElement(newElement)) {
 787          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"));
 788        }
 789      }
 790      return /* @__PURE__ */ React8.cloneElement(newElement, mergedProps);
 791    }
 792    if (element) {
 793      if (typeof element === "string") {
 794        return renderTag(element, props);
 795      }
 796    }
 797    throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
 798  }
 799  function warnIfRenderPropLooksLikeComponent(renderFn) {
 800    const functionName = renderFn.name;
 801    if (functionName.length === 0) {
 802      return;
 803    }
 804    if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
 805      return;
 806    }
 807    if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
 808      return;
 809    }
 810    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");
 811  }
 812  function renderTag(Tag, props) {
 813    if (Tag === "button") {
 814      return /* @__PURE__ */ (0, import_react.createElement)("button", {
 815        type: "button",
 816        ...props,
 817        key: props.key
 818      });
 819    }
 820    if (Tag === "img") {
 821      return /* @__PURE__ */ (0, import_react.createElement)("img", {
 822        alt: "",
 823        ...props,
 824        key: props.key
 825      });
 826    }
 827    return /* @__PURE__ */ React8.createElement(Tag, props);
 828  }
 829  
 830  // node_modules/@base-ui/utils/useId.mjs
 831  var React9 = __toESM(require_react(), 1);
 832  var globalId = 0;
 833  function useGlobalId(idOverride, prefix = "mui") {
 834    const [defaultId, setDefaultId] = React9.useState(idOverride);
 835    const id = idOverride || defaultId;
 836    React9.useEffect(() => {
 837      if (defaultId == null) {
 838        globalId += 1;
 839        setDefaultId(`$prefix}-$globalId}`);
 840      }
 841    }, [defaultId, prefix]);
 842    return id;
 843  }
 844  var maybeReactUseId = SafeReact.useId;
 845  function useId(idOverride, prefix) {
 846    if (maybeReactUseId !== void 0) {
 847      const reactId = maybeReactUseId();
 848      return idOverride ?? (prefix ? `$prefix}-$reactId}` : reactId);
 849    }
 850    return useGlobalId(idOverride, prefix);
 851  }
 852  
 853  // node_modules/@base-ui/react/internals/useBaseUiId.mjs
 854  function useBaseUiId(idOverride) {
 855    return useId(idOverride, "base-ui");
 856  }
 857  
 858  // node_modules/@base-ui/react/internals/reason-parts.mjs
 859  var reason_parts_exports = {};
 860  __export(reason_parts_exports, {
 861    cancelOpen: () => cancelOpen,
 862    chipRemovePress: () => chipRemovePress,
 863    clearPress: () => clearPress,
 864    closePress: () => closePress,
 865    closeWatcher: () => closeWatcher,
 866    decrementPress: () => decrementPress,
 867    disabled: () => disabled,
 868    drag: () => drag,
 869    escapeKey: () => escapeKey,
 870    focusOut: () => focusOut,
 871    imperativeAction: () => imperativeAction,
 872    incrementPress: () => incrementPress,
 873    initial: () => initial,
 874    inputBlur: () => inputBlur,
 875    inputChange: () => inputChange,
 876    inputClear: () => inputClear,
 877    inputPaste: () => inputPaste,
 878    inputPress: () => inputPress,
 879    itemPress: () => itemPress,
 880    keyboard: () => keyboard,
 881    linkPress: () => linkPress,
 882    listNavigation: () => listNavigation,
 883    missing: () => missing,
 884    none: () => none,
 885    outsidePress: () => outsidePress,
 886    pointer: () => pointer,
 887    scrub: () => scrub,
 888    siblingOpen: () => siblingOpen,
 889    swipe: () => swipe,
 890    trackPress: () => trackPress,
 891    triggerFocus: () => triggerFocus,
 892    triggerHover: () => triggerHover,
 893    triggerPress: () => triggerPress,
 894    wheel: () => wheel,
 895    windowResize: () => windowResize
 896  });
 897  var none = "none";
 898  var triggerPress = "trigger-press";
 899  var triggerHover = "trigger-hover";
 900  var triggerFocus = "trigger-focus";
 901  var outsidePress = "outside-press";
 902  var itemPress = "item-press";
 903  var closePress = "close-press";
 904  var linkPress = "link-press";
 905  var clearPress = "clear-press";
 906  var chipRemovePress = "chip-remove-press";
 907  var trackPress = "track-press";
 908  var incrementPress = "increment-press";
 909  var decrementPress = "decrement-press";
 910  var inputChange = "input-change";
 911  var inputClear = "input-clear";
 912  var inputBlur = "input-blur";
 913  var inputPaste = "input-paste";
 914  var inputPress = "input-press";
 915  var focusOut = "focus-out";
 916  var escapeKey = "escape-key";
 917  var closeWatcher = "close-watcher";
 918  var listNavigation = "list-navigation";
 919  var keyboard = "keyboard";
 920  var pointer = "pointer";
 921  var drag = "drag";
 922  var wheel = "wheel";
 923  var scrub = "scrub";
 924  var cancelOpen = "cancel-open";
 925  var siblingOpen = "sibling-open";
 926  var disabled = "disabled";
 927  var missing = "missing";
 928  var initial = "initial";
 929  var imperativeAction = "imperative-action";
 930  var swipe = "swipe";
 931  var windowResize = "window-resize";
 932  
 933  // node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
 934  function createChangeEventDetails(reason, event, trigger, customProperties) {
 935    let canceled = false;
 936    let allowPropagation = false;
 937    const custom = customProperties ?? EMPTY_OBJECT;
 938    const details = {
 939      reason,
 940      event: event ?? new Event("base-ui"),
 941      cancel() {
 942        canceled = true;
 943      },
 944      allowPropagation() {
 945        allowPropagation = true;
 946      },
 947      get isCanceled() {
 948        return canceled;
 949      },
 950      get isPropagationAllowed() {
 951        return allowPropagation;
 952      },
 953      trigger,
 954      ...custom
 955    };
 956    return details;
 957  }
 958  
 959  // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
 960  var React11 = __toESM(require_react(), 1);
 961  
 962  // node_modules/@base-ui/utils/useOnMount.mjs
 963  var React10 = __toESM(require_react(), 1);
 964  var EMPTY = [];
 965  function useOnMount(fn) {
 966    React10.useEffect(fn, EMPTY);
 967  }
 968  
 969  // node_modules/@base-ui/utils/useAnimationFrame.mjs
 970  var EMPTY2 = null;
 971  var LAST_RAF = globalThis.requestAnimationFrame;
 972  var Scheduler = class {
 973    /* This implementation uses an array as a backing data-structure for frame callbacks.
 974     * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
 975     * never calls the native `cancelAnimationFrame` if there are no frames left. This can
 976     * be much more efficient if there is a call pattern that alterns as
 977     * "request-cancel-request-cancel-…".
 978     * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
 979     * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
 980    callbacks = [];
 981    callbacksCount = 0;
 982    nextId = 1;
 983    startId = 1;
 984    isScheduled = false;
 985    tick = (timestamp) => {
 986      this.isScheduled = false;
 987      const currentCallbacks = this.callbacks;
 988      const currentCallbacksCount = this.callbacksCount;
 989      this.callbacks = [];
 990      this.callbacksCount = 0;
 991      this.startId = this.nextId;
 992      if (currentCallbacksCount > 0) {
 993        for (let i = 0; i < currentCallbacks.length; i += 1) {
 994          currentCallbacks[i]?.(timestamp);
 995        }
 996      }
 997    };
 998    request(fn) {
 999      const id = this.nextId;
1000      this.nextId += 1;
1001      this.callbacks.push(fn);
1002      this.callbacksCount += 1;
1003      const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
1004      if (!this.isScheduled || didRAFChange) {
1005        requestAnimationFrame(this.tick);
1006        this.isScheduled = true;
1007      }
1008      return id;
1009    }
1010    cancel(id) {
1011      const index2 = id - this.startId;
1012      if (index2 < 0 || index2 >= this.callbacks.length) {
1013        return;
1014      }
1015      this.callbacks[index2] = null;
1016      this.callbacksCount -= 1;
1017    }
1018  };
1019  var scheduler = new Scheduler();
1020  var AnimationFrame = class _AnimationFrame {
1021    static create() {
1022      return new _AnimationFrame();
1023    }
1024    static request(fn) {
1025      return scheduler.request(fn);
1026    }
1027    static cancel(id) {
1028      return scheduler.cancel(id);
1029    }
1030    currentId = EMPTY2;
1031    /**
1032     * Executes `fn` after `delay`, clearing any previously scheduled call.
1033     */
1034    request(fn) {
1035      this.cancel();
1036      this.currentId = scheduler.request(() => {
1037        this.currentId = EMPTY2;
1038        fn();
1039      });
1040    }
1041    cancel = () => {
1042      if (this.currentId !== EMPTY2) {
1043        scheduler.cancel(this.currentId);
1044        this.currentId = EMPTY2;
1045      }
1046    };
1047    disposeEffect = () => {
1048      return this.cancel;
1049    };
1050  };
1051  function useAnimationFrame() {
1052    const timeout = useRefWithInit(AnimationFrame.create).current;
1053    useOnMount(timeout.disposeEffect);
1054    return timeout;
1055  }
1056  
1057  // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1058  function useTransitionStatus(open, enableIdleState = false, deferEndingState = false) {
1059    const [transitionStatus, setTransitionStatus] = React11.useState(open && enableIdleState ? "idle" : void 0);
1060    const [mounted, setMounted] = React11.useState(open);
1061    if (open && !mounted) {
1062      setMounted(true);
1063      setTransitionStatus("starting");
1064    }
1065    if (!open && mounted && transitionStatus !== "ending" && !deferEndingState) {
1066      setTransitionStatus("ending");
1067    }
1068    if (!open && !mounted && transitionStatus === "ending") {
1069      setTransitionStatus(void 0);
1070    }
1071    useIsoLayoutEffect(() => {
1072      if (!open && mounted && transitionStatus !== "ending" && deferEndingState) {
1073        const frame = AnimationFrame.request(() => {
1074          setTransitionStatus("ending");
1075        });
1076        return () => {
1077          AnimationFrame.cancel(frame);
1078        };
1079      }
1080      return void 0;
1081    }, [open, mounted, transitionStatus, deferEndingState]);
1082    useIsoLayoutEffect(() => {
1083      if (!open || enableIdleState) {
1084        return void 0;
1085      }
1086      const frame = AnimationFrame.request(() => {
1087        setTransitionStatus(void 0);
1088      });
1089      return () => {
1090        AnimationFrame.cancel(frame);
1091      };
1092    }, [enableIdleState, open]);
1093    useIsoLayoutEffect(() => {
1094      if (!open || !enableIdleState) {
1095        return void 0;
1096      }
1097      if (open && mounted && transitionStatus !== "idle") {
1098        setTransitionStatus("starting");
1099      }
1100      const frame = AnimationFrame.request(() => {
1101        setTransitionStatus("idle");
1102      });
1103      return () => {
1104        AnimationFrame.cancel(frame);
1105      };
1106    }, [enableIdleState, open, mounted, transitionStatus]);
1107    return {
1108      mounted,
1109      setMounted,
1110      transitionStatus
1111    };
1112  }
1113  
1114  // node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
1115  var TransitionStatusDataAttributes = /* @__PURE__ */ (function(TransitionStatusDataAttributes2) {
1116    TransitionStatusDataAttributes2["startingStyle"] = "data-starting-style";
1117    TransitionStatusDataAttributes2["endingStyle"] = "data-ending-style";
1118    return TransitionStatusDataAttributes2;
1119  })({});
1120  var STARTING_HOOK = {
1121    [TransitionStatusDataAttributes.startingStyle]: ""
1122  };
1123  var ENDING_HOOK = {
1124    [TransitionStatusDataAttributes.endingStyle]: ""
1125  };
1126  var transitionStatusMapping = {
1127    transitionStatus(value) {
1128      if (value === "starting") {
1129        return STARTING_HOOK;
1130      }
1131      if (value === "ending") {
1132        return ENDING_HOOK;
1133      }
1134      return null;
1135    }
1136  };
1137  
1138  // node_modules/@base-ui/react/internals/use-button/useButton.mjs
1139  var React14 = __toESM(require_react(), 1);
1140  
1141  // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1142  function hasWindow() {
1143    return typeof window !== "undefined";
1144  }
1145  function getNodeName(node) {
1146    if (isNode(node)) {
1147      return (node.nodeName || "").toLowerCase();
1148    }
1149    return "#document";
1150  }
1151  function getWindow(node) {
1152    var _node$ownerDocument;
1153    return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1154  }
1155  function getDocumentElement(node) {
1156    var _ref;
1157    return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1158  }
1159  function isNode(value) {
1160    if (!hasWindow()) {
1161      return false;
1162    }
1163    return value instanceof Node || value instanceof getWindow(value).Node;
1164  }
1165  function isElement(value) {
1166    if (!hasWindow()) {
1167      return false;
1168    }
1169    return value instanceof Element || value instanceof getWindow(value).Element;
1170  }
1171  function isHTMLElement(value) {
1172    if (!hasWindow()) {
1173      return false;
1174    }
1175    return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1176  }
1177  function isShadowRoot(value) {
1178    if (!hasWindow() || typeof ShadowRoot === "undefined") {
1179      return false;
1180    }
1181    return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1182  }
1183  function isOverflowElement(element) {
1184    const {
1185      overflow,
1186      overflowX,
1187      overflowY,
1188      display
1189    } = getComputedStyle2(element);
1190    return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
1191  }
1192  function isTableElement(element) {
1193    return /^(table|td|th)$/.test(getNodeName(element));
1194  }
1195  function isTopLayer(element) {
1196    try {
1197      if (element.matches(":popover-open")) {
1198        return true;
1199      }
1200    } catch (_e) {
1201    }
1202    try {
1203      return element.matches(":modal");
1204    } catch (_e) {
1205      return false;
1206    }
1207  }
1208  var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1209  var containRe = /paint|layout|strict|content/;
1210  var isNotNone = (value) => !!value && value !== "none";
1211  var isWebKitValue;
1212  function isContainingBlock(elementOrCss) {
1213    const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
1214    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 || "");
1215  }
1216  function getContainingBlock(element) {
1217    let currentNode = getParentNode(element);
1218    while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1219      if (isContainingBlock(currentNode)) {
1220        return currentNode;
1221      } else if (isTopLayer(currentNode)) {
1222        return null;
1223      }
1224      currentNode = getParentNode(currentNode);
1225    }
1226    return null;
1227  }
1228  function isWebKit() {
1229    if (isWebKitValue == null) {
1230      isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
1231    }
1232    return isWebKitValue;
1233  }
1234  function isLastTraversableNode(node) {
1235    return /^(html|body|#document)$/.test(getNodeName(node));
1236  }
1237  function getComputedStyle2(element) {
1238    return getWindow(element).getComputedStyle(element);
1239  }
1240  function getNodeScroll(element) {
1241    if (isElement(element)) {
1242      return {
1243        scrollLeft: element.scrollLeft,
1244        scrollTop: element.scrollTop
1245      };
1246    }
1247    return {
1248      scrollLeft: element.scrollX,
1249      scrollTop: element.scrollY
1250    };
1251  }
1252  function getParentNode(node) {
1253    if (getNodeName(node) === "html") {
1254      return node;
1255    }
1256    const result = (
1257      // Step into the shadow DOM of the parent of a slotted node.
1258      node.assignedSlot || // DOM Element detected.
1259      node.parentNode || // ShadowRoot detected.
1260      isShadowRoot(node) && node.host || // Fallback.
1261      getDocumentElement(node)
1262    );
1263    return isShadowRoot(result) ? result.host : result;
1264  }
1265  function getNearestOverflowAncestor(node) {
1266    const parentNode = getParentNode(node);
1267    if (isLastTraversableNode(parentNode)) {
1268      return node.ownerDocument ? node.ownerDocument.body : node.body;
1269    }
1270    if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1271      return parentNode;
1272    }
1273    return getNearestOverflowAncestor(parentNode);
1274  }
1275  function getOverflowAncestors(node, list, traverseIframes) {
1276    var _node$ownerDocument2;
1277    if (list === void 0) {
1278      list = [];
1279    }
1280    if (traverseIframes === void 0) {
1281      traverseIframes = true;
1282    }
1283    const scrollableAncestor = getNearestOverflowAncestor(node);
1284    const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1285    const win = getWindow(scrollableAncestor);
1286    if (isBody) {
1287      const frameElement = getFrameElement(win);
1288      return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1289    } else {
1290      return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1291    }
1292  }
1293  function getFrameElement(win) {
1294    return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1295  }
1296  
1297  // node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs
1298  var React12 = __toESM(require_react(), 1);
1299  var CompositeRootContext = /* @__PURE__ */ React12.createContext(void 0);
1300  if (true) CompositeRootContext.displayName = "CompositeRootContext";
1301  function useCompositeRootContext(optional = false) {
1302    const context = React12.useContext(CompositeRootContext);
1303    if (context === void 0 && !optional) {
1304      throw new Error(true ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : formatErrorMessage_default(16));
1305    }
1306    return context;
1307  }
1308  
1309  // node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs
1310  var React13 = __toESM(require_react(), 1);
1311  function useFocusableWhenDisabled(parameters) {
1312    const {
1313      focusableWhenDisabled,
1314      disabled: disabled2,
1315      composite = false,
1316      tabIndex: tabIndexProp = 0,
1317      isNativeButton
1318    } = parameters;
1319    const isFocusableComposite = composite && focusableWhenDisabled !== false;
1320    const isNonFocusableComposite = composite && focusableWhenDisabled === false;
1321    const props = React13.useMemo(() => {
1322      const additionalProps = {
1323        // allow Tabbing away from focusableWhenDisabled elements
1324        onKeyDown(event) {
1325          if (disabled2 && focusableWhenDisabled && event.key !== "Tab") {
1326            event.preventDefault();
1327          }
1328        }
1329      };
1330      if (!composite) {
1331        additionalProps.tabIndex = tabIndexProp;
1332        if (!isNativeButton && disabled2) {
1333          additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;
1334        }
1335      }
1336      if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled2) {
1337        additionalProps["aria-disabled"] = disabled2;
1338      }
1339      if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {
1340        additionalProps.disabled = disabled2;
1341      }
1342      return additionalProps;
1343    }, [composite, disabled2, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);
1344    return {
1345      props
1346    };
1347  }
1348  
1349  // node_modules/@base-ui/react/internals/use-button/useButton.mjs
1350  function useButton(parameters = {}) {
1351    const {
1352      disabled: disabled2 = false,
1353      focusableWhenDisabled,
1354      tabIndex = 0,
1355      native: isNativeButton = true,
1356      composite: compositeProp
1357    } = parameters;
1358    const elementRef = React14.useRef(null);
1359    const compositeRootContext = useCompositeRootContext(true);
1360    const isCompositeItem = compositeProp ?? compositeRootContext !== void 0;
1361    const {
1362      props: focusableWhenDisabledProps
1363    } = useFocusableWhenDisabled({
1364      focusableWhenDisabled,
1365      disabled: disabled2,
1366      composite: isCompositeItem,
1367      tabIndex,
1368      isNativeButton
1369    });
1370    if (true) {
1371      React14.useEffect(() => {
1372        if (!elementRef.current) {
1373          return;
1374        }
1375        const isButtonTag = isButtonElement(elementRef.current);
1376        if (isNativeButton) {
1377          if (!isButtonTag) {
1378            const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
1379            const message = "A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the `render` prop, or set `nativeButton` to `false`.";
1380            error(`$message}$ownerStackMessage}`);
1381          }
1382        } else if (isButtonTag) {
1383          const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
1384          const message = "A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set `nativeButton` to `true`.";
1385          error(`$message}$ownerStackMessage}`);
1386        }
1387      }, [isNativeButton]);
1388    }
1389    const updateDisabled = React14.useCallback(() => {
1390      const element = elementRef.current;
1391      if (!isButtonElement(element)) {
1392        return;
1393      }
1394      if (isCompositeItem && disabled2 && focusableWhenDisabledProps.disabled === void 0 && element.disabled) {
1395        element.disabled = false;
1396      }
1397    }, [disabled2, focusableWhenDisabledProps.disabled, isCompositeItem]);
1398    useIsoLayoutEffect(updateDisabled, [updateDisabled]);
1399    const getButtonProps = React14.useCallback((externalProps = {}) => {
1400      const {
1401        onClick: externalOnClick,
1402        onMouseDown: externalOnMouseDown,
1403        onKeyUp: externalOnKeyUp,
1404        onKeyDown: externalOnKeyDown,
1405        onPointerDown: externalOnPointerDown,
1406        ...otherExternalProps
1407      } = externalProps;
1408      return mergeProps({
1409        onClick(event) {
1410          if (disabled2) {
1411            event.preventDefault();
1412            return;
1413          }
1414          externalOnClick?.(event);
1415        },
1416        onMouseDown(event) {
1417          if (!disabled2) {
1418            externalOnMouseDown?.(event);
1419          }
1420        },
1421        onKeyDown(event) {
1422          if (disabled2) {
1423            return;
1424          }
1425          makeEventPreventable(event);
1426          externalOnKeyDown?.(event);
1427          if (event.baseUIHandlerPrevented) {
1428            return;
1429          }
1430          const isCurrentTarget = event.target === event.currentTarget;
1431          const currentTarget = event.currentTarget;
1432          const isButton = isButtonElement(currentTarget);
1433          const isLink = !isNativeButton && isValidLinkElement(currentTarget);
1434          const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink);
1435          const isEnterKey = event.key === "Enter";
1436          const isSpaceKey = event.key === " ";
1437          const role = currentTarget.getAttribute("role");
1438          const isTextNavigationRole = role?.startsWith("menuitem") || role === "option" || role === "gridcell";
1439          if (isCurrentTarget && isCompositeItem && isSpaceKey) {
1440            if (event.defaultPrevented && isTextNavigationRole) {
1441              return;
1442            }
1443            event.preventDefault();
1444            if (isLink || isNativeButton && isButton) {
1445              currentTarget.click();
1446              event.preventBaseUIHandler();
1447            } else if (shouldClick) {
1448              externalOnClick?.(event);
1449              event.preventBaseUIHandler();
1450            }
1451            return;
1452          }
1453          if (shouldClick) {
1454            if (!isNativeButton && (isSpaceKey || isEnterKey)) {
1455              event.preventDefault();
1456            }
1457            if (!isNativeButton && isEnterKey) {
1458              externalOnClick?.(event);
1459            }
1460          }
1461        },
1462        onKeyUp(event) {
1463          if (disabled2) {
1464            return;
1465          }
1466          makeEventPreventable(event);
1467          externalOnKeyUp?.(event);
1468          if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === " ") {
1469            event.preventDefault();
1470            return;
1471          }
1472          if (event.baseUIHandlerPrevented) {
1473            return;
1474          }
1475          if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && event.key === " ") {
1476            externalOnClick?.(event);
1477          }
1478        },
1479        onPointerDown(event) {
1480          if (disabled2) {
1481            event.preventDefault();
1482            return;
1483          }
1484          externalOnPointerDown?.(event);
1485        }
1486      }, isNativeButton ? {
1487        type: "button"
1488      } : {
1489        role: "button"
1490      }, focusableWhenDisabledProps, otherExternalProps);
1491    }, [disabled2, focusableWhenDisabledProps, isCompositeItem, isNativeButton]);
1492    const buttonRef = useStableCallback((element) => {
1493      elementRef.current = element;
1494      updateDisabled();
1495    });
1496    return {
1497      getButtonProps,
1498      buttonRef
1499    };
1500  }
1501  function isButtonElement(elem) {
1502    return isHTMLElement(elem) && elem.tagName === "BUTTON";
1503  }
1504  function isValidLinkElement(elem) {
1505    return Boolean(elem?.tagName === "A" && elem?.href);
1506  }
1507  
1508  // node_modules/@base-ui/utils/addEventListener.mjs
1509  function addEventListener(target, type, listener, options) {
1510    target.addEventListener(type, listener, options);
1511    return () => {
1512      target.removeEventListener(type, listener, options);
1513    };
1514  }
1515  
1516  // node_modules/@base-ui/utils/useValueAsRef.mjs
1517  function useValueAsRef(value) {
1518    const latest = useRefWithInit(createLatestRef, value).current;
1519    latest.next = value;
1520    useIsoLayoutEffect(latest.effect);
1521    return latest;
1522  }
1523  function createLatestRef(value) {
1524    const latest = {
1525      current: value,
1526      next: value,
1527      effect: () => {
1528        latest.current = latest.next;
1529      }
1530    };
1531    return latest;
1532  }
1533  
1534  // node_modules/@base-ui/utils/owner.mjs
1535  function ownerDocument(node) {
1536    return node?.ownerDocument || document;
1537  }
1538  
1539  // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1540  var React15 = __toESM(require_react(), 1);
1541  
1542  // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1543  var ReactDOM = __toESM(require_react_dom(), 1);
1544  
1545  // node_modules/@base-ui/react/utils/resolveRef.mjs
1546  function resolveRef(maybeRef) {
1547    if (maybeRef == null) {
1548      return maybeRef;
1549    }
1550    return "current" in maybeRef ? maybeRef.current : maybeRef;
1551  }
1552  
1553  // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1554  function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, treatAbortedAsFinished = true) {
1555    const frame = useAnimationFrame();
1556    return useStableCallback((fnToExecute, signal = null) => {
1557      frame.cancel();
1558      const element = resolveRef(elementOrRef);
1559      if (element == null) {
1560        return;
1561      }
1562      const resolvedElement = element;
1563      const done = () => {
1564        ReactDOM.flushSync(fnToExecute);
1565      };
1566      if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
1567        fnToExecute();
1568        return;
1569      }
1570      function exec() {
1571        Promise.all(resolvedElement.getAnimations().map((animation) => animation.finished)).then(() => {
1572          if (!signal?.aborted) {
1573            done();
1574          }
1575        }).catch(() => {
1576          if (treatAbortedAsFinished) {
1577            if (!signal?.aborted) {
1578              done();
1579            }
1580            return;
1581          }
1582          const currentAnimations = resolvedElement.getAnimations();
1583          if (!signal?.aborted && currentAnimations.length > 0 && currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
1584            exec();
1585          }
1586        });
1587      }
1588      if (waitForStartingStyleRemoved) {
1589        const startingStyleAttribute = TransitionStatusDataAttributes.startingStyle;
1590        if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1591          frame.request(exec);
1592          return;
1593        }
1594        const attributeObserver = new MutationObserver(() => {
1595          if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1596            attributeObserver.disconnect();
1597            exec();
1598          }
1599        });
1600        attributeObserver.observe(resolvedElement, {
1601          attributes: true,
1602          attributeFilter: [startingStyleAttribute]
1603        });
1604        signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
1605          once: true
1606        });
1607        return;
1608      }
1609      frame.request(exec);
1610    });
1611  }
1612  
1613  // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1614  function useOpenChangeComplete(parameters) {
1615    const {
1616      enabled = true,
1617      open,
1618      ref,
1619      onComplete: onCompleteParam
1620    } = parameters;
1621    const onComplete = useStableCallback(onCompleteParam);
1622    const runOnceAnimationsFinish = useAnimationsFinished(ref, open, false);
1623    React15.useEffect(() => {
1624      if (!enabled) {
1625        return void 0;
1626      }
1627      const abortController = new AbortController();
1628      runOnceAnimationsFinish(onComplete, abortController.signal);
1629      return () => {
1630        abortController.abort();
1631      };
1632    }, [enabled, open, onComplete, runOnceAnimationsFinish]);
1633  }
1634  
1635  // node_modules/@base-ui/utils/useOnFirstRender.mjs
1636  var React16 = __toESM(require_react(), 1);
1637  function useOnFirstRender(fn) {
1638    const ref = React16.useRef(true);
1639    if (ref.current) {
1640      ref.current = false;
1641      fn();
1642    }
1643  }
1644  
1645  // node_modules/@base-ui/utils/platform/parts.mjs
1646  var parts_exports = {};
1647  __export(parts_exports, {
1648    engine: () => engine_exports,
1649    env: () => env_exports,
1650    os: () => os_exports,
1651    screenReader: () => screen_reader_exports
1652  });
1653  
1654  // node_modules/@base-ui/utils/platform/os.mjs
1655  var os_exports = {};
1656  __export(os_exports, {
1657    android: () => android,
1658    apple: () => apple,
1659    ios: () => ios,
1660    linux: () => linux,
1661    mac: () => mac,
1662    windows: () => windows
1663  });
1664  
1665  // node_modules/@base-ui/utils/platform/shared.mjs
1666  function readRawData() {
1667    if (typeof navigator === "undefined") {
1668      return {
1669        userAgent: "",
1670        platform: "",
1671        maxTouchPoints: 0
1672      };
1673    }
1674    if (true) {
1675      const uaData = navigator.userAgentData;
1676      if (uaData && Array.isArray(uaData.brands)) {
1677        return {
1678          userAgent: uaData.brands.map(({
1679            brand,
1680            version: version2
1681          }) => `$brand}/$version2}`).join(" "),
1682          platform: uaData.platform ?? navigator.platform ?? "",
1683          maxTouchPoints: navigator.maxTouchPoints ?? 0
1684        };
1685      }
1686    }
1687    return {
1688      userAgent: navigator.userAgent,
1689      platform: navigator.platform ?? "",
1690      maxTouchPoints: navigator.maxTouchPoints ?? 0
1691    };
1692  }
1693  var {
1694    userAgent,
1695    platform,
1696    maxTouchPoints
1697  } = readRawData();
1698  var lowerUserAgent = userAgent.toLowerCase();
1699  var lowerPlatform = platform.toLowerCase();
1700  
1701  // node_modules/@base-ui/utils/platform/os.mjs
1702  var ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1;
1703  var ANDROID_STRING = "android";
1704  var android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
1705  var mac = !ios && lowerPlatform.startsWith("mac");
1706  var windows = lowerPlatform.startsWith("win");
1707  var linux = !android && /^(linux|chrome os)/.test(lowerPlatform);
1708  var apple = mac || ios;
1709  
1710  // node_modules/@base-ui/utils/platform/engine.mjs
1711  var engine_exports = {};
1712  __export(engine_exports, {
1713    blink: () => blink,
1714    gecko: () => gecko,
1715    webkit: () => webkit
1716  });
1717  var webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none");
1718  var gecko = !webkit && lowerUserAgent.includes("firefox");
1719  var blink = !webkit && lowerUserAgent.includes("chrom");
1720  
1721  // node_modules/@base-ui/utils/platform/screen-reader.mjs
1722  var screen_reader_exports = {};
1723  __export(screen_reader_exports, {
1724    voiceOver: () => voiceOver
1725  });
1726  var voiceOver = apple;
1727  
1728  // node_modules/@base-ui/utils/platform/env.mjs
1729  var env_exports = {};
1730  __export(env_exports, {
1731    jsdom: () => jsdom
1732  });
1733  var jsdom = /jsdom|happydom/.test(lowerUserAgent);
1734  
1735  // node_modules/@base-ui/utils/useTimeout.mjs
1736  var EMPTY3 = 0;
1737  var Timeout = class _Timeout {
1738    static create() {
1739      return new _Timeout();
1740    }
1741    currentId = EMPTY3;
1742    /**
1743     * Executes `fn` after `delay`, clearing any previously scheduled call.
1744     */
1745    start(delay, fn) {
1746      this.clear();
1747      this.currentId = setTimeout(() => {
1748        this.currentId = EMPTY3;
1749        fn();
1750      }, delay);
1751    }
1752    isStarted() {
1753      return this.currentId !== EMPTY3;
1754    }
1755    clear = () => {
1756      if (this.currentId !== EMPTY3) {
1757        clearTimeout(this.currentId);
1758        this.currentId = EMPTY3;
1759      }
1760    };
1761    disposeEffect = () => {
1762      return this.clear;
1763    };
1764  };
1765  function useTimeout() {
1766    const timeout = useRefWithInit(Timeout.create).current;
1767    useOnMount(timeout.disposeEffect);
1768    return timeout;
1769  }
1770  
1771  // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1772  var React17 = __toESM(require_react(), 1);
1773  
1774  // node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
1775  function isReactEvent(event) {
1776    return "nativeEvent" in event;
1777  }
1778  function isMouseLikePointerType(pointerType, strict) {
1779    const values = ["mouse", "pen"];
1780    if (!strict) {
1781      values.push("", void 0);
1782    }
1783    return values.includes(pointerType);
1784  }
1785  function isClickLikeEvent(event) {
1786    const type = event.type;
1787    return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
1788  }
1789  
1790  // node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
1791  var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
1792  var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
1793  
1794  // node_modules/@base-ui/react/internals/shadowDom.mjs
1795  function activeElement(doc) {
1796    let element = doc.activeElement;
1797    while (element?.shadowRoot?.activeElement != null) {
1798      element = element.shadowRoot.activeElement;
1799    }
1800    return element;
1801  }
1802  function contains(parent, child) {
1803    if (!parent || !child) {
1804      return false;
1805    }
1806    const rootNode = child.getRootNode?.();
1807    if (parent.contains(child)) {
1808      return true;
1809    }
1810    if (rootNode && isShadowRoot(rootNode)) {
1811      let next = child;
1812      while (next) {
1813        if (parent === next) {
1814          return true;
1815        }
1816        next = next.parentNode || next.host;
1817      }
1818    }
1819    return false;
1820  }
1821  function getTarget(event) {
1822    if ("composedPath" in event) {
1823      return event.composedPath()[0];
1824    }
1825    return event.target;
1826  }
1827  
1828  // node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
1829  function isTargetInsideEnabledTrigger(target, triggerElements) {
1830    if (!isElement(target)) {
1831      return false;
1832    }
1833    const targetElement = target;
1834    if (triggerElements.hasElement(targetElement)) {
1835      return !targetElement.hasAttribute("data-trigger-disabled");
1836    }
1837    for (const [, trigger] of triggerElements.entries()) {
1838      if (contains(trigger, targetElement)) {
1839        return !trigger.hasAttribute("data-trigger-disabled");
1840      }
1841    }
1842    return false;
1843  }
1844  function isEventTargetWithin(event, node) {
1845    if (node == null) {
1846      return false;
1847    }
1848    if ("composedPath" in event) {
1849      return event.composedPath().includes(node);
1850    }
1851    const eventAgain = event;
1852    return eventAgain.target != null && node.contains(eventAgain.target);
1853  }
1854  function isRootElement(element) {
1855    return element.matches("html,body");
1856  }
1857  function isTypeableElement(element) {
1858    return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
1859  }
1860  function isInteractiveElement(element) {
1861    return element?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),$TYPEABLE_SELECTOR}`) != null;
1862  }
1863  function matchesFocusVisible(element) {
1864    if (!element || parts_exports.env.jsdom) {
1865      return true;
1866    }
1867    try {
1868      return element.matches(":focus-visible");
1869    } catch (_e) {
1870      return true;
1871    }
1872  }
1873  
1874  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs
1875  function resolveValue(value, pointerType) {
1876    if (pointerType != null && !isMouseLikePointerType(pointerType)) {
1877      return 0;
1878    }
1879    if (typeof value === "function") {
1880      return value();
1881    }
1882    return value;
1883  }
1884  function getDelay(value, prop, pointerType) {
1885    const result = resolveValue(value, pointerType);
1886    if (typeof result === "number") {
1887      return result;
1888    }
1889    return result?.[prop];
1890  }
1891  function getRestMs(value) {
1892    if (typeof value === "function") {
1893      return value();
1894    }
1895    return value;
1896  }
1897  function isClickLikeOpenEvent(openEventType, interactedInside) {
1898    return interactedInside || openEventType === "click" || openEventType === "mousedown";
1899  }
1900  function isHoverOpenEvent(openEventType) {
1901    return openEventType?.includes("mouse") && openEventType !== "mousedown";
1902  }
1903  
1904  // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1905  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
1906  var FloatingDelayGroupContext = /* @__PURE__ */ React17.createContext({
1907    hasProvider: false,
1908    timeoutMs: 0,
1909    delayRef: {
1910      current: 0
1911    },
1912    initialDelayRef: {
1913      current: 0
1914    },
1915    timeout: new Timeout(),
1916    currentIdRef: {
1917      current: null
1918    },
1919    currentContextRef: {
1920      current: null
1921    }
1922  });
1923  if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
1924  function resetDelayRef(delayRef, initialDelayRef) {
1925    delayRef.current = initialDelayRef.current;
1926  }
1927  function FloatingDelayGroup(props) {
1928    const {
1929      children,
1930      delay,
1931      timeoutMs = 0
1932    } = props;
1933    const delayRef = React17.useRef(delay);
1934    const initialDelayRef = React17.useRef(delay);
1935    const currentIdRef = React17.useRef(null);
1936    const currentContextRef = React17.useRef(null);
1937    const timeout = useTimeout();
1938    useIsoLayoutEffect(() => {
1939      initialDelayRef.current = delay;
1940      if (!currentIdRef.current) {
1941        delayRef.current = delay;
1942        return;
1943      }
1944      delayRef.current = {
1945        open: getDelay(delayRef.current, "open"),
1946        close: getDelay(delay, "close")
1947      };
1948    }, [delay, currentIdRef, delayRef, initialDelayRef]);
1949    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingDelayGroupContext.Provider, {
1950      value: React17.useMemo(() => ({
1951        hasProvider: true,
1952        delayRef,
1953        initialDelayRef,
1954        currentIdRef,
1955        timeoutMs,
1956        currentContextRef,
1957        timeout
1958      }), [timeoutMs, timeout]),
1959      children
1960    });
1961  }
1962  function useDelayGroup(context, options = {
1963    open: false
1964  }) {
1965    const {
1966      open
1967    } = options;
1968    const store2 = "rootStore" in context ? context.rootStore : context;
1969    const floatingId = store2.useState("floatingId");
1970    const groupContext = React17.useContext(FloatingDelayGroupContext);
1971    const {
1972      currentIdRef,
1973      delayRef,
1974      timeoutMs,
1975      initialDelayRef,
1976      currentContextRef,
1977      hasProvider,
1978      timeout
1979    } = groupContext;
1980    const [isInstantPhase, setIsInstantPhase] = React17.useState(false);
1981    const openRef = React17.useRef(open);
1982    const isUnmountedRef = React17.useRef(false);
1983    useIsoLayoutEffect(() => {
1984      openRef.current = open;
1985    }, [open]);
1986    useIsoLayoutEffect(() => {
1987      return () => {
1988        isUnmountedRef.current = true;
1989      };
1990    }, []);
1991    useIsoLayoutEffect(() => {
1992      function unset() {
1993        if (!isUnmountedRef.current) {
1994          setIsInstantPhase(false);
1995        }
1996        currentContextRef.current?.setIsInstantPhase(false);
1997        currentIdRef.current = null;
1998        currentContextRef.current = null;
1999        delayRef.current = initialDelayRef.current;
2000        timeout.clear();
2001      }
2002      if (!currentIdRef.current) {
2003        return void 0;
2004      }
2005      if (!open && currentIdRef.current === floatingId) {
2006        setIsInstantPhase(false);
2007        if (timeoutMs) {
2008          const closingId = floatingId;
2009          timeout.start(timeoutMs, () => {
2010            if (store2.select("open") || currentIdRef.current && currentIdRef.current !== closingId) {
2011              return;
2012            }
2013            unset();
2014          });
2015          return () => {
2016            if (openRef.current || currentIdRef.current !== closingId) {
2017              timeout.clear();
2018            }
2019          };
2020        }
2021        unset();
2022      }
2023      return void 0;
2024    }, [open, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store2]);
2025    useIsoLayoutEffect(() => {
2026      if (!open) {
2027        return;
2028      }
2029      const prevContext = currentContextRef.current;
2030      const prevId = currentIdRef.current;
2031      timeout.clear();
2032      currentContextRef.current = {
2033        onOpenChange: store2.setOpen,
2034        setIsInstantPhase
2035      };
2036      currentIdRef.current = floatingId;
2037      delayRef.current = {
2038        open: 0,
2039        close: getDelay(initialDelayRef.current, "close")
2040      };
2041      if (prevId !== null && prevId !== floatingId) {
2042        setIsInstantPhase(true);
2043        prevContext?.setIsInstantPhase(true);
2044        prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none));
2045      } else {
2046        setIsInstantPhase(false);
2047        prevContext?.setIsInstantPhase(false);
2048      }
2049    }, [open, floatingId, store2, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]);
2050    useIsoLayoutEffect(() => {
2051      return () => {
2052        if (currentIdRef.current === floatingId) {
2053          currentContextRef.current = null;
2054          if (!openRef.current) {
2055            return;
2056          }
2057          currentIdRef.current = null;
2058          resetDelayRef(delayRef, initialDelayRef);
2059          timeout.clear();
2060        }
2061      };
2062    }, [currentContextRef, currentIdRef, delayRef, floatingId, initialDelayRef, timeout]);
2063    return React17.useMemo(() => ({
2064      hasProvider,
2065      delayRef,
2066      isInstantPhase
2067    }), [hasProvider, delayRef, isInstantPhase]);
2068  }
2069  
2070  // node_modules/@base-ui/utils/mergeCleanups.mjs
2071  function mergeCleanups(...cleanups) {
2072    return () => {
2073      for (let i = 0; i < cleanups.length; i += 1) {
2074        const cleanup = cleanups[i];
2075        if (cleanup) {
2076          cleanup();
2077        }
2078      }
2079    };
2080  }
2081  
2082  // node_modules/@base-ui/react/utils/FocusGuard.mjs
2083  var React18 = __toESM(require_react(), 1);
2084  
2085  // node_modules/@base-ui/utils/visuallyHidden.mjs
2086  var visuallyHiddenBase = {
2087    clipPath: "inset(50%)",
2088    overflow: "hidden",
2089    whiteSpace: "nowrap",
2090    border: 0,
2091    padding: 0,
2092    width: 1,
2093    height: 1,
2094    margin: -1
2095  };
2096  var visuallyHidden = {
2097    ...visuallyHiddenBase,
2098    position: "fixed",
2099    top: 0,
2100    left: 0
2101  };
2102  var visuallyHiddenInput = {
2103    ...visuallyHiddenBase,
2104    position: "absolute"
2105  };
2106  
2107  // node_modules/@base-ui/react/utils/FocusGuard.mjs
2108  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
2109  var FocusGuard = /* @__PURE__ */ React18.forwardRef(function FocusGuard2(props, ref) {
2110    const [role, setRole] = React18.useState();
2111    useIsoLayoutEffect(() => {
2112      if (parts_exports.screenReader.voiceOver && parts_exports.engine.webkit) {
2113        setRole("button");
2114      }
2115    }, []);
2116    const restProps = {
2117      tabIndex: 0,
2118      // Role is only for VoiceOver
2119      role
2120    };
2121    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
2122      ...props,
2123      ref,
2124      style: visuallyHidden,
2125      "aria-hidden": role ? void 0 : true,
2126      ...restProps,
2127      "data-base-ui-focus-guard": ""
2128    });
2129  });
2130  if (true) FocusGuard.displayName = "FocusGuard";
2131  
2132  // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
2133  var sides = ["top", "right", "bottom", "left"];
2134  var min = Math.min;
2135  var max = Math.max;
2136  var round = Math.round;
2137  var floor = Math.floor;
2138  var createCoords = (v) => ({
2139    x: v,
2140    y: v
2141  });
2142  var oppositeSideMap = {
2143    left: "right",
2144    right: "left",
2145    bottom: "top",
2146    top: "bottom"
2147  };
2148  function clamp(start, value, end) {
2149    return max(start, min(value, end));
2150  }
2151  function evaluate(value, param) {
2152    return typeof value === "function" ? value(param) : value;
2153  }
2154  function getSide(placement) {
2155    return placement.split("-")[0];
2156  }
2157  function getAlignment(placement) {
2158    return placement.split("-")[1];
2159  }
2160  function getOppositeAxis(axis) {
2161    return axis === "x" ? "y" : "x";
2162  }
2163  function getAxisLength(axis) {
2164    return axis === "y" ? "height" : "width";
2165  }
2166  function getSideAxis(placement) {
2167    const firstChar = placement[0];
2168    return firstChar === "t" || firstChar === "b" ? "y" : "x";
2169  }
2170  function getAlignmentAxis(placement) {
2171    return getOppositeAxis(getSideAxis(placement));
2172  }
2173  function getAlignmentSides(placement, rects, rtl) {
2174    if (rtl === void 0) {
2175      rtl = false;
2176    }
2177    const alignment = getAlignment(placement);
2178    const alignmentAxis = getAlignmentAxis(placement);
2179    const length = getAxisLength(alignmentAxis);
2180    let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
2181    if (rects.reference[length] > rects.floating[length]) {
2182      mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
2183    }
2184    return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
2185  }
2186  function getExpandedPlacements(placement) {
2187    const oppositePlacement = getOppositePlacement(placement);
2188    return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
2189  }
2190  function getOppositeAlignmentPlacement(placement) {
2191    return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
2192  }
2193  var lrPlacement = ["left", "right"];
2194  var rlPlacement = ["right", "left"];
2195  var tbPlacement = ["top", "bottom"];
2196  var btPlacement = ["bottom", "top"];
2197  function getSideList(side, isStart, rtl) {
2198    switch (side) {
2199      case "top":
2200      case "bottom":
2201        if (rtl) return isStart ? rlPlacement : lrPlacement;
2202        return isStart ? lrPlacement : rlPlacement;
2203      case "left":
2204      case "right":
2205        return isStart ? tbPlacement : btPlacement;
2206      default:
2207        return [];
2208    }
2209  }
2210  function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
2211    const alignment = getAlignment(placement);
2212    let list = getSideList(getSide(placement), direction === "start", rtl);
2213    if (alignment) {
2214      list = list.map((side) => side + "-" + alignment);
2215      if (flipAlignment) {
2216        list = list.concat(list.map(getOppositeAlignmentPlacement));
2217      }
2218    }
2219    return list;
2220  }
2221  function getOppositePlacement(placement) {
2222    const side = getSide(placement);
2223    return oppositeSideMap[side] + placement.slice(side.length);
2224  }
2225  function expandPaddingObject(padding) {
2226    return {
2227      top: 0,
2228      right: 0,
2229      bottom: 0,
2230      left: 0,
2231      ...padding
2232    };
2233  }
2234  function getPaddingObject(padding) {
2235    return typeof padding !== "number" ? expandPaddingObject(padding) : {
2236      top: padding,
2237      right: padding,
2238      bottom: padding,
2239      left: padding
2240    };
2241  }
2242  function rectToClientRect(rect) {
2243    const {
2244      x,
2245      y,
2246      width,
2247      height
2248    } = rect;
2249    return {
2250      width,
2251      height,
2252      top: y,
2253      left: x,
2254      right: x + width,
2255      bottom: y + height,
2256      x,
2257      y
2258    };
2259  }
2260  
2261  // node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
2262  function isHiddenByStyles(styles) {
2263    return styles.visibility === "hidden" || styles.visibility === "collapse";
2264  }
2265  function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) {
2266    if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
2267      return false;
2268    }
2269    if (typeof element.checkVisibility === "function") {
2270      return element.checkVisibility();
2271    }
2272    return styles.display !== "none" && styles.display !== "contents";
2273  }
2274  
2275  // node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs
2276  var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
2277  function getParentElement(element) {
2278    const assignedSlot = element.assignedSlot;
2279    if (assignedSlot) {
2280      return assignedSlot;
2281    }
2282    if (element.parentElement) {
2283      return element.parentElement;
2284    }
2285    const rootNode = element.getRootNode();
2286    return isShadowRoot(rootNode) ? rootNode.host : null;
2287  }
2288  function getDetailsSummary(details) {
2289    for (const child of Array.from(details.children)) {
2290      if (getNodeName(child) === "summary") {
2291        return child;
2292      }
2293    }
2294    return null;
2295  }
2296  function isWithinOpenDetailsSummary(element, details) {
2297    const summary = getDetailsSummary(details);
2298    return !!summary && (element === summary || contains(summary, element));
2299  }
2300  function isFocusableCandidate(element) {
2301    const nodeName = element ? getNodeName(element) : "";
2302    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");
2303  }
2304  function isFocusableElement(element) {
2305    if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) {
2306      return false;
2307    }
2308    for (let current = element; current; current = getParentElement(current)) {
2309      const isAncestor = current !== element;
2310      const isSlot = getNodeName(current) === "slot";
2311      if (current.hasAttribute("inert")) {
2312        return false;
2313      }
2314      if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {
2315        return false;
2316      }
2317    }
2318    return true;
2319  }
2320  function isVisibleInTabbableTree(element, isAncestor) {
2321    const styles = getComputedStyle2(element);
2322    if (!isAncestor) {
2323      return isElementVisible(element, styles);
2324    }
2325    return styles.display !== "none";
2326  }
2327  function getTabIndex(element) {
2328    const tabIndex = element.tabIndex;
2329    if (tabIndex < 0) {
2330      const nodeName = getNodeName(element);
2331      if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) {
2332        return 0;
2333      }
2334    }
2335    return tabIndex;
2336  }
2337  function getNamedRadioInput(element) {
2338    if (getNodeName(element) !== "input") {
2339      return null;
2340    }
2341    const input = element;
2342    return input.type === "radio" && input.name !== "" ? input : null;
2343  }
2344  function isTabbableRadio(element, candidates) {
2345    const input = getNamedRadioInput(element);
2346    if (!input) {
2347      return true;
2348    }
2349    const checkedRadio = candidates.find((candidate) => {
2350      const radio = getNamedRadioInput(candidate);
2351      return radio?.name === input.name && radio.form === input.form && radio.checked;
2352    });
2353    if (checkedRadio) {
2354      return checkedRadio === input;
2355    }
2356    return candidates.find((candidate) => {
2357      const radio = getNamedRadioInput(candidate);
2358      return radio?.name === input.name && radio.form === input.form;
2359    }) === input;
2360  }
2361  function getComposedChildren(container) {
2362    if (isHTMLElement(container) && getNodeName(container) === "slot") {
2363      const assignedElements = container.assignedElements({
2364        flatten: true
2365      });
2366      if (assignedElements.length > 0) {
2367        return assignedElements;
2368      }
2369    }
2370    if (isHTMLElement(container) && container.shadowRoot) {
2371      return Array.from(container.shadowRoot.children);
2372    }
2373    return Array.from(container.children);
2374  }
2375  function appendCandidates(container, list) {
2376    getComposedChildren(container).forEach((child) => {
2377      if (isFocusableCandidate(child)) {
2378        list.push(child);
2379      }
2380      appendCandidates(child, list);
2381    });
2382  }
2383  function appendMatchingElements(container, selector, list) {
2384    getComposedChildren(container).forEach((child) => {
2385      if (isHTMLElement(child) && child.matches(selector)) {
2386        list.push(child);
2387      }
2388      appendMatchingElements(child, selector, list);
2389    });
2390  }
2391  function focusable(container) {
2392    const candidates = [];
2393    appendCandidates(container, candidates);
2394    return candidates.filter(isFocusableElement);
2395  }
2396  function tabbable(container) {
2397    const candidates = focusable(container);
2398    return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
2399  }
2400  function getTabbableIn(container, dir) {
2401    const list = tabbable(container);
2402    const len = list.length;
2403    if (len === 0) {
2404      return void 0;
2405    }
2406    const active = activeElement(ownerDocument(container));
2407    const index2 = list.indexOf(active);
2408    const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir;
2409    return list[nextIndex];
2410  }
2411  function getNextTabbable(referenceElement) {
2412    return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
2413  }
2414  function getPreviousTabbable(referenceElement) {
2415    return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
2416  }
2417  function isOutsideEvent(event, container) {
2418    const containerElement = container || event.currentTarget;
2419    const relatedTarget = event.relatedTarget;
2420    return !relatedTarget || !contains(containerElement, relatedTarget);
2421  }
2422  function disableFocusInside(container) {
2423    const tabbableElements = tabbable(container);
2424    tabbableElements.forEach((element) => {
2425      element.dataset.tabindex = element.getAttribute("tabindex") || "";
2426      element.setAttribute("tabindex", "-1");
2427    });
2428  }
2429  function enableFocusInside(container) {
2430    const elements = [];
2431    appendMatchingElements(container, "[data-tabindex]", elements);
2432    elements.forEach((element) => {
2433      const tabindex = element.dataset.tabindex;
2434      delete element.dataset.tabindex;
2435      if (tabindex) {
2436        element.setAttribute("tabindex", tabindex);
2437      } else {
2438        element.removeAttribute("tabindex");
2439      }
2440    });
2441  }
2442  
2443  // node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs
2444  function getNodeChildren(nodes, id, onlyOpenChildren = true) {
2445    const directChildren = nodes.filter((node) => node.parentId === id);
2446    return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
2447  }
2448  
2449  // node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs
2450  function createAttribute(name) {
2451    return `data-base-ui-$name}`;
2452  }
2453  
2454  // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2455  var React19 = __toESM(require_react(), 1);
2456  var ReactDOM2 = __toESM(require_react_dom(), 1);
2457  
2458  // node_modules/@base-ui/react/internals/constants.mjs
2459  var DISABLED_TRANSITIONS_STYLE = {
2460    style: {
2461      transition: "none"
2462    }
2463  };
2464  var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
2465  var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
2466  var BASE_UI_SWIPE_IGNORE_SELECTOR = `[$BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
2467  var LEGACY_SWIPE_IGNORE_SELECTOR = `[$LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
2468  var POPUP_COLLISION_AVOIDANCE = {
2469    fallbackAxisSide: "end"
2470  };
2471  var ownerVisuallyHidden = {
2472    clipPath: "inset(50%)",
2473    position: "fixed",
2474    top: 0,
2475    left: 0
2476  };
2477  
2478  // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2479  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
2480  var PortalContext = /* @__PURE__ */ React19.createContext(null);
2481  if (true) PortalContext.displayName = "PortalContext";
2482  var usePortalContext = () => React19.useContext(PortalContext);
2483  var attr = createAttribute("portal");
2484  function useFloatingPortalNode(props = {}) {
2485    const {
2486      ref,
2487      container: containerProp,
2488      componentProps = EMPTY_OBJECT,
2489      elementProps
2490    } = props;
2491    const uniqueId = useId();
2492    const portalContext = usePortalContext();
2493    const parentPortalNode = portalContext?.portalNode;
2494    const [containerElement, setContainerElement] = React19.useState(null);
2495    const [portalNode, setPortalNode] = React19.useState(null);
2496    const setPortalNodeRef = useStableCallback((node) => {
2497      if (node !== null) {
2498        setPortalNode(node);
2499      }
2500    });
2501    const containerRef = React19.useRef(null);
2502    useIsoLayoutEffect(() => {
2503      if (containerProp === null) {
2504        if (containerRef.current) {
2505          containerRef.current = null;
2506          setPortalNode(null);
2507          setContainerElement(null);
2508        }
2509        return;
2510      }
2511      if (uniqueId == null) {
2512        return;
2513      }
2514      const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
2515      if (resolvedContainer == null) {
2516        if (containerRef.current) {
2517          containerRef.current = null;
2518          setPortalNode(null);
2519          setContainerElement(null);
2520        }
2521        return;
2522      }
2523      if (containerRef.current !== resolvedContainer) {
2524        containerRef.current = resolvedContainer;
2525        setPortalNode(null);
2526        setContainerElement(resolvedContainer);
2527      }
2528    }, [containerProp, parentPortalNode, uniqueId]);
2529    const portalElement = useRenderElement("div", componentProps, {
2530      ref: [ref, setPortalNodeRef],
2531      props: [{
2532        id: uniqueId,
2533        [attr]: ""
2534      }, elementProps]
2535    });
2536    const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null;
2537    return {
2538      portalNode,
2539      portalSubtree
2540    };
2541  }
2542  var FloatingPortal = /* @__PURE__ */ React19.forwardRef(function FloatingPortal2(componentProps, forwardedRef) {
2543    const {
2544      render,
2545      className,
2546      style,
2547      children,
2548      container,
2549      renderGuards,
2550      ...elementProps
2551    } = componentProps;
2552    const {
2553      portalNode,
2554      portalSubtree
2555    } = useFloatingPortalNode({
2556      container,
2557      ref: forwardedRef,
2558      componentProps,
2559      elementProps
2560    });
2561    const beforeOutsideRef = React19.useRef(null);
2562    const afterOutsideRef = React19.useRef(null);
2563    const beforeInsideRef = React19.useRef(null);
2564    const afterInsideRef = React19.useRef(null);
2565    const [focusManagerState, setFocusManagerState] = React19.useState(null);
2566    const focusInsideDisabledRef = React19.useRef(false);
2567    const modal = focusManagerState?.modal;
2568    const open = focusManagerState?.open;
2569    const shouldRenderGuards = typeof renderGuards === "boolean" ? renderGuards : !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;
2570    React19.useEffect(() => {
2571      if (!portalNode || modal) {
2572        return void 0;
2573      }
2574      function onFocus(event) {
2575        if (portalNode && event.relatedTarget && isOutsideEvent(event)) {
2576          if (event.type === "focusin") {
2577            if (focusInsideDisabledRef.current) {
2578              enableFocusInside(portalNode);
2579              focusInsideDisabledRef.current = false;
2580            }
2581          } else {
2582            disableFocusInside(portalNode);
2583            focusInsideDisabledRef.current = true;
2584          }
2585        }
2586      }
2587      return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true));
2588    }, [portalNode, modal]);
2589    useIsoLayoutEffect(() => {
2590      if (!portalNode || open !== true || !focusInsideDisabledRef.current) {
2591        return;
2592      }
2593      enableFocusInside(portalNode);
2594      focusInsideDisabledRef.current = false;
2595    }, [open, portalNode]);
2596    const portalContextValue = React19.useMemo(() => ({
2597      beforeOutsideRef,
2598      afterOutsideRef,
2599      beforeInsideRef,
2600      afterInsideRef,
2601      portalNode,
2602      setFocusManagerState
2603    }), [portalNode]);
2604    return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(React19.Fragment, {
2605      children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(PortalContext.Provider, {
2606        value: portalContextValue,
2607        children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2608          "data-type": "outside",
2609          ref: beforeOutsideRef,
2610          onFocus: (event) => {
2611            if (isOutsideEvent(event, portalNode)) {
2612              beforeInsideRef.current?.focus();
2613            } else {
2614              const domReference = focusManagerState ? focusManagerState.domReference : null;
2615              const prevTabbable = getPreviousTabbable(domReference);
2616              prevTabbable?.focus();
2617            }
2618          }
2619        }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {
2620          "aria-owns": portalNode.id,
2621          style: ownerVisuallyHidden
2622        }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2623          "data-type": "outside",
2624          ref: afterOutsideRef,
2625          onFocus: (event) => {
2626            if (isOutsideEvent(event, portalNode)) {
2627              afterInsideRef.current?.focus();
2628            } else {
2629              const domReference = focusManagerState ? focusManagerState.domReference : null;
2630              const nextTabbable = getNextTabbable(domReference);
2631              nextTabbable?.focus();
2632              if (focusManagerState?.closeOnFocusOut) {
2633                focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent));
2634              }
2635            }
2636          }
2637        })]
2638      })]
2639    });
2640  });
2641  if (true) FloatingPortal.displayName = "FloatingPortal";
2642  
2643  // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2644  var React20 = __toESM(require_react(), 1);
2645  
2646  // node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs
2647  function createEventEmitter() {
2648    const map = /* @__PURE__ */ new Map();
2649    return {
2650      emit(event, data) {
2651        map.get(event)?.forEach((listener) => listener(data));
2652      },
2653      on(event, listener) {
2654        if (!map.has(event)) {
2655          map.set(event, /* @__PURE__ */ new Set());
2656        }
2657        map.get(event).add(listener);
2658      },
2659      off(event, listener) {
2660        map.get(event)?.delete(listener);
2661      }
2662    };
2663  }
2664  
2665  // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2666  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
2667  var FloatingNodeContext = /* @__PURE__ */ React20.createContext(null);
2668  if (true) FloatingNodeContext.displayName = "FloatingNodeContext";
2669  var FloatingTreeContext = /* @__PURE__ */ React20.createContext(null);
2670  if (true) FloatingTreeContext.displayName = "FloatingTreeContext";
2671  var useFloatingParentNodeId = () => React20.useContext(FloatingNodeContext)?.id || null;
2672  var useFloatingTree = (externalTree) => {
2673    const contextTree = React20.useContext(FloatingTreeContext);
2674    return externalTree ?? contextTree;
2675  };
2676  
2677  // node_modules/@base-ui/react/floating-ui-react/hooks/useClientPoint.mjs
2678  var React21 = __toESM(require_react(), 1);
2679  function createVirtualElement(domElement, data) {
2680    let offsetX = null;
2681    let offsetY = null;
2682    let isAutoUpdateEvent = false;
2683    return {
2684      contextElement: domElement || void 0,
2685      getBoundingClientRect() {
2686        const domRect = domElement?.getBoundingClientRect() || {
2687          width: 0,
2688          height: 0,
2689          x: 0,
2690          y: 0
2691        };
2692        const isXAxis = data.axis === "x" || data.axis === "both";
2693        const isYAxis = data.axis === "y" || data.axis === "both";
2694        const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch";
2695        let width = domRect.width;
2696        let height = domRect.height;
2697        let x = domRect.x;
2698        let y = domRect.y;
2699        if (offsetX == null && data.x && isXAxis) {
2700          offsetX = domRect.x - data.x;
2701        }
2702        if (offsetY == null && data.y && isYAxis) {
2703          offsetY = domRect.y - data.y;
2704        }
2705        x -= offsetX || 0;
2706        y -= offsetY || 0;
2707        width = 0;
2708        height = 0;
2709        if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {
2710          width = data.axis === "y" ? domRect.width : 0;
2711          height = data.axis === "x" ? domRect.height : 0;
2712          x = isXAxis && data.x != null ? data.x : x;
2713          y = isYAxis && data.y != null ? data.y : y;
2714        } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {
2715          height = data.axis === "x" ? domRect.height : height;
2716          width = data.axis === "y" ? domRect.width : width;
2717        }
2718        isAutoUpdateEvent = true;
2719        return {
2720          width,
2721          height,
2722          x,
2723          y,
2724          top: y,
2725          right: x + width,
2726          bottom: y + height,
2727          left: x
2728        };
2729      }
2730    };
2731  }
2732  function isMouseBasedEvent(event) {
2733    return event != null && event.clientX != null;
2734  }
2735  function useClientPoint(context, props = {}) {
2736    const {
2737      enabled = true,
2738      axis = "both"
2739    } = props;
2740    const store2 = "rootStore" in context ? context.rootStore : context;
2741    const open = store2.useState("open");
2742    const floating = store2.useState("floatingElement");
2743    const domReference = store2.useState("domReferenceElement");
2744    const dataRef = store2.context.dataRef;
2745    const initialRef = React21.useRef(false);
2746    const cleanupListenerRef = React21.useRef(null);
2747    const [pointerType, setPointerType] = React21.useState();
2748    const [reactive, setReactive] = React21.useState([]);
2749    const resetReference = useStableCallback((reference2) => {
2750      store2.set("positionReference", reference2);
2751    });
2752    const setReference = useStableCallback((newX, newY, referenceElement) => {
2753      if (initialRef.current) {
2754        return;
2755      }
2756      if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {
2757        return;
2758      }
2759      store2.set("positionReference", createVirtualElement(referenceElement ?? domReference, {
2760        x: newX,
2761        y: newY,
2762        axis,
2763        dataRef,
2764        pointerType
2765      }));
2766    });
2767    const handleReferenceEnterOrMove = useStableCallback((event) => {
2768      if (!open) {
2769        setReference(event.clientX, event.clientY, event.currentTarget);
2770      } else if (!cleanupListenerRef.current) {
2771        setReference(event.clientX, event.clientY, event.currentTarget);
2772        setReactive([]);
2773      }
2774    });
2775    const openCheck = isMouseLikePointerType(pointerType) ? floating : open;
2776    React21.useEffect(() => {
2777      if (!enabled) {
2778        resetReference(domReference);
2779        return void 0;
2780      }
2781      if (!openCheck) {
2782        return void 0;
2783      }
2784      function cleanupListener() {
2785        cleanupListenerRef.current?.();
2786        cleanupListenerRef.current = null;
2787      }
2788      const win = getWindow(floating);
2789      function handleMouseMove(event) {
2790        const target = getTarget(event);
2791        if (!contains(floating, target)) {
2792          setReference(event.clientX, event.clientY);
2793        } else {
2794          cleanupListener();
2795        }
2796      }
2797      if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {
2798        cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove);
2799      } else {
2800        resetReference(domReference);
2801      }
2802      return cleanupListener;
2803    }, [openCheck, enabled, floating, dataRef, domReference, store2, setReference, resetReference, reactive]);
2804    React21.useEffect(() => () => {
2805      store2.set("positionReference", null);
2806    }, [store2]);
2807    React21.useEffect(() => {
2808      if (enabled && !floating) {
2809        initialRef.current = false;
2810      }
2811    }, [enabled, floating]);
2812    React21.useEffect(() => {
2813      if (!enabled && open) {
2814        initialRef.current = true;
2815      }
2816    }, [enabled, open]);
2817    const reference = React21.useMemo(() => {
2818      function setPointerTypeRef(event) {
2819        setPointerType(event.pointerType);
2820      }
2821      return {
2822        onPointerDown: setPointerTypeRef,
2823        onPointerEnter: setPointerTypeRef,
2824        onMouseMove: handleReferenceEnterOrMove,
2825        onMouseEnter: handleReferenceEnterOrMove
2826      };
2827    }, [handleReferenceEnterOrMove]);
2828    return React21.useMemo(() => enabled ? {
2829      reference,
2830      trigger: reference
2831    } : {}, [enabled, reference]);
2832  }
2833  
2834  // node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs
2835  var React22 = __toESM(require_react(), 1);
2836  function alwaysFalse() {
2837    return false;
2838  }
2839  function normalizeProp(normalizable) {
2840    return {
2841      escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false,
2842      outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true
2843    };
2844  }
2845  function useDismiss(context, props = {}) {
2846    const {
2847      enabled = true,
2848      escapeKey: escapeKey2 = true,
2849      outsidePress: outsidePressProp = true,
2850      outsidePressEvent = "sloppy",
2851      referencePress = alwaysFalse,
2852      bubbles,
2853      externalTree
2854    } = props;
2855    const store2 = "rootStore" in context ? context.rootStore : context;
2856    const open = store2.useState("open");
2857    const floatingElement = store2.useState("floatingElement");
2858    const {
2859      dataRef
2860    } = store2.context;
2861    const tree = useFloatingTree(externalTree);
2862    const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false);
2863    const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp;
2864    const outsidePressEnabled = outsidePress2 !== false;
2865    const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);
2866    const {
2867      escapeKey: escapeKeyBubbles,
2868      outsidePress: outsidePressBubbles
2869    } = normalizeProp(bubbles);
2870    const pressStartedInsideRef = React22.useRef(false);
2871    const pressStartPreventedRef = React22.useRef(false);
2872    const suppressNextOutsideClickRef = React22.useRef(false);
2873    const isComposingRef = React22.useRef(false);
2874    const currentPointerTypeRef = React22.useRef("");
2875    const touchStateRef = React22.useRef(null);
2876    const cancelDismissOnEndTimeout = useTimeout();
2877    const clearInsideReactTreeTimeout = useTimeout();
2878    const clearInsideReactTree = useStableCallback(() => {
2879      clearInsideReactTreeTimeout.clear();
2880      dataRef.current.insideReactTree = false;
2881    });
2882    const hasBlockingChild = useStableCallback((bubbleKey) => {
2883      const nodeId = dataRef.current.floatingContext?.nodeId;
2884      const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];
2885      return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]);
2886    });
2887    const isEventWithinOwnElements = useStableCallback((event) => {
2888      return isEventTargetWithin(event, store2.select("floatingElement")) || isEventTargetWithin(event, store2.select("domReferenceElement"));
2889    });
2890    const closeOnReferencePress = useStableCallback((event) => {
2891      if (!referencePress()) {
2892        return;
2893      }
2894      store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent));
2895    });
2896    const closeOnEscapeKeyDown = useStableCallback((event) => {
2897      if (!open || !enabled || !escapeKey2 || event.key !== "Escape") {
2898        return;
2899      }
2900      if (isComposingRef.current) {
2901        return;
2902      }
2903      if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) {
2904        return;
2905      }
2906      const native = isReactEvent(event) ? event.nativeEvent : event;
2907      const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native);
2908      store2.setOpen(false, eventDetails);
2909      if (!eventDetails.isCanceled) {
2910        event.preventDefault();
2911      }
2912      if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {
2913        event.stopPropagation();
2914      }
2915    });
2916    const markInsideReactTree = useStableCallback(() => {
2917      dataRef.current.insideReactTree = true;
2918      clearInsideReactTreeTimeout.start(0, clearInsideReactTree);
2919    });
2920    const markPressStartedInsideReactTree = useStableCallback((event) => {
2921      if (!open || !enabled || event.button !== 0) {
2922        return;
2923      }
2924      const target = getTarget(event.nativeEvent);
2925      if (!contains(store2.select("floatingElement"), target)) {
2926        return;
2927      }
2928      if (!pressStartedInsideRef.current) {
2929        pressStartedInsideRef.current = true;
2930        pressStartPreventedRef.current = false;
2931      }
2932    });
2933    const markInsidePressStartPrevented = useStableCallback((event) => {
2934      if (!open || !enabled) {
2935        return;
2936      }
2937      if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {
2938        return;
2939      }
2940      if (pressStartedInsideRef.current) {
2941        pressStartPreventedRef.current = true;
2942      }
2943    });
2944    React22.useEffect(() => {
2945      if (!open || !enabled) {
2946        return void 0;
2947      }
2948      dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;
2949      dataRef.current.__outsidePressBubbles = outsidePressBubbles;
2950      const compositionTimeout = new Timeout();
2951      const preventedPressSuppressionTimeout = new Timeout();
2952      function handleCompositionStart() {
2953        compositionTimeout.clear();
2954        isComposingRef.current = true;
2955      }
2956      function handleCompositionEnd() {
2957        compositionTimeout.start(
2958          // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
2959          // Only apply to WebKit for the test to remain 0ms.
2960          parts_exports.engine.webkit ? 5 : 0,
2961          () => {
2962            isComposingRef.current = false;
2963          }
2964        );
2965      }
2966      function suppressImmediateOutsideClickAfterPreventedStart() {
2967        suppressNextOutsideClickRef.current = true;
2968        preventedPressSuppressionTimeout.start(0, () => {
2969          suppressNextOutsideClickRef.current = false;
2970        });
2971      }
2972      function resetPressStartState() {
2973        pressStartedInsideRef.current = false;
2974        pressStartPreventedRef.current = false;
2975      }
2976      function getOutsidePressEvent() {
2977        const type = currentPointerTypeRef.current;
2978        const computedType = type === "pen" || !type ? "mouse" : type;
2979        const outsidePressEventValue = getOutsidePressEventProp();
2980        const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue;
2981        if (typeof resolved === "string") {
2982          return resolved;
2983        }
2984        return resolved[computedType];
2985      }
2986      function shouldIgnoreEvent(event) {
2987        const computedOutsidePressEvent = getOutsidePressEvent();
2988        return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click";
2989      }
2990      function isEventWithinFloatingTree(event) {
2991        const nodeId = dataRef.current.floatingContext?.nodeId;
2992        const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating));
2993        return isEventWithinOwnElements(event) || targetIsInsideChildren;
2994      }
2995      function closeOnPressOutside(event) {
2996        if (shouldIgnoreEvent(event)) {
2997          if (event.type !== "click" && !isEventWithinOwnElements(event)) {
2998            preventedPressSuppressionTimeout.clear();
2999            suppressNextOutsideClickRef.current = false;
3000          }
3001          clearInsideReactTree();
3002          return;
3003        }
3004        if (dataRef.current.insideReactTree) {
3005          clearInsideReactTree();
3006          return;
3007        }
3008        const target = getTarget(event);
3009        const inertSelector = `[$createAttribute("inert")}]`;
3010        const targetRoot = isElement(target) ? target.getRootNode() : null;
3011        const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store2.select("floatingElement"))).querySelectorAll(inertSelector));
3012        const triggers = store2.context.triggerElements;
3013        if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) {
3014          return;
3015        }
3016        let targetRootAncestor = isElement(target) ? target : null;
3017        while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
3018          const nextParent = getParentNode(targetRootAncestor);
3019          if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {
3020            break;
3021          }
3022          targetRootAncestor = nextParent;
3023        }
3024        if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
3025        !contains(target, store2.select("floatingElement")) && // If the target root element contains none of the markers, then the
3026        // element was injected after the floating element rendered.
3027        markers.every((marker) => !contains(targetRootAncestor, marker))) {
3028          return;
3029        }
3030        if (isHTMLElement(target) && !("touches" in event)) {
3031          const lastTraversableNode = isLastTraversableNode(target);
3032          const style = getComputedStyle2(target);
3033          const scrollRe = /auto|scroll/;
3034          const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);
3035          const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);
3036          const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;
3037          const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;
3038          const isRTL2 = style.direction === "rtl";
3039          const pressedVerticalScrollbar = canScrollY && (isRTL2 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);
3040          const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;
3041          if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {
3042            return;
3043          }
3044        }
3045        if (isEventWithinFloatingTree(event)) {
3046          return;
3047        }
3048        if (getOutsidePressEvent() === "intentional" && suppressNextOutsideClickRef.current) {
3049          preventedPressSuppressionTimeout.clear();
3050          suppressNextOutsideClickRef.current = false;
3051          return;
3052        }
3053        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3054          return;
3055        }
3056        if (hasBlockingChild("__outsidePressBubbles")) {
3057          return;
3058        }
3059        store2.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event));
3060        clearInsideReactTree();
3061      }
3062      function handlePointerDown(event) {
3063        if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) {
3064          return;
3065        }
3066        closeOnPressOutside(event);
3067      }
3068      function handleTouchStart(event) {
3069        if (getOutsidePressEvent() !== "sloppy" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) {
3070          return;
3071        }
3072        const touch = event.touches[0];
3073        if (touch) {
3074          touchStateRef.current = {
3075            startTime: Date.now(),
3076            startX: touch.clientX,
3077            startY: touch.clientY,
3078            dismissOnTouchEnd: false,
3079            dismissOnMouseDown: true
3080          };
3081          cancelDismissOnEndTimeout.start(1e3, () => {
3082            if (touchStateRef.current) {
3083              touchStateRef.current.dismissOnTouchEnd = false;
3084              touchStateRef.current.dismissOnMouseDown = false;
3085            }
3086          });
3087        }
3088      }
3089      function addTargetEventListenerOnce(event, listener) {
3090        const target = getTarget(event);
3091        if (!target) {
3092          return;
3093        }
3094        const unsubscribe2 = addEventListener(target, event.type, () => {
3095          listener(event);
3096          unsubscribe2();
3097        });
3098      }
3099      function handleTouchStartCapture(event) {
3100        currentPointerTypeRef.current = "touch";
3101        addTargetEventListenerOnce(event, handleTouchStart);
3102      }
3103      function closeOnPressOutsideCapture(event) {
3104        cancelDismissOnEndTimeout.clear();
3105        if (event.type === "pointerdown") {
3106          currentPointerTypeRef.current = event.pointerType;
3107        }
3108        if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {
3109          return;
3110        }
3111        addTargetEventListenerOnce(event, (targetEvent) => {
3112          if (targetEvent.type === "pointerdown") {
3113            handlePointerDown(targetEvent);
3114          } else {
3115            closeOnPressOutside(targetEvent);
3116          }
3117        });
3118      }
3119      function handlePressEndCapture(event) {
3120        if (!pressStartedInsideRef.current) {
3121          return;
3122        }
3123        const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;
3124        resetPressStartState();
3125        if (getOutsidePressEvent() !== "intentional") {
3126          return;
3127        }
3128        if (event.type === "pointercancel") {
3129          if (pressStartedInsideDefaultPrevented) {
3130            suppressImmediateOutsideClickAfterPreventedStart();
3131          }
3132          return;
3133        }
3134        if (isEventWithinFloatingTree(event)) {
3135          return;
3136        }
3137        if (pressStartedInsideDefaultPrevented) {
3138          suppressImmediateOutsideClickAfterPreventedStart();
3139          return;
3140        }
3141        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3142          return;
3143        }
3144        preventedPressSuppressionTimeout.clear();
3145        suppressNextOutsideClickRef.current = true;
3146        clearInsideReactTree();
3147      }
3148      function handleTouchMove(event) {
3149        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3150          return;
3151        }
3152        const touch = event.touches[0];
3153        if (!touch) {
3154          return;
3155        }
3156        const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);
3157        const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);
3158        const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
3159        if (distance > 5) {
3160          touchStateRef.current.dismissOnTouchEnd = true;
3161        }
3162        if (distance > 10) {
3163          closeOnPressOutside(event);
3164          cancelDismissOnEndTimeout.clear();
3165          touchStateRef.current = null;
3166        }
3167      }
3168      function handleTouchMoveCapture(event) {
3169        addTargetEventListenerOnce(event, handleTouchMove);
3170      }
3171      function handleTouchEnd(event) {
3172        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3173          return;
3174        }
3175        if (touchStateRef.current.dismissOnTouchEnd) {
3176          closeOnPressOutside(event);
3177        }
3178        cancelDismissOnEndTimeout.clear();
3179        touchStateRef.current = null;
3180      }
3181      function handleTouchEndCapture(event) {
3182        addTargetEventListenerOnce(event, handleTouchEnd);
3183      }
3184      const doc = ownerDocument(floatingElement);
3185      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, true), addEventListener(doc, "touchmove", handleTouchMoveCapture, true), addEventListener(doc, "touchend", handleTouchEndCapture, true)));
3186      return () => {
3187        unsubscribe();
3188        compositionTimeout.clear();
3189        preventedPressSuppressionTimeout.clear();
3190        resetPressStartState();
3191        suppressNextOutsideClickRef.current = false;
3192      };
3193    }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store2, cancelDismissOnEndTimeout]);
3194    React22.useEffect(clearInsideReactTree, [outsidePress2, clearInsideReactTree]);
3195    const reference = React22.useMemo(() => ({
3196      onKeyDown: closeOnEscapeKeyDown,
3197      onPointerDown: closeOnReferencePress,
3198      onClick: closeOnReferencePress
3199    }), [closeOnEscapeKeyDown, closeOnReferencePress]);
3200    const floating = React22.useMemo(() => ({
3201      onKeyDown: closeOnEscapeKeyDown,
3202      // `onMouseDown` may be blocked if `event.preventDefault()` is called in
3203      // `onPointerDown`, such as with <NumberField.ScrubArea>.
3204      // See https://github.com/mui/base-ui/pull/3379
3205      onPointerDown: markInsidePressStartPrevented,
3206      onMouseDown: markInsidePressStartPrevented,
3207      onClickCapture: markInsideReactTree,
3208      onMouseDownCapture(event) {
3209        markInsideReactTree();
3210        markPressStartedInsideReactTree(event);
3211      },
3212      onPointerDownCapture(event) {
3213        markInsideReactTree();
3214        markPressStartedInsideReactTree(event);
3215      },
3216      onMouseUpCapture: markInsideReactTree,
3217      onTouchEndCapture: markInsideReactTree,
3218      onTouchMoveCapture: markInsideReactTree
3219    }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);
3220    return React22.useMemo(() => enabled ? {
3221      reference,
3222      floating,
3223      trigger: reference
3224    } : {}, [enabled, reference, floating]);
3225  }
3226  
3227  // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
3228  var React29 = __toESM(require_react(), 1);
3229  
3230  // node_modules/@floating-ui/core/dist/floating-ui.core.mjs
3231  function computeCoordsFromPlacement(_ref, placement, rtl) {
3232    let {
3233      reference,
3234      floating
3235    } = _ref;
3236    const sideAxis = getSideAxis(placement);
3237    const alignmentAxis = getAlignmentAxis(placement);
3238    const alignLength = getAxisLength(alignmentAxis);
3239    const side = getSide(placement);
3240    const isVertical = sideAxis === "y";
3241    const commonX = reference.x + reference.width / 2 - floating.width / 2;
3242    const commonY = reference.y + reference.height / 2 - floating.height / 2;
3243    const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
3244    let coords;
3245    switch (side) {
3246      case "top":
3247        coords = {
3248          x: commonX,
3249          y: reference.y - floating.height
3250        };
3251        break;
3252      case "bottom":
3253        coords = {
3254          x: commonX,
3255          y: reference.y + reference.height
3256        };
3257        break;
3258      case "right":
3259        coords = {
3260          x: reference.x + reference.width,
3261          y: commonY
3262        };
3263        break;
3264      case "left":
3265        coords = {
3266          x: reference.x - floating.width,
3267          y: commonY
3268        };
3269        break;
3270      default:
3271        coords = {
3272          x: reference.x,
3273          y: reference.y
3274        };
3275    }
3276    switch (getAlignment(placement)) {
3277      case "start":
3278        coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
3279        break;
3280      case "end":
3281        coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
3282        break;
3283    }
3284    return coords;
3285  }
3286  async function detectOverflow(state, options) {
3287    var _await$platform$isEle;
3288    if (options === void 0) {
3289      options = {};
3290    }
3291    const {
3292      x,
3293      y,
3294      platform: platform3,
3295      rects,
3296      elements,
3297      strategy
3298    } = state;
3299    const {
3300      boundary = "clippingAncestors",
3301      rootBoundary = "viewport",
3302      elementContext = "floating",
3303      altBoundary = false,
3304      padding = 0
3305    } = evaluate(options, state);
3306    const paddingObject = getPaddingObject(padding);
3307    const altContext = elementContext === "floating" ? "reference" : "floating";
3308    const element = elements[altBoundary ? altContext : elementContext];
3309    const clippingClientRect = rectToClientRect(await platform3.getClippingRect({
3310      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)),
3311      boundary,
3312      rootBoundary,
3313      strategy
3314    }));
3315    const rect = elementContext === "floating" ? {
3316      x,
3317      y,
3318      width: rects.floating.width,
3319      height: rects.floating.height
3320    } : rects.reference;
3321    const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements.floating));
3322    const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) ? await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || {
3323      x: 1,
3324      y: 1
3325    } : {
3326      x: 1,
3327      y: 1
3328    };
3329    const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({
3330      elements,
3331      rect,
3332      offsetParent,
3333      strategy
3334    }) : rect);
3335    return {
3336      top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
3337      bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
3338      left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
3339      right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
3340    };
3341  }
3342  var MAX_RESET_COUNT = 50;
3343  var computePosition = async (reference, floating, config) => {
3344    const {
3345      placement = "bottom",
3346      strategy = "absolute",
3347      middleware = [],
3348      platform: platform3
3349    } = config;
3350    const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : {
3351      ...platform3,
3352      detectOverflow
3353    };
3354    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating));
3355    let rects = await platform3.getElementRects({
3356      reference,
3357      floating,
3358      strategy
3359    });
3360    let {
3361      x,
3362      y
3363    } = computeCoordsFromPlacement(rects, placement, rtl);
3364    let statefulPlacement = placement;
3365    let resetCount = 0;
3366    const middlewareData = {};
3367    for (let i = 0; i < middleware.length; i++) {
3368      const currentMiddleware = middleware[i];
3369      if (!currentMiddleware) {
3370        continue;
3371      }
3372      const {
3373        name,
3374        fn
3375      } = currentMiddleware;
3376      const {
3377        x: nextX,
3378        y: nextY,
3379        data,
3380        reset
3381      } = await fn({
3382        x,
3383        y,
3384        initialPlacement: placement,
3385        placement: statefulPlacement,
3386        strategy,
3387        middlewareData,
3388        rects,
3389        platform: platformWithDetectOverflow,
3390        elements: {
3391          reference,
3392          floating
3393        }
3394      });
3395      x = nextX != null ? nextX : x;
3396      y = nextY != null ? nextY : y;
3397      middlewareData[name] = {
3398        ...middlewareData[name],
3399        ...data
3400      };
3401      if (reset && resetCount < MAX_RESET_COUNT) {
3402        resetCount++;
3403        if (typeof reset === "object") {
3404          if (reset.placement) {
3405            statefulPlacement = reset.placement;
3406          }
3407          if (reset.rects) {
3408            rects = reset.rects === true ? await platform3.getElementRects({
3409              reference,
3410              floating,
3411              strategy
3412            }) : reset.rects;
3413          }
3414          ({
3415            x,
3416            y
3417          } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
3418        }
3419        i = -1;
3420      }
3421    }
3422    return {
3423      x,
3424      y,
3425      placement: statefulPlacement,
3426      strategy,
3427      middlewareData
3428    };
3429  };
3430  var flip = function(options) {
3431    if (options === void 0) {
3432      options = {};
3433    }
3434    return {
3435      name: "flip",
3436      options,
3437      async fn(state) {
3438        var _middlewareData$arrow, _middlewareData$flip;
3439        const {
3440          placement,
3441          middlewareData,
3442          rects,
3443          initialPlacement,
3444          platform: platform3,
3445          elements
3446        } = state;
3447        const {
3448          mainAxis: checkMainAxis = true,
3449          crossAxis: checkCrossAxis = true,
3450          fallbackPlacements: specifiedFallbackPlacements,
3451          fallbackStrategy = "bestFit",
3452          fallbackAxisSideDirection = "none",
3453          flipAlignment = true,
3454          ...detectOverflowOptions
3455        } = evaluate(options, state);
3456        if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3457          return {};
3458        }
3459        const side = getSide(placement);
3460        const initialSideAxis = getSideAxis(initialPlacement);
3461        const isBasePlacement = getSide(initialPlacement) === initialPlacement;
3462        const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
3463        const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
3464        const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
3465        if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
3466          fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
3467        }
3468        const placements2 = [initialPlacement, ...fallbackPlacements];
3469        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3470        const overflows = [];
3471        let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
3472        if (checkMainAxis) {
3473          overflows.push(overflow[side]);
3474        }
3475        if (checkCrossAxis) {
3476          const sides2 = getAlignmentSides(placement, rects, rtl);
3477          overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
3478        }
3479        overflowsData = [...overflowsData, {
3480          placement,
3481          overflows
3482        }];
3483        if (!overflows.every((side2) => side2 <= 0)) {
3484          var _middlewareData$flip2, _overflowsData$filter;
3485          const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
3486          const nextPlacement = placements2[nextIndex];
3487          if (nextPlacement) {
3488            const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
3489            if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
3490            // overflows the main axis.
3491            overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
3492              return {
3493                data: {
3494                  index: nextIndex,
3495                  overflows: overflowsData
3496                },
3497                reset: {
3498                  placement: nextPlacement
3499                }
3500              };
3501            }
3502          }
3503          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;
3504          if (!resetPlacement) {
3505            switch (fallbackStrategy) {
3506              case "bestFit": {
3507                var _overflowsData$filter2;
3508                const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
3509                  if (hasFallbackAxisSideDirection) {
3510                    const currentSideAxis = getSideAxis(d.placement);
3511                    return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
3512                    // reading directions favoring greater width.
3513                    currentSideAxis === "y";
3514                  }
3515                  return true;
3516                }).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];
3517                if (placement2) {
3518                  resetPlacement = placement2;
3519                }
3520                break;
3521              }
3522              case "initialPlacement":
3523                resetPlacement = initialPlacement;
3524                break;
3525            }
3526          }
3527          if (placement !== resetPlacement) {
3528            return {
3529              reset: {
3530                placement: resetPlacement
3531              }
3532            };
3533          }
3534        }
3535        return {};
3536      }
3537    };
3538  };
3539  function getSideOffsets(overflow, rect) {
3540    return {
3541      top: overflow.top - rect.height,
3542      right: overflow.right - rect.width,
3543      bottom: overflow.bottom - rect.height,
3544      left: overflow.left - rect.width
3545    };
3546  }
3547  function isAnySideFullyClipped(overflow) {
3548    return sides.some((side) => overflow[side] >= 0);
3549  }
3550  var hide = function(options) {
3551    if (options === void 0) {
3552      options = {};
3553    }
3554    return {
3555      name: "hide",
3556      options,
3557      async fn(state) {
3558        const {
3559          rects,
3560          platform: platform3
3561        } = state;
3562        const {
3563          strategy = "referenceHidden",
3564          ...detectOverflowOptions
3565        } = evaluate(options, state);
3566        switch (strategy) {
3567          case "referenceHidden": {
3568            const overflow = await platform3.detectOverflow(state, {
3569              ...detectOverflowOptions,
3570              elementContext: "reference"
3571            });
3572            const offsets = getSideOffsets(overflow, rects.reference);
3573            return {
3574              data: {
3575                referenceHiddenOffsets: offsets,
3576                referenceHidden: isAnySideFullyClipped(offsets)
3577              }
3578            };
3579          }
3580          case "escaped": {
3581            const overflow = await platform3.detectOverflow(state, {
3582              ...detectOverflowOptions,
3583              altBoundary: true
3584            });
3585            const offsets = getSideOffsets(overflow, rects.floating);
3586            return {
3587              data: {
3588                escapedOffsets: offsets,
3589                escaped: isAnySideFullyClipped(offsets)
3590              }
3591            };
3592          }
3593          default: {
3594            return {};
3595          }
3596        }
3597      }
3598    };
3599  };
3600  var originSides = /* @__PURE__ */ new Set(["left", "top"]);
3601  async function convertValueToCoords(state, options) {
3602    const {
3603      placement,
3604      platform: platform3,
3605      elements
3606    } = state;
3607    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating));
3608    const side = getSide(placement);
3609    const alignment = getAlignment(placement);
3610    const isVertical = getSideAxis(placement) === "y";
3611    const mainAxisMulti = originSides.has(side) ? -1 : 1;
3612    const crossAxisMulti = rtl && isVertical ? -1 : 1;
3613    const rawValue = evaluate(options, state);
3614    let {
3615      mainAxis,
3616      crossAxis,
3617      alignmentAxis
3618    } = typeof rawValue === "number" ? {
3619      mainAxis: rawValue,
3620      crossAxis: 0,
3621      alignmentAxis: null
3622    } : {
3623      mainAxis: rawValue.mainAxis || 0,
3624      crossAxis: rawValue.crossAxis || 0,
3625      alignmentAxis: rawValue.alignmentAxis
3626    };
3627    if (alignment && typeof alignmentAxis === "number") {
3628      crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
3629    }
3630    return isVertical ? {
3631      x: crossAxis * crossAxisMulti,
3632      y: mainAxis * mainAxisMulti
3633    } : {
3634      x: mainAxis * mainAxisMulti,
3635      y: crossAxis * crossAxisMulti
3636    };
3637  }
3638  var offset = function(options) {
3639    if (options === void 0) {
3640      options = 0;
3641    }
3642    return {
3643      name: "offset",
3644      options,
3645      async fn(state) {
3646        var _middlewareData$offse, _middlewareData$arrow;
3647        const {
3648          x,
3649          y,
3650          placement,
3651          middlewareData
3652        } = state;
3653        const diffCoords = await convertValueToCoords(state, options);
3654        if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3655          return {};
3656        }
3657        return {
3658          x: x + diffCoords.x,
3659          y: y + diffCoords.y,
3660          data: {
3661            ...diffCoords,
3662            placement
3663          }
3664        };
3665      }
3666    };
3667  };
3668  var shift = function(options) {
3669    if (options === void 0) {
3670      options = {};
3671    }
3672    return {
3673      name: "shift",
3674      options,
3675      async fn(state) {
3676        const {
3677          x,
3678          y,
3679          placement,
3680          platform: platform3
3681        } = state;
3682        const {
3683          mainAxis: checkMainAxis = true,
3684          crossAxis: checkCrossAxis = false,
3685          limiter = {
3686            fn: (_ref) => {
3687              let {
3688                x: x2,
3689                y: y2
3690              } = _ref;
3691              return {
3692                x: x2,
3693                y: y2
3694              };
3695            }
3696          },
3697          ...detectOverflowOptions
3698        } = evaluate(options, state);
3699        const coords = {
3700          x,
3701          y
3702        };
3703        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3704        const crossAxis = getSideAxis(getSide(placement));
3705        const mainAxis = getOppositeAxis(crossAxis);
3706        let mainAxisCoord = coords[mainAxis];
3707        let crossAxisCoord = coords[crossAxis];
3708        if (checkMainAxis) {
3709          const minSide = mainAxis === "y" ? "top" : "left";
3710          const maxSide = mainAxis === "y" ? "bottom" : "right";
3711          const min2 = mainAxisCoord + overflow[minSide];
3712          const max2 = mainAxisCoord - overflow[maxSide];
3713          mainAxisCoord = clamp(min2, mainAxisCoord, max2);
3714        }
3715        if (checkCrossAxis) {
3716          const minSide = crossAxis === "y" ? "top" : "left";
3717          const maxSide = crossAxis === "y" ? "bottom" : "right";
3718          const min2 = crossAxisCoord + overflow[minSide];
3719          const max2 = crossAxisCoord - overflow[maxSide];
3720          crossAxisCoord = clamp(min2, crossAxisCoord, max2);
3721        }
3722        const limitedCoords = limiter.fn({
3723          ...state,
3724          [mainAxis]: mainAxisCoord,
3725          [crossAxis]: crossAxisCoord
3726        });
3727        return {
3728          ...limitedCoords,
3729          data: {
3730            x: limitedCoords.x - x,
3731            y: limitedCoords.y - y,
3732            enabled: {
3733              [mainAxis]: checkMainAxis,
3734              [crossAxis]: checkCrossAxis
3735            }
3736          }
3737        };
3738      }
3739    };
3740  };
3741  var limitShift = function(options) {
3742    if (options === void 0) {
3743      options = {};
3744    }
3745    return {
3746      options,
3747      fn(state) {
3748        const {
3749          x,
3750          y,
3751          placement,
3752          rects,
3753          middlewareData
3754        } = state;
3755        const {
3756          offset: offset4 = 0,
3757          mainAxis: checkMainAxis = true,
3758          crossAxis: checkCrossAxis = true
3759        } = evaluate(options, state);
3760        const coords = {
3761          x,
3762          y
3763        };
3764        const crossAxis = getSideAxis(placement);
3765        const mainAxis = getOppositeAxis(crossAxis);
3766        let mainAxisCoord = coords[mainAxis];
3767        let crossAxisCoord = coords[crossAxis];
3768        const rawOffset = evaluate(offset4, state);
3769        const computedOffset = typeof rawOffset === "number" ? {
3770          mainAxis: rawOffset,
3771          crossAxis: 0
3772        } : {
3773          mainAxis: 0,
3774          crossAxis: 0,
3775          ...rawOffset
3776        };
3777        if (checkMainAxis) {
3778          const len = mainAxis === "y" ? "height" : "width";
3779          const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
3780          const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
3781          if (mainAxisCoord < limitMin) {
3782            mainAxisCoord = limitMin;
3783          } else if (mainAxisCoord > limitMax) {
3784            mainAxisCoord = limitMax;
3785          }
3786        }
3787        if (checkCrossAxis) {
3788          var _middlewareData$offse, _middlewareData$offse2;
3789          const len = mainAxis === "y" ? "width" : "height";
3790          const isOriginSide = originSides.has(getSide(placement));
3791          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);
3792          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);
3793          if (crossAxisCoord < limitMin) {
3794            crossAxisCoord = limitMin;
3795          } else if (crossAxisCoord > limitMax) {
3796            crossAxisCoord = limitMax;
3797          }
3798        }
3799        return {
3800          [mainAxis]: mainAxisCoord,
3801          [crossAxis]: crossAxisCoord
3802        };
3803      }
3804    };
3805  };
3806  var size = function(options) {
3807    if (options === void 0) {
3808      options = {};
3809    }
3810    return {
3811      name: "size",
3812      options,
3813      async fn(state) {
3814        var _state$middlewareData, _state$middlewareData2;
3815        const {
3816          placement,
3817          rects,
3818          platform: platform3,
3819          elements
3820        } = state;
3821        const {
3822          apply = () => {
3823          },
3824          ...detectOverflowOptions
3825        } = evaluate(options, state);
3826        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3827        const side = getSide(placement);
3828        const alignment = getAlignment(placement);
3829        const isYAxis = getSideAxis(placement) === "y";
3830        const {
3831          width,
3832          height
3833        } = rects.floating;
3834        let heightSide;
3835        let widthSide;
3836        if (side === "top" || side === "bottom") {
3837          heightSide = side;
3838          widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
3839        } else {
3840          widthSide = side;
3841          heightSide = alignment === "end" ? "top" : "bottom";
3842        }
3843        const maximumClippingHeight = height - overflow.top - overflow.bottom;
3844        const maximumClippingWidth = width - overflow.left - overflow.right;
3845        const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
3846        const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
3847        const noShift = !state.middlewareData.shift;
3848        let availableHeight = overflowAvailableHeight;
3849        let availableWidth = overflowAvailableWidth;
3850        if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
3851          availableWidth = maximumClippingWidth;
3852        }
3853        if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
3854          availableHeight = maximumClippingHeight;
3855        }
3856        if (noShift && !alignment) {
3857          const xMin = max(overflow.left, 0);
3858          const xMax = max(overflow.right, 0);
3859          const yMin = max(overflow.top, 0);
3860          const yMax = max(overflow.bottom, 0);
3861          if (isYAxis) {
3862            availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
3863          } else {
3864            availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
3865          }
3866        }
3867        await apply({
3868          ...state,
3869          availableWidth,
3870          availableHeight
3871        });
3872        const nextDimensions = await platform3.getDimensions(elements.floating);
3873        if (width !== nextDimensions.width || height !== nextDimensions.height) {
3874          return {
3875            reset: {
3876              rects: true
3877            }
3878          };
3879        }
3880        return {};
3881      }
3882    };
3883  };
3884  
3885  // node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
3886  function getCssDimensions(element) {
3887    const css = getComputedStyle2(element);
3888    let width = parseFloat(css.width) || 0;
3889    let height = parseFloat(css.height) || 0;
3890    const hasOffset = isHTMLElement(element);
3891    const offsetWidth = hasOffset ? element.offsetWidth : width;
3892    const offsetHeight = hasOffset ? element.offsetHeight : height;
3893    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
3894    if (shouldFallback) {
3895      width = offsetWidth;
3896      height = offsetHeight;
3897    }
3898    return {
3899      width,
3900      height,
3901      $: shouldFallback
3902    };
3903  }
3904  function unwrapElement(element) {
3905    return !isElement(element) ? element.contextElement : element;
3906  }
3907  function getScale(element) {
3908    const domElement = unwrapElement(element);
3909    if (!isHTMLElement(domElement)) {
3910      return createCoords(1);
3911    }
3912    const rect = domElement.getBoundingClientRect();
3913    const {
3914      width,
3915      height,
3916      $
3917    } = getCssDimensions(domElement);
3918    let x = ($ ? round(rect.width) : rect.width) / width;
3919    let y = ($ ? round(rect.height) : rect.height) / height;
3920    if (!x || !Number.isFinite(x)) {
3921      x = 1;
3922    }
3923    if (!y || !Number.isFinite(y)) {
3924      y = 1;
3925    }
3926    return {
3927      x,
3928      y
3929    };
3930  }
3931  var noOffsets = /* @__PURE__ */ createCoords(0);
3932  function getVisualOffsets(element) {
3933    const win = getWindow(element);
3934    if (!isWebKit() || !win.visualViewport) {
3935      return noOffsets;
3936    }
3937    return {
3938      x: win.visualViewport.offsetLeft,
3939      y: win.visualViewport.offsetTop
3940    };
3941  }
3942  function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
3943    if (isFixed === void 0) {
3944      isFixed = false;
3945    }
3946    if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
3947      return false;
3948    }
3949    return isFixed;
3950  }
3951  function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
3952    if (includeScale === void 0) {
3953      includeScale = false;
3954    }
3955    if (isFixedStrategy === void 0) {
3956      isFixedStrategy = false;
3957    }
3958    const clientRect = element.getBoundingClientRect();
3959    const domElement = unwrapElement(element);
3960    let scale = createCoords(1);
3961    if (includeScale) {
3962      if (offsetParent) {
3963        if (isElement(offsetParent)) {
3964          scale = getScale(offsetParent);
3965        }
3966      } else {
3967        scale = getScale(element);
3968      }
3969    }
3970    const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
3971    let x = (clientRect.left + visualOffsets.x) / scale.x;
3972    let y = (clientRect.top + visualOffsets.y) / scale.y;
3973    let width = clientRect.width / scale.x;
3974    let height = clientRect.height / scale.y;
3975    if (domElement) {
3976      const win = getWindow(domElement);
3977      const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
3978      let currentWin = win;
3979      let currentIFrame = getFrameElement(currentWin);
3980      while (currentIFrame && offsetParent && offsetWin !== currentWin) {
3981        const iframeScale = getScale(currentIFrame);
3982        const iframeRect = currentIFrame.getBoundingClientRect();
3983        const css = getComputedStyle2(currentIFrame);
3984        const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
3985        const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
3986        x *= iframeScale.x;
3987        y *= iframeScale.y;
3988        width *= iframeScale.x;
3989        height *= iframeScale.y;
3990        x += left;
3991        y += top;
3992        currentWin = getWindow(currentIFrame);
3993        currentIFrame = getFrameElement(currentWin);
3994      }
3995    }
3996    return rectToClientRect({
3997      width,
3998      height,
3999      x,
4000      y
4001    });
4002  }
4003  function getWindowScrollBarX(element, rect) {
4004    const leftScroll = getNodeScroll(element).scrollLeft;
4005    if (!rect) {
4006      return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
4007    }
4008    return rect.left + leftScroll;
4009  }
4010  function getHTMLOffset(documentElement, scroll) {
4011    const htmlRect = documentElement.getBoundingClientRect();
4012    const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
4013    const y = htmlRect.top + scroll.scrollTop;
4014    return {
4015      x,
4016      y
4017    };
4018  }
4019  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
4020    let {
4021      elements,
4022      rect,
4023      offsetParent,
4024      strategy
4025    } = _ref;
4026    const isFixed = strategy === "fixed";
4027    const documentElement = getDocumentElement(offsetParent);
4028    const topLayer = elements ? isTopLayer(elements.floating) : false;
4029    if (offsetParent === documentElement || topLayer && isFixed) {
4030      return rect;
4031    }
4032    let scroll = {
4033      scrollLeft: 0,
4034      scrollTop: 0
4035    };
4036    let scale = createCoords(1);
4037    const offsets = createCoords(0);
4038    const isOffsetParentAnElement = isHTMLElement(offsetParent);
4039    if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
4040      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
4041        scroll = getNodeScroll(offsetParent);
4042      }
4043      if (isOffsetParentAnElement) {
4044        const offsetRect = getBoundingClientRect(offsetParent);
4045        scale = getScale(offsetParent);
4046        offsets.x = offsetRect.x + offsetParent.clientLeft;
4047        offsets.y = offsetRect.y + offsetParent.clientTop;
4048      }
4049    }
4050    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4051    return {
4052      width: rect.width * scale.x,
4053      height: rect.height * scale.y,
4054      x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
4055      y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
4056    };
4057  }
4058  function getClientRects(element) {
4059    return Array.from(element.getClientRects());
4060  }
4061  function getDocumentRect(element) {
4062    const html = getDocumentElement(element);
4063    const scroll = getNodeScroll(element);
4064    const body = element.ownerDocument.body;
4065    const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
4066    const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
4067    let x = -scroll.scrollLeft + getWindowScrollBarX(element);
4068    const y = -scroll.scrollTop;
4069    if (getComputedStyle2(body).direction === "rtl") {
4070      x += max(html.clientWidth, body.clientWidth) - width;
4071    }
4072    return {
4073      width,
4074      height,
4075      x,
4076      y
4077    };
4078  }
4079  var SCROLLBAR_MAX = 25;
4080  function getViewportRect(element, strategy) {
4081    const win = getWindow(element);
4082    const html = getDocumentElement(element);
4083    const visualViewport = win.visualViewport;
4084    let width = html.clientWidth;
4085    let height = html.clientHeight;
4086    let x = 0;
4087    let y = 0;
4088    if (visualViewport) {
4089      width = visualViewport.width;
4090      height = visualViewport.height;
4091      const visualViewportBased = isWebKit();
4092      if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
4093        x = visualViewport.offsetLeft;
4094        y = visualViewport.offsetTop;
4095      }
4096    }
4097    const windowScrollbarX = getWindowScrollBarX(html);
4098    if (windowScrollbarX <= 0) {
4099      const doc = html.ownerDocument;
4100      const body = doc.body;
4101      const bodyStyles = getComputedStyle(body);
4102      const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
4103      const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
4104      if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
4105        width -= clippingStableScrollbarWidth;
4106      }
4107    } else if (windowScrollbarX <= SCROLLBAR_MAX) {
4108      width += windowScrollbarX;
4109    }
4110    return {
4111      width,
4112      height,
4113      x,
4114      y
4115    };
4116  }
4117  function getInnerBoundingClientRect(element, strategy) {
4118    const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
4119    const top = clientRect.top + element.clientTop;
4120    const left = clientRect.left + element.clientLeft;
4121    const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
4122    const width = element.clientWidth * scale.x;
4123    const height = element.clientHeight * scale.y;
4124    const x = left * scale.x;
4125    const y = top * scale.y;
4126    return {
4127      width,
4128      height,
4129      x,
4130      y
4131    };
4132  }
4133  function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
4134    let rect;
4135    if (clippingAncestor === "viewport") {
4136      rect = getViewportRect(element, strategy);
4137    } else if (clippingAncestor === "document") {
4138      rect = getDocumentRect(getDocumentElement(element));
4139    } else if (isElement(clippingAncestor)) {
4140      rect = getInnerBoundingClientRect(clippingAncestor, strategy);
4141    } else {
4142      const visualOffsets = getVisualOffsets(element);
4143      rect = {
4144        x: clippingAncestor.x - visualOffsets.x,
4145        y: clippingAncestor.y - visualOffsets.y,
4146        width: clippingAncestor.width,
4147        height: clippingAncestor.height
4148      };
4149    }
4150    return rectToClientRect(rect);
4151  }
4152  function hasFixedPositionAncestor(element, stopNode) {
4153    const parentNode = getParentNode(element);
4154    if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
4155      return false;
4156    }
4157    return getComputedStyle2(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
4158  }
4159  function getClippingElementAncestors(element, cache) {
4160    const cachedResult = cache.get(element);
4161    if (cachedResult) {
4162      return cachedResult;
4163    }
4164    let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
4165    let currentContainingBlockComputedStyle = null;
4166    const elementIsFixed = getComputedStyle2(element).position === "fixed";
4167    let currentNode = elementIsFixed ? getParentNode(element) : element;
4168    while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
4169      const computedStyle = getComputedStyle2(currentNode);
4170      const currentNodeIsContaining = isContainingBlock(currentNode);
4171      if (!currentNodeIsContaining && computedStyle.position === "fixed") {
4172        currentContainingBlockComputedStyle = null;
4173      }
4174      const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
4175      if (shouldDropCurrentNode) {
4176        result = result.filter((ancestor) => ancestor !== currentNode);
4177      } else {
4178        currentContainingBlockComputedStyle = computedStyle;
4179      }
4180      currentNode = getParentNode(currentNode);
4181    }
4182    cache.set(element, result);
4183    return result;
4184  }
4185  function getClippingRect(_ref) {
4186    let {
4187      element,
4188      boundary,
4189      rootBoundary,
4190      strategy
4191    } = _ref;
4192    const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
4193    const clippingAncestors = [...elementClippingAncestors, rootBoundary];
4194    const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
4195    let top = firstRect.top;
4196    let right = firstRect.right;
4197    let bottom = firstRect.bottom;
4198    let left = firstRect.left;
4199    for (let i = 1; i < clippingAncestors.length; i++) {
4200      const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
4201      top = max(rect.top, top);
4202      right = min(rect.right, right);
4203      bottom = min(rect.bottom, bottom);
4204      left = max(rect.left, left);
4205    }
4206    return {
4207      width: right - left,
4208      height: bottom - top,
4209      x: left,
4210      y: top
4211    };
4212  }
4213  function getDimensions(element) {
4214    const {
4215      width,
4216      height
4217    } = getCssDimensions(element);
4218    return {
4219      width,
4220      height
4221    };
4222  }
4223  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
4224    const isOffsetParentAnElement = isHTMLElement(offsetParent);
4225    const documentElement = getDocumentElement(offsetParent);
4226    const isFixed = strategy === "fixed";
4227    const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
4228    let scroll = {
4229      scrollLeft: 0,
4230      scrollTop: 0
4231    };
4232    const offsets = createCoords(0);
4233    function setLeftRTLScrollbarOffset() {
4234      offsets.x = getWindowScrollBarX(documentElement);
4235    }
4236    if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
4237      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
4238        scroll = getNodeScroll(offsetParent);
4239      }
4240      if (isOffsetParentAnElement) {
4241        const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
4242        offsets.x = offsetRect.x + offsetParent.clientLeft;
4243        offsets.y = offsetRect.y + offsetParent.clientTop;
4244      } else if (documentElement) {
4245        setLeftRTLScrollbarOffset();
4246      }
4247    }
4248    if (isFixed && !isOffsetParentAnElement && documentElement) {
4249      setLeftRTLScrollbarOffset();
4250    }
4251    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4252    const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
4253    const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
4254    return {
4255      x,
4256      y,
4257      width: rect.width,
4258      height: rect.height
4259    };
4260  }
4261  function isStaticPositioned(element) {
4262    return getComputedStyle2(element).position === "static";
4263  }
4264  function getTrueOffsetParent(element, polyfill) {
4265    if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
4266      return null;
4267    }
4268    if (polyfill) {
4269      return polyfill(element);
4270    }
4271    let rawOffsetParent = element.offsetParent;
4272    if (getDocumentElement(element) === rawOffsetParent) {
4273      rawOffsetParent = rawOffsetParent.ownerDocument.body;
4274    }
4275    return rawOffsetParent;
4276  }
4277  function getOffsetParent(element, polyfill) {
4278    const win = getWindow(element);
4279    if (isTopLayer(element)) {
4280      return win;
4281    }
4282    if (!isHTMLElement(element)) {
4283      let svgOffsetParent = getParentNode(element);
4284      while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
4285        if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
4286          return svgOffsetParent;
4287        }
4288        svgOffsetParent = getParentNode(svgOffsetParent);
4289      }
4290      return win;
4291    }
4292    let offsetParent = getTrueOffsetParent(element, polyfill);
4293    while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
4294      offsetParent = getTrueOffsetParent(offsetParent, polyfill);
4295    }
4296    if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
4297      return win;
4298    }
4299    return offsetParent || getContainingBlock(element) || win;
4300  }
4301  var getElementRects = async function(data) {
4302    const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
4303    const getDimensionsFn = this.getDimensions;
4304    const floatingDimensions = await getDimensionsFn(data.floating);
4305    return {
4306      reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
4307      floating: {
4308        x: 0,
4309        y: 0,
4310        width: floatingDimensions.width,
4311        height: floatingDimensions.height
4312      }
4313    };
4314  };
4315  function isRTL(element) {
4316    return getComputedStyle2(element).direction === "rtl";
4317  }
4318  var platform2 = {
4319    convertOffsetParentRelativeRectToViewportRelativeRect,
4320    getDocumentElement,
4321    getClippingRect,
4322    getOffsetParent,
4323    getElementRects,
4324    getClientRects,
4325    getDimensions,
4326    getScale,
4327    isElement,
4328    isRTL
4329  };
4330  function rectsAreEqual(a, b) {
4331    return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
4332  }
4333  function observeMove(element, onMove) {
4334    let io = null;
4335    let timeoutId;
4336    const root = getDocumentElement(element);
4337    function cleanup() {
4338      var _io;
4339      clearTimeout(timeoutId);
4340      (_io = io) == null || _io.disconnect();
4341      io = null;
4342    }
4343    function refresh(skip, threshold) {
4344      if (skip === void 0) {
4345        skip = false;
4346      }
4347      if (threshold === void 0) {
4348        threshold = 1;
4349      }
4350      cleanup();
4351      const elementRectForRootMargin = element.getBoundingClientRect();
4352      const {
4353        left,
4354        top,
4355        width,
4356        height
4357      } = elementRectForRootMargin;
4358      if (!skip) {
4359        onMove();
4360      }
4361      if (!width || !height) {
4362        return;
4363      }
4364      const insetTop = floor(top);
4365      const insetRight = floor(root.clientWidth - (left + width));
4366      const insetBottom = floor(root.clientHeight - (top + height));
4367      const insetLeft = floor(left);
4368      const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
4369      const options = {
4370        rootMargin,
4371        threshold: max(0, min(1, threshold)) || 1
4372      };
4373      let isFirstUpdate = true;
4374      function handleObserve(entries) {
4375        const ratio = entries[0].intersectionRatio;
4376        if (ratio !== threshold) {
4377          if (!isFirstUpdate) {
4378            return refresh();
4379          }
4380          if (!ratio) {
4381            timeoutId = setTimeout(() => {
4382              refresh(false, 1e-7);
4383            }, 1e3);
4384          } else {
4385            refresh(false, ratio);
4386          }
4387        }
4388        if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
4389          refresh();
4390        }
4391        isFirstUpdate = false;
4392      }
4393      try {
4394        io = new IntersectionObserver(handleObserve, {
4395          ...options,
4396          // Handle <iframe>s
4397          root: root.ownerDocument
4398        });
4399      } catch (_e) {
4400        io = new IntersectionObserver(handleObserve, options);
4401      }
4402      io.observe(element);
4403    }
4404    refresh(true);
4405    return cleanup;
4406  }
4407  function autoUpdate(reference, floating, update2, options) {
4408    if (options === void 0) {
4409      options = {};
4410    }
4411    const {
4412      ancestorScroll = true,
4413      ancestorResize = true,
4414      elementResize = typeof ResizeObserver === "function",
4415      layoutShift = typeof IntersectionObserver === "function",
4416      animationFrame = false
4417    } = options;
4418    const referenceEl = unwrapElement(reference);
4419    const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
4420    ancestors.forEach((ancestor) => {
4421      ancestorScroll && ancestor.addEventListener("scroll", update2, {
4422        passive: true
4423      });
4424      ancestorResize && ancestor.addEventListener("resize", update2);
4425    });
4426    const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2) : null;
4427    let reobserveFrame = -1;
4428    let resizeObserver = null;
4429    if (elementResize) {
4430      resizeObserver = new ResizeObserver((_ref) => {
4431        let [firstEntry] = _ref;
4432        if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
4433          resizeObserver.unobserve(floating);
4434          cancelAnimationFrame(reobserveFrame);
4435          reobserveFrame = requestAnimationFrame(() => {
4436            var _resizeObserver;
4437            (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
4438          });
4439        }
4440        update2();
4441      });
4442      if (referenceEl && !animationFrame) {
4443        resizeObserver.observe(referenceEl);
4444      }
4445      if (floating) {
4446        resizeObserver.observe(floating);
4447      }
4448    }
4449    let frameId;
4450    let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
4451    if (animationFrame) {
4452      frameLoop();
4453    }
4454    function frameLoop() {
4455      const nextRefRect = getBoundingClientRect(reference);
4456      if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
4457        update2();
4458      }
4459      prevRefRect = nextRefRect;
4460      frameId = requestAnimationFrame(frameLoop);
4461    }
4462    update2();
4463    return () => {
4464      var _resizeObserver2;
4465      ancestors.forEach((ancestor) => {
4466        ancestorScroll && ancestor.removeEventListener("scroll", update2);
4467        ancestorResize && ancestor.removeEventListener("resize", update2);
4468      });
4469      cleanupIo == null || cleanupIo();
4470      (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
4471      resizeObserver = null;
4472      if (animationFrame) {
4473        cancelAnimationFrame(frameId);
4474      }
4475    };
4476  }
4477  var offset2 = offset;
4478  var shift2 = shift;
4479  var flip2 = flip;
4480  var size2 = size;
4481  var hide2 = hide;
4482  var limitShift2 = limitShift;
4483  var computePosition2 = (reference, floating, options) => {
4484    const cache = /* @__PURE__ */ new Map();
4485    const mergedOptions = {
4486      platform: platform2,
4487      ...options
4488    };
4489    const platformWithCache = {
4490      ...mergedOptions.platform,
4491      _c: cache
4492    };
4493    return computePosition(reference, floating, {
4494      ...mergedOptions,
4495      platform: platformWithCache
4496    });
4497  };
4498  
4499  // node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
4500  var React23 = __toESM(require_react(), 1);
4501  var import_react2 = __toESM(require_react(), 1);
4502  var ReactDOM3 = __toESM(require_react_dom(), 1);
4503  var isClient = typeof document !== "undefined";
4504  var noop2 = function noop3() {
4505  };
4506  var index = isClient ? import_react2.useLayoutEffect : noop2;
4507  function deepEqual(a, b) {
4508    if (a === b) {
4509      return true;
4510    }
4511    if (typeof a !== typeof b) {
4512      return false;
4513    }
4514    if (typeof a === "function" && a.toString() === b.toString()) {
4515      return true;
4516    }
4517    let length;
4518    let i;
4519    let keys;
4520    if (a && b && typeof a === "object") {
4521      if (Array.isArray(a)) {
4522        length = a.length;
4523        if (length !== b.length) return false;
4524        for (i = length; i-- !== 0; ) {
4525          if (!deepEqual(a[i], b[i])) {
4526            return false;
4527          }
4528        }
4529        return true;
4530      }
4531      keys = Object.keys(a);
4532      length = keys.length;
4533      if (length !== Object.keys(b).length) {
4534        return false;
4535      }
4536      for (i = length; i-- !== 0; ) {
4537        if (!{}.hasOwnProperty.call(b, keys[i])) {
4538          return false;
4539        }
4540      }
4541      for (i = length; i-- !== 0; ) {
4542        const key = keys[i];
4543        if (key === "_owner" && a.$$typeof) {
4544          continue;
4545        }
4546        if (!deepEqual(a[key], b[key])) {
4547          return false;
4548        }
4549      }
4550      return true;
4551    }
4552    return a !== a && b !== b;
4553  }
4554  function getDPR(element) {
4555    if (typeof window === "undefined") {
4556      return 1;
4557    }
4558    const win = element.ownerDocument.defaultView || window;
4559    return win.devicePixelRatio || 1;
4560  }
4561  function roundByDPR(element, value) {
4562    const dpr = getDPR(element);
4563    return Math.round(value * dpr) / dpr;
4564  }
4565  function useLatestRef(value) {
4566    const ref = React23.useRef(value);
4567    index(() => {
4568      ref.current = value;
4569    });
4570    return ref;
4571  }
4572  function useFloating(options) {
4573    if (options === void 0) {
4574      options = {};
4575    }
4576    const {
4577      placement = "bottom",
4578      strategy = "absolute",
4579      middleware = [],
4580      platform: platform3,
4581      elements: {
4582        reference: externalReference,
4583        floating: externalFloating
4584      } = {},
4585      transform = true,
4586      whileElementsMounted,
4587      open
4588    } = options;
4589    const [data, setData] = React23.useState({
4590      x: 0,
4591      y: 0,
4592      strategy,
4593      placement,
4594      middlewareData: {},
4595      isPositioned: false
4596    });
4597    const [latestMiddleware, setLatestMiddleware] = React23.useState(middleware);
4598    if (!deepEqual(latestMiddleware, middleware)) {
4599      setLatestMiddleware(middleware);
4600    }
4601    const [_reference, _setReference] = React23.useState(null);
4602    const [_floating, _setFloating] = React23.useState(null);
4603    const setReference = React23.useCallback((node) => {
4604      if (node !== referenceRef.current) {
4605        referenceRef.current = node;
4606        _setReference(node);
4607      }
4608    }, []);
4609    const setFloating = React23.useCallback((node) => {
4610      if (node !== floatingRef.current) {
4611        floatingRef.current = node;
4612        _setFloating(node);
4613      }
4614    }, []);
4615    const referenceEl = externalReference || _reference;
4616    const floatingEl = externalFloating || _floating;
4617    const referenceRef = React23.useRef(null);
4618    const floatingRef = React23.useRef(null);
4619    const dataRef = React23.useRef(data);
4620    const hasWhileElementsMounted = whileElementsMounted != null;
4621    const whileElementsMountedRef = useLatestRef(whileElementsMounted);
4622    const platformRef = useLatestRef(platform3);
4623    const openRef = useLatestRef(open);
4624    const update2 = React23.useCallback(() => {
4625      if (!referenceRef.current || !floatingRef.current) {
4626        return;
4627      }
4628      const config = {
4629        placement,
4630        strategy,
4631        middleware: latestMiddleware
4632      };
4633      if (platformRef.current) {
4634        config.platform = platformRef.current;
4635      }
4636      computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
4637        const fullData = {
4638          ...data2,
4639          // The floating element's position may be recomputed while it's closed
4640          // but still mounted (such as when transitioning out). To ensure
4641          // `isPositioned` will be `false` initially on the next open, avoid
4642          // setting it to `true` when `open === false` (must be specified).
4643          isPositioned: openRef.current !== false
4644        };
4645        if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
4646          dataRef.current = fullData;
4647          ReactDOM3.flushSync(() => {
4648            setData(fullData);
4649          });
4650        }
4651      });
4652    }, [latestMiddleware, placement, strategy, platformRef, openRef]);
4653    index(() => {
4654      if (open === false && dataRef.current.isPositioned) {
4655        dataRef.current.isPositioned = false;
4656        setData((data2) => ({
4657          ...data2,
4658          isPositioned: false
4659        }));
4660      }
4661    }, [open]);
4662    const isMountedRef = React23.useRef(false);
4663    index(() => {
4664      isMountedRef.current = true;
4665      return () => {
4666        isMountedRef.current = false;
4667      };
4668    }, []);
4669    index(() => {
4670      if (referenceEl) referenceRef.current = referenceEl;
4671      if (floatingEl) floatingRef.current = floatingEl;
4672      if (referenceEl && floatingEl) {
4673        if (whileElementsMountedRef.current) {
4674          return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
4675        }
4676        update2();
4677      }
4678    }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
4679    const refs = React23.useMemo(() => ({
4680      reference: referenceRef,
4681      floating: floatingRef,
4682      setReference,
4683      setFloating
4684    }), [setReference, setFloating]);
4685    const elements = React23.useMemo(() => ({
4686      reference: referenceEl,
4687      floating: floatingEl
4688    }), [referenceEl, floatingEl]);
4689    const floatingStyles = React23.useMemo(() => {
4690      const initialStyles = {
4691        position: strategy,
4692        left: 0,
4693        top: 0
4694      };
4695      if (!elements.floating) {
4696        return initialStyles;
4697      }
4698      const x = roundByDPR(elements.floating, data.x);
4699      const y = roundByDPR(elements.floating, data.y);
4700      if (transform) {
4701        return {
4702          ...initialStyles,
4703          transform: "translate(" + x + "px, " + y + "px)",
4704          ...getDPR(elements.floating) >= 1.5 && {
4705            willChange: "transform"
4706          }
4707        };
4708      }
4709      return {
4710        position: strategy,
4711        left: x,
4712        top: y
4713      };
4714    }, [strategy, transform, elements.floating, data.x, data.y]);
4715    return React23.useMemo(() => ({
4716      ...data,
4717      update: update2,
4718      refs,
4719      elements,
4720      floatingStyles
4721    }), [data, update2, refs, elements, floatingStyles]);
4722  }
4723  var offset3 = (options, deps) => {
4724    const result = offset2(options);
4725    return {
4726      name: result.name,
4727      fn: result.fn,
4728      options: [options, deps]
4729    };
4730  };
4731  var shift3 = (options, deps) => {
4732    const result = shift2(options);
4733    return {
4734      name: result.name,
4735      fn: result.fn,
4736      options: [options, deps]
4737    };
4738  };
4739  var limitShift3 = (options, deps) => {
4740    const result = limitShift2(options);
4741    return {
4742      fn: result.fn,
4743      options: [options, deps]
4744    };
4745  };
4746  var flip3 = (options, deps) => {
4747    const result = flip2(options);
4748    return {
4749      name: result.name,
4750      fn: result.fn,
4751      options: [options, deps]
4752    };
4753  };
4754  var size3 = (options, deps) => {
4755    const result = size2(options);
4756    return {
4757      name: result.name,
4758      fn: result.fn,
4759      options: [options, deps]
4760    };
4761  };
4762  var hide3 = (options, deps) => {
4763    const result = hide2(options);
4764    return {
4765      name: result.name,
4766      fn: result.fn,
4767      options: [options, deps]
4768    };
4769  };
4770  
4771  // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
4772  var React28 = __toESM(require_react(), 1);
4773  var ReactDOM4 = __toESM(require_react_dom(), 1);
4774  
4775  // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
4776  var React27 = __toESM(require_react(), 1);
4777  
4778  // node_modules/@base-ui/utils/store/createSelector.mjs
4779  var createSelector = (a, b, c, d, e, f, ...other) => {
4780    if (other.length > 0) {
4781      throw new Error(true ? "Unsupported number of selectors" : formatErrorMessage_default(1));
4782    }
4783    let selector;
4784    if (a && b && c && d && e && f) {
4785      selector = (state, a1, a2, a3) => {
4786        const va = a(state, a1, a2, a3);
4787        const vb = b(state, a1, a2, a3);
4788        const vc = c(state, a1, a2, a3);
4789        const vd = d(state, a1, a2, a3);
4790        const ve = e(state, a1, a2, a3);
4791        return f(va, vb, vc, vd, ve, a1, a2, a3);
4792      };
4793    } else if (a && b && c && d && e) {
4794      selector = (state, a1, a2, a3) => {
4795        const va = a(state, a1, a2, a3);
4796        const vb = b(state, a1, a2, a3);
4797        const vc = c(state, a1, a2, a3);
4798        const vd = d(state, a1, a2, a3);
4799        return e(va, vb, vc, vd, a1, a2, a3);
4800      };
4801    } else if (a && b && c && d) {
4802      selector = (state, a1, a2, a3) => {
4803        const va = a(state, a1, a2, a3);
4804        const vb = b(state, a1, a2, a3);
4805        const vc = c(state, a1, a2, a3);
4806        return d(va, vb, vc, a1, a2, a3);
4807      };
4808    } else if (a && b && c) {
4809      selector = (state, a1, a2, a3) => {
4810        const va = a(state, a1, a2, a3);
4811        const vb = b(state, a1, a2, a3);
4812        return c(va, vb, a1, a2, a3);
4813      };
4814    } else if (a && b) {
4815      selector = (state, a1, a2, a3) => {
4816        const va = a(state, a1, a2, a3);
4817        return b(va, a1, a2, a3);
4818      };
4819    } else if (a) {
4820      selector = a;
4821    } else {
4822      throw (
4823        /* minify-error-disabled */
4824        new Error("Missing arguments")
4825      );
4826    }
4827    return selector;
4828  };
4829  
4830  // node_modules/@base-ui/utils/store/useStore.mjs
4831  var React25 = __toESM(require_react(), 1);
4832  var import_shim = __toESM(require_shim(), 1);
4833  var import_with_selector = __toESM(require_with_selector(), 1);
4834  
4835  // node_modules/@base-ui/utils/fastHooks.mjs
4836  var React24 = __toESM(require_react(), 1);
4837  var hooks = [];
4838  var currentInstance = void 0;
4839  function getInstance() {
4840    return currentInstance;
4841  }
4842  function register(hook) {
4843    hooks.push(hook);
4844  }
4845  function fastComponent(fn) {
4846    const FastComponent = (props, forwardedRef) => {
4847      const instance = useRefWithInit(createInstance).current;
4848      let result;
4849      try {
4850        currentInstance = instance;
4851        for (const hook of hooks) {
4852          hook.before(instance);
4853        }
4854        result = fn(props, forwardedRef);
4855        for (const hook of hooks) {
4856          hook.after(instance);
4857        }
4858        instance.didInitialize = true;
4859      } finally {
4860        currentInstance = void 0;
4861      }
4862      return result;
4863    };
4864    FastComponent.displayName = fn.displayName || fn.name;
4865    return FastComponent;
4866  }
4867  function fastComponentRef(fn) {
4868    return /* @__PURE__ */ React24.forwardRef(fastComponent(fn));
4869  }
4870  function createInstance() {
4871    return {
4872      didInitialize: false
4873    };
4874  }
4875  
4876  // node_modules/@base-ui/utils/store/useStore.mjs
4877  var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19);
4878  var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy;
4879  function useStore(store2, selector, a1, a2, a3) {
4880    return useStoreImplementation(store2, selector, a1, a2, a3);
4881  }
4882  function useStoreR19(store2, selector, a1, a2, a3) {
4883    const getSelection = React25.useCallback(() => selector(store2.getSnapshot(), a1, a2, a3), [store2, selector, a1, a2, a3]);
4884    return (0, import_shim.useSyncExternalStore)(store2.subscribe, getSelection, getSelection);
4885  }
4886  register({
4887    before(instance) {
4888      instance.syncIndex = 0;
4889      if (!instance.didInitialize) {
4890        instance.syncTick = 1;
4891        instance.syncHooks = [];
4892        instance.didChangeStore = true;
4893        instance.getSnapshot = () => {
4894          let didChange2 = false;
4895          for (let i = 0; i < instance.syncHooks.length; i += 1) {
4896            const hook = instance.syncHooks[i];
4897            const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
4898            if (!Object.is(hook.value, value)) {
4899              didChange2 = true;
4900              hook.value = value;
4901            }
4902          }
4903          if (didChange2) {
4904            instance.syncTick += 1;
4905          }
4906          return instance.syncTick;
4907        };
4908      }
4909    },
4910    after(instance) {
4911      if (instance.syncHooks.length > 0) {
4912        if (instance.didChangeStore) {
4913          instance.didChangeStore = false;
4914          instance.subscribe = (onStoreChange) => {
4915            const stores = /* @__PURE__ */ new Set();
4916            for (const hook of instance.syncHooks) {
4917              stores.add(hook.store);
4918            }
4919            const unsubscribes = [];
4920            for (const store2 of stores) {
4921              unsubscribes.push(store2.subscribe(onStoreChange));
4922            }
4923            return () => {
4924              for (const unsubscribe of unsubscribes) {
4925                unsubscribe();
4926              }
4927            };
4928          };
4929        }
4930        (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
4931      }
4932    }
4933  });
4934  function useStoreFast(store2, selector, a1, a2, a3) {
4935    const instance = getInstance();
4936    if (!instance) {
4937      return useStoreR19(store2, selector, a1, a2, a3);
4938    }
4939    const index2 = instance.syncIndex;
4940    instance.syncIndex += 1;
4941    let hook;
4942    if (!instance.didInitialize) {
4943      hook = {
4944        store: store2,
4945        selector,
4946        a1,
4947        a2,
4948        a3,
4949        value: selector(store2.getSnapshot(), a1, a2, a3)
4950      };
4951      instance.syncHooks.push(hook);
4952    } else {
4953      hook = instance.syncHooks[index2];
4954      if (hook.store !== store2 || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
4955        if (hook.store !== store2) {
4956          instance.didChangeStore = true;
4957        }
4958        hook.store = store2;
4959        hook.selector = selector;
4960        hook.a1 = a1;
4961        hook.a2 = a2;
4962        hook.a3 = a3;
4963        hook.value = selector(store2.getSnapshot(), a1, a2, a3);
4964      }
4965    }
4966    return hook.value;
4967  }
4968  function useStoreLegacy(store2, selector, a1, a2, a3) {
4969    return (0, import_with_selector.useSyncExternalStoreWithSelector)(store2.subscribe, store2.getSnapshot, store2.getSnapshot, (state) => selector(state, a1, a2, a3));
4970  }
4971  
4972  // node_modules/@base-ui/utils/store/Store.mjs
4973  var Store = class {
4974    /**
4975     * The current state of the store.
4976     * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
4977     * 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).
4978     * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
4979     *
4980     * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
4981     */
4982    // Internal state to handle recursive `setState()` calls
4983    constructor(state) {
4984      this.state = state;
4985      this.listeners = /* @__PURE__ */ new Set();
4986      this.updateTick = 0;
4987    }
4988    /**
4989     * Registers a listener that will be called whenever the store's state changes.
4990     *
4991     * @param fn The listener function to be called on state changes.
4992     * @returns A function to unsubscribe the listener.
4993     */
4994    subscribe = (fn) => {
4995      this.listeners.add(fn);
4996      return () => {
4997        this.listeners.delete(fn);
4998      };
4999    };
5000    /**
5001     * Returns the current state of the store.
5002     */
5003    getSnapshot = () => {
5004      return this.state;
5005    };
5006    /**
5007     * Updates the entire store's state and notifies all registered listeners.
5008     *
5009     * @param newState The new state to set for the store.
5010     */
5011    setState(newState) {
5012      if (this.state === newState) {
5013        return;
5014      }
5015      this.state = newState;
5016      this.updateTick += 1;
5017      const currentTick = this.updateTick;
5018      for (const listener of this.listeners) {
5019        if (currentTick !== this.updateTick) {
5020          return;
5021        }
5022        listener(newState);
5023      }
5024    }
5025    /**
5026     * Merges the provided changes into the current state and notifies listeners if there are changes.
5027     *
5028     * @param changes An object containing the changes to apply to the current state.
5029     */
5030    update(changes) {
5031      for (const key in changes) {
5032        if (!Object.is(this.state[key], changes[key])) {
5033          this.setState({
5034            ...this.state,
5035            ...changes
5036          });
5037          return;
5038        }
5039      }
5040    }
5041    /**
5042     * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
5043     *
5044     * @param key The key in the store's state to update.
5045     * @param value The new value to set for the specified key.
5046     */
5047    set(key, value) {
5048      if (!Object.is(this.state[key], value)) {
5049        this.setState({
5050          ...this.state,
5051          [key]: value
5052        });
5053      }
5054    }
5055    /**
5056     * Gives the state a new reference and updates all registered listeners.
5057     */
5058    notifyAll() {
5059      const newState = {
5060        ...this.state
5061      };
5062      this.setState(newState);
5063    }
5064    use(selector, a1, a2, a3) {
5065      return useStore(this, selector, a1, a2, a3);
5066    }
5067  };
5068  
5069  // node_modules/@base-ui/utils/store/ReactStore.mjs
5070  var React26 = __toESM(require_react(), 1);
5071  var ReactStore = class extends Store {
5072    /**
5073     * Creates a new ReactStore instance.
5074     *
5075     * @param state Initial state of the store.
5076     * @param context Non-reactive context values.
5077     * @param selectors Optional selectors for use with `useState`.
5078     */
5079    constructor(state, context = {}, selectors3) {
5080      super(state);
5081      this.context = context;
5082      this.selectors = selectors3;
5083    }
5084    /**
5085     * Non-reactive values such as refs, callbacks, etc.
5086     */
5087    /**
5088     * Synchronizes a single external value into the store.
5089     *
5090     * Note that the while the value in `state` is updated immediately, the value returned
5091     * by `useState` is updated before the next render (similarly to React's `useState`).
5092     */
5093    useSyncedValue(key, value) {
5094      React26.useDebugValue(key);
5095      const store2 = this;
5096      useIsoLayoutEffect(() => {
5097        if (store2.state[key] !== value) {
5098          store2.set(key, value);
5099        }
5100      }, [store2, key, value]);
5101    }
5102    /**
5103     * Synchronizes a single external value into the store and
5104     * cleans it up (sets to `undefined`) on unmount.
5105     *
5106     * Note that the while the value in `state` is updated immediately, the value returned
5107     * by `useState` is updated before the next render (similarly to React's `useState`).
5108     */
5109    useSyncedValueWithCleanup(key, value) {
5110      const store2 = this;
5111      useIsoLayoutEffect(() => {
5112        if (store2.state[key] !== value) {
5113          store2.set(key, value);
5114        }
5115        return () => {
5116          store2.set(key, void 0);
5117        };
5118      }, [store2, key, value]);
5119    }
5120    /**
5121     * Synchronizes multiple external values into the store.
5122     *
5123     * Note that the while the values in `state` are updated immediately, the values returned
5124     * by `useState` are updated before the next render (similarly to React's `useState`).
5125     */
5126    useSyncedValues(statePart) {
5127      const store2 = this;
5128      if (true) {
5129        React26.useDebugValue(statePart, (p) => Object.keys(p));
5130        const keys = React26.useRef(Object.keys(statePart)).current;
5131        const nextKeys = Object.keys(statePart);
5132        if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) {
5133          console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
5134        }
5135      }
5136      const dependencies = Object.values(statePart);
5137      useIsoLayoutEffect(() => {
5138        store2.update(statePart);
5139      }, [store2, ...dependencies]);
5140    }
5141    /**
5142     * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
5143     * is non-undefined, the store's state at `key` is updated to match `controlled`.
5144     */
5145    useControlledProp(key, controlled) {
5146      React26.useDebugValue(key);
5147      const store2 = this;
5148      const isControlled = controlled !== void 0;
5149      useIsoLayoutEffect(() => {
5150        if (isControlled && !Object.is(store2.state[key], controlled)) {
5151          store2.setState({
5152            ...store2.state,
5153            [key]: controlled
5154          });
5155        }
5156      }, [store2, key, controlled, isControlled]);
5157      if (true) {
5158        const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
5159        if (!cache.has(key)) {
5160          cache.set(key, isControlled);
5161        }
5162        const previouslyControlled = cache.get(key);
5163        if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) {
5164          console.error(`A component is changing the $isControlled ? "" : "un"}controlled state of $key.toString()} to be $isControlled ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
5165        }
5166      }
5167    }
5168    /** Gets the current value from the store using a selector with the provided key.
5169     *
5170     * @param key Key of the selector to use.
5171     */
5172    select(key, a1, a2, a3) {
5173      const selector = this.selectors[key];
5174      return selector(this.state, a1, a2, a3);
5175    }
5176    /**
5177     * Returns a value from the store's state using a selector function.
5178     * Used to subscribe to specific parts of the state.
5179     * This methods causes a rerender whenever the selected state changes.
5180     *
5181     * @param key Key of the selector to use.
5182     */
5183    useState(key, a1, a2, a3) {
5184      React26.useDebugValue(key);
5185      return useStore(this, this.selectors[key], a1, a2, a3);
5186    }
5187    /**
5188     * Wraps a function with `useStableCallback` to ensure it has a stable reference
5189     * and assigns it to the context.
5190     *
5191     * @param key Key of the event callback. Must be a function in the context.
5192     * @param fn Function to assign.
5193     */
5194    useContextCallback(key, fn) {
5195      React26.useDebugValue(key);
5196      const stableFunction = useStableCallback(fn ?? NOOP);
5197      this.context[key] = stableFunction;
5198    }
5199    /**
5200     * Returns a stable setter function for a specific key in the store's state.
5201     * It's commonly used to pass as a ref callback to React elements.
5202     *
5203     * @param key Key of the state to set.
5204     */
5205    useStateSetter(key) {
5206      const ref = React26.useRef(void 0);
5207      if (ref.current === void 0) {
5208        ref.current = (value) => {
5209          this.set(key, value);
5210        };
5211      }
5212      return ref.current;
5213    }
5214    /**
5215     * Observes changes derived from the store's selectors and calls the listener when the selected value changes.
5216     *
5217     * @param key Key of the selector to observe.
5218     * @param listener Listener function called when the selector result changes.
5219     */
5220    observe(selector, listener) {
5221      let selectFn;
5222      if (typeof selector === "function") {
5223        selectFn = selector;
5224      } else {
5225        selectFn = this.selectors[selector];
5226      }
5227      let prevValue = selectFn(this.state);
5228      listener(prevValue, prevValue, this);
5229      return this.subscribe((nextState) => {
5230        const nextValue = selectFn(nextState);
5231        if (!Object.is(prevValue, nextValue)) {
5232          const oldValue = prevValue;
5233          prevValue = nextValue;
5234          listener(nextValue, oldValue, this);
5235        }
5236      });
5237    }
5238  };
5239  
5240  // node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
5241  var selectors = {
5242    open: createSelector((state) => state.open),
5243    transitionStatus: createSelector((state) => state.transitionStatus),
5244    domReferenceElement: createSelector((state) => state.domReferenceElement),
5245    referenceElement: createSelector((state) => state.positionReference ?? state.referenceElement),
5246    floatingElement: createSelector((state) => state.floatingElement),
5247    floatingId: createSelector((state) => state.floatingId)
5248  };
5249  var FloatingRootStore = class extends ReactStore {
5250    constructor(options) {
5251      const {
5252        syncOnly,
5253        nested,
5254        onOpenChange,
5255        triggerElements,
5256        ...initialState
5257      } = options;
5258      super({
5259        ...initialState,
5260        positionReference: initialState.referenceElement,
5261        domReferenceElement: initialState.referenceElement
5262      }, {
5263        onOpenChange,
5264        dataRef: {
5265          current: {}
5266        },
5267        events: createEventEmitter(),
5268        nested,
5269        triggerElements
5270      }, selectors);
5271      this.syncOnly = syncOnly;
5272    }
5273    /**
5274     * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
5275     */
5276    syncOpenEvent = (newOpen, event) => {
5277      if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
5278      // click events to upgrade a hover-open.
5279      event != null && isClickLikeEvent(event)) {
5280        this.context.dataRef.current.openEvent = newOpen ? event : void 0;
5281      }
5282    };
5283    /**
5284     * Runs the root-owned side effects for an open state change.
5285     */
5286    dispatchOpenChange = (newOpen, eventDetails) => {
5287      this.syncOpenEvent(newOpen, eventDetails.event);
5288      const details = {
5289        open: newOpen,
5290        reason: eventDetails.reason,
5291        nativeEvent: eventDetails.event,
5292        nested: this.context.nested,
5293        triggerElement: eventDetails.trigger
5294      };
5295      this.context.events.emit("openchange", details);
5296    };
5297    /**
5298     * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
5299     *
5300     * @param newOpen The new open state.
5301     * @param eventDetails Details about the event that triggered the open state change.
5302     */
5303    setOpen = (newOpen, eventDetails) => {
5304      if (this.syncOnly) {
5305        this.context.onOpenChange?.(newOpen, eventDetails);
5306        return;
5307      }
5308      this.dispatchOpenChange(newOpen, eventDetails);
5309      this.context.onOpenChange?.(newOpen, eventDetails);
5310    };
5311  };
5312  
5313  // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
5314  function useSyncedFloatingRootContext(options) {
5315    const {
5316      popupStore,
5317      treatPopupAsFloatingElement = false,
5318      floatingRootContext: floatingRootContextProp,
5319      floatingId,
5320      nested,
5321      onOpenChange
5322    } = options;
5323    const open = popupStore.useState("open");
5324    const referenceElement = popupStore.useState("activeTriggerElement");
5325    const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
5326    const triggerElements = popupStore.context.triggerElements;
5327    const handleOpenChange = onOpenChange;
5328    const internalStoreRef = React27.useRef(null);
5329    if (floatingRootContextProp === void 0 && internalStoreRef.current === null) {
5330      internalStoreRef.current = new FloatingRootStore({
5331        open,
5332        transitionStatus: void 0,
5333        referenceElement,
5334        floatingElement,
5335        triggerElements,
5336        onOpenChange: handleOpenChange,
5337        floatingId,
5338        syncOnly: true,
5339        nested
5340      });
5341    }
5342    const store2 = floatingRootContextProp ?? internalStoreRef.current;
5343    popupStore.useSyncedValue("floatingId", floatingId);
5344    useIsoLayoutEffect(() => {
5345      const valuesToSync = {
5346        open,
5347        floatingId,
5348        referenceElement,
5349        floatingElement
5350      };
5351      if (isElement(referenceElement)) {
5352        valuesToSync.domReferenceElement = referenceElement;
5353      }
5354      if (store2.state.positionReference === store2.state.referenceElement) {
5355        valuesToSync.positionReference = referenceElement;
5356      }
5357      store2.update(valuesToSync);
5358    }, [open, floatingId, referenceElement, floatingElement, store2]);
5359    store2.context.onOpenChange = handleOpenChange;
5360    store2.context.nested = nested;
5361    return store2;
5362  }
5363  
5364  // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
5365  var FOCUSABLE_POPUP_PROPS = {
5366    tabIndex: -1,
5367    [FOCUSABLE_ATTRIBUTE]: ""
5368  };
5369  function usePopupStore(externalStore, createStore, treatPopupAsFloatingElement = false) {
5370    const floatingId = useId();
5371    const nested = useFloatingParentNodeId() != null;
5372    const internalStoreRef = React28.useRef(null);
5373    if (externalStore === void 0 && internalStoreRef.current === null) {
5374      internalStoreRef.current = createStore(floatingId, nested);
5375    }
5376    const store2 = externalStore ?? internalStoreRef.current;
5377    useSyncedFloatingRootContext({
5378      popupStore: store2,
5379      treatPopupAsFloatingElement,
5380      floatingRootContext: store2.state.floatingRootContext,
5381      floatingId,
5382      nested,
5383      onOpenChange: store2.setOpen
5384    });
5385    return {
5386      store: store2,
5387      internalStore: internalStoreRef.current
5388    };
5389  }
5390  function useTriggerRegistration(id, store2) {
5391    const registeredElementIdRef = React28.useRef(null);
5392    const registeredElementRef = React28.useRef(null);
5393    return React28.useCallback((element) => {
5394      if (id === void 0) {
5395        return;
5396      }
5397      let shouldSyncTriggerCount = false;
5398      if (registeredElementIdRef.current !== null) {
5399        const registeredId = registeredElementIdRef.current;
5400        const registeredElement = registeredElementRef.current;
5401        const currentElement = store2.context.triggerElements.getById(registeredId);
5402        if (registeredElement && currentElement === registeredElement) {
5403          store2.context.triggerElements.delete(registeredId);
5404          shouldSyncTriggerCount = true;
5405        }
5406        registeredElementIdRef.current = null;
5407        registeredElementRef.current = null;
5408      }
5409      if (element !== null) {
5410        registeredElementIdRef.current = id;
5411        registeredElementRef.current = element;
5412        store2.context.triggerElements.add(id, element);
5413        shouldSyncTriggerCount = true;
5414      }
5415      if (shouldSyncTriggerCount) {
5416        const triggerCount = store2.context.triggerElements.size;
5417        if (store2.select("open") && store2.state.triggerCount !== triggerCount) {
5418          store2.set("triggerCount", triggerCount);
5419        }
5420      }
5421    }, [store2, id]);
5422  }
5423  function setPopupOpenState(state, open, trigger, preventUnmountOnClose = false) {
5424    if (open) {
5425      state.preventUnmountingOnClose = false;
5426    } else if (preventUnmountOnClose) {
5427      state.preventUnmountingOnClose = true;
5428    }
5429    const triggerId = trigger?.id ?? null;
5430    if (triggerId || open) {
5431      state.activeTriggerId = triggerId;
5432      state.activeTriggerElement = trigger ?? null;
5433    }
5434  }
5435  function attachPreventUnmountOnClose(eventDetails) {
5436    let preventUnmountOnClose = false;
5437    eventDetails.preventUnmountOnClose = () => {
5438      preventUnmountOnClose = true;
5439    };
5440    return () => preventUnmountOnClose;
5441  }
5442  function applyPopupOpenChange(store2, nextOpen, eventDetails, options = {}) {
5443    const reason = eventDetails.reason;
5444    const isHover = reason === reason_parts_exports.triggerHover;
5445    const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus;
5446    const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey);
5447    const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);
5448    store2.context.onOpenChange?.(nextOpen, eventDetails);
5449    if (eventDetails.isCanceled) {
5450      return;
5451    }
5452    options.onBeforeDispatch?.();
5453    store2.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
5454    const changeState = () => {
5455      const updatedState = {
5456        ...options.extraState,
5457        open: nextOpen
5458      };
5459      if (isFocusOpen) {
5460        updatedState.instantType = "focus";
5461      } else if (isDismissClose) {
5462        updatedState.instantType = "dismiss";
5463      } else if (isHover) {
5464        updatedState.instantType = void 0;
5465      }
5466      setPopupOpenState(updatedState, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
5467      store2.update(updatedState);
5468    };
5469    if (isHover) {
5470      ReactDOM4.flushSync(changeState);
5471    } else {
5472      changeState();
5473    }
5474  }
5475  function useInitialOpenSync(store2, openProp, defaultOpen, defaultTriggerId) {
5476    useOnFirstRender(() => {
5477      if (openProp === void 0 && store2.state.open === false && defaultOpen) {
5478        store2.state = {
5479          ...store2.state,
5480          open: true,
5481          activeTriggerId: defaultTriggerId,
5482          preventUnmountingOnClose: false
5483        };
5484      }
5485    });
5486  }
5487  function useTriggerDataForwarding(triggerId, triggerElementRef, store2, stateUpdates) {
5488    const isMountedByThisTrigger = store2.useState("isMountedByTrigger", triggerId);
5489    const baseRegisterTrigger = useTriggerRegistration(triggerId, store2);
5490    const registerTrigger = useStableCallback((element) => {
5491      baseRegisterTrigger(element);
5492      if (!element) {
5493        return;
5494      }
5495      const open = store2.select("open");
5496      const activeTriggerId = store2.select("activeTriggerId");
5497      if (activeTriggerId === triggerId) {
5498        store2.update({
5499          activeTriggerElement: element,
5500          ...open ? stateUpdates : null
5501        });
5502        return;
5503      }
5504      if (activeTriggerId == null && open) {
5505        store2.update({
5506          activeTriggerId: triggerId,
5507          activeTriggerElement: element,
5508          ...stateUpdates
5509        });
5510      }
5511    });
5512    useIsoLayoutEffect(() => {
5513      if (isMountedByThisTrigger) {
5514        store2.update({
5515          activeTriggerElement: triggerElementRef.current,
5516          ...stateUpdates
5517        });
5518      }
5519    }, [isMountedByThisTrigger, store2, triggerElementRef, ...Object.values(stateUpdates)]);
5520    return {
5521      registerTrigger,
5522      isMountedByThisTrigger
5523    };
5524  }
5525  function useImplicitActiveTrigger(store2, options = {}) {
5526    const {
5527      closeOnActiveTriggerUnmount = false
5528    } = options;
5529    const open = store2.useState("open");
5530    const reactiveTriggerCount = store2.useState("triggerCount");
5531    useIsoLayoutEffect(() => {
5532      if (!open) {
5533        if (store2.state.triggerCount !== 0) {
5534          store2.set("triggerCount", 0);
5535        }
5536        return;
5537      }
5538      const triggerCount = store2.context.triggerElements.size;
5539      const stateUpdates = {};
5540      if (store2.state.triggerCount !== triggerCount) {
5541        stateUpdates.triggerCount = triggerCount;
5542      }
5543      const activeTriggerId = store2.select("activeTriggerId");
5544      let lostActiveTriggerId = null;
5545      if (activeTriggerId) {
5546        const activeTriggerElement = store2.context.triggerElements.getById(activeTriggerId);
5547        if (!activeTriggerElement) {
5548          lostActiveTriggerId = activeTriggerId;
5549        } else if (activeTriggerElement !== store2.state.activeTriggerElement) {
5550          stateUpdates.activeTriggerElement = activeTriggerElement;
5551        }
5552      }
5553      if (!lostActiveTriggerId && !activeTriggerId && triggerCount === 1) {
5554        const iteratorResult = store2.context.triggerElements.entries().next();
5555        if (!iteratorResult.done) {
5556          const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;
5557          stateUpdates.activeTriggerId = implicitTriggerId;
5558          stateUpdates.activeTriggerElement = implicitTriggerElement;
5559        }
5560      }
5561      if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0 || stateUpdates.activeTriggerElement !== void 0) {
5562        store2.update(stateUpdates);
5563      }
5564      if (lostActiveTriggerId) {
5565        if (closeOnActiveTriggerUnmount) {
5566          queueMicrotask(() => {
5567            if (store2.select("open") && store2.select("activeTriggerId") === lostActiveTriggerId && !store2.context.triggerElements.getById(lostActiveTriggerId)) {
5568              const eventDetails = createChangeEventDetails(reason_parts_exports.none);
5569              store2.setOpen(false, eventDetails);
5570              if (!eventDetails.isCanceled) {
5571                store2.update({
5572                  activeTriggerId: null,
5573                  activeTriggerElement: null
5574                });
5575              }
5576            }
5577          });
5578        }
5579      }
5580    }, [open, store2, reactiveTriggerCount, closeOnActiveTriggerUnmount]);
5581  }
5582  function useOpenStateTransitions(open, store2, onUnmount) {
5583    const {
5584      mounted,
5585      setMounted,
5586      transitionStatus
5587    } = useTransitionStatus(open);
5588    const preventUnmountingOnClose = store2.useState("preventUnmountingOnClose");
5589    const syncedPreventUnmountingOnClose = open ? false : preventUnmountingOnClose;
5590    store2.useSyncedValues({
5591      mounted,
5592      transitionStatus,
5593      preventUnmountingOnClose: syncedPreventUnmountingOnClose
5594    });
5595    const forceUnmount = useStableCallback(() => {
5596      setMounted(false);
5597      store2.update({
5598        activeTriggerId: null,
5599        activeTriggerElement: null,
5600        mounted: false,
5601        preventUnmountingOnClose: false
5602      });
5603      onUnmount?.();
5604      store2.context.onOpenChangeComplete?.(false);
5605    });
5606    useOpenChangeComplete({
5607      enabled: mounted && !open && !syncedPreventUnmountingOnClose,
5608      open,
5609      ref: store2.context.popupRef,
5610      onComplete() {
5611        if (!open) {
5612          forceUnmount();
5613        }
5614      }
5615    });
5616    return {
5617      forceUnmount,
5618      transitionStatus
5619    };
5620  }
5621  function usePopupInteractionProps(store2, statePart) {
5622    store2.useSyncedValues(statePart);
5623    useIsoLayoutEffect(() => () => {
5624      store2.update({
5625        activeTriggerProps: EMPTY_OBJECT,
5626        inactiveTriggerProps: EMPTY_OBJECT,
5627        popupProps: EMPTY_OBJECT
5628      });
5629    }, [store2]);
5630  }
5631  
5632  // node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs
5633  var PopupTriggerMap = class {
5634    constructor() {
5635      this.elementsSet = /* @__PURE__ */ new Set();
5636      this.idMap = /* @__PURE__ */ new Map();
5637    }
5638    /**
5639     * Adds a trigger element with the given ID.
5640     *
5641     * Note: The provided element is assumed to not be registered under multiple IDs.
5642     */
5643    add(id, element) {
5644      const existingElement = this.idMap.get(id);
5645      if (existingElement === element) {
5646        return;
5647      }
5648      if (existingElement !== void 0) {
5649        this.elementsSet.delete(existingElement);
5650      }
5651      this.elementsSet.add(element);
5652      this.idMap.set(id, element);
5653      if (true) {
5654        if (this.elementsSet.size !== this.idMap.size) {
5655          throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
5656        }
5657      }
5658    }
5659    /**
5660     * Removes the trigger element with the given ID.
5661     */
5662    delete(id) {
5663      const element = this.idMap.get(id);
5664      if (element) {
5665        this.elementsSet.delete(element);
5666        this.idMap.delete(id);
5667      }
5668    }
5669    /**
5670     * Whether the given element is registered as a trigger.
5671     */
5672    hasElement(element) {
5673      return this.elementsSet.has(element);
5674    }
5675    /**
5676     * Whether there is a registered trigger element matching the given predicate.
5677     */
5678    hasMatchingElement(predicate) {
5679      for (const element of this.elementsSet) {
5680        if (predicate(element)) {
5681          return true;
5682        }
5683      }
5684      return false;
5685    }
5686    /**
5687     * Returns the trigger element associated with the given ID, or undefined if no such element exists.
5688     */
5689    getById(id) {
5690      return this.idMap.get(id);
5691    }
5692    /**
5693     * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
5694     */
5695    entries() {
5696      return this.idMap.entries();
5697    }
5698    /**
5699     * Returns an iterable of all registered trigger elements.
5700     */
5701    elements() {
5702      return this.elementsSet.values();
5703    }
5704    /**
5705     * Returns the number of registered trigger elements.
5706     */
5707    get size() {
5708      return this.idMap.size;
5709    }
5710  };
5711  
5712  // node_modules/@base-ui/react/floating-ui-react/utils/getEmptyRootContext.mjs
5713  function getEmptyRootContext() {
5714    return new FloatingRootStore({
5715      open: false,
5716      transitionStatus: void 0,
5717      floatingElement: null,
5718      referenceElement: null,
5719      triggerElements: new PopupTriggerMap(),
5720      floatingId: void 0,
5721      syncOnly: false,
5722      nested: false,
5723      onOpenChange: void 0
5724    });
5725  }
5726  
5727  // node_modules/@base-ui/react/utils/popups/store.mjs
5728  function createInitialPopupStoreState() {
5729    return {
5730      open: false,
5731      openProp: void 0,
5732      mounted: false,
5733      transitionStatus: void 0,
5734      floatingRootContext: getEmptyRootContext(),
5735      floatingId: void 0,
5736      triggerCount: 0,
5737      preventUnmountingOnClose: false,
5738      payload: void 0,
5739      activeTriggerId: null,
5740      activeTriggerElement: null,
5741      triggerIdProp: void 0,
5742      popupElement: null,
5743      positionerElement: null,
5744      activeTriggerProps: EMPTY_OBJECT,
5745      inactiveTriggerProps: EMPTY_OBJECT,
5746      popupProps: EMPTY_OBJECT
5747    };
5748  }
5749  function createPopupFloatingRootContext(triggerElements, floatingId, nested = false) {
5750    return new FloatingRootStore({
5751      open: false,
5752      transitionStatus: void 0,
5753      floatingElement: null,
5754      referenceElement: null,
5755      triggerElements,
5756      floatingId,
5757      syncOnly: true,
5758      nested,
5759      onOpenChange: void 0
5760    });
5761  }
5762  var activeTriggerIdSelector = createSelector((state) => state.triggerIdProp ?? state.activeTriggerId);
5763  var openSelector = createSelector((state) => state.openProp ?? state.open);
5764  var popupIdSelector = createSelector((state) => {
5765    const popupId = state.popupElement?.id ?? state.floatingId;
5766    return popupId || void 0;
5767  });
5768  function triggerOwnsOpenPopup(state, triggerId) {
5769    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
5770  }
5771  function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
5772    if (triggerOwnsOpenPopup(state, triggerId)) {
5773      return true;
5774    }
5775    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;
5776  }
5777  var popupStoreSelectors = {
5778    open: openSelector,
5779    mounted: createSelector((state) => state.mounted),
5780    transitionStatus: createSelector((state) => state.transitionStatus),
5781    floatingRootContext: createSelector((state) => state.floatingRootContext),
5782    triggerCount: createSelector((state) => state.triggerCount),
5783    preventUnmountingOnClose: createSelector((state) => state.preventUnmountingOnClose),
5784    payload: createSelector((state) => state.payload),
5785    activeTriggerId: activeTriggerIdSelector,
5786    activeTriggerElement: createSelector((state) => state.mounted ? state.activeTriggerElement : null),
5787    popupId: popupIdSelector,
5788    /**
5789     * Whether the trigger with the given ID was used to open the popup.
5790     */
5791    isTriggerActive: createSelector((state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId),
5792    /**
5793     * Whether the popup is open and was activated by a trigger with the given ID.
5794     */
5795    isOpenedByTrigger: createSelector((state, triggerId) => triggerOwnsOpenPopup(state, triggerId)),
5796    /**
5797     * Whether the popup is mounted and was activated by a trigger with the given ID.
5798     */
5799    isMountedByTrigger: createSelector((state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted),
5800    triggerProps: createSelector((state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps),
5801    /**
5802     * Popup id for the trigger that currently owns the open popup.
5803     */
5804    triggerPopupId: createSelector((state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0),
5805    popupProps: createSelector((state) => state.popupProps),
5806    popupElement: createSelector((state) => state.popupElement),
5807    positionerElement: createSelector((state) => state.positionerElement)
5808  };
5809  
5810  // node_modules/@base-ui/react/floating-ui-react/hooks/useFloatingRootContext.mjs
5811  function useFloatingRootContext(options) {
5812    const {
5813      open = false,
5814      onOpenChange,
5815      elements = {}
5816    } = options;
5817    const floatingId = useId();
5818    const nested = useFloatingParentNodeId() != null;
5819    if (true) {
5820      const optionDomReference = elements.reference;
5821      if (optionDomReference && !isElement(optionDomReference)) {
5822        console.error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `context.setPositionReference()`", "instead.");
5823      }
5824    }
5825    const store2 = useRefWithInit(() => new FloatingRootStore({
5826      open,
5827      transitionStatus: void 0,
5828      onOpenChange,
5829      referenceElement: elements.reference ?? null,
5830      floatingElement: elements.floating ?? null,
5831      triggerElements: new PopupTriggerMap(),
5832      floatingId,
5833      syncOnly: false,
5834      nested
5835    })).current;
5836    useIsoLayoutEffect(() => {
5837      const valuesToSync = {
5838        open,
5839        floatingId
5840      };
5841      if (elements.reference !== void 0) {
5842        valuesToSync.referenceElement = elements.reference;
5843        valuesToSync.domReferenceElement = isElement(elements.reference) ? elements.reference : null;
5844      }
5845      if (elements.floating !== void 0) {
5846        valuesToSync.floatingElement = elements.floating;
5847      }
5848      store2.update(valuesToSync);
5849    }, [open, floatingId, elements.reference, elements.floating, store2]);
5850    store2.context.onOpenChange = onOpenChange;
5851    store2.context.nested = nested;
5852    return store2;
5853  }
5854  
5855  // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
5856  function useFloating2(options = {}) {
5857    const {
5858      nodeId,
5859      externalTree
5860    } = options;
5861    const internalStore = useFloatingRootContext(options);
5862    const store2 = options.rootContext || internalStore;
5863    const referenceElement = store2.useState("referenceElement");
5864    const floatingElement = store2.useState("floatingElement");
5865    const domReferenceElement = store2.useState("domReferenceElement");
5866    const open = store2.useState("open");
5867    const floatingId = store2.useState("floatingId");
5868    const [positionReference, setPositionReferenceRaw] = React29.useState(null);
5869    const [localDomReference, setLocalDomReference] = React29.useState(void 0);
5870    const [localFloatingElement, setLocalFloatingElement] = React29.useState(void 0);
5871    const domReferenceRef = React29.useRef(null);
5872    const tree = useFloatingTree(externalTree);
5873    const storeElements = React29.useMemo(() => ({
5874      reference: referenceElement,
5875      floating: floatingElement,
5876      domReference: domReferenceElement
5877    }), [referenceElement, floatingElement, domReferenceElement]);
5878    const position = useFloating({
5879      ...options,
5880      elements: {
5881        ...storeElements,
5882        ...positionReference && {
5883          reference: positionReference
5884        }
5885      }
5886    });
5887    const localDomReferenceElement = isElement(localDomReference) ? localDomReference : null;
5888    const syncedFloatingElement = localFloatingElement === void 0 ? store2.state.floatingElement : localFloatingElement;
5889    store2.useSyncedValue("referenceElement", localDomReference ?? null);
5890    store2.useSyncedValue("domReferenceElement", localDomReference === void 0 ? domReferenceElement : localDomReferenceElement);
5891    store2.useSyncedValue("floatingElement", syncedFloatingElement);
5892    const setPositionReference = React29.useCallback((node) => {
5893      const computedPositionReference = isElement(node) ? {
5894        getBoundingClientRect: () => node.getBoundingClientRect(),
5895        getClientRects: () => node.getClientRects(),
5896        contextElement: node
5897      } : node;
5898      setPositionReferenceRaw(computedPositionReference);
5899      position.refs.setReference(computedPositionReference);
5900    }, [position.refs]);
5901    const setReference = React29.useCallback((node) => {
5902      if (isElement(node) || node === null) {
5903        domReferenceRef.current = node;
5904        setLocalDomReference(node);
5905      }
5906      if (isElement(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
5907      // `null` to support `positionReference` + an unstable `reference`
5908      // callback ref.
5909      node !== null && !isElement(node)) {
5910        position.refs.setReference(node);
5911      }
5912    }, [position.refs, setLocalDomReference]);
5913    const setFloating = React29.useCallback((node) => {
5914      setLocalFloatingElement(node);
5915      position.refs.setFloating(node);
5916    }, [position.refs]);
5917    const refs = React29.useMemo(() => ({
5918      ...position.refs,
5919      setReference,
5920      setFloating,
5921      setPositionReference,
5922      domReference: domReferenceRef
5923    }), [position.refs, setReference, setFloating, setPositionReference]);
5924    const elements = React29.useMemo(() => ({
5925      ...position.elements,
5926      domReference: domReferenceElement
5927    }), [position.elements, domReferenceElement]);
5928    const context = React29.useMemo(() => ({
5929      ...position,
5930      dataRef: store2.context.dataRef,
5931      open,
5932      onOpenChange: store2.setOpen,
5933      events: store2.context.events,
5934      floatingId,
5935      refs,
5936      elements,
5937      nodeId,
5938      rootStore: store2
5939    }), [position, refs, elements, nodeId, store2, open, floatingId]);
5940    useIsoLayoutEffect(() => {
5941      if (domReferenceElement) {
5942        domReferenceRef.current = domReferenceElement;
5943      }
5944    }, [domReferenceElement]);
5945    useIsoLayoutEffect(() => {
5946      store2.context.dataRef.current.floatingContext = context;
5947      const node = tree?.nodesRef.current.find((n) => n.id === nodeId);
5948      if (node) {
5949        node.context = context;
5950      }
5951    });
5952    return React29.useMemo(() => ({
5953      ...position,
5954      context,
5955      refs,
5956      elements,
5957      rootStore: store2
5958    }), [position, refs, elements, context, store2]);
5959  }
5960  
5961  // node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs
5962  var React30 = __toESM(require_react(), 1);
5963  var isMacSafari = parts_exports.os.mac && parts_exports.engine.webkit;
5964  function useFocus(context, props = {}) {
5965    const {
5966      enabled = true,
5967      delay
5968    } = props;
5969    const store2 = "rootStore" in context ? context.rootStore : context;
5970    const {
5971      events,
5972      dataRef
5973    } = store2.context;
5974    const blockFocusRef = React30.useRef(false);
5975    const blockedReferenceRef = React30.useRef(null);
5976    const keyboardModalityRef = React30.useRef(true);
5977    const timeout = useTimeout();
5978    React30.useEffect(() => {
5979      const domReference = store2.select("domReferenceElement");
5980      if (!enabled) {
5981        return void 0;
5982      }
5983      const win = getWindow(domReference);
5984      function onBlur() {
5985        const currentDomReference = store2.select("domReferenceElement");
5986        if (!store2.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {
5987          blockFocusRef.current = true;
5988        }
5989      }
5990      function onKeyDown() {
5991        keyboardModalityRef.current = true;
5992      }
5993      function onPointerDown() {
5994        keyboardModalityRef.current = false;
5995      }
5996      return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true));
5997    }, [store2, enabled]);
5998    React30.useEffect(() => {
5999      if (!enabled) {
6000        return void 0;
6001      }
6002      function onOpenChangeLocal(details) {
6003        if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) {
6004          const referenceElement = store2.select("domReferenceElement");
6005          if (isElement(referenceElement)) {
6006            blockedReferenceRef.current = referenceElement;
6007            blockFocusRef.current = true;
6008          }
6009        }
6010      }
6011      events.on("openchange", onOpenChangeLocal);
6012      return () => {
6013        events.off("openchange", onOpenChangeLocal);
6014      };
6015    }, [events, enabled, store2]);
6016    const reference = React30.useMemo(() => {
6017      function resetBlockedFocus() {
6018        blockFocusRef.current = false;
6019        blockedReferenceRef.current = null;
6020      }
6021      return {
6022        onMouseLeave() {
6023          resetBlockedFocus();
6024        },
6025        onFocus(event) {
6026          const focusTarget = event.currentTarget;
6027          if (blockFocusRef.current) {
6028            if (blockedReferenceRef.current === focusTarget) {
6029              return;
6030            }
6031            resetBlockedFocus();
6032          }
6033          const target = getTarget(event.nativeEvent);
6034          if (isElement(target)) {
6035            if (isMacSafari && !event.relatedTarget) {
6036              if (!keyboardModalityRef.current && !isTypeableElement(target)) {
6037                return;
6038              }
6039            } else if (!matchesFocusVisible(target)) {
6040              return;
6041            }
6042          }
6043          const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements);
6044          const {
6045            nativeEvent,
6046            currentTarget
6047          } = event;
6048          const delayValue = typeof delay === "function" ? delay() : delay;
6049          if (store2.select("open") && movedFromOtherEnabledTrigger || delayValue === 0 || delayValue === void 0) {
6050            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6051            return;
6052          }
6053          timeout.start(delayValue, () => {
6054            if (blockFocusRef.current) {
6055              return;
6056            }
6057            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6058          });
6059        },
6060        onBlur(event) {
6061          resetBlockedFocus();
6062          const relatedTarget = event.relatedTarget;
6063          const nativeEvent = event.nativeEvent;
6064          const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside";
6065          timeout.start(0, () => {
6066            const domReference = store2.select("domReferenceElement");
6067            const activeEl = activeElement(ownerDocument(domReference));
6068            if (!relatedTarget && activeEl === domReference) {
6069              return;
6070            }
6071            if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {
6072              return;
6073            }
6074            const nextFocusedElement = relatedTarget ?? activeEl;
6075            if (isTargetInsideEnabledTrigger(nextFocusedElement, store2.context.triggerElements)) {
6076              return;
6077            }
6078            store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent));
6079          });
6080        }
6081      };
6082    }, [dataRef, delay, store2, timeout]);
6083    return React30.useMemo(() => enabled ? {
6084      reference,
6085      trigger: reference
6086    } : {}, [enabled, reference]);
6087  }
6088  
6089  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6090  var React31 = __toESM(require_react(), 1);
6091  
6092  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs
6093  var HoverInteraction = class _HoverInteraction {
6094    constructor() {
6095      this.pointerType = void 0;
6096      this.interactedInside = false;
6097      this.handler = void 0;
6098      this.blockMouseMove = true;
6099      this.performedPointerEventsMutation = false;
6100      this.pointerEventsScopeElement = null;
6101      this.pointerEventsReferenceElement = null;
6102      this.pointerEventsFloatingElement = null;
6103      this.restTimeoutPending = false;
6104      this.openChangeTimeout = new Timeout();
6105      this.restTimeout = new Timeout();
6106      this.handleCloseOptions = void 0;
6107    }
6108    static create() {
6109      return new _HoverInteraction();
6110    }
6111    dispose = () => {
6112      this.openChangeTimeout.clear();
6113      this.restTimeout.clear();
6114    };
6115    disposeEffect = () => {
6116      return this.dispose;
6117    };
6118  };
6119  var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap();
6120  function clearSafePolygonPointerEventsMutation(instance) {
6121    if (!instance.performedPointerEventsMutation) {
6122      return;
6123    }
6124    const scopeElement = instance.pointerEventsScopeElement;
6125    if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {
6126      instance.pointerEventsScopeElement?.style.removeProperty("pointer-events");
6127      instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events");
6128      instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events");
6129      pointerEventsMutationOwnerByScopeElement.delete(scopeElement);
6130    }
6131    instance.performedPointerEventsMutation = false;
6132    instance.pointerEventsScopeElement = null;
6133    instance.pointerEventsReferenceElement = null;
6134    instance.pointerEventsFloatingElement = null;
6135  }
6136  function applySafePolygonPointerEventsMutation(instance, options) {
6137    const {
6138      scopeElement,
6139      referenceElement,
6140      floatingElement
6141    } = options;
6142    const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);
6143    if (existingOwner && existingOwner !== instance) {
6144      clearSafePolygonPointerEventsMutation(existingOwner);
6145    }
6146    clearSafePolygonPointerEventsMutation(instance);
6147    instance.performedPointerEventsMutation = true;
6148    instance.pointerEventsScopeElement = scopeElement;
6149    instance.pointerEventsReferenceElement = referenceElement;
6150    instance.pointerEventsFloatingElement = floatingElement;
6151    pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);
6152    scopeElement.style.pointerEvents = "none";
6153    referenceElement.style.pointerEvents = "auto";
6154    floatingElement.style.pointerEvents = "auto";
6155  }
6156  function useHoverInteractionSharedState(store2) {
6157    const data = store2.context.dataRef.current;
6158    const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;
6159    if (!data.hoverInteractionState) {
6160      data.hoverInteractionState = instance;
6161    }
6162    useOnMount(data.hoverInteractionState.disposeEffect);
6163    return data.hoverInteractionState;
6164  }
6165  
6166  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6167  function useHoverFloatingInteraction(context, parameters = {}) {
6168    const {
6169      enabled = true,
6170      closeDelay: closeDelayProp = 0,
6171      nodeId: nodeIdProp
6172    } = parameters;
6173    const store2 = "rootStore" in context ? context.rootStore : context;
6174    const open = store2.useState("open");
6175    const floatingElement = store2.useState("floatingElement");
6176    const domReferenceElement = store2.useState("domReferenceElement");
6177    const {
6178      dataRef
6179    } = store2.context;
6180    const tree = useFloatingTree();
6181    const parentId = useFloatingParentNodeId();
6182    const instance = useHoverInteractionSharedState(store2);
6183    const childClosedTimeout = useTimeout();
6184    const isClickLikeOpenEvent2 = useStableCallback(() => {
6185      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6186    });
6187    const isHoverOpen = useStableCallback(() => {
6188      return isHoverOpenEvent(dataRef.current.openEvent?.type);
6189    });
6190    const clearPointerEvents = useStableCallback(() => {
6191      clearSafePolygonPointerEventsMutation(instance);
6192    });
6193    useIsoLayoutEffect(() => {
6194      if (!open) {
6195        instance.pointerType = void 0;
6196        instance.restTimeoutPending = false;
6197        instance.interactedInside = false;
6198        clearPointerEvents();
6199      }
6200    }, [open, instance, clearPointerEvents]);
6201    React31.useEffect(() => {
6202      return clearPointerEvents;
6203    }, [clearPointerEvents]);
6204    useIsoLayoutEffect(() => {
6205      if (!enabled) {
6206        return void 0;
6207      }
6208      if (open && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {
6209        const ref = domReferenceElement;
6210        const floatingEl = floatingElement;
6211        const doc = ownerDocument(floatingElement);
6212        const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating;
6213        if (parentFloating) {
6214          parentFloating.style.pointerEvents = "";
6215        }
6216        const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;
6217        const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;
6218        const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? ref.closest("[data-rootownerid]") ?? doc.body;
6219        applySafePolygonPointerEventsMutation(instance, {
6220          scopeElement,
6221          referenceElement: ref,
6222          floatingElement: floatingEl
6223        });
6224        return () => {
6225          clearPointerEvents();
6226        };
6227      }
6228      return void 0;
6229    }, [enabled, open, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);
6230    React31.useEffect(() => {
6231      if (!enabled) {
6232        return void 0;
6233      }
6234      function hasParentChildren() {
6235        return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);
6236      }
6237      function closeWithDelay(event) {
6238        const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType);
6239        const close = () => {
6240          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6241          tree?.events.emit("floating.closed", event);
6242        };
6243        if (closeDelay) {
6244          instance.openChangeTimeout.start(closeDelay, close);
6245        } else {
6246          instance.openChangeTimeout.clear();
6247          close();
6248        }
6249      }
6250      function handleInteractInside(event) {
6251        const target = getTarget(event);
6252        if (!isInteractiveElement(target)) {
6253          instance.interactedInside = false;
6254          return;
6255        }
6256        instance.interactedInside = target?.closest("[aria-haspopup]") != null;
6257      }
6258      function onFloatingMouseEnter() {
6259        instance.openChangeTimeout.clear();
6260        childClosedTimeout.clear();
6261        tree?.events.off("floating.closed", onNodeClosed);
6262        clearPointerEvents();
6263      }
6264      function onFloatingMouseLeave(event) {
6265        if (hasParentChildren() && tree) {
6266          tree.events.on("floating.closed", onNodeClosed);
6267          return;
6268        }
6269        if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) {
6270          return;
6271        }
6272        const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;
6273        const relatedTarget = event.relatedTarget;
6274        const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget));
6275        if (isMovingIntoDescendantFloating) {
6276          return;
6277        }
6278        if (instance.handler) {
6279          instance.handler(event);
6280          return;
6281        }
6282        clearPointerEvents();
6283        if (isHoverOpen() && !isClickLikeOpenEvent2()) {
6284          closeWithDelay(event);
6285        }
6286      }
6287      function onNodeClosed(event) {
6288        if (!tree || !parentId || hasParentChildren()) {
6289          return;
6290        }
6291        childClosedTimeout.start(0, () => {
6292          tree.events.off("floating.closed", onNodeClosed);
6293          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6294          tree.events.emit("floating.closed", event);
6295        });
6296      }
6297      const floating = floatingElement;
6298      return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => {
6299        tree?.events.off("floating.closed", onNodeClosed);
6300      });
6301    }, [enabled, floatingElement, store2, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);
6302  }
6303  
6304  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs
6305  var React32 = __toESM(require_react(), 1);
6306  var ReactDOM5 = __toESM(require_react_dom(), 1);
6307  var EMPTY_REF = {
6308    current: null
6309  };
6310  function useHoverReferenceInteraction(context, props = {}) {
6311    const {
6312      enabled = true,
6313      delay = 0,
6314      handleClose = null,
6315      mouseOnly = false,
6316      restMs = 0,
6317      move = true,
6318      triggerElementRef = EMPTY_REF,
6319      externalTree,
6320      isActiveTrigger = true,
6321      getHandleCloseContext,
6322      isClosing,
6323      shouldOpen: shouldOpenProp
6324    } = props;
6325    const store2 = "rootStore" in context ? context.rootStore : context;
6326    const {
6327      dataRef,
6328      events
6329    } = store2.context;
6330    const tree = useFloatingTree(externalTree);
6331    const instance = useHoverInteractionSharedState(store2);
6332    const isHoverCloseActiveRef = React32.useRef(false);
6333    const handleCloseRef = useValueAsRef(handleClose);
6334    const delayRef = useValueAsRef(delay);
6335    const restMsRef = useValueAsRef(restMs);
6336    const enabledRef = useValueAsRef(enabled);
6337    const shouldOpenRef = useValueAsRef(shouldOpenProp);
6338    const isClosingRef = useValueAsRef(isClosing);
6339    const isClickLikeOpenEvent2 = useStableCallback(() => {
6340      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6341    });
6342    const checkShouldOpen = useStableCallback(() => {
6343      return shouldOpenRef.current?.() !== false;
6344    });
6345    const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {
6346      const allTriggers = store2.context.triggerElements;
6347      if (allTriggers.hasElement(currentTarget)) {
6348        return !currentDomReference || !contains(currentDomReference, currentTarget);
6349      }
6350      if (!isElement(target)) {
6351        return false;
6352      }
6353      const targetElement = target;
6354      return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));
6355    });
6356    const cleanupMouseMoveHandler = useStableCallback(() => {
6357      if (!instance.handler) {
6358        return;
6359      }
6360      const doc = ownerDocument(store2.select("domReferenceElement"));
6361      doc.removeEventListener("mousemove", instance.handler);
6362      instance.handler = void 0;
6363    });
6364    const clearPointerEvents = useStableCallback(() => {
6365      clearSafePolygonPointerEventsMutation(instance);
6366    });
6367    if (isActiveTrigger) {
6368      instance.handleCloseOptions = handleCloseRef.current?.__options;
6369    }
6370    React32.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);
6371    React32.useEffect(() => {
6372      if (!enabled) {
6373        return void 0;
6374      }
6375      function onOpenChangeLocal(details) {
6376        if (!details.open) {
6377          isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover;
6378          cleanupMouseMoveHandler();
6379          instance.openChangeTimeout.clear();
6380          instance.restTimeout.clear();
6381          instance.blockMouseMove = true;
6382          instance.restTimeoutPending = false;
6383        } else {
6384          isHoverCloseActiveRef.current = false;
6385        }
6386      }
6387      events.on("openchange", onOpenChangeLocal);
6388      return () => {
6389        events.off("openchange", onOpenChangeLocal);
6390      };
6391    }, [enabled, events, instance, cleanupMouseMoveHandler]);
6392    React32.useEffect(() => {
6393      if (!enabled) {
6394        return void 0;
6395      }
6396      function closeWithDelay(event, runElseBranch = true) {
6397        const closeDelay = getDelay(delayRef.current, "close", instance.pointerType);
6398        if (closeDelay) {
6399          instance.openChangeTimeout.start(closeDelay, () => {
6400            store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6401            tree?.events.emit("floating.closed", event);
6402          });
6403        } else if (runElseBranch) {
6404          instance.openChangeTimeout.clear();
6405          store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6406          tree?.events.emit("floating.closed", event);
6407        }
6408      }
6409      const trigger = triggerElementRef.current ?? (isActiveTrigger ? store2.select("domReferenceElement") : null);
6410      if (!isElement(trigger)) {
6411        return void 0;
6412      }
6413      function onMouseEnter(event) {
6414        instance.openChangeTimeout.clear();
6415        instance.blockMouseMove = false;
6416        if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6417          return;
6418        }
6419        const restMsValue = getRestMs(restMsRef.current);
6420        const openDelay = getDelay(delayRef.current, "open", instance.pointerType);
6421        const eventTarget = getTarget(event);
6422        const currentTarget = event.currentTarget ?? null;
6423        const currentDomReference = store2.select("domReferenceElement");
6424        let triggerNode = currentTarget;
6425        if (isElement(eventTarget) && !store2.context.triggerElements.hasElement(eventTarget)) {
6426          for (const triggerElement of store2.context.triggerElements.elements()) {
6427            if (contains(triggerElement, eventTarget)) {
6428              triggerNode = triggerElement;
6429              break;
6430            }
6431          }
6432        }
6433        if (isElement(currentTarget) && isElement(currentDomReference) && !store2.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {
6434          triggerNode = currentDomReference;
6435        }
6436        const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);
6437        const isOpen = store2.select("open");
6438        const isInClosingTransition = isClosingRef.current?.() ?? store2.select("transitionStatus") === "ending";
6439        const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;
6440        const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;
6441        const isRestOnlyDelay = restMsValue > 0 && !openDelay;
6442        const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;
6443        const shouldOpen = !isOpen || isOverInactive;
6444        if (shouldOpenImmediately) {
6445          if (checkShouldOpen()) {
6446            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6447          }
6448          return;
6449        }
6450        if (isRestOnlyDelay) {
6451          return;
6452        }
6453        if (openDelay) {
6454          instance.openChangeTimeout.start(openDelay, () => {
6455            if (shouldOpen && checkShouldOpen()) {
6456              store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6457            }
6458          });
6459        } else if (shouldOpen) {
6460          if (checkShouldOpen()) {
6461            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6462          }
6463        }
6464      }
6465      function onMouseLeave(event) {
6466        if (isClickLikeOpenEvent2()) {
6467          clearPointerEvents();
6468          return;
6469        }
6470        cleanupMouseMoveHandler();
6471        const domReferenceElement = store2.select("domReferenceElement");
6472        const doc = ownerDocument(domReferenceElement);
6473        instance.restTimeout.clear();
6474        instance.restTimeoutPending = false;
6475        const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();
6476        if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) {
6477          return;
6478        }
6479        if (handleCloseRef.current && handleCloseContextBase) {
6480          if (!store2.select("open")) {
6481            instance.openChangeTimeout.clear();
6482          }
6483          const currentTrigger = triggerElementRef.current;
6484          instance.handler = handleCloseRef.current({
6485            ...handleCloseContextBase,
6486            tree,
6487            x: event.clientX,
6488            y: event.clientY,
6489            onClose() {
6490              clearPointerEvents();
6491              cleanupMouseMoveHandler();
6492              if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store2.select("domReferenceElement")) {
6493                closeWithDelay(event, true);
6494              }
6495            }
6496          });
6497          doc.addEventListener("mousemove", instance.handler);
6498          instance.handler(event);
6499          return;
6500        }
6501        const shouldClose = instance.pointerType === "touch" ? !contains(store2.select("floatingElement"), event.relatedTarget) : true;
6502        if (shouldClose) {
6503          closeWithDelay(event);
6504        }
6505      }
6506      if (move) {
6507        return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, {
6508          once: true
6509        }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave));
6510      }
6511      return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave));
6512    }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store2, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen]);
6513    return React32.useMemo(() => {
6514      if (!enabled) {
6515        return void 0;
6516      }
6517      function setPointerRef(event) {
6518        instance.pointerType = event.pointerType;
6519      }
6520      return {
6521        onPointerDown: setPointerRef,
6522        onPointerEnter: setPointerRef,
6523        onMouseMove(event) {
6524          const {
6525            nativeEvent
6526          } = event;
6527          const trigger = event.currentTarget;
6528          const currentDomReference = store2.select("domReferenceElement");
6529          const currentOpen = store2.select("open");
6530          const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);
6531          if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6532            return;
6533          }
6534          if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {
6535            const floatingElement = store2.select("floatingElement");
6536            if (floatingElement) {
6537              const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;
6538              applySafePolygonPointerEventsMutation(instance, {
6539                scopeElement,
6540                referenceElement: trigger,
6541                floatingElement
6542              });
6543            }
6544          }
6545          const restMsValue = getRestMs(restMsRef.current);
6546          if (currentOpen && !isOverInactive || restMsValue === 0) {
6547            return;
6548          }
6549          if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {
6550            return;
6551          }
6552          instance.restTimeout.clear();
6553          function handleMouseMove() {
6554            instance.restTimeoutPending = false;
6555            if (isClickLikeOpenEvent2()) {
6556              return;
6557            }
6558            const latestOpen = store2.select("open");
6559            if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {
6560              store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger));
6561            }
6562          }
6563          if (instance.pointerType === "touch") {
6564            ReactDOM5.flushSync(() => {
6565              handleMouseMove();
6566            });
6567          } else if (isOverInactive && currentOpen) {
6568            handleMouseMove();
6569          } else {
6570            instance.restTimeoutPending = true;
6571            instance.restTimeout.start(restMsValue, handleMouseMove);
6572          }
6573        }
6574      };
6575    }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store2, restMsRef, checkShouldOpen]);
6576  }
6577  
6578  // node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs
6579  var CURSOR_SPEED_THRESHOLD = 0.1;
6580  var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;
6581  var POLYGON_BUFFER = 0.5;
6582  function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {
6583    return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;
6584  }
6585  function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {
6586    let isInsideValue = false;
6587    if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {
6588      isInsideValue = !isInsideValue;
6589    }
6590    if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {
6591      isInsideValue = !isInsideValue;
6592    }
6593    if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {
6594      isInsideValue = !isInsideValue;
6595    }
6596    if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {
6597      isInsideValue = !isInsideValue;
6598    }
6599    return isInsideValue;
6600  }
6601  function isInsideRect(pointX, pointY, rect) {
6602    return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;
6603  }
6604  function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {
6605    const minX = Math.min(x1, x2);
6606    const maxX = Math.max(x1, x2);
6607    const minY = Math.min(y1, y2);
6608    const maxY = Math.max(y1, y2);
6609    return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;
6610  }
6611  function safePolygon(options = {}) {
6612    const {
6613      blockPointerEvents = false
6614    } = options;
6615    const timeout = new Timeout();
6616    const fn = ({
6617      x,
6618      y,
6619      placement,
6620      elements,
6621      onClose,
6622      nodeId,
6623      tree
6624    }) => {
6625      const side = placement?.split("-")[0];
6626      let hasLanded = false;
6627      let lastX = null;
6628      let lastY = null;
6629      let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0;
6630      function isCursorMovingSlowly(nextX, nextY) {
6631        const currentTime = performance.now();
6632        const elapsedTime = currentTime - lastCursorTime;
6633        if (lastX === null || lastY === null || elapsedTime === 0) {
6634          lastX = nextX;
6635          lastY = nextY;
6636          lastCursorTime = currentTime;
6637          return false;
6638        }
6639        const deltaX = nextX - lastX;
6640        const deltaY = nextY - lastY;
6641        const distanceSquared = deltaX * deltaX + deltaY * deltaY;
6642        const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;
6643        lastX = nextX;
6644        lastY = nextY;
6645        lastCursorTime = currentTime;
6646        return distanceSquared < thresholdSquared;
6647      }
6648      function close() {
6649        timeout.clear();
6650        onClose();
6651      }
6652      return function onMouseMove(event) {
6653        timeout.clear();
6654        const domReference = elements.domReference;
6655        const floating = elements.floating;
6656        if (!domReference || !floating || side == null || x == null || y == null) {
6657          return void 0;
6658        }
6659        const {
6660          clientX,
6661          clientY
6662        } = event;
6663        const target = getTarget(event);
6664        const isLeave = event.type === "mouseleave";
6665        const isOverFloatingEl = contains(floating, target);
6666        const isOverReferenceEl = contains(domReference, target);
6667        if (isOverFloatingEl) {
6668          hasLanded = true;
6669          if (!isLeave) {
6670            return void 0;
6671          }
6672        }
6673        if (isOverReferenceEl) {
6674          hasLanded = false;
6675          if (!isLeave) {
6676            hasLanded = true;
6677            return void 0;
6678          }
6679        }
6680        if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {
6681          return void 0;
6682        }
6683        function hasOpenChildNode() {
6684          return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);
6685        }
6686        function closeIfNoOpenChild() {
6687          if (!hasOpenChildNode()) {
6688            close();
6689          }
6690        }
6691        if (hasOpenChildNode()) {
6692          return void 0;
6693        }
6694        const refRect = domReference.getBoundingClientRect();
6695        const rect = floating.getBoundingClientRect();
6696        const cursorLeaveFromRight = x > rect.right - rect.width / 2;
6697        const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;
6698        const isFloatingWider = rect.width > refRect.width;
6699        const isFloatingTaller = rect.height > refRect.height;
6700        const left = (isFloatingWider ? refRect : rect).left;
6701        const right = (isFloatingWider ? refRect : rect).right;
6702        const top = (isFloatingTaller ? refRect : rect).top;
6703        const bottom = (isFloatingTaller ? refRect : rect).bottom;
6704        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) {
6705          closeIfNoOpenChild();
6706          return void 0;
6707        }
6708        let isInsideTroughRect = false;
6709        switch (side) {
6710          case "top":
6711            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);
6712            break;
6713          case "bottom":
6714            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);
6715            break;
6716          case "left":
6717            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);
6718            break;
6719          case "right":
6720            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);
6721            break;
6722          default:
6723        }
6724        if (isInsideTroughRect) {
6725          return void 0;
6726        }
6727        if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {
6728          closeIfNoOpenChild();
6729          return void 0;
6730        }
6731        if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {
6732          closeIfNoOpenChild();
6733          return void 0;
6734        }
6735        let isInsidePolygon = false;
6736        switch (side) {
6737          case "top": {
6738            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6739            const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6740            const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6741            const cursorPointY = y + POLYGON_BUFFER + 1;
6742            const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;
6743            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;
6744            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6745            break;
6746          }
6747          case "bottom": {
6748            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6749            const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6750            const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset;
6751            const cursorPointY = y - POLYGON_BUFFER;
6752            const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;
6753            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;
6754            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6755            break;
6756          }
6757          case "left": {
6758            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6759            const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6760            const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6761            const cursorPointX = x + POLYGON_BUFFER + 1;
6762            const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;
6763            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;
6764            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);
6765            break;
6766          }
6767          case "right": {
6768            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6769            const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6770            const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset;
6771            const cursorPointX = x - POLYGON_BUFFER;
6772            const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;
6773            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;
6774            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);
6775            break;
6776          }
6777          default:
6778        }
6779        if (!isInsidePolygon) {
6780          closeIfNoOpenChild();
6781        } else if (!hasLanded) {
6782          timeout.start(40, closeIfNoOpenChild);
6783        }
6784        return void 0;
6785      };
6786    };
6787    fn.__options = {
6788      ...options,
6789      blockPointerEvents
6790    };
6791    return fn;
6792  }
6793  
6794  // node_modules/@base-ui/react/utils/popupStateMapping.mjs
6795  var CommonPopupDataAttributes = (function(CommonPopupDataAttributes2) {
6796    CommonPopupDataAttributes2["open"] = "data-open";
6797    CommonPopupDataAttributes2["closed"] = "data-closed";
6798    CommonPopupDataAttributes2[CommonPopupDataAttributes2["startingStyle"] = TransitionStatusDataAttributes.startingStyle] = "startingStyle";
6799    CommonPopupDataAttributes2[CommonPopupDataAttributes2["endingStyle"] = TransitionStatusDataAttributes.endingStyle] = "endingStyle";
6800    CommonPopupDataAttributes2["anchorHidden"] = "data-anchor-hidden";
6801    CommonPopupDataAttributes2["side"] = "data-side";
6802    CommonPopupDataAttributes2["align"] = "data-align";
6803    return CommonPopupDataAttributes2;
6804  })({});
6805  var CommonTriggerDataAttributes = /* @__PURE__ */ (function(CommonTriggerDataAttributes2) {
6806    CommonTriggerDataAttributes2["popupOpen"] = "data-popup-open";
6807    CommonTriggerDataAttributes2["pressed"] = "data-pressed";
6808    return CommonTriggerDataAttributes2;
6809  })({});
6810  var TRIGGER_HOOK = {
6811    [CommonTriggerDataAttributes.popupOpen]: ""
6812  };
6813  var PRESSABLE_TRIGGER_HOOK = {
6814    [CommonTriggerDataAttributes.popupOpen]: "",
6815    [CommonTriggerDataAttributes.pressed]: ""
6816  };
6817  var POPUP_OPEN_HOOK = {
6818    [CommonPopupDataAttributes.open]: ""
6819  };
6820  var POPUP_CLOSED_HOOK = {
6821    [CommonPopupDataAttributes.closed]: ""
6822  };
6823  var ANCHOR_HIDDEN_HOOK = {
6824    [CommonPopupDataAttributes.anchorHidden]: ""
6825  };
6826  var triggerOpenStateMapping = {
6827    open(value) {
6828      if (value) {
6829        return TRIGGER_HOOK;
6830      }
6831      return null;
6832    }
6833  };
6834  var popupStateMapping = {
6835    open(value) {
6836      if (value) {
6837        return POPUP_OPEN_HOOK;
6838      }
6839      return POPUP_CLOSED_HOOK;
6840    },
6841    anchorHidden(value) {
6842      if (value) {
6843        return ANCHOR_HIDDEN_HOOK;
6844      }
6845      return null;
6846    }
6847  };
6848  
6849  // node_modules/@base-ui/utils/inertValue.mjs
6850  function inertValue(value) {
6851    if (isReactVersionAtLeast(19)) {
6852      return value;
6853    }
6854    return value ? "true" : void 0;
6855  }
6856  
6857  // node_modules/@base-ui/react/utils/useAnchorPositioning.mjs
6858  var React33 = __toESM(require_react(), 1);
6859  
6860  // node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs
6861  var baseArrow = (options) => ({
6862    name: "arrow",
6863    options,
6864    async fn(state) {
6865      const {
6866        x,
6867        y,
6868        placement,
6869        rects,
6870        platform: platform3,
6871        elements,
6872        middlewareData
6873      } = state;
6874      const {
6875        element,
6876        padding = 0,
6877        offsetParent = "real"
6878      } = evaluate(options, state) || {};
6879      if (element == null) {
6880        return {};
6881      }
6882      const paddingObject = getPaddingObject(padding);
6883      const coords = {
6884        x,
6885        y
6886      };
6887      const axis = getAlignmentAxis(placement);
6888      const length = getAxisLength(axis);
6889      const arrowDimensions = await platform3.getDimensions(element);
6890      const isYAxis = axis === "y";
6891      const minProp = isYAxis ? "top" : "left";
6892      const maxProp = isYAxis ? "bottom" : "right";
6893      const clientProp = isYAxis ? "clientHeight" : "clientWidth";
6894      const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
6895      const startDiff = coords[axis] - rects.reference[axis];
6896      const arrowOffsetParent = offsetParent === "real" ? await platform3.getOffsetParent?.(element) : elements.floating;
6897      let clientSize = elements.floating[clientProp] || rects.floating[length];
6898      if (!clientSize || !await platform3.isElement?.(arrowOffsetParent)) {
6899        clientSize = elements.floating[clientProp] || rects.floating[length];
6900      }
6901      const centerToReference = endDiff / 2 - startDiff / 2;
6902      const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
6903      const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);
6904      const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);
6905      const min2 = minPadding;
6906      const max2 = clientSize - arrowDimensions[length] - maxPadding;
6907      const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
6908      const offset4 = clamp(min2, center, max2);
6909      const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
6910      const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0;
6911      return {
6912        [axis]: coords[axis] + alignmentOffset,
6913        data: {
6914          [axis]: offset4,
6915          centerOffset: center - offset4 - alignmentOffset,
6916          ...shouldAddOffset && {
6917            alignmentOffset
6918          }
6919        },
6920        reset: shouldAddOffset
6921      };
6922    }
6923  });
6924  var arrow4 = (options, deps) => ({
6925    ...baseArrow(options),
6926    options: [options, deps]
6927  });
6928  
6929  // node_modules/@base-ui/react/utils/hideMiddleware.mjs
6930  var nativeHideFn = hide3().fn;
6931  var hide4 = {
6932    name: "hide",
6933    async fn(state) {
6934      const {
6935        width,
6936        height,
6937        x,
6938        y
6939      } = state.rects.reference;
6940      const anchorHidden = width === 0 && height === 0 && x === 0 && y === 0;
6941      const nativeHideResult = await nativeHideFn(state);
6942      return {
6943        data: {
6944          referenceHidden: nativeHideResult.data?.referenceHidden || anchorHidden
6945        }
6946      };
6947    }
6948  };
6949  
6950  // node_modules/@base-ui/react/utils/adaptiveOriginMiddleware.mjs
6951  var DEFAULT_SIDES = {
6952    sideX: "left",
6953    sideY: "top"
6954  };
6955  var adaptiveOrigin = {
6956    name: "adaptiveOrigin",
6957    async fn(state) {
6958      const {
6959        x: rawX,
6960        y: rawY,
6961        rects: {
6962          floating: floatRect
6963        },
6964        elements: {
6965          floating
6966        },
6967        platform: platform3,
6968        strategy,
6969        placement
6970      } = state;
6971      const win = getWindow(floating);
6972      const styles = win.getComputedStyle(floating);
6973      const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== "";
6974      if (!hasTransition) {
6975        return {
6976          x: rawX,
6977          y: rawY,
6978          data: DEFAULT_SIDES
6979        };
6980      }
6981      const offsetParent = await platform3.getOffsetParent?.(floating);
6982      let offsetDimensions = {
6983        width: 0,
6984        height: 0
6985      };
6986      if (strategy === "fixed" && win?.visualViewport) {
6987        offsetDimensions = {
6988          width: win.visualViewport.width,
6989          height: win.visualViewport.height
6990        };
6991      } else if (offsetParent === win) {
6992        const doc = ownerDocument(floating);
6993        offsetDimensions = {
6994          width: doc.documentElement.clientWidth,
6995          height: doc.documentElement.clientHeight
6996        };
6997      } else if (await platform3.isElement?.(offsetParent)) {
6998        offsetDimensions = await platform3.getDimensions(offsetParent);
6999      }
7000      const currentSide = getSide(placement);
7001      let x = rawX;
7002      let y = rawY;
7003      if (currentSide === "left") {
7004        x = offsetDimensions.width - (rawX + floatRect.width);
7005      }
7006      if (currentSide === "top") {
7007        y = offsetDimensions.height - (rawY + floatRect.height);
7008      }
7009      const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX;
7010      const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY;
7011      return {
7012        x,
7013        y,
7014        data: {
7015          sideX,
7016          sideY
7017        }
7018      };
7019    }
7020  };
7021  
7022  // node_modules/@base-ui/react/utils/useAnchorPositioning.mjs
7023  function getLogicalSide(sideParam, renderedSide, isRtl) {
7024    const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end";
7025    const logicalRight = isRtl ? "inline-start" : "inline-end";
7026    const logicalLeft = isRtl ? "inline-end" : "inline-start";
7027    return {
7028      top: "top",
7029      right: isLogicalSideParam ? logicalRight : "right",
7030      bottom: "bottom",
7031      left: isLogicalSideParam ? logicalLeft : "left"
7032    }[renderedSide];
7033  }
7034  function getOffsetData(state, sideParam, isRtl) {
7035    const {
7036      rects,
7037      placement
7038    } = state;
7039    const data = {
7040      side: getLogicalSide(sideParam, getSide(placement), isRtl),
7041      align: getAlignment(placement) || "center",
7042      anchor: {
7043        width: rects.reference.width,
7044        height: rects.reference.height
7045      },
7046      positioner: {
7047        width: rects.floating.width,
7048        height: rects.floating.height
7049      }
7050    };
7051    return data;
7052  }
7053  function useAnchorPositioning(params) {
7054    const {
7055      // Public parameters
7056      anchor,
7057      positionMethod = "absolute",
7058      side: sideParam = "bottom",
7059      sideOffset = 0,
7060      align = "center",
7061      alignOffset = 0,
7062      collisionBoundary,
7063      collisionPadding: collisionPaddingParam = 5,
7064      sticky = false,
7065      arrowPadding = 5,
7066      disableAnchorTracking = false,
7067      inline: inlineMiddleware,
7068      // Private parameters
7069      keepMounted = false,
7070      floatingRootContext,
7071      mounted,
7072      collisionAvoidance,
7073      shiftCrossAxis = false,
7074      nodeId,
7075      adaptiveOrigin: adaptiveOrigin2,
7076      lazyFlip = false,
7077      externalTree
7078    } = params;
7079    const [mountSide, setMountSide] = React33.useState(null);
7080    if (!mounted && mountSide !== null) {
7081      setMountSide(null);
7082    }
7083    const collisionAvoidanceSide = collisionAvoidance.side || "flip";
7084    const collisionAvoidanceAlign = collisionAvoidance.align || "flip";
7085    const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end";
7086    const anchorFn = typeof anchor === "function" ? anchor : void 0;
7087    const anchorFnCallback = useStableCallback(anchorFn);
7088    const anchorDep = anchorFn ? anchorFnCallback : anchor;
7089    const anchorValueRef = useValueAsRef(anchor);
7090    const mountedRef = useValueAsRef(mounted);
7091    const direction = useDirection();
7092    const isRtl = direction === "rtl";
7093    const side = mountSide || {
7094      top: "top",
7095      right: "right",
7096      bottom: "bottom",
7097      left: "left",
7098      "inline-end": isRtl ? "left" : "right",
7099      "inline-start": isRtl ? "right" : "left"
7100    }[sideParam];
7101    const placement = align === "center" ? side : `$side}-$align}`;
7102    let collisionPadding = collisionPaddingParam;
7103    const bias = 1;
7104    const biasTop = sideParam === "bottom" ? bias : 0;
7105    const biasBottom = sideParam === "top" ? bias : 0;
7106    const biasLeft = sideParam === "right" ? bias : 0;
7107    const biasRight = sideParam === "left" ? bias : 0;
7108    if (typeof collisionPadding === "number") {
7109      collisionPadding = {
7110        top: collisionPadding + biasTop,
7111        right: collisionPadding + biasRight,
7112        bottom: collisionPadding + biasBottom,
7113        left: collisionPadding + biasLeft
7114      };
7115    } else if (collisionPadding) {
7116      collisionPadding = {
7117        top: (collisionPadding.top || 0) + biasTop,
7118        right: (collisionPadding.right || 0) + biasRight,
7119        bottom: (collisionPadding.bottom || 0) + biasBottom,
7120        left: (collisionPadding.left || 0) + biasLeft
7121      };
7122    }
7123    const commonCollisionProps = {
7124      boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary,
7125      padding: collisionPadding
7126    };
7127    const arrowRef = React33.useRef(null);
7128    const sideOffsetRef = useValueAsRef(sideOffset);
7129    const alignOffsetRef = useValueAsRef(alignOffset);
7130    const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0;
7131    const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0;
7132    const middleware = [];
7133    if (inlineMiddleware) {
7134      middleware.push(inlineMiddleware);
7135    }
7136    middleware.push(offset3((state) => {
7137      const data = getOffsetData(state, sideParam, isRtl);
7138      const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current;
7139      const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current;
7140      return {
7141        mainAxis: sideAxis,
7142        crossAxis: alignAxis,
7143        alignmentAxis: alignAxis
7144      };
7145    }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));
7146    const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift";
7147    const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift");
7148    const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({
7149      ...commonCollisionProps,
7150      // Ensure the popup flips if it's been limited by its --available-height and it resizes.
7151      // Since the size() padding is smaller than the flip() padding, flip() will take precedence.
7152      padding: {
7153        top: collisionPadding.top + bias,
7154        right: collisionPadding.right + bias,
7155        bottom: collisionPadding.bottom + bias,
7156        left: collisionPadding.left + bias
7157      },
7158      mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip",
7159      crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false,
7160      fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide
7161    });
7162    const shiftMiddleware = shiftDisabled ? null : shift3((data) => {
7163      const html = ownerDocument(data.elements.floating).documentElement;
7164      return {
7165        ...commonCollisionProps,
7166        // Use the Layout Viewport to avoid shifting around when pinch-zooming
7167        // for context menus.
7168        rootBoundary: shiftCrossAxis ? {
7169          x: 0,
7170          y: 0,
7171          width: html.clientWidth,
7172          height: html.clientHeight
7173        } : void 0,
7174        mainAxis: collisionAvoidanceAlign !== "none",
7175        crossAxis: crossAxisShiftEnabled,
7176        limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => {
7177          if (!arrowRef.current) {
7178            return {};
7179          }
7180          const {
7181            width,
7182            height
7183          } = arrowRef.current.getBoundingClientRect();
7184          const sideAxis = getSideAxis(getSide(limitData.placement));
7185          const arrowSize = sideAxis === "y" ? width : height;
7186          const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;
7187          return {
7188            offset: arrowSize / 2 + offsetAmount / 2
7189          };
7190        })
7191      };
7192    }, [commonCollisionProps, sticky, shiftCrossAxis, collisionPadding, collisionAvoidanceAlign]);
7193    if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || align === "center") {
7194      middleware.push(shiftMiddleware, flipMiddleware);
7195    } else {
7196      middleware.push(flipMiddleware, shiftMiddleware);
7197    }
7198    middleware.push(size3({
7199      ...commonCollisionProps,
7200      apply({
7201        elements: {
7202          floating
7203        },
7204        availableWidth,
7205        availableHeight,
7206        rects
7207      }) {
7208        if (!mountedRef.current) {
7209          return;
7210        }
7211        const floatingStyle = floating.style;
7212        floatingStyle.setProperty("--available-width", `$availableWidth}px`);
7213        floatingStyle.setProperty("--available-height", `$availableHeight}px`);
7214        const dpr = getWindow(floating).devicePixelRatio || 1;
7215        const {
7216          x: x2,
7217          y: y2,
7218          width,
7219          height
7220        } = rects.reference;
7221        const anchorWidth = (Math.round((x2 + width) * dpr) - Math.round(x2 * dpr)) / dpr;
7222        const anchorHeight = (Math.round((y2 + height) * dpr) - Math.round(y2 * dpr)) / dpr;
7223        floatingStyle.setProperty("--anchor-width", `$anchorWidth}px`);
7224        floatingStyle.setProperty("--anchor-height", `$anchorHeight}px`);
7225      }
7226    }), arrow4((state) => ({
7227      // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
7228      // we'll create a fake element.
7229      element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"),
7230      padding: arrowPadding,
7231      offsetParent: "floating"
7232    }), [arrowPadding]), {
7233      name: "transformOrigin",
7234      fn(state) {
7235        const {
7236          elements: elements2,
7237          middlewareData: middlewareData2,
7238          placement: renderedPlacement2,
7239          rects,
7240          y: y2
7241        } = state;
7242        const currentRenderedSide = getSide(renderedPlacement2);
7243        const currentRenderedAxis = getSideAxis(currentRenderedSide);
7244        const arrowEl = arrowRef.current;
7245        const arrowX = middlewareData2.arrow?.x || 0;
7246        const arrowY = middlewareData2.arrow?.y || 0;
7247        const arrowWidth = arrowEl?.clientWidth || 0;
7248        const arrowHeight = arrowEl?.clientHeight || 0;
7249        const transformX = arrowX + arrowWidth / 2;
7250        const transformY = arrowY + arrowHeight / 2;
7251        const shiftY = Math.abs(middlewareData2.shift?.y || 0);
7252        const halfAnchorHeight = rects.reference.height / 2;
7253        const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;
7254        const isOverlappingAnchor = shiftY > sideOffsetValue;
7255        const adjacentTransformOrigin = {
7256          top: `$transformX}px calc(100% + $sideOffsetValue}px)`,
7257          bottom: `$transformX}px ${-sideOffsetValue}px`,
7258          left: `calc(100% + $sideOffsetValue}px) $transformY}px`,
7259          right: `${-sideOffsetValue}px $transformY}px`
7260        }[currentRenderedSide];
7261        const overlapTransformOrigin = `$transformX}px $rects.reference.y + halfAnchorHeight - y2}px`;
7262        elements2.floating.style.setProperty("--transform-origin", crossAxisShiftEnabled && currentRenderedAxis === "y" && isOverlappingAnchor ? overlapTransformOrigin : adjacentTransformOrigin);
7263        return {};
7264      }
7265    }, hide4, adaptiveOrigin2);
7266    useIsoLayoutEffect(() => {
7267      if (!mounted && floatingRootContext) {
7268        floatingRootContext.update({
7269          referenceElement: null,
7270          floatingElement: null,
7271          domReferenceElement: null,
7272          positionReference: null
7273        });
7274      }
7275    }, [mounted, floatingRootContext]);
7276    const autoUpdateOptions = React33.useMemo(() => ({
7277      elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined",
7278      layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined"
7279    }), [disableAnchorTracking]);
7280    const {
7281      refs,
7282      elements,
7283      x,
7284      y,
7285      middlewareData,
7286      update: update2,
7287      placement: renderedPlacement,
7288      context,
7289      isPositioned,
7290      floatingStyles: originalFloatingStyles
7291    } = useFloating2({
7292      rootContext: floatingRootContext,
7293      open: keepMounted ? mounted : void 0,
7294      placement,
7295      middleware,
7296      strategy: positionMethod,
7297      whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions),
7298      nodeId,
7299      externalTree
7300    });
7301    const {
7302      sideX,
7303      sideY
7304    } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;
7305    const resolvedPosition = isPositioned ? positionMethod : "fixed";
7306    const floatingStyles = React33.useMemo(() => {
7307      const base = adaptiveOrigin2 ? {
7308        position: resolvedPosition,
7309        [sideX]: x,
7310        [sideY]: y
7311      } : {
7312        position: resolvedPosition,
7313        ...originalFloatingStyles
7314      };
7315      if (!isPositioned) {
7316        base.opacity = 0;
7317      }
7318      return base;
7319    }, [adaptiveOrigin2, resolvedPosition, sideX, x, sideY, y, originalFloatingStyles, isPositioned]);
7320    const registeredPositionReferenceRef = React33.useRef(null);
7321    useIsoLayoutEffect(() => {
7322      if (!mounted) {
7323        return;
7324      }
7325      const anchorValue = anchorValueRef.current;
7326      const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue;
7327      const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;
7328      const finalAnchor = unwrappedElement || null;
7329      if (finalAnchor !== registeredPositionReferenceRef.current) {
7330        refs.setPositionReference(finalAnchor);
7331        registeredPositionReferenceRef.current = finalAnchor;
7332      }
7333    }, [mounted, refs, anchorDep, anchorValueRef]);
7334    React33.useEffect(() => {
7335      if (!mounted) {
7336        return;
7337      }
7338      const anchorValue = anchorValueRef.current;
7339      if (typeof anchorValue === "function") {
7340        return;
7341      }
7342      if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {
7343        refs.setPositionReference(anchorValue.current);
7344        registeredPositionReferenceRef.current = anchorValue.current;
7345      }
7346    }, [mounted, refs, anchorDep, anchorValueRef]);
7347    React33.useEffect(() => {
7348      if (keepMounted && mounted && elements.reference && elements.floating) {
7349        return autoUpdate(elements.reference, elements.floating, update2, autoUpdateOptions);
7350      }
7351      return void 0;
7352    }, [keepMounted, mounted, elements, update2, autoUpdateOptions]);
7353    const renderedSide = getSide(renderedPlacement);
7354    const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);
7355    const renderedAlign = getAlignment(renderedPlacement) || "center";
7356    const anchorHidden = Boolean(middlewareData.hide?.referenceHidden);
7357    useIsoLayoutEffect(() => {
7358      if (lazyFlip && mounted && isPositioned) {
7359        setMountSide(renderedSide);
7360      }
7361    }, [lazyFlip, mounted, isPositioned, renderedSide]);
7362    const arrowStyles = React33.useMemo(() => ({
7363      position: "absolute",
7364      top: middlewareData.arrow?.y,
7365      left: middlewareData.arrow?.x
7366    }), [middlewareData.arrow]);
7367    const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;
7368    return React33.useMemo(() => ({
7369      positionerStyles: floatingStyles,
7370      arrowStyles,
7371      arrowRef,
7372      arrowUncentered,
7373      side: logicalRenderedSide,
7374      align: renderedAlign,
7375      physicalSide: renderedSide,
7376      anchorHidden,
7377      refs,
7378      context,
7379      isPositioned,
7380      update: update2
7381    }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden, refs, context, isPositioned, update2]);
7382  }
7383  function isRef(param) {
7384    return param != null && "current" in param;
7385  }
7386  
7387  // node_modules/@base-ui/react/utils/getDisabledMountTransitionStyles.mjs
7388  function getDisabledMountTransitionStyles(transitionStatus) {
7389    return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;
7390  }
7391  
7392  // node_modules/@base-ui/react/utils/usePositioner.mjs
7393  function usePositioner(componentProps, state, {
7394    styles,
7395    transitionStatus,
7396    props,
7397    refs,
7398    hidden,
7399    inert = false
7400  }) {
7401    const style = {
7402      ...styles
7403    };
7404    if (inert) {
7405      style.pointerEvents = "none";
7406    }
7407    return useRenderElement("div", componentProps, {
7408      state,
7409      ref: refs,
7410      props: [{
7411        role: "presentation",
7412        hidden,
7413        style
7414      }, getDisabledMountTransitionStyles(transitionStatus), props],
7415      stateAttributesMapping: popupStateMapping
7416    });
7417  }
7418  
7419  // node_modules/@base-ui/react/button/Button.mjs
7420  var React34 = __toESM(require_react(), 1);
7421  var Button = /* @__PURE__ */ React34.forwardRef(function Button2(componentProps, forwardedRef) {
7422    const {
7423      render,
7424      className,
7425      disabled: disabled2 = false,
7426      focusableWhenDisabled = false,
7427      nativeButton = true,
7428      style,
7429      ...elementProps
7430    } = componentProps;
7431    const {
7432      getButtonProps,
7433      buttonRef
7434    } = useButton({
7435      disabled: disabled2,
7436      focusableWhenDisabled,
7437      native: nativeButton
7438    });
7439    const state = {
7440      disabled: disabled2
7441    };
7442    return useRenderElement("button", componentProps, {
7443      state,
7444      ref: [forwardedRef, buttonRef],
7445      props: [elementProps, getButtonProps]
7446    });
7447  });
7448  if (true) Button.displayName = "Button";
7449  
7450  // node_modules/@base-ui/react/utils/usePopupViewport.mjs
7451  var React37 = __toESM(require_react(), 1);
7452  var ReactDOM6 = __toESM(require_react_dom(), 1);
7453  
7454  // node_modules/@base-ui/utils/usePreviousValue.mjs
7455  var React35 = __toESM(require_react(), 1);
7456  function usePreviousValue(value) {
7457    const [state, setState] = React35.useState({
7458      current: value,
7459      previous: null
7460    });
7461    if (value !== state.current) {
7462      setState({
7463        current: value,
7464        previous: state.current
7465      });
7466    }
7467    return state.previous;
7468  }
7469  
7470  // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7471  var React36 = __toESM(require_react(), 1);
7472  
7473  // node_modules/@base-ui/react/utils/getCssDimensions.mjs
7474  function getCssDimensions2(element) {
7475    const css = getComputedStyle2(element);
7476    let width = parseFloat(css.width) || 0;
7477    let height = parseFloat(css.height) || 0;
7478    const hasOffset = isHTMLElement(element);
7479    const offsetWidth = hasOffset ? element.offsetWidth : width;
7480    const offsetHeight = hasOffset ? element.offsetHeight : height;
7481    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
7482    if (shouldFallback) {
7483      width = offsetWidth;
7484      height = offsetHeight;
7485    }
7486    return {
7487      width,
7488      height
7489    };
7490  }
7491  
7492  // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7493  function usePopupAutoResize(parameters) {
7494    const {
7495      popupElement,
7496      positionerElement,
7497      content,
7498      mounted,
7499      onMeasureLayout: onMeasureLayoutParam,
7500      onMeasureLayoutComplete: onMeasureLayoutCompleteParam,
7501      side,
7502      direction
7503    } = parameters;
7504    const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true, false);
7505    const animationFrame = useAnimationFrame();
7506    const committedDimensionsRef = React36.useRef(null);
7507    const isInitialRenderRef = React36.useRef(true);
7508    const restoreAnchoringStylesRef = React36.useRef(NOOP);
7509    const onMeasureLayout = useStableCallback(onMeasureLayoutParam);
7510    const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam);
7511    const anchoringStyles = React36.useMemo(() => {
7512      let isOriginSide = side === "top";
7513      let isPhysicalLeft = side === "left";
7514      if (direction === "rtl") {
7515        isOriginSide = isOriginSide || side === "inline-end";
7516        isPhysicalLeft = isPhysicalLeft || side === "inline-end";
7517      } else {
7518        isOriginSide = isOriginSide || side === "inline-start";
7519        isPhysicalLeft = isPhysicalLeft || side === "inline-start";
7520      }
7521      return isOriginSide ? {
7522        position: "absolute",
7523        [side === "top" ? "bottom" : "top"]: "0",
7524        [isPhysicalLeft ? "right" : "left"]: "0"
7525      } : EMPTY_OBJECT;
7526    }, [side, direction]);
7527    useIsoLayoutEffect(() => {
7528      if (!mounted) {
7529        restoreAnchoringStylesRef.current = NOOP;
7530        isInitialRenderRef.current = true;
7531        committedDimensionsRef.current = null;
7532        return void 0;
7533      }
7534      if (!popupElement || !positionerElement) {
7535        return void 0;
7536      }
7537      restoreAnchoringStylesRef.current = applyElementStyles(popupElement, anchoringStyles);
7538      setPopupCssSize(popupElement, "auto");
7539      const restorePopupPosition = overrideElementStyle(popupElement, "position", "static");
7540      const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none");
7541      const restorePopupScale = overrideElementStyle(popupElement, "scale", "1");
7542      const restorePositionerAvailableSize = applyElementStyles(positionerElement, {
7543        "--available-width": "max-content",
7544        "--available-height": "max-content"
7545      });
7546      function restoreMeasurementOverrides() {
7547        restorePopupPosition();
7548        restorePopupTransform();
7549        restorePositionerAvailableSize();
7550      }
7551      function restoreMeasurementOverridesIncludingScale() {
7552        restoreMeasurementOverrides();
7553        restorePopupScale();
7554      }
7555      onMeasureLayout?.();
7556      if (isInitialRenderRef.current || committedDimensionsRef.current === null) {
7557        setPositionerCssSize(positionerElement, "max-content");
7558        const dimensions = getCssDimensions2(popupElement);
7559        committedDimensionsRef.current = dimensions;
7560        setPositionerCssSize(positionerElement, dimensions);
7561        restoreMeasurementOverridesIncludingScale();
7562        onMeasureLayoutComplete?.(null, dimensions);
7563        isInitialRenderRef.current = false;
7564        return () => {
7565          restoreAnchoringStylesRef.current();
7566          restoreAnchoringStylesRef.current = NOOP;
7567        };
7568      }
7569      setPositionerCssSize(positionerElement, "max-content");
7570      const previousDimensions = committedDimensionsRef.current;
7571      const newDimensions = getCssDimensions2(popupElement);
7572      committedDimensionsRef.current = newDimensions;
7573      setPopupCssSize(popupElement, previousDimensions);
7574      restoreMeasurementOverridesIncludingScale();
7575      onMeasureLayoutComplete?.(previousDimensions, newDimensions);
7576      setPositionerCssSize(positionerElement, newDimensions);
7577      const abortController = new AbortController();
7578      animationFrame.request(() => {
7579        setPopupCssSize(popupElement, newDimensions);
7580        runOnceAnimationsFinish(() => {
7581          popupElement.style.setProperty("--popup-width", "auto");
7582          popupElement.style.setProperty("--popup-height", "auto");
7583        }, abortController.signal);
7584      });
7585      return () => {
7586        abortController.abort();
7587        animationFrame.cancel();
7588        restoreAnchoringStylesRef.current();
7589        restoreAnchoringStylesRef.current = NOOP;
7590      };
7591    }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]);
7592  }
7593  function overrideElementStyle(element, property, value) {
7594    const originalValue = element.style.getPropertyValue(property);
7595    element.style.setProperty(property, value);
7596    return () => {
7597      element.style.setProperty(property, originalValue);
7598    };
7599  }
7600  function applyElementStyles(element, styles) {
7601    const restorers = [];
7602    for (const [key, value] of Object.entries(styles)) {
7603      restorers.push(overrideElementStyle(element, key, value));
7604    }
7605    return restorers.length ? () => {
7606      restorers.forEach((restore) => restore());
7607    } : NOOP;
7608  }
7609  function setPopupCssSize(popupElement, size4) {
7610    const width = size4 === "auto" ? "auto" : `$size4.width}px`;
7611    const height = size4 === "auto" ? "auto" : `$size4.height}px`;
7612    popupElement.style.setProperty("--popup-width", width);
7613    popupElement.style.setProperty("--popup-height", height);
7614  }
7615  function setPositionerCssSize(positionerElement, size4) {
7616    const width = size4 === "max-content" ? "max-content" : `$size4.width}px`;
7617    const height = size4 === "max-content" ? "max-content" : `$size4.height}px`;
7618    positionerElement.style.setProperty("--positioner-width", width);
7619    positionerElement.style.setProperty("--positioner-height", height);
7620  }
7621  
7622  // node_modules/@base-ui/react/utils/usePopupViewport.mjs
7623  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
7624  function usePopupViewport(parameters) {
7625    const {
7626      store: store2,
7627      side,
7628      cssVars,
7629      children
7630    } = parameters;
7631    const direction = useDirection();
7632    const activeTrigger = store2.useState("activeTriggerElement");
7633    const activeTriggerId = store2.useState("activeTriggerId");
7634    const open = store2.useState("open");
7635    const payload = store2.useState("payload");
7636    const mounted = store2.useState("mounted");
7637    const popupElement = store2.useState("popupElement");
7638    const positionerElement = store2.useState("positionerElement");
7639    const previousActiveTrigger = usePreviousValue(open ? activeTrigger : null);
7640    const currentContentKey = usePopupContentKey(activeTriggerId, payload);
7641    const capturedNodeRef = React37.useRef(null);
7642    const [previousContentNode, setPreviousContentNode] = React37.useState(null);
7643    const [newTriggerOffset, setNewTriggerOffset] = React37.useState(null);
7644    const currentContainerRef = React37.useRef(null);
7645    const previousContainerRef = React37.useRef(null);
7646    const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true, false);
7647    const cleanupFrame = useAnimationFrame();
7648    const [previousContentDimensions, setPreviousContentDimensions] = React37.useState(null);
7649    const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React37.useState(false);
7650    useIsoLayoutEffect(() => {
7651      store2.set("hasViewport", true);
7652      return () => {
7653        store2.set("hasViewport", false);
7654      };
7655    }, [store2]);
7656    const handleMeasureLayout = useStableCallback(() => {
7657      currentContainerRef.current?.style.setProperty("animation", "none");
7658      currentContainerRef.current?.style.setProperty("transition", "none");
7659      previousContainerRef.current?.style.setProperty("display", "none");
7660    });
7661    const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => {
7662      currentContainerRef.current?.style.removeProperty("animation");
7663      currentContainerRef.current?.style.removeProperty("transition");
7664      previousContainerRef.current?.style.removeProperty("display");
7665      if (previousDimensions) {
7666        setPreviousContentDimensions(previousDimensions);
7667      }
7668    });
7669    const lastHandledTriggerRef = React37.useRef(null);
7670    useIsoLayoutEffect(() => {
7671      if (!open || !mounted) {
7672        lastHandledTriggerRef.current = null;
7673      }
7674    }, [open, mounted]);
7675    useIsoLayoutEffect(() => {
7676      if (activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) {
7677        setPreviousContentNode(capturedNodeRef.current);
7678        setShowStartingStyleAttribute(true);
7679        const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger);
7680        setNewTriggerOffset(offset4);
7681        cleanupFrame.request(() => {
7682          ReactDOM6.flushSync(() => {
7683            setShowStartingStyleAttribute(false);
7684          });
7685          onAnimationsFinished(() => {
7686            setPreviousContentNode(null);
7687            setPreviousContentDimensions(null);
7688            capturedNodeRef.current = null;
7689          });
7690        });
7691        lastHandledTriggerRef.current = activeTrigger;
7692      }
7693    }, [activeTrigger, previousActiveTrigger, previousContentNode, onAnimationsFinished, cleanupFrame]);
7694    useIsoLayoutEffect(() => {
7695      const source = currentContainerRef.current;
7696      if (!source) {
7697        return;
7698      }
7699      const wrapper = ownerDocument(source).createElement("div");
7700      for (const child of Array.from(source.childNodes)) {
7701        wrapper.appendChild(child.cloneNode(true));
7702      }
7703      capturedNodeRef.current = wrapper;
7704    });
7705    const isTransitioning = previousContentNode != null;
7706    let childrenToRender;
7707    if (!isTransitioning) {
7708      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {
7709        "data-current": true,
7710        ref: currentContainerRef,
7711        children
7712      }, currentContentKey);
7713    } else {
7714      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(React37.Fragment, {
7715        children: [/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {
7716          "data-previous": true,
7717          inert: inertValue(true),
7718          ref: previousContainerRef,
7719          style: {
7720            ...previousContentDimensions ? {
7721              [cssVars.popupWidth]: `$previousContentDimensions.width}px`,
7722              [cssVars.popupHeight]: `$previousContentDimensions.height}px`
7723            } : null,
7724            position: "absolute"
7725          },
7726          "data-ending-style": showStartingStyleAttribute ? void 0 : ""
7727        }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {
7728          "data-current": true,
7729          ref: currentContainerRef,
7730          "data-starting-style": showStartingStyleAttribute ? "" : void 0,
7731          children
7732        }, currentContentKey)]
7733      });
7734    }
7735    useIsoLayoutEffect(() => {
7736      const container = previousContainerRef.current;
7737      if (!container || !previousContentNode) {
7738        return;
7739      }
7740      container.replaceChildren(...Array.from(previousContentNode.childNodes));
7741    }, [previousContentNode]);
7742    usePopupAutoResize({
7743      popupElement,
7744      positionerElement,
7745      mounted,
7746      content: payload,
7747      onMeasureLayout: handleMeasureLayout,
7748      onMeasureLayoutComplete: handleMeasureLayoutComplete,
7749      side,
7750      direction
7751    });
7752    const state = {
7753      activationDirection: getActivationDirection(newTriggerOffset),
7754      transitioning: isTransitioning
7755    };
7756    return {
7757      children: childrenToRender,
7758      state
7759    };
7760  }
7761  function getActivationDirection(offset4) {
7762    if (!offset4) {
7763      return void 0;
7764    }
7765    return `$getValueWithTolerance(offset4.horizontal, 5, "right", "left")} $getValueWithTolerance(offset4.vertical, 5, "down", "up")}`;
7766  }
7767  function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) {
7768    if (value > tolerance) {
7769      return positiveLabel;
7770    }
7771    if (value < -tolerance) {
7772      return negativeLabel;
7773    }
7774    return "";
7775  }
7776  function calculateRelativePosition(from, to) {
7777    const fromRect = from.getBoundingClientRect();
7778    const toRect = to.getBoundingClientRect();
7779    const fromCenter = {
7780      x: fromRect.left + fromRect.width / 2,
7781      y: fromRect.top + fromRect.height / 2
7782    };
7783    const toCenter = {
7784      x: toRect.left + toRect.width / 2,
7785      y: toRect.top + toRect.height / 2
7786    };
7787    return {
7788      horizontal: toCenter.x - fromCenter.x,
7789      vertical: toCenter.y - fromCenter.y
7790    };
7791  }
7792  function usePopupContentKey(activeTriggerId, payload) {
7793    const [contentKey, setContentKey] = React37.useState(0);
7794    const previousActiveTriggerIdRef = React37.useRef(activeTriggerId);
7795    const previousPayloadRef = React37.useRef(payload);
7796    const pendingPayloadUpdateRef = React37.useRef(false);
7797    useIsoLayoutEffect(() => {
7798      const previousActiveTriggerId = previousActiveTriggerIdRef.current;
7799      const previousPayload = previousPayloadRef.current;
7800      const triggerIdChanged = activeTriggerId !== previousActiveTriggerId;
7801      const payloadChanged = payload !== previousPayload;
7802      if (triggerIdChanged) {
7803        setContentKey((value) => value + 1);
7804        pendingPayloadUpdateRef.current = !payloadChanged;
7805      } else if (pendingPayloadUpdateRef.current && payloadChanged) {
7806        setContentKey((value) => value + 1);
7807        pendingPayloadUpdateRef.current = false;
7808      }
7809      previousActiveTriggerIdRef.current = activeTriggerId;
7810      previousPayloadRef.current = payload;
7811    }, [activeTriggerId, payload]);
7812    return `$activeTriggerId ?? "current"}-$contentKey}`;
7813  }
7814  
7815  // node_modules/@base-ui/react/utils/FloatingPortalLite.mjs
7816  var React38 = __toESM(require_react(), 1);
7817  var ReactDOM7 = __toESM(require_react_dom(), 1);
7818  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
7819  var FloatingPortalLite = /* @__PURE__ */ React38.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) {
7820    const {
7821      children,
7822      container,
7823      className,
7824      render,
7825      style,
7826      ...elementProps
7827    } = componentProps;
7828    const {
7829      portalNode,
7830      portalSubtree
7831    } = useFloatingPortalNode({
7832      container,
7833      ref: forwardedRef,
7834      componentProps,
7835      elementProps
7836    });
7837    if (!portalSubtree && !portalNode) {
7838      return null;
7839    }
7840    return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(React38.Fragment, {
7841      children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM7.createPortal(children, portalNode)]
7842    });
7843  });
7844  if (true) FloatingPortalLite.displayName = "FloatingPortalLite";
7845  
7846  // node_modules/@base-ui/react/tooltip/index.parts.mjs
7847  var index_parts_exports = {};
7848  __export(index_parts_exports, {
7849    Arrow: () => TooltipArrow,
7850    Handle: () => TooltipHandle,
7851    Popup: () => TooltipPopup,
7852    Portal: () => TooltipPortal,
7853    Positioner: () => TooltipPositioner,
7854    Provider: () => TooltipProvider,
7855    Root: () => TooltipRoot,
7856    Trigger: () => TooltipTrigger,
7857    Viewport: () => TooltipViewport,
7858    createHandle: () => createTooltipHandle
7859  });
7860  
7861  // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
7862  var React41 = __toESM(require_react(), 1);
7863  
7864  // node_modules/@base-ui/react/tooltip/root/TooltipRootContext.mjs
7865  var React39 = __toESM(require_react(), 1);
7866  var TooltipRootContext = /* @__PURE__ */ React39.createContext(void 0);
7867  if (true) TooltipRootContext.displayName = "TooltipRootContext";
7868  function useTooltipRootContext(optional) {
7869    const context = React39.useContext(TooltipRootContext);
7870    if (context === void 0 && !optional) {
7871      throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72));
7872    }
7873    return context;
7874  }
7875  
7876  // node_modules/@base-ui/react/tooltip/store/TooltipStore.mjs
7877  var React40 = __toESM(require_react(), 1);
7878  var selectors2 = {
7879    ...popupStoreSelectors,
7880    disabled: createSelector((state) => state.disabled),
7881    instantType: createSelector((state) => state.instantType),
7882    isInstantPhase: createSelector((state) => state.isInstantPhase),
7883    trackCursorAxis: createSelector((state) => state.trackCursorAxis),
7884    disableHoverablePopup: createSelector((state) => state.disableHoverablePopup),
7885    lastOpenChangeReason: createSelector((state) => state.openChangeReason),
7886    closeOnClick: createSelector((state) => state.closeOnClick),
7887    closeDelay: createSelector((state) => state.closeDelay),
7888    hasViewport: createSelector((state) => state.hasViewport)
7889  };
7890  var TooltipStore = class _TooltipStore extends ReactStore {
7891    constructor(initialState, floatingId, nested = false) {
7892      const triggerElements = new PopupTriggerMap();
7893      const state = {
7894        ...createInitialState(),
7895        ...initialState
7896      };
7897      state.floatingRootContext = createPopupFloatingRootContext(triggerElements, floatingId, nested);
7898      super(state, {
7899        popupRef: /* @__PURE__ */ React40.createRef(),
7900        onOpenChange: void 0,
7901        onOpenChangeComplete: void 0,
7902        triggerElements
7903      }, selectors2);
7904    }
7905    setOpen = (nextOpen, eventDetails) => {
7906      applyPopupOpenChange(this, nextOpen, eventDetails, {
7907        extraState: {
7908          openChangeReason: eventDetails.reason
7909        }
7910      });
7911    };
7912    // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change.
7913    cancelPendingOpen(event) {
7914      this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event));
7915    }
7916    static useStore(externalStore, initialState) {
7917      const store2 = usePopupStore(externalStore, (floatingId, nested) => new _TooltipStore(initialState, floatingId, nested)).store;
7918      return store2;
7919    }
7920  };
7921  function createInitialState() {
7922    return {
7923      ...createInitialPopupStoreState(),
7924      disabled: false,
7925      instantType: void 0,
7926      isInstantPhase: false,
7927      trackCursorAxis: "none",
7928      disableHoverablePopup: false,
7929      openChangeReason: null,
7930      closeOnClick: true,
7931      closeDelay: 0,
7932      hasViewport: false
7933    };
7934  }
7935  
7936  // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
7937  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
7938  var TooltipRoot = fastComponent(function TooltipRoot2(props) {
7939    const {
7940      disabled: disabled2 = false,
7941      defaultOpen = false,
7942      open: openProp,
7943      disableHoverablePopup = false,
7944      trackCursorAxis = "none",
7945      actionsRef,
7946      onOpenChange,
7947      onOpenChangeComplete,
7948      handle,
7949      triggerId: triggerIdProp,
7950      defaultTriggerId: defaultTriggerIdProp = null,
7951      children
7952    } = props;
7953    const store2 = TooltipStore.useStore(handle?.store, {
7954      open: defaultOpen,
7955      openProp,
7956      activeTriggerId: defaultTriggerIdProp,
7957      triggerIdProp
7958    });
7959    useInitialOpenSync(store2, openProp, defaultOpen, defaultTriggerIdProp);
7960    store2.useControlledProp("openProp", openProp);
7961    store2.useControlledProp("triggerIdProp", triggerIdProp);
7962    store2.useContextCallback("onOpenChange", onOpenChange);
7963    store2.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
7964    const openState = store2.useState("open");
7965    const open = !disabled2 && openState;
7966    const activeTriggerId = store2.useState("activeTriggerId");
7967    const mounted = store2.useState("mounted");
7968    const payload = store2.useState("payload");
7969    store2.useSyncedValues({
7970      trackCursorAxis,
7971      disableHoverablePopup
7972    });
7973    store2.useSyncedValue("disabled", disabled2);
7974    useImplicitActiveTrigger(store2, {
7975      closeOnActiveTriggerUnmount: true
7976    });
7977    const {
7978      forceUnmount,
7979      transitionStatus
7980    } = useOpenStateTransitions(open, store2);
7981    const isInstantPhase = store2.useState("isInstantPhase");
7982    const instantType = store2.useState("instantType");
7983    const lastOpenChangeReason = store2.useState("lastOpenChangeReason");
7984    const previousInstantTypeRef = React41.useRef(null);
7985    useIsoLayoutEffect(() => {
7986      if (openState && disabled2) {
7987        store2.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled));
7988      }
7989    }, [openState, disabled2, store2]);
7990    useIsoLayoutEffect(() => {
7991      if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) {
7992        if (instantType !== "delay") {
7993          previousInstantTypeRef.current = instantType;
7994        }
7995        store2.set("instantType", "delay");
7996      } else if (previousInstantTypeRef.current !== null) {
7997        store2.set("instantType", previousInstantTypeRef.current);
7998        previousInstantTypeRef.current = null;
7999      }
8000    }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store2]);
8001    useIsoLayoutEffect(() => {
8002      if (open) {
8003        if (activeTriggerId == null) {
8004          store2.set("payload", void 0);
8005        }
8006      }
8007    }, [store2, activeTriggerId, open]);
8008    const handleImperativeClose = React41.useCallback(() => {
8009      store2.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction));
8010    }, [store2]);
8011    React41.useImperativeHandle(actionsRef, () => ({
8012      unmount: forceUnmount,
8013      close: handleImperativeClose
8014    }), [forceUnmount, handleImperativeClose]);
8015    const shouldRenderInteractions = open || mounted || !disabled2 && trackCursorAxis !== "none";
8016    return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(TooltipRootContext.Provider, {
8017      value: store2,
8018      children: [shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TooltipInteractions, {
8019        store: store2,
8020        disabled: disabled2,
8021        trackCursorAxis
8022      }), typeof children === "function" ? children({
8023        payload
8024      }) : children]
8025    });
8026  });
8027  if (true) TooltipRoot.displayName = "TooltipRoot";
8028  function TooltipInteractions({
8029    store: store2,
8030    disabled: disabled2,
8031    trackCursorAxis
8032  }) {
8033    const floatingRootContext = store2.useState("floatingRootContext");
8034    const dismiss = useDismiss(floatingRootContext, {
8035      enabled: !disabled2,
8036      referencePress: () => store2.select("closeOnClick")
8037    });
8038    const clientPoint = useClientPoint(floatingRootContext, {
8039      enabled: !disabled2 && trackCursorAxis !== "none",
8040      axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis
8041    });
8042    const activeTriggerProps = React41.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]);
8043    const inactiveTriggerProps = React41.useMemo(() => mergeProps(clientPoint.trigger, dismiss.trigger), [clientPoint.trigger, dismiss.trigger]);
8044    const popupProps = React41.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, clientPoint.floating, dismiss.floating), [clientPoint.floating, dismiss.floating]);
8045    usePopupInteractionProps(store2, {
8046      activeTriggerProps,
8047      inactiveTriggerProps,
8048      popupProps
8049    });
8050    return null;
8051  }
8052  
8053  // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8054  var React43 = __toESM(require_react(), 1);
8055  
8056  // node_modules/@base-ui/react/tooltip/provider/TooltipProviderContext.mjs
8057  var React42 = __toESM(require_react(), 1);
8058  var TooltipProviderContext = /* @__PURE__ */ React42.createContext(void 0);
8059  if (true) TooltipProviderContext.displayName = "TooltipProviderContext";
8060  function useTooltipProviderContext() {
8061    return React42.useContext(TooltipProviderContext);
8062  }
8063  
8064  // node_modules/@base-ui/react/tooltip/trigger/TooltipTriggerDataAttributes.mjs
8065  var TooltipTriggerDataAttributes = (function(TooltipTriggerDataAttributes2) {
8066    TooltipTriggerDataAttributes2[TooltipTriggerDataAttributes2["popupOpen"] = CommonTriggerDataAttributes.popupOpen] = "popupOpen";
8067    TooltipTriggerDataAttributes2["triggerDisabled"] = "data-trigger-disabled";
8068    return TooltipTriggerDataAttributes2;
8069  })({});
8070  
8071  // node_modules/@base-ui/react/tooltip/utils/constants.mjs
8072  var OPEN_DELAY = 600;
8073  
8074  // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8075  var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger";
8076  function getTargetElement(event) {
8077    if ("composedPath" in event) {
8078      const path = event.composedPath();
8079      for (let i = 0; i < path.length; i += 1) {
8080        const element = path[i];
8081        if (isElement(element)) {
8082          return element;
8083        }
8084      }
8085    }
8086    const target = event.target;
8087    if (isElement(target)) {
8088      return target;
8089    }
8090    return null;
8091  }
8092  function closestEnabledTooltipTrigger(element) {
8093    let current = element;
8094    while (current) {
8095      if (current.hasAttribute(TOOLTIP_TRIGGER_IDENTIFIER)) {
8096        return current;
8097      }
8098      const parentElement = current.parentElement;
8099      if (parentElement) {
8100        current = parentElement;
8101        continue;
8102      }
8103      const root = current.getRootNode();
8104      current = "host" in root && isElement(root.host) ? root.host : null;
8105    }
8106    return null;
8107  }
8108  var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) {
8109    const {
8110      render,
8111      className,
8112      style,
8113      handle,
8114      payload,
8115      disabled: disabledProp,
8116      delay,
8117      closeOnClick = true,
8118      closeDelay,
8119      id: idProp,
8120      ...elementProps
8121    } = componentProps;
8122    const rootContext = useTooltipRootContext(true);
8123    const store2 = handle?.store ?? rootContext;
8124    if (!store2) {
8125      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));
8126    }
8127    const thisTriggerId = useBaseUiId(idProp);
8128    const isTriggerActive = store2.useState("isTriggerActive", thisTriggerId);
8129    const isOpenedByThisTrigger = store2.useState("isOpenedByTrigger", thisTriggerId);
8130    const floatingRootContext = store2.useState("floatingRootContext");
8131    const triggerElementRef = React43.useRef(null);
8132    const delayWithDefault = delay ?? OPEN_DELAY;
8133    const closeDelayWithDefault = closeDelay ?? 0;
8134    const {
8135      registerTrigger,
8136      isMountedByThisTrigger
8137    } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store2, {
8138      payload,
8139      closeOnClick,
8140      closeDelay: closeDelayWithDefault
8141    });
8142    const providerContext = useTooltipProviderContext();
8143    const {
8144      delayRef,
8145      isInstantPhase,
8146      hasProvider
8147    } = useDelayGroup(floatingRootContext, {
8148      open: isOpenedByThisTrigger
8149    });
8150    const hoverInteraction = useHoverInteractionSharedState(floatingRootContext);
8151    store2.useSyncedValue("isInstantPhase", isInstantPhase);
8152    const rootDisabled = store2.useState("disabled");
8153    const disabled2 = disabledProp ?? rootDisabled;
8154    const disabledRef = useValueAsRef(disabled2);
8155    const trackCursorAxis = store2.useState("trackCursorAxis");
8156    const disableHoverablePopup = store2.useState("disableHoverablePopup");
8157    const isNestedTriggerHoveredRef = React43.useRef(false);
8158    const nestedTriggerOpenTimeout = useTimeout();
8159    const pointerTypeRef = React43.useRef(void 0);
8160    function getOpenDelay() {
8161      const providerDelay = providerContext?.delay;
8162      const groupOpenValue = typeof delayRef.current === "object" ? delayRef.current.open : void 0;
8163      let computedOpenDelay = delayWithDefault;
8164      if (hasProvider) {
8165        if (groupOpenValue !== 0) {
8166          computedOpenDelay = delay ?? providerDelay ?? delayWithDefault;
8167        } else {
8168          computedOpenDelay = 0;
8169        }
8170      }
8171      return computedOpenDelay;
8172    }
8173    function isEnabledNestedTriggerTarget(target) {
8174      const triggerEl = triggerElementRef.current;
8175      if (!triggerEl || !target) {
8176        return false;
8177      }
8178      const nearestTrigger = closestEnabledTooltipTrigger(target);
8179      return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger);
8180    }
8181    function detectNestedTriggerHover(target) {
8182      const nestedTriggerHovered = isEnabledNestedTriggerTarget(target);
8183      isNestedTriggerHoveredRef.current = nestedTriggerHovered;
8184      if (nestedTriggerHovered) {
8185        hoverInteraction.openChangeTimeout.clear();
8186        hoverInteraction.restTimeout.clear();
8187        hoverInteraction.restTimeoutPending = false;
8188        nestedTriggerOpenTimeout.clear();
8189      }
8190      return nestedTriggerHovered;
8191    }
8192    const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
8193      enabled: !disabled2,
8194      mouseOnly: true,
8195      move: false,
8196      handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null,
8197      restMs: getOpenDelay,
8198      delay() {
8199        const closeValue = typeof delayRef.current === "object" ? delayRef.current.close : void 0;
8200        let computedCloseDelay = closeDelayWithDefault;
8201        if (closeDelay == null && hasProvider) {
8202          computedCloseDelay = closeValue;
8203        }
8204        return {
8205          close: computedCloseDelay
8206        };
8207      },
8208      triggerElementRef,
8209      isActiveTrigger: isTriggerActive,
8210      isClosing: () => store2.select("transitionStatus") === "ending",
8211      shouldOpen() {
8212        return !isNestedTriggerHoveredRef.current;
8213      }
8214    });
8215    const focusProps = useFocus(floatingRootContext, {
8216      enabled: !disabled2
8217    }).reference;
8218    const handleNestedTriggerHover = (event) => {
8219      const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current;
8220      const target = getTargetElement(event);
8221      const nestedTriggerHovered = detectNestedTriggerHover(target);
8222      const triggerEl = triggerElementRef.current;
8223      const targetInsideTrigger = triggerEl && target && contains(triggerEl, target);
8224      if (nestedTriggerHovered && store2.select("open") && store2.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) {
8225        store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
8226        return;
8227      }
8228      if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store2.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences.
8229      isMouseLikePointerType(pointerTypeRef.current)) {
8230        const open = () => {
8231          if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store2.select("open")) {
8232            store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl));
8233          }
8234        };
8235        const openDelay = getOpenDelay();
8236        if (openDelay === 0) {
8237          nestedTriggerOpenTimeout.clear();
8238          open();
8239        } else {
8240          nestedTriggerOpenTimeout.start(openDelay, open);
8241        }
8242      }
8243    };
8244    const rootTriggerProps = store2.useState("triggerProps", isMountedByThisTrigger);
8245    const shouldApplyRootTriggerProps = isMountedByThisTrigger || trackCursorAxis !== "none";
8246    const state = {
8247      open: isOpenedByThisTrigger
8248    };
8249    const element = useRenderElement("button", componentProps, {
8250      state,
8251      ref: [forwardedRef, registerTrigger, triggerElementRef],
8252      props: [hoverProps, focusProps, shouldApplyRootTriggerProps ? rootTriggerProps : void 0, {
8253        onMouseOver(event) {
8254          handleNestedTriggerHover(event.nativeEvent);
8255        },
8256        onFocus(event) {
8257          if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) {
8258            event.preventBaseUIHandler();
8259          }
8260        },
8261        onMouseLeave() {
8262          isNestedTriggerHoveredRef.current = false;
8263          nestedTriggerOpenTimeout.clear();
8264          pointerTypeRef.current = void 0;
8265        },
8266        onPointerEnter(event) {
8267          pointerTypeRef.current = event.pointerType;
8268        },
8269        onPointerDown(event) {
8270          pointerTypeRef.current = event.pointerType;
8271          store2.set("closeOnClick", closeOnClick);
8272          if (closeOnClick && !store2.select("open")) {
8273            store2.cancelPendingOpen(event.nativeEvent);
8274          }
8275        },
8276        onClick(event) {
8277          if (closeOnClick && !store2.select("open")) {
8278            store2.cancelPendingOpen(event.nativeEvent);
8279          }
8280        },
8281        id: thisTriggerId,
8282        [TooltipTriggerDataAttributes.triggerDisabled]: disabled2 ? "" : void 0,
8283        [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : ""
8284      }, elementProps],
8285      stateAttributesMapping: triggerOpenStateMapping
8286    });
8287    return element;
8288  });
8289  if (true) TooltipTrigger.displayName = "TooltipTrigger";
8290  
8291  // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8292  var React45 = __toESM(require_react(), 1);
8293  
8294  // node_modules/@base-ui/react/tooltip/portal/TooltipPortalContext.mjs
8295  var React44 = __toESM(require_react(), 1);
8296  var TooltipPortalContext = /* @__PURE__ */ React44.createContext(void 0);
8297  if (true) TooltipPortalContext.displayName = "TooltipPortalContext";
8298  function useTooltipPortalContext() {
8299    const value = React44.useContext(TooltipPortalContext);
8300    if (value === void 0) {
8301      throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70));
8302    }
8303    return value;
8304  }
8305  
8306  // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8307  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
8308  var TooltipPortal = /* @__PURE__ */ React45.forwardRef(function TooltipPortal2(props, forwardedRef) {
8309    const {
8310      keepMounted = false,
8311      ...portalProps
8312    } = props;
8313    const store2 = useTooltipRootContext();
8314    const mounted = store2.useState("mounted");
8315    const shouldRender = mounted || keepMounted;
8316    if (!shouldRender) {
8317      return null;
8318    }
8319    return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TooltipPortalContext.Provider, {
8320      value: keepMounted,
8321      children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FloatingPortalLite, {
8322        ref: forwardedRef,
8323        ...portalProps
8324      })
8325    });
8326  });
8327  if (true) TooltipPortal.displayName = "TooltipPortal";
8328  
8329  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8330  var React47 = __toESM(require_react(), 1);
8331  
8332  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositionerContext.mjs
8333  var React46 = __toESM(require_react(), 1);
8334  var TooltipPositionerContext = /* @__PURE__ */ React46.createContext(void 0);
8335  if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext";
8336  function useTooltipPositionerContext() {
8337    const context = React46.useContext(TooltipPositionerContext);
8338    if (context === void 0) {
8339      throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71));
8340    }
8341    return context;
8342  }
8343  
8344  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8345  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
8346  var TooltipPositioner = /* @__PURE__ */ React47.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) {
8347    const {
8348      render,
8349      className,
8350      anchor,
8351      positionMethod = "absolute",
8352      side = "top",
8353      align = "center",
8354      sideOffset = 0,
8355      alignOffset = 0,
8356      collisionBoundary = "clipping-ancestors",
8357      collisionPadding = 5,
8358      arrowPadding = 5,
8359      sticky = false,
8360      disableAnchorTracking = false,
8361      collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
8362      style,
8363      ...elementProps
8364    } = componentProps;
8365    const store2 = useTooltipRootContext();
8366    const keepMounted = useTooltipPortalContext();
8367    const open = store2.useState("open");
8368    const mounted = store2.useState("mounted");
8369    const trackCursorAxis = store2.useState("trackCursorAxis");
8370    const disableHoverablePopup = store2.useState("disableHoverablePopup");
8371    const floatingRootContext = store2.useState("floatingRootContext");
8372    const instantType = store2.useState("instantType");
8373    const transitionStatus = store2.useState("transitionStatus");
8374    const hasViewport = store2.useState("hasViewport");
8375    const positioning = useAnchorPositioning({
8376      anchor,
8377      positionMethod,
8378      floatingRootContext,
8379      mounted,
8380      side,
8381      sideOffset,
8382      align,
8383      alignOffset,
8384      collisionBoundary,
8385      collisionPadding,
8386      sticky,
8387      arrowPadding,
8388      disableAnchorTracking,
8389      keepMounted,
8390      collisionAvoidance,
8391      adaptiveOrigin: hasViewport ? adaptiveOrigin : void 0
8392    });
8393    const state = React47.useMemo(() => ({
8394      open,
8395      side: positioning.side,
8396      align: positioning.align,
8397      anchorHidden: positioning.anchorHidden,
8398      instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType
8399    }), [open, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]);
8400    const element = usePositioner(componentProps, state, {
8401      styles: positioning.positionerStyles,
8402      transitionStatus,
8403      props: elementProps,
8404      refs: [forwardedRef, store2.useStateSetter("positionerElement")],
8405      hidden: !mounted,
8406      inert: !open || trackCursorAxis === "both" || disableHoverablePopup
8407    });
8408    return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TooltipPositionerContext.Provider, {
8409      value: positioning,
8410      children: element
8411    });
8412  });
8413  if (true) TooltipPositioner.displayName = "TooltipPositioner";
8414  
8415  // node_modules/@base-ui/react/tooltip/popup/TooltipPopup.mjs
8416  var React48 = __toESM(require_react(), 1);
8417  var stateAttributesMapping = {
8418    ...popupStateMapping,
8419    ...transitionStatusMapping
8420  };
8421  var TooltipPopup = /* @__PURE__ */ React48.forwardRef(function TooltipPopup2(componentProps, forwardedRef) {
8422    const {
8423      render,
8424      className,
8425      style,
8426      ...elementProps
8427    } = componentProps;
8428    const store2 = useTooltipRootContext();
8429    const {
8430      side,
8431      align
8432    } = useTooltipPositionerContext();
8433    const open = store2.useState("open");
8434    const instantType = store2.useState("instantType");
8435    const transitionStatus = store2.useState("transitionStatus");
8436    const popupProps = store2.useState("popupProps");
8437    const floatingContext = store2.useState("floatingRootContext");
8438    const disabled2 = store2.useState("disabled");
8439    const closeDelay = store2.useState("closeDelay");
8440    useOpenChangeComplete({
8441      open,
8442      ref: store2.context.popupRef,
8443      onComplete() {
8444        if (open) {
8445          store2.context.onOpenChangeComplete?.(true);
8446        }
8447      }
8448    });
8449    useHoverFloatingInteraction(floatingContext, {
8450      enabled: !disabled2,
8451      closeDelay
8452    });
8453    const setPopupElement = store2.useStateSetter("popupElement");
8454    const state = {
8455      open,
8456      side,
8457      align,
8458      instant: instantType,
8459      transitionStatus
8460    };
8461    const element = useRenderElement("div", componentProps, {
8462      state,
8463      ref: [forwardedRef, store2.context.popupRef, setPopupElement],
8464      props: [popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps],
8465      stateAttributesMapping
8466    });
8467    return element;
8468  });
8469  if (true) TooltipPopup.displayName = "TooltipPopup";
8470  
8471  // node_modules/@base-ui/react/tooltip/arrow/TooltipArrow.mjs
8472  var React49 = __toESM(require_react(), 1);
8473  var TooltipArrow = /* @__PURE__ */ React49.forwardRef(function TooltipArrow2(componentProps, forwardedRef) {
8474    const {
8475      render,
8476      className,
8477      style,
8478      ...elementProps
8479    } = componentProps;
8480    const store2 = useTooltipRootContext();
8481    const {
8482      arrowRef,
8483      side,
8484      align,
8485      arrowUncentered,
8486      arrowStyles
8487    } = useTooltipPositionerContext();
8488    const open = store2.useState("open");
8489    const instantType = store2.useState("instantType");
8490    const state = {
8491      open,
8492      side,
8493      align,
8494      uncentered: arrowUncentered,
8495      instant: instantType
8496    };
8497    const element = useRenderElement("div", componentProps, {
8498      state,
8499      ref: [forwardedRef, arrowRef],
8500      props: [{
8501        style: arrowStyles,
8502        "aria-hidden": true
8503      }, elementProps],
8504      stateAttributesMapping: popupStateMapping
8505    });
8506    return element;
8507  });
8508  if (true) TooltipArrow.displayName = "TooltipArrow";
8509  
8510  // node_modules/@base-ui/react/tooltip/provider/TooltipProvider.mjs
8511  var React50 = __toESM(require_react(), 1);
8512  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
8513  var TooltipProvider = function TooltipProvider2(props) {
8514    const {
8515      delay,
8516      closeDelay,
8517      timeout = 400
8518    } = props;
8519    const contextValue = React50.useMemo(() => ({
8520      delay,
8521      closeDelay
8522    }), [delay, closeDelay]);
8523    const delayValue = React50.useMemo(() => ({
8524      open: delay,
8525      close: closeDelay
8526    }), [delay, closeDelay]);
8527    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TooltipProviderContext.Provider, {
8528      value: contextValue,
8529      children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FloatingDelayGroup, {
8530        delay: delayValue,
8531        timeoutMs: timeout,
8532        children: props.children
8533      })
8534    });
8535  };
8536  if (true) TooltipProvider.displayName = "TooltipProvider";
8537  
8538  // node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs
8539  var React51 = __toESM(require_react(), 1);
8540  
8541  // node_modules/@base-ui/react/tooltip/viewport/TooltipViewportCssVars.mjs
8542  var TooltipViewportCssVars = /* @__PURE__ */ (function(TooltipViewportCssVars2) {
8543    TooltipViewportCssVars2["popupWidth"] = "--popup-width";
8544    TooltipViewportCssVars2["popupHeight"] = "--popup-height";
8545    return TooltipViewportCssVars2;
8546  })({});
8547  
8548  // node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs
8549  var stateAttributesMapping2 = {
8550    activationDirection: (value) => value ? {
8551      "data-activation-direction": value
8552    } : null
8553  };
8554  var TooltipViewport = /* @__PURE__ */ React51.forwardRef(function TooltipViewport2(componentProps, forwardedRef) {
8555    const {
8556      render,
8557      className,
8558      style,
8559      children,
8560      ...elementProps
8561    } = componentProps;
8562    const store2 = useTooltipRootContext();
8563    const positioner = useTooltipPositionerContext();
8564    const instantType = store2.useState("instantType");
8565    const {
8566      children: childrenToRender,
8567      state: viewportState
8568    } = usePopupViewport({
8569      store: store2,
8570      side: positioner.side,
8571      cssVars: TooltipViewportCssVars,
8572      children
8573    });
8574    const state = {
8575      activationDirection: viewportState.activationDirection,
8576      transitioning: viewportState.transitioning,
8577      instant: instantType
8578    };
8579    return useRenderElement("div", componentProps, {
8580      state,
8581      ref: forwardedRef,
8582      props: [elementProps, {
8583        children: childrenToRender
8584      }],
8585      stateAttributesMapping: stateAttributesMapping2
8586    });
8587  });
8588  if (true) TooltipViewport.displayName = "TooltipViewport";
8589  
8590  // node_modules/@base-ui/react/tooltip/store/TooltipHandle.mjs
8591  var TooltipHandle = class {
8592    /**
8593     * Internal store holding the tooltip state.
8594     * @internal
8595     */
8596    constructor() {
8597      this.store = new TooltipStore();
8598    }
8599    /**
8600     * Opens the tooltip and associates it with the trigger with the given ID.
8601     * The trigger must be a Tooltip.Trigger component with this handle passed as a prop.
8602     *
8603     * This method should only be called in an event handler or an effect (not during rendering).
8604     *
8605     * @param triggerId ID of the trigger to associate with the tooltip.
8606     */
8607    open(triggerId) {
8608      const triggerElement = triggerId ? this.store.context.triggerElements.getById(triggerId) : void 0;
8609      if (triggerId && !triggerElement) {
8610        throw new Error(true ? `Base UI: TooltipHandle.open: No trigger found with id "$triggerId}".` : formatErrorMessage_default(81, triggerId));
8611      }
8612      this.store.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement));
8613    }
8614    /**
8615     * Closes the tooltip.
8616     */
8617    close() {
8618      this.store.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, void 0));
8619    }
8620    /**
8621     * Indicates whether the tooltip is currently open.
8622     */
8623    get isOpen() {
8624      return this.store.select("open");
8625    }
8626  };
8627  function createTooltipHandle() {
8628    return new TooltipHandle();
8629  }
8630  
8631  // node_modules/@base-ui/react/use-render/useRender.mjs
8632  function useRender(params) {
8633    return useRenderElement(params.defaultTagName ?? "div", params, params);
8634  }
8635  
8636  // packages/ui/build-module/text/text.mjs
8637  var import_element10 = __toESM(require_element(), 1);
8638  var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
8639  function getRuntime() {
8640    const globalScope = globalThis;
8641    if (globalScope.__wpStyleRuntime) {
8642      return globalScope.__wpStyleRuntime;
8643    }
8644    globalScope.__wpStyleRuntime = {
8645      documents: /* @__PURE__ */ new Map(),
8646      styles: /* @__PURE__ */ new Map(),
8647      injectedStyles: /* @__PURE__ */ new WeakMap()
8648    };
8649    if (typeof document !== "undefined") {
8650      registerDocument(document);
8651    }
8652    return globalScope.__wpStyleRuntime;
8653  }
8654  function documentContainsStyleHash(targetDocument, hash) {
8655    if (!targetDocument.head) {
8656      return false;
8657    }
8658    for (const style of targetDocument.head.querySelectorAll(
8659      `style[$STYLE_HASH_ATTRIBUTE}]`
8660    )) {
8661      if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
8662        return true;
8663      }
8664    }
8665    return false;
8666  }
8667  function injectStyle(targetDocument, hash, css) {
8668    if (!targetDocument.head) {
8669      return;
8670    }
8671    const runtime = getRuntime();
8672    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8673    if (!injectedStyles) {
8674      injectedStyles = /* @__PURE__ */ new Set();
8675      runtime.injectedStyles.set(targetDocument, injectedStyles);
8676    }
8677    if (injectedStyles.has(hash)) {
8678      return;
8679    }
8680    if (documentContainsStyleHash(targetDocument, hash)) {
8681      injectedStyles.add(hash);
8682      return;
8683    }
8684    const style = targetDocument.createElement("style");
8685    style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
8686    style.appendChild(targetDocument.createTextNode(css));
8687    targetDocument.head.appendChild(style);
8688    injectedStyles.add(hash);
8689  }
8690  function registerDocument(targetDocument) {
8691    const runtime = getRuntime();
8692    runtime.documents.set(
8693      targetDocument,
8694      (runtime.documents.get(targetDocument) ?? 0) + 1
8695    );
8696    for (const [hash, css] of runtime.styles) {
8697      injectStyle(targetDocument, hash, css);
8698    }
8699    return () => {
8700      const count = runtime.documents.get(targetDocument);
8701      if (count === void 0) {
8702        return;
8703      }
8704      if (count <= 1) {
8705        runtime.documents.delete(targetDocument);
8706        return;
8707      }
8708      runtime.documents.set(targetDocument, count - 1);
8709    };
8710  }
8711  function registerStyle(hash, css) {
8712    const runtime = getRuntime();
8713    runtime.styles.set(hash, css);
8714    for (const targetDocument of runtime.documents.keys()) {
8715      injectStyle(targetDocument, hash, css);
8716    }
8717  }
8718  if (typeof process === "undefined" || true) {
8719    registerStyle("a495f9d138", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{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)}}}');
8720  }
8721  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" };
8722  if (typeof process === "undefined" || true) {
8723    registerStyle("af6d9984a6", "._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);&: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))}&::placeholder{color:var(--_gcd-input-placeholder-color,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)}");
8724  }
8725  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" };
8726  var Text = (0, import_element10.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
8727    const element = useRender({
8728      render,
8729      defaultTagName: "span",
8730      ref,
8731      props: mergeProps(props, {
8732        className: clsx_default(
8733          style_default.text,
8734          global_css_defense_default.heading,
8735          global_css_defense_default.p,
8736          style_default[variant],
8737          className
8738        )
8739      })
8740    });
8741    return element;
8742  });
8743  
8744  // packages/ui/build-module/badge/badge.mjs
8745  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
8746  var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
8747  function getRuntime2() {
8748    const globalScope = globalThis;
8749    if (globalScope.__wpStyleRuntime) {
8750      return globalScope.__wpStyleRuntime;
8751    }
8752    globalScope.__wpStyleRuntime = {
8753      documents: /* @__PURE__ */ new Map(),
8754      styles: /* @__PURE__ */ new Map(),
8755      injectedStyles: /* @__PURE__ */ new WeakMap()
8756    };
8757    if (typeof document !== "undefined") {
8758      registerDocument2(document);
8759    }
8760    return globalScope.__wpStyleRuntime;
8761  }
8762  function documentContainsStyleHash2(targetDocument, hash) {
8763    if (!targetDocument.head) {
8764      return false;
8765    }
8766    for (const style of targetDocument.head.querySelectorAll(
8767      `style[$STYLE_HASH_ATTRIBUTE2}]`
8768    )) {
8769      if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
8770        return true;
8771      }
8772    }
8773    return false;
8774  }
8775  function injectStyle2(targetDocument, hash, css) {
8776    if (!targetDocument.head) {
8777      return;
8778    }
8779    const runtime = getRuntime2();
8780    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8781    if (!injectedStyles) {
8782      injectedStyles = /* @__PURE__ */ new Set();
8783      runtime.injectedStyles.set(targetDocument, injectedStyles);
8784    }
8785    if (injectedStyles.has(hash)) {
8786      return;
8787    }
8788    if (documentContainsStyleHash2(targetDocument, hash)) {
8789      injectedStyles.add(hash);
8790      return;
8791    }
8792    const style = targetDocument.createElement("style");
8793    style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
8794    style.appendChild(targetDocument.createTextNode(css));
8795    targetDocument.head.appendChild(style);
8796    injectedStyles.add(hash);
8797  }
8798  function registerDocument2(targetDocument) {
8799    const runtime = getRuntime2();
8800    runtime.documents.set(
8801      targetDocument,
8802      (runtime.documents.get(targetDocument) ?? 0) + 1
8803    );
8804    for (const [hash, css] of runtime.styles) {
8805      injectStyle2(targetDocument, hash, css);
8806    }
8807    return () => {
8808      const count = runtime.documents.get(targetDocument);
8809      if (count === void 0) {
8810        return;
8811      }
8812      if (count <= 1) {
8813        runtime.documents.delete(targetDocument);
8814        return;
8815      }
8816      runtime.documents.set(targetDocument, count - 1);
8817    };
8818  }
8819  function registerStyle2(hash, css) {
8820    const runtime = getRuntime2();
8821    runtime.styles.set(hash, css);
8822    for (const targetDocument of runtime.documents.keys()) {
8823      injectStyle2(targetDocument, hash, css);
8824    }
8825  }
8826  if (typeof process === "undefined" || true) {
8827    registerStyle2("9db2873e7f", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-background-surface-error,#f6e6e3);color:var(--wpds-color-foreground-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-background-surface-warning,#fde6be);color:var(--wpds-color-foreground-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-background-surface-caution,#fee995);color:var(--wpds-color-foreground-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-background-surface-success,#c6f7cd);color:var(--wpds-color-foreground-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-background-surface-info,#deebfa);color:var(--wpds-color-foreground-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}}");
8828  }
8829  var style_default2 = { "badge": "_96e6251aad1a6136__badge", "is-high-intent": "_99f7158cb520f750__is-high-intent", "is-medium-intent": "c20ebef2365bc8b7__is-medium-intent", "is-low-intent": "_365e1626c6202e52__is-low-intent", "is-stable-intent": "_33f8198127ddf4ef__is-stable-intent", "is-informational-intent": "_04c1aca8fc449412__is-informational-intent", "is-draft-intent": "_90726e69d495ec19__is-draft-intent", "is-none-intent": "_898f4a544993bd39__is-none-intent" };
8830  var Badge = (0, import_element11.forwardRef)(function Badge2({ intent = "none", className, ...props }, ref) {
8831    return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
8832      Text,
8833      {
8834        ref,
8835        className: clsx_default(
8836          style_default2.badge,
8837          style_default2[`is-$intent}-intent`],
8838          className
8839        ),
8840        ...props,
8841        variant: "body-sm"
8842      }
8843    );
8844  });
8845  
8846  // packages/ui/build-module/button/button.mjs
8847  var import_element12 = __toESM(require_element(), 1);
8848  var import_i18n = __toESM(require_i18n(), 1);
8849  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
8850  import { speak } from "@wordpress/a11y";
8851  var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
8852  function getRuntime3() {
8853    const globalScope = globalThis;
8854    if (globalScope.__wpStyleRuntime) {
8855      return globalScope.__wpStyleRuntime;
8856    }
8857    globalScope.__wpStyleRuntime = {
8858      documents: /* @__PURE__ */ new Map(),
8859      styles: /* @__PURE__ */ new Map(),
8860      injectedStyles: /* @__PURE__ */ new WeakMap()
8861    };
8862    if (typeof document !== "undefined") {
8863      registerDocument3(document);
8864    }
8865    return globalScope.__wpStyleRuntime;
8866  }
8867  function documentContainsStyleHash3(targetDocument, hash) {
8868    if (!targetDocument.head) {
8869      return false;
8870    }
8871    for (const style of targetDocument.head.querySelectorAll(
8872      `style[$STYLE_HASH_ATTRIBUTE3}]`
8873    )) {
8874      if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
8875        return true;
8876      }
8877    }
8878    return false;
8879  }
8880  function injectStyle3(targetDocument, hash, css) {
8881    if (!targetDocument.head) {
8882      return;
8883    }
8884    const runtime = getRuntime3();
8885    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8886    if (!injectedStyles) {
8887      injectedStyles = /* @__PURE__ */ new Set();
8888      runtime.injectedStyles.set(targetDocument, injectedStyles);
8889    }
8890    if (injectedStyles.has(hash)) {
8891      return;
8892    }
8893    if (documentContainsStyleHash3(targetDocument, hash)) {
8894      injectedStyles.add(hash);
8895      return;
8896    }
8897    const style = targetDocument.createElement("style");
8898    style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
8899    style.appendChild(targetDocument.createTextNode(css));
8900    targetDocument.head.appendChild(style);
8901    injectedStyles.add(hash);
8902  }
8903  function registerDocument3(targetDocument) {
8904    const runtime = getRuntime3();
8905    runtime.documents.set(
8906      targetDocument,
8907      (runtime.documents.get(targetDocument) ?? 0) + 1
8908    );
8909    for (const [hash, css] of runtime.styles) {
8910      injectStyle3(targetDocument, hash, css);
8911    }
8912    return () => {
8913      const count = runtime.documents.get(targetDocument);
8914      if (count === void 0) {
8915        return;
8916      }
8917      if (count <= 1) {
8918        runtime.documents.delete(targetDocument);
8919        return;
8920      }
8921      runtime.documents.set(targetDocument, count - 1);
8922    };
8923  }
8924  function registerStyle3(hash, css) {
8925    const runtime = getRuntime3();
8926    runtime.styles.set(hash, css);
8927    for (const targetDocument of runtime.documents.keys()) {
8928      injectStyle3(targetDocument, hash, css);
8929    }
8930  }
8931  if (typeof process === "undefined" || true) {
8932    registerStyle3("b74f1ac304", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;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(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);inset-inline-start:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');
8933  }
8934  var style_default3 = { "button": "_97b0fc33c028be1a__button", "is-unstyled": "abbb272e2ce49bd6__is-unstyled", "is-loading": "_914b42f315c0e580__is-loading", "is-small": "_908205475f9f2a92__is-small", "icon": "_9f6fc6553aeb36fe__icon", "is-brand": "dd460c965226cc77__is-brand", "is-outline": "_62d5a778b7b258ee__is-outline", "is-minimal": "ad0619a3217c6a5b__is-minimal", "is-neutral": "e722a8f96726aa99__is-neutral", "is-solid": "b50b3358c5fb4d0b__is-solid", "is-compact": "cf59cf1b69629838__is-compact", "loading-animation": "_5a1d53da6f830c8d__loading-animation" };
8935  if (typeof process === "undefined" || true) {
8936    registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
8937  }
8938  var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
8939  if (typeof process === "undefined" || true) {
8940    registerStyle3("5f8e7aa0bc", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid 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(--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(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
8941  }
8942  var focus_default = { "outset-ring--focus": "_08e8a2e44959f892__outset-ring--focus", "outset-ring--focus-except-active": "e25b2bdd7aa21721__outset-ring--focus-except-active", "outset-ring--focus-visible": "d0541bc9dd9dc7b6__outset-ring--focus-visible", "outset-ring--focus-within": "cd83dfc2126a0846__outset-ring--focus-within", "outset-ring--focus-within-except-active": "_970d04df7376df67__outset-ring--focus-within-except-active", "outset-ring--focus-within-visible": "c5cb3ee4bddaa8e4__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "ecadb9e080e2dfa5__outset-ring--focus-parent-visible" };
8943  if (typeof process === "undefined" || true) {
8944    registerStyle3("af6d9984a6", "._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);&: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))}&::placeholder{color:var(--_gcd-input-placeholder-color,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)}");
8945  }
8946  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" };
8947  var Button3 = (0, import_element12.forwardRef)(
8948    function Button22({
8949      tone = "brand",
8950      variant = "solid",
8951      size: size4 = "default",
8952      className,
8953      focusableWhenDisabled = true,
8954      disabled: disabled2,
8955      loading,
8956      loadingAnnouncement = (0, import_i18n.__)("Loading"),
8957      children,
8958      ...props
8959    }, ref) {
8960      const mergedClassName = clsx_default(
8961        global_css_defense_default2.button,
8962        resets_default["box-sizing"],
8963        focus_default["outset-ring--focus-except-active"],
8964        variant !== "unstyled" && style_default3.button,
8965        style_default3[`is-$tone}`],
8966        style_default3[`is-$variant}`],
8967        style_default3[`is-$size4}`],
8968        loading && style_default3["is-loading"],
8969        className
8970      );
8971      (0, import_element12.useEffect)(() => {
8972        if (loading && loadingAnnouncement) {
8973          speak(loadingAnnouncement);
8974        }
8975      }, [loading, loadingAnnouncement]);
8976      return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8977        Button,
8978        {
8979          ref,
8980          className: mergedClassName,
8981          focusableWhenDisabled,
8982          disabled: disabled2 ?? loading,
8983          ...props,
8984          children
8985        }
8986      );
8987    }
8988  );
8989  
8990  // packages/ui/build-module/button/icon.mjs
8991  var import_element14 = __toESM(require_element(), 1);
8992  
8993  // packages/ui/build-module/icon/icon.mjs
8994  var import_element13 = __toESM(require_element(), 1);
8995  var import_primitives = __toESM(require_primitives(), 1);
8996  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
8997  var Icon = (0, import_element13.forwardRef)(function Icon2({ icon, size: size4 = 24, ...restProps }, ref) {
8998    return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
8999      import_primitives.SVG,
9000      {
9001        ref,
9002        ...icon.props,
9003        ...restProps,
9004        width: size4,
9005        height: size4
9006      }
9007    );
9008  });
9009  
9010  // packages/ui/build-module/button/icon.mjs
9011  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
9012  var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
9013  function getRuntime4() {
9014    const globalScope = globalThis;
9015    if (globalScope.__wpStyleRuntime) {
9016      return globalScope.__wpStyleRuntime;
9017    }
9018    globalScope.__wpStyleRuntime = {
9019      documents: /* @__PURE__ */ new Map(),
9020      styles: /* @__PURE__ */ new Map(),
9021      injectedStyles: /* @__PURE__ */ new WeakMap()
9022    };
9023    if (typeof document !== "undefined") {
9024      registerDocument4(document);
9025    }
9026    return globalScope.__wpStyleRuntime;
9027  }
9028  function documentContainsStyleHash4(targetDocument, hash) {
9029    if (!targetDocument.head) {
9030      return false;
9031    }
9032    for (const style of targetDocument.head.querySelectorAll(
9033      `style[$STYLE_HASH_ATTRIBUTE4}]`
9034    )) {
9035      if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
9036        return true;
9037      }
9038    }
9039    return false;
9040  }
9041  function injectStyle4(targetDocument, hash, css) {
9042    if (!targetDocument.head) {
9043      return;
9044    }
9045    const runtime = getRuntime4();
9046    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9047    if (!injectedStyles) {
9048      injectedStyles = /* @__PURE__ */ new Set();
9049      runtime.injectedStyles.set(targetDocument, injectedStyles);
9050    }
9051    if (injectedStyles.has(hash)) {
9052      return;
9053    }
9054    if (documentContainsStyleHash4(targetDocument, hash)) {
9055      injectedStyles.add(hash);
9056      return;
9057    }
9058    const style = targetDocument.createElement("style");
9059    style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
9060    style.appendChild(targetDocument.createTextNode(css));
9061    targetDocument.head.appendChild(style);
9062    injectedStyles.add(hash);
9063  }
9064  function registerDocument4(targetDocument) {
9065    const runtime = getRuntime4();
9066    runtime.documents.set(
9067      targetDocument,
9068      (runtime.documents.get(targetDocument) ?? 0) + 1
9069    );
9070    for (const [hash, css] of runtime.styles) {
9071      injectStyle4(targetDocument, hash, css);
9072    }
9073    return () => {
9074      const count = runtime.documents.get(targetDocument);
9075      if (count === void 0) {
9076        return;
9077      }
9078      if (count <= 1) {
9079        runtime.documents.delete(targetDocument);
9080        return;
9081      }
9082      runtime.documents.set(targetDocument, count - 1);
9083    };
9084  }
9085  function registerStyle4(hash, css) {
9086    const runtime = getRuntime4();
9087    runtime.styles.set(hash, css);
9088    for (const targetDocument of runtime.documents.keys()) {
9089      injectStyle4(targetDocument, hash, css);
9090    }
9091  }
9092  if (typeof process === "undefined" || true) {
9093    registerStyle4("b74f1ac304", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;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(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);inset-inline-start:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');
9094  }
9095  var style_default4 = { "button": "_97b0fc33c028be1a__button", "is-unstyled": "abbb272e2ce49bd6__is-unstyled", "is-loading": "_914b42f315c0e580__is-loading", "is-small": "_908205475f9f2a92__is-small", "icon": "_9f6fc6553aeb36fe__icon", "is-brand": "dd460c965226cc77__is-brand", "is-outline": "_62d5a778b7b258ee__is-outline", "is-minimal": "ad0619a3217c6a5b__is-minimal", "is-neutral": "e722a8f96726aa99__is-neutral", "is-solid": "b50b3358c5fb4d0b__is-solid", "is-compact": "cf59cf1b69629838__is-compact", "loading-animation": "_5a1d53da6f830c8d__loading-animation" };
9096  var ButtonIcon = (0, import_element14.forwardRef)(
9097    function ButtonIcon2({ className, icon, ...props }, ref) {
9098      return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
9099        Icon,
9100        {
9101          ref,
9102          icon,
9103          className: clsx_default(style_default4.icon, className),
9104          size: 24,
9105          ...props
9106        }
9107      );
9108    }
9109  );
9110  
9111  // packages/ui/build-module/button/index.mjs
9112  ButtonIcon.displayName = "Button.Icon";
9113  var Button4 = Object.assign(Button3, {
9114    /**
9115     * An icon component specifically designed to work well when rendered inside
9116     * a `Button` component.
9117     */
9118    Icon: ButtonIcon
9119  });
9120  
9121  // packages/icons/build-module/library/caution.mjs
9122  var import_primitives2 = __toESM(require_primitives(), 1);
9123  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
9124  var caution_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives2.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z" }) });
9125  
9126  // packages/icons/build-module/library/close-small.mjs
9127  var import_primitives3 = __toESM(require_primitives(), 1);
9128  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
9129  var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives3.Path, { d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z" }) });
9130  
9131  // packages/icons/build-module/library/error.mjs
9132  var import_primitives4 = __toESM(require_primitives(), 1);
9133  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
9134  var error_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives4.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z" }) });
9135  
9136  // packages/icons/build-module/library/info.mjs
9137  var import_primitives5 = __toESM(require_primitives(), 1);
9138  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
9139  var info_default = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_primitives5.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z" }) });
9140  
9141  // packages/icons/build-module/library/published.mjs
9142  var import_primitives6 = __toESM(require_primitives(), 1);
9143  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
9144  var published_default = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_primitives6.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z" }) });
9145  
9146  // packages/ui/build-module/utils/render-slot-with-children.mjs
9147  var import_element15 = __toESM(require_element(), 1);
9148  function renderSlotWithChildren(slot, defaultSlot, children) {
9149    return (0, import_element15.cloneElement)(slot ?? defaultSlot, { children });
9150  }
9151  
9152  // packages/ui/build-module/utils/theme-provider.mjs
9153  var theme = __toESM(require_theme(), 1);
9154  
9155  // packages/ui/build-module/lock-unlock.mjs
9156  var import_private_apis = __toESM(require_private_apis(), 1);
9157  var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
9158    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
9159    "@wordpress/ui"
9160  );
9161  
9162  // packages/ui/build-module/utils/theme-provider.mjs
9163  function getThemeProvider() {
9164    const themePackage = theme;
9165    if (themePackage.ThemeProvider) {
9166      return themePackage.ThemeProvider;
9167    }
9168    if (!themePackage.privateApis) {
9169      throw new Error(
9170        "@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`."
9171      );
9172    }
9173    return unlock(
9174      themePackage.privateApis
9175    ).ThemeProvider;
9176  }
9177  var ThemeProvider = getThemeProvider();
9178  
9179  // packages/ui/build-module/stack/stack.mjs
9180  var import_element16 = __toESM(require_element(), 1);
9181  var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
9182  function getRuntime5() {
9183    const globalScope = globalThis;
9184    if (globalScope.__wpStyleRuntime) {
9185      return globalScope.__wpStyleRuntime;
9186    }
9187    globalScope.__wpStyleRuntime = {
9188      documents: /* @__PURE__ */ new Map(),
9189      styles: /* @__PURE__ */ new Map(),
9190      injectedStyles: /* @__PURE__ */ new WeakMap()
9191    };
9192    if (typeof document !== "undefined") {
9193      registerDocument5(document);
9194    }
9195    return globalScope.__wpStyleRuntime;
9196  }
9197  function documentContainsStyleHash5(targetDocument, hash) {
9198    if (!targetDocument.head) {
9199      return false;
9200    }
9201    for (const style of targetDocument.head.querySelectorAll(
9202      `style[$STYLE_HASH_ATTRIBUTE5}]`
9203    )) {
9204      if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
9205        return true;
9206      }
9207    }
9208    return false;
9209  }
9210  function injectStyle5(targetDocument, hash, css) {
9211    if (!targetDocument.head) {
9212      return;
9213    }
9214    const runtime = getRuntime5();
9215    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9216    if (!injectedStyles) {
9217      injectedStyles = /* @__PURE__ */ new Set();
9218      runtime.injectedStyles.set(targetDocument, injectedStyles);
9219    }
9220    if (injectedStyles.has(hash)) {
9221      return;
9222    }
9223    if (documentContainsStyleHash5(targetDocument, hash)) {
9224      injectedStyles.add(hash);
9225      return;
9226    }
9227    const style = targetDocument.createElement("style");
9228    style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
9229    style.appendChild(targetDocument.createTextNode(css));
9230    targetDocument.head.appendChild(style);
9231    injectedStyles.add(hash);
9232  }
9233  function registerDocument5(targetDocument) {
9234    const runtime = getRuntime5();
9235    runtime.documents.set(
9236      targetDocument,
9237      (runtime.documents.get(targetDocument) ?? 0) + 1
9238    );
9239    for (const [hash, css] of runtime.styles) {
9240      injectStyle5(targetDocument, hash, css);
9241    }
9242    return () => {
9243      const count = runtime.documents.get(targetDocument);
9244      if (count === void 0) {
9245        return;
9246      }
9247      if (count <= 1) {
9248        runtime.documents.delete(targetDocument);
9249        return;
9250      }
9251      runtime.documents.set(targetDocument, count - 1);
9252    };
9253  }
9254  function registerStyle5(hash, css) {
9255    const runtime = getRuntime5();
9256    runtime.styles.set(hash, css);
9257    for (const targetDocument of runtime.documents.keys()) {
9258      injectStyle5(targetDocument, hash, css);
9259    }
9260  }
9261  if (typeof process === "undefined" || true) {
9262    registerStyle5("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
9263  }
9264  var style_default5 = { "stack": "_19ce0419607e1896__stack" };
9265  var gapTokens = {
9266    xs: "var(--wpds-dimension-gap-xs, 4px)",
9267    sm: "var(--wpds-dimension-gap-sm, 8px)",
9268    md: "var(--wpds-dimension-gap-md, 12px)",
9269    lg: "var(--wpds-dimension-gap-lg, 16px)",
9270    xl: "var(--wpds-dimension-gap-xl, 24px)",
9271    "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
9272    "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
9273  };
9274  var Stack = (0, import_element16.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
9275    const style = {
9276      gap: gap && gapTokens[gap],
9277      alignItems: align,
9278      justifyContent: justify,
9279      flexDirection: direction,
9280      flexWrap: wrap
9281    };
9282    const element = useRender({
9283      render,
9284      ref,
9285      props: mergeProps(props, { style, className: style_default5.stack })
9286    });
9287    return element;
9288  });
9289  
9290  // packages/ui/build-module/icon-button/icon-button.mjs
9291  var import_element21 = __toESM(require_element(), 1);
9292  
9293  // packages/ui/build-module/tooltip/popup.mjs
9294  var import_element19 = __toESM(require_element(), 1);
9295  
9296  // packages/ui/build-module/tooltip/portal.mjs
9297  var import_element17 = __toESM(require_element(), 1);
9298  
9299  // packages/ui/build-module/utils/wp-compat-overlay-slot.mjs
9300  var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
9301  function getRuntime6() {
9302    const globalScope = globalThis;
9303    if (globalScope.__wpStyleRuntime) {
9304      return globalScope.__wpStyleRuntime;
9305    }
9306    globalScope.__wpStyleRuntime = {
9307      documents: /* @__PURE__ */ new Map(),
9308      styles: /* @__PURE__ */ new Map(),
9309      injectedStyles: /* @__PURE__ */ new WeakMap()
9310    };
9311    if (typeof document !== "undefined") {
9312      registerDocument6(document);
9313    }
9314    return globalScope.__wpStyleRuntime;
9315  }
9316  function documentContainsStyleHash6(targetDocument, hash) {
9317    if (!targetDocument.head) {
9318      return false;
9319    }
9320    for (const style of targetDocument.head.querySelectorAll(
9321      `style[$STYLE_HASH_ATTRIBUTE6}]`
9322    )) {
9323      if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
9324        return true;
9325      }
9326    }
9327    return false;
9328  }
9329  function injectStyle6(targetDocument, hash, css) {
9330    if (!targetDocument.head) {
9331      return;
9332    }
9333    const runtime = getRuntime6();
9334    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9335    if (!injectedStyles) {
9336      injectedStyles = /* @__PURE__ */ new Set();
9337      runtime.injectedStyles.set(targetDocument, injectedStyles);
9338    }
9339    if (injectedStyles.has(hash)) {
9340      return;
9341    }
9342    if (documentContainsStyleHash6(targetDocument, hash)) {
9343      injectedStyles.add(hash);
9344      return;
9345    }
9346    const style = targetDocument.createElement("style");
9347    style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
9348    style.appendChild(targetDocument.createTextNode(css));
9349    targetDocument.head.appendChild(style);
9350    injectedStyles.add(hash);
9351  }
9352  function registerDocument6(targetDocument) {
9353    const runtime = getRuntime6();
9354    runtime.documents.set(
9355      targetDocument,
9356      (runtime.documents.get(targetDocument) ?? 0) + 1
9357    );
9358    for (const [hash, css] of runtime.styles) {
9359      injectStyle6(targetDocument, hash, css);
9360    }
9361    return () => {
9362      const count = runtime.documents.get(targetDocument);
9363      if (count === void 0) {
9364        return;
9365      }
9366      if (count <= 1) {
9367        runtime.documents.delete(targetDocument);
9368        return;
9369      }
9370      runtime.documents.set(targetDocument, count - 1);
9371    };
9372  }
9373  function registerStyle6(hash, css) {
9374    const runtime = getRuntime6();
9375    runtime.styles.set(hash, css);
9376    for (const targetDocument of runtime.documents.keys()) {
9377      injectStyle6(targetDocument, hash, css);
9378    }
9379  }
9380  if (typeof process === "undefined" || true) {
9381    registerStyle6("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}}}");
9382  }
9383  var wp_compat_overlay_slot_default = { "slot": "_11fc52b637ff8a7e__slot" };
9384  var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot";
9385  function resolveOwnerDocument() {
9386    return typeof document === "undefined" ? null : document;
9387  }
9388  function isInWordPressEnvironment() {
9389    let topWp;
9390    try {
9391      topWp = window.top?.wp;
9392    } catch {
9393    }
9394    const wp = topWp ?? window.wp;
9395    return typeof wp?.components === "object" && wp.components !== null;
9396  }
9397  var cachedSlot = null;
9398  function ensureSlotIsAccessible(element) {
9399    element.setAttribute("aria-hidden", "false");
9400    return element;
9401  }
9402  function createSlot(ownerDocument2) {
9403    const element = ownerDocument2.createElement("div");
9404    element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, "");
9405    if (wp_compat_overlay_slot_default.slot) {
9406      element.classList.add(wp_compat_overlay_slot_default.slot);
9407    }
9408    ownerDocument2.body.appendChild(element);
9409    return element;
9410  }
9411  function getWpCompatOverlaySlot() {
9412    if (typeof window === "undefined") {
9413      return void 0;
9414    }
9415    if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) {
9416      return void 0;
9417    }
9418    const ownerDocument2 = resolveOwnerDocument();
9419    if (!ownerDocument2 || !ownerDocument2.body) {
9420      return void 0;
9421    }
9422    if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) {
9423      return ensureSlotIsAccessible(cachedSlot);
9424    }
9425    const existing = ownerDocument2.querySelector(
9426      `[$WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]`
9427    );
9428    if (existing instanceof HTMLDivElement) {
9429      cachedSlot = ensureSlotIsAccessible(existing);
9430      return cachedSlot;
9431    }
9432    if (cachedSlot?.isConnected) {
9433      cachedSlot.remove();
9434    }
9435    cachedSlot = ensureSlotIsAccessible(createSlot(ownerDocument2));
9436    return cachedSlot;
9437  }
9438  
9439  // packages/ui/build-module/tooltip/portal.mjs
9440  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
9441  var Portal = (0, import_element17.forwardRef)(
9442    function TooltipPortal3({ container, ...restProps }, ref) {
9443      return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9444        index_parts_exports.Portal,
9445        {
9446          container: container ?? getWpCompatOverlaySlot(),
9447          ...restProps,
9448          ref
9449        }
9450      );
9451    }
9452  );
9453  
9454  // packages/ui/build-module/tooltip/positioner.mjs
9455  var import_element18 = __toESM(require_element(), 1);
9456  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
9457  var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
9458  function getRuntime7() {
9459    const globalScope = globalThis;
9460    if (globalScope.__wpStyleRuntime) {
9461      return globalScope.__wpStyleRuntime;
9462    }
9463    globalScope.__wpStyleRuntime = {
9464      documents: /* @__PURE__ */ new Map(),
9465      styles: /* @__PURE__ */ new Map(),
9466      injectedStyles: /* @__PURE__ */ new WeakMap()
9467    };
9468    if (typeof document !== "undefined") {
9469      registerDocument7(document);
9470    }
9471    return globalScope.__wpStyleRuntime;
9472  }
9473  function documentContainsStyleHash7(targetDocument, hash) {
9474    if (!targetDocument.head) {
9475      return false;
9476    }
9477    for (const style of targetDocument.head.querySelectorAll(
9478      `style[$STYLE_HASH_ATTRIBUTE7}]`
9479    )) {
9480      if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
9481        return true;
9482      }
9483    }
9484    return false;
9485  }
9486  function injectStyle7(targetDocument, hash, css) {
9487    if (!targetDocument.head) {
9488      return;
9489    }
9490    const runtime = getRuntime7();
9491    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9492    if (!injectedStyles) {
9493      injectedStyles = /* @__PURE__ */ new Set();
9494      runtime.injectedStyles.set(targetDocument, injectedStyles);
9495    }
9496    if (injectedStyles.has(hash)) {
9497      return;
9498    }
9499    if (documentContainsStyleHash7(targetDocument, hash)) {
9500      injectedStyles.add(hash);
9501      return;
9502    }
9503    const style = targetDocument.createElement("style");
9504    style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
9505    style.appendChild(targetDocument.createTextNode(css));
9506    targetDocument.head.appendChild(style);
9507    injectedStyles.add(hash);
9508  }
9509  function registerDocument7(targetDocument) {
9510    const runtime = getRuntime7();
9511    runtime.documents.set(
9512      targetDocument,
9513      (runtime.documents.get(targetDocument) ?? 0) + 1
9514    );
9515    for (const [hash, css] of runtime.styles) {
9516      injectStyle7(targetDocument, hash, css);
9517    }
9518    return () => {
9519      const count = runtime.documents.get(targetDocument);
9520      if (count === void 0) {
9521        return;
9522      }
9523      if (count <= 1) {
9524        runtime.documents.delete(targetDocument);
9525        return;
9526      }
9527      runtime.documents.set(targetDocument, count - 1);
9528    };
9529  }
9530  function registerStyle7(hash, css) {
9531    const runtime = getRuntime7();
9532    runtime.styles.set(hash, css);
9533    for (const targetDocument of runtime.documents.keys()) {
9534      injectStyle7(targetDocument, hash, css);
9535    }
9536  }
9537  if (typeof process === "undefined" || true) {
9538    registerStyle7("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9539  }
9540  var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9541  if (typeof process === "undefined" || true) {
9542    registerStyle7("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}}}}');
9543  }
9544  var style_default6 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9545  var Positioner = (0, import_element18.forwardRef)(
9546    function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) {
9547      return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9548        index_parts_exports.Positioner,
9549        {
9550          ref,
9551          align,
9552          side,
9553          sideOffset,
9554          ...props,
9555          className: clsx_default(
9556            resets_default2["box-sizing"],
9557            style_default6.positioner,
9558            className
9559          )
9560        }
9561      );
9562    }
9563  );
9564  
9565  // packages/ui/build-module/tooltip/popup.mjs
9566  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
9567  var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
9568  function getRuntime8() {
9569    const globalScope = globalThis;
9570    if (globalScope.__wpStyleRuntime) {
9571      return globalScope.__wpStyleRuntime;
9572    }
9573    globalScope.__wpStyleRuntime = {
9574      documents: /* @__PURE__ */ new Map(),
9575      styles: /* @__PURE__ */ new Map(),
9576      injectedStyles: /* @__PURE__ */ new WeakMap()
9577    };
9578    if (typeof document !== "undefined") {
9579      registerDocument8(document);
9580    }
9581    return globalScope.__wpStyleRuntime;
9582  }
9583  function documentContainsStyleHash8(targetDocument, hash) {
9584    if (!targetDocument.head) {
9585      return false;
9586    }
9587    for (const style of targetDocument.head.querySelectorAll(
9588      `style[$STYLE_HASH_ATTRIBUTE8}]`
9589    )) {
9590      if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
9591        return true;
9592      }
9593    }
9594    return false;
9595  }
9596  function injectStyle8(targetDocument, hash, css) {
9597    if (!targetDocument.head) {
9598      return;
9599    }
9600    const runtime = getRuntime8();
9601    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9602    if (!injectedStyles) {
9603      injectedStyles = /* @__PURE__ */ new Set();
9604      runtime.injectedStyles.set(targetDocument, injectedStyles);
9605    }
9606    if (injectedStyles.has(hash)) {
9607      return;
9608    }
9609    if (documentContainsStyleHash8(targetDocument, hash)) {
9610      injectedStyles.add(hash);
9611      return;
9612    }
9613    const style = targetDocument.createElement("style");
9614    style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
9615    style.appendChild(targetDocument.createTextNode(css));
9616    targetDocument.head.appendChild(style);
9617    injectedStyles.add(hash);
9618  }
9619  function registerDocument8(targetDocument) {
9620    const runtime = getRuntime8();
9621    runtime.documents.set(
9622      targetDocument,
9623      (runtime.documents.get(targetDocument) ?? 0) + 1
9624    );
9625    for (const [hash, css] of runtime.styles) {
9626      injectStyle8(targetDocument, hash, css);
9627    }
9628    return () => {
9629      const count = runtime.documents.get(targetDocument);
9630      if (count === void 0) {
9631        return;
9632      }
9633      if (count <= 1) {
9634        runtime.documents.delete(targetDocument);
9635        return;
9636      }
9637      runtime.documents.set(targetDocument, count - 1);
9638    };
9639  }
9640  function registerStyle8(hash, css) {
9641    const runtime = getRuntime8();
9642    runtime.styles.set(hash, css);
9643    for (const targetDocument of runtime.documents.keys()) {
9644      injectStyle8(targetDocument, hash, css);
9645    }
9646  }
9647  if (typeof process === "undefined" || true) {
9648    registerStyle8("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}}}}');
9649  }
9650  var style_default7 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9651  var POPUP_COLOR = { background: "#1e1e1e" };
9652  var Popup = (0, import_element19.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) {
9653    const popupContent = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
9654      index_parts_exports.Popup,
9655      {
9656        ref,
9657        className: clsx_default(style_default7.popup, className),
9658        ...props,
9659        children
9660      }
9661    ) });
9662    const positionedPopup = renderSlotWithChildren(
9663      positioner,
9664      /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Positioner, {}),
9665      popupContent
9666    );
9667    return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Portal, {}), positionedPopup);
9668  });
9669  
9670  // packages/ui/build-module/tooltip/trigger.mjs
9671  var import_element20 = __toESM(require_element(), 1);
9672  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
9673  var Trigger = (0, import_element20.forwardRef)(
9674    function TooltipTrigger3(props, ref) {
9675      return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(index_parts_exports.Trigger, { ref, ...props });
9676    }
9677  );
9678  
9679  // packages/ui/build-module/tooltip/root.mjs
9680  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
9681  function Root(props) {
9682    return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(index_parts_exports.Root, { ...props });
9683  }
9684  
9685  // packages/ui/build-module/icon-button/icon-button.mjs
9686  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
9687  var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
9688  function getRuntime9() {
9689    const globalScope = globalThis;
9690    if (globalScope.__wpStyleRuntime) {
9691      return globalScope.__wpStyleRuntime;
9692    }
9693    globalScope.__wpStyleRuntime = {
9694      documents: /* @__PURE__ */ new Map(),
9695      styles: /* @__PURE__ */ new Map(),
9696      injectedStyles: /* @__PURE__ */ new WeakMap()
9697    };
9698    if (typeof document !== "undefined") {
9699      registerDocument9(document);
9700    }
9701    return globalScope.__wpStyleRuntime;
9702  }
9703  function documentContainsStyleHash9(targetDocument, hash) {
9704    if (!targetDocument.head) {
9705      return false;
9706    }
9707    for (const style of targetDocument.head.querySelectorAll(
9708      `style[$STYLE_HASH_ATTRIBUTE9}]`
9709    )) {
9710      if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
9711        return true;
9712      }
9713    }
9714    return false;
9715  }
9716  function injectStyle9(targetDocument, hash, css) {
9717    if (!targetDocument.head) {
9718      return;
9719    }
9720    const runtime = getRuntime9();
9721    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9722    if (!injectedStyles) {
9723      injectedStyles = /* @__PURE__ */ new Set();
9724      runtime.injectedStyles.set(targetDocument, injectedStyles);
9725    }
9726    if (injectedStyles.has(hash)) {
9727      return;
9728    }
9729    if (documentContainsStyleHash9(targetDocument, hash)) {
9730      injectedStyles.add(hash);
9731      return;
9732    }
9733    const style = targetDocument.createElement("style");
9734    style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
9735    style.appendChild(targetDocument.createTextNode(css));
9736    targetDocument.head.appendChild(style);
9737    injectedStyles.add(hash);
9738  }
9739  function registerDocument9(targetDocument) {
9740    const runtime = getRuntime9();
9741    runtime.documents.set(
9742      targetDocument,
9743      (runtime.documents.get(targetDocument) ?? 0) + 1
9744    );
9745    for (const [hash, css] of runtime.styles) {
9746      injectStyle9(targetDocument, hash, css);
9747    }
9748    return () => {
9749      const count = runtime.documents.get(targetDocument);
9750      if (count === void 0) {
9751        return;
9752      }
9753      if (count <= 1) {
9754        runtime.documents.delete(targetDocument);
9755        return;
9756      }
9757      runtime.documents.set(targetDocument, count - 1);
9758    };
9759  }
9760  function registerStyle9(hash, css) {
9761    const runtime = getRuntime9();
9762    runtime.styles.set(hash, css);
9763    for (const targetDocument of runtime.documents.keys()) {
9764      injectStyle9(targetDocument, hash, css);
9765    }
9766  }
9767  if (typeof process === "undefined" || true) {
9768    registerStyle9("c5cdafb1bc", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer compositions{._28cfdc260e755391__icon-button{--wp-ui-button-aspect-ratio:1;--wp-ui-button-padding-inline:0px;--wp-ui-button-min-width:unset}.f1c70d719989a85a__icon{margin:-1px}}}");
9769  }
9770  var style_default8 = { "icon-button": "_28cfdc260e755391__icon-button", "icon": "f1c70d719989a85a__icon" };
9771  var IconButton = (0, import_element21.forwardRef)(
9772    function IconButton2({
9773      label,
9774      className,
9775      // Prevent accidental forwarding of `children`
9776      children: _children,
9777      disabled: disabled2,
9778      focusableWhenDisabled = true,
9779      icon,
9780      size: size4,
9781      shortcut,
9782      positioner,
9783      ...restProps
9784    }, ref) {
9785      const classes = clsx_default(style_default8["icon-button"], className);
9786      return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Root, { children: [
9787        /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
9788          Trigger,
9789          {
9790            ref,
9791            disabled: disabled2 && !focusableWhenDisabled,
9792            render: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
9793              Button4,
9794              {
9795                ...restProps,
9796                size: size4,
9797                "aria-label": label,
9798                "aria-keyshortcuts": shortcut?.ariaKeyShortcut,
9799                disabled: disabled2,
9800                focusableWhenDisabled
9801              }
9802            ),
9803            className: classes,
9804            children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { icon, size: 24, className: style_default8.icon })
9805          }
9806        ),
9807        /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Popup, { positioner, children: [
9808          label,
9809          shortcut && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
9810            " ",
9811            /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { "aria-hidden": "true", children: shortcut.displayShortcut })
9812          ] })
9813        ] })
9814      ] });
9815    }
9816  );
9817  
9818  // packages/ui/build-module/link/link.mjs
9819  var import_element22 = __toESM(require_element(), 1);
9820  var import_i18n2 = __toESM(require_i18n(), 1);
9821  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
9822  var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
9823  function getRuntime10() {
9824    const globalScope = globalThis;
9825    if (globalScope.__wpStyleRuntime) {
9826      return globalScope.__wpStyleRuntime;
9827    }
9828    globalScope.__wpStyleRuntime = {
9829      documents: /* @__PURE__ */ new Map(),
9830      styles: /* @__PURE__ */ new Map(),
9831      injectedStyles: /* @__PURE__ */ new WeakMap()
9832    };
9833    if (typeof document !== "undefined") {
9834      registerDocument10(document);
9835    }
9836    return globalScope.__wpStyleRuntime;
9837  }
9838  function documentContainsStyleHash10(targetDocument, hash) {
9839    if (!targetDocument.head) {
9840      return false;
9841    }
9842    for (const style of targetDocument.head.querySelectorAll(
9843      `style[$STYLE_HASH_ATTRIBUTE10}]`
9844    )) {
9845      if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
9846        return true;
9847      }
9848    }
9849    return false;
9850  }
9851  function injectStyle10(targetDocument, hash, css) {
9852    if (!targetDocument.head) {
9853      return;
9854    }
9855    const runtime = getRuntime10();
9856    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9857    if (!injectedStyles) {
9858      injectedStyles = /* @__PURE__ */ new Set();
9859      runtime.injectedStyles.set(targetDocument, injectedStyles);
9860    }
9861    if (injectedStyles.has(hash)) {
9862      return;
9863    }
9864    if (documentContainsStyleHash10(targetDocument, hash)) {
9865      injectedStyles.add(hash);
9866      return;
9867    }
9868    const style = targetDocument.createElement("style");
9869    style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
9870    style.appendChild(targetDocument.createTextNode(css));
9871    targetDocument.head.appendChild(style);
9872    injectedStyles.add(hash);
9873  }
9874  function registerDocument10(targetDocument) {
9875    const runtime = getRuntime10();
9876    runtime.documents.set(
9877      targetDocument,
9878      (runtime.documents.get(targetDocument) ?? 0) + 1
9879    );
9880    for (const [hash, css] of runtime.styles) {
9881      injectStyle10(targetDocument, hash, css);
9882    }
9883    return () => {
9884      const count = runtime.documents.get(targetDocument);
9885      if (count === void 0) {
9886        return;
9887      }
9888      if (count <= 1) {
9889        runtime.documents.delete(targetDocument);
9890        return;
9891      }
9892      runtime.documents.set(targetDocument, count - 1);
9893    };
9894  }
9895  function registerStyle10(hash, css) {
9896    const runtime = getRuntime10();
9897    runtime.styles.set(hash, css);
9898    for (const targetDocument of runtime.documents.keys()) {
9899      injectStyle10(targetDocument, hash, css);
9900    }
9901  }
9902  if (typeof process === "undefined" || true) {
9903    registerStyle10("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9904  }
9905  var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9906  if (typeof process === "undefined" || true) {
9907    registerStyle10("5f8e7aa0bc", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid 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(--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(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
9908  }
9909  var focus_default2 = { "outset-ring--focus": "_08e8a2e44959f892__outset-ring--focus", "outset-ring--focus-except-active": "e25b2bdd7aa21721__outset-ring--focus-except-active", "outset-ring--focus-visible": "d0541bc9dd9dc7b6__outset-ring--focus-visible", "outset-ring--focus-within": "cd83dfc2126a0846__outset-ring--focus-within", "outset-ring--focus-within-except-active": "_970d04df7376df67__outset-ring--focus-within-except-active", "outset-ring--focus-within-visible": "c5cb3ee4bddaa8e4__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "ecadb9e080e2dfa5__outset-ring--focus-parent-visible" };
9910  if (typeof process === "undefined" || true) {
9911    registerStyle10("e8e6a9be37", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.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-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;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:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');
9912  }
9913  var style_default9 = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
9914  if (typeof process === "undefined" || true) {
9915    registerStyle10("af6d9984a6", "._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);&: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))}&::placeholder{color:var(--_gcd-input-placeholder-color,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)}");
9916  }
9917  var global_css_defense_default3 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a" };
9918  var Link = (0, import_element22.forwardRef)(function Link2({
9919    children,
9920    variant = "default",
9921    tone = "brand",
9922    openInNewTab = false,
9923    render,
9924    className,
9925    ...props
9926  }, ref) {
9927    const element = useRender({
9928      render,
9929      defaultTagName: "a",
9930      ref,
9931      props: mergeProps(props, {
9932        className: clsx_default(
9933          global_css_defense_default3.a,
9934          resets_default3["box-sizing"],
9935          focus_default2["outset-ring--focus-except-active"],
9936          variant !== "unstyled" && style_default9.link,
9937          variant !== "unstyled" && style_default9[`is-$tone}`],
9938          variant === "unstyled" && style_default9["is-unstyled"],
9939          className
9940        ),
9941        target: openInNewTab ? "_blank" : void 0,
9942        children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
9943          children,
9944          openInNewTab && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9945            "span",
9946            {
9947              className: style_default9["link-icon"],
9948              role: "img",
9949              "aria-label": (
9950                /* translators: accessibility text appended to link text */
9951                (0, import_i18n2.__)("(opens in a new tab)")
9952              )
9953            }
9954          )
9955        ] })
9956      })
9957    });
9958    return element;
9959  });
9960  
9961  // packages/ui/build-module/notice/index.mjs
9962  var notice_exports = {};
9963  __export(notice_exports, {
9964    ActionButton: () => ActionButton,
9965    ActionLink: () => ActionLink,
9966    Actions: () => Actions,
9967    CloseIcon: () => CloseIcon,
9968    Description: () => Description,
9969    Root: () => Root2,
9970    Title: () => Title
9971  });
9972  
9973  // packages/ui/build-module/notice/root.mjs
9974  var import_element23 = __toESM(require_element(), 1);
9975  import { speak as speak2 } from "@wordpress/a11y";
9976  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
9977  var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
9978  function getRuntime11() {
9979    const globalScope = globalThis;
9980    if (globalScope.__wpStyleRuntime) {
9981      return globalScope.__wpStyleRuntime;
9982    }
9983    globalScope.__wpStyleRuntime = {
9984      documents: /* @__PURE__ */ new Map(),
9985      styles: /* @__PURE__ */ new Map(),
9986      injectedStyles: /* @__PURE__ */ new WeakMap()
9987    };
9988    if (typeof document !== "undefined") {
9989      registerDocument11(document);
9990    }
9991    return globalScope.__wpStyleRuntime;
9992  }
9993  function documentContainsStyleHash11(targetDocument, hash) {
9994    if (!targetDocument.head) {
9995      return false;
9996    }
9997    for (const style of targetDocument.head.querySelectorAll(
9998      `style[$STYLE_HASH_ATTRIBUTE11}]`
9999    )) {
10000      if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
10001        return true;
10002      }
10003    }
10004    return false;
10005  }
10006  function injectStyle11(targetDocument, hash, css) {
10007    if (!targetDocument.head) {
10008      return;
10009    }
10010    const runtime = getRuntime11();
10011    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10012    if (!injectedStyles) {
10013      injectedStyles = /* @__PURE__ */ new Set();
10014      runtime.injectedStyles.set(targetDocument, injectedStyles);
10015    }
10016    if (injectedStyles.has(hash)) {
10017      return;
10018    }
10019    if (documentContainsStyleHash11(targetDocument, hash)) {
10020      injectedStyles.add(hash);
10021      return;
10022    }
10023    const style = targetDocument.createElement("style");
10024    style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
10025    style.appendChild(targetDocument.createTextNode(css));
10026    targetDocument.head.appendChild(style);
10027    injectedStyles.add(hash);
10028  }
10029  function registerDocument11(targetDocument) {
10030    const runtime = getRuntime11();
10031    runtime.documents.set(
10032      targetDocument,
10033      (runtime.documents.get(targetDocument) ?? 0) + 1
10034    );
10035    for (const [hash, css] of runtime.styles) {
10036      injectStyle11(targetDocument, hash, css);
10037    }
10038    return () => {
10039      const count = runtime.documents.get(targetDocument);
10040      if (count === void 0) {
10041        return;
10042      }
10043      if (count <= 1) {
10044        runtime.documents.delete(targetDocument);
10045        return;
10046      }
10047      runtime.documents.set(targetDocument, count - 1);
10048    };
10049  }
10050  function registerStyle11(hash, css) {
10051    const runtime = getRuntime11();
10052    runtime.styles.set(hash, css);
10053    for (const targetDocument of runtime.documents.keys()) {
10054      injectStyle11(targetDocument, hash, css);
10055    }
10056  }
10057  if (typeof process === "undefined" || true) {
10058    registerStyle11("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
10059  }
10060  var resets_default4 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
10061  if (typeof process === "undefined" || true) {
10062    registerStyle11("726c480820", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
10063  }
10064  var style_default10 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
10065  var icons = {
10066    neutral: null,
10067    info: info_default,
10068    warning: caution_default,
10069    success: published_default,
10070    error: error_default
10071  };
10072  function getDefaultPoliteness(intent) {
10073    return intent === "error" ? "assertive" : "polite";
10074  }
10075  function safeRenderToString(message) {
10076    if (!message) {
10077      return void 0;
10078    }
10079    if (typeof message === "string") {
10080      return message;
10081    }
10082    try {
10083      return (0, import_element23.renderToString)(message);
10084    } catch {
10085      return void 0;
10086    }
10087  }
10088  function useSpokenMessage(message, politeness) {
10089    const spokenMessage = safeRenderToString(message);
10090    (0, import_element23.useEffect)(() => {
10091      if (spokenMessage) {
10092        speak2(spokenMessage, politeness);
10093      }
10094    }, [spokenMessage, politeness]);
10095  }
10096  var Root2 = (0, import_element23.forwardRef)(function Notice({
10097    intent = "neutral",
10098    children,
10099    icon,
10100    spokenMessage = children,
10101    politeness = getDefaultPoliteness(intent),
10102    render,
10103    ...restProps
10104  }, ref) {
10105    useSpokenMessage(spokenMessage, politeness);
10106    const iconElement = icon === null ? null : icon ?? icons[intent];
10107    const mergedClassName = clsx_default(
10108      style_default10.notice,
10109      style_default10[`is-$intent}`],
10110      resets_default4["box-sizing"]
10111    );
10112    const element = useRender({
10113      defaultTagName: "div",
10114      render,
10115      ref,
10116      props: mergeProps(
10117        {
10118          className: mergedClassName,
10119          children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
10120            children,
10121            iconElement && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10122              Icon,
10123              {
10124                className: style_default10.icon,
10125                icon: iconElement
10126              }
10127            )
10128          ] })
10129        },
10130        restProps
10131      )
10132    });
10133    return element;
10134  });
10135  
10136  // packages/ui/build-module/notice/title.mjs
10137  var import_element24 = __toESM(require_element(), 1);
10138  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
10139  var STYLE_HASH_ATTRIBUTE12 = "data-wp-hash";
10140  function getRuntime12() {
10141    const globalScope = globalThis;
10142    if (globalScope.__wpStyleRuntime) {
10143      return globalScope.__wpStyleRuntime;
10144    }
10145    globalScope.__wpStyleRuntime = {
10146      documents: /* @__PURE__ */ new Map(),
10147      styles: /* @__PURE__ */ new Map(),
10148      injectedStyles: /* @__PURE__ */ new WeakMap()
10149    };
10150    if (typeof document !== "undefined") {
10151      registerDocument12(document);
10152    }
10153    return globalScope.__wpStyleRuntime;
10154  }
10155  function documentContainsStyleHash12(targetDocument, hash) {
10156    if (!targetDocument.head) {
10157      return false;
10158    }
10159    for (const style of targetDocument.head.querySelectorAll(
10160      `style[$STYLE_HASH_ATTRIBUTE12}]`
10161    )) {
10162      if (style.getAttribute(STYLE_HASH_ATTRIBUTE12) === hash) {
10163        return true;
10164      }
10165    }
10166    return false;
10167  }
10168  function injectStyle12(targetDocument, hash, css) {
10169    if (!targetDocument.head) {
10170      return;
10171    }
10172    const runtime = getRuntime12();
10173    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10174    if (!injectedStyles) {
10175      injectedStyles = /* @__PURE__ */ new Set();
10176      runtime.injectedStyles.set(targetDocument, injectedStyles);
10177    }
10178    if (injectedStyles.has(hash)) {
10179      return;
10180    }
10181    if (documentContainsStyleHash12(targetDocument, hash)) {
10182      injectedStyles.add(hash);
10183      return;
10184    }
10185    const style = targetDocument.createElement("style");
10186    style.setAttribute(STYLE_HASH_ATTRIBUTE12, hash);
10187    style.appendChild(targetDocument.createTextNode(css));
10188    targetDocument.head.appendChild(style);
10189    injectedStyles.add(hash);
10190  }
10191  function registerDocument12(targetDocument) {
10192    const runtime = getRuntime12();
10193    runtime.documents.set(
10194      targetDocument,
10195      (runtime.documents.get(targetDocument) ?? 0) + 1
10196    );
10197    for (const [hash, css] of runtime.styles) {
10198      injectStyle12(targetDocument, hash, css);
10199    }
10200    return () => {
10201      const count = runtime.documents.get(targetDocument);
10202      if (count === void 0) {
10203        return;
10204      }
10205      if (count <= 1) {
10206        runtime.documents.delete(targetDocument);
10207        return;
10208      }
10209      runtime.documents.set(targetDocument, count - 1);
10210    };
10211  }
10212  function registerStyle12(hash, css) {
10213    const runtime = getRuntime12();
10214    runtime.styles.set(hash, css);
10215    for (const targetDocument of runtime.documents.keys()) {
10216      injectStyle12(targetDocument, hash, css);
10217    }
10218  }
10219  if (typeof process === "undefined" || true) {
10220    registerStyle12("726c480820", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
10221  }
10222  var style_default11 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
10223  var Title = (0, import_element24.forwardRef)(
10224    function NoticeTitle({ className, ...props }, ref) {
10225      return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10226        Text,
10227        {
10228          ref,
10229          variant: "heading-md",
10230          className: clsx_default(style_default11.title, className),
10231          ...props
10232        }
10233      );
10234    }
10235  );
10236  
10237  // packages/ui/build-module/notice/description.mjs
10238  var import_element25 = __toESM(require_element(), 1);
10239  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
10240  var STYLE_HASH_ATTRIBUTE13 = "data-wp-hash";
10241  function getRuntime13() {
10242    const globalScope = globalThis;
10243    if (globalScope.__wpStyleRuntime) {
10244      return globalScope.__wpStyleRuntime;
10245    }
10246    globalScope.__wpStyleRuntime = {
10247      documents: /* @__PURE__ */ new Map(),
10248      styles: /* @__PURE__ */ new Map(),
10249      injectedStyles: /* @__PURE__ */ new WeakMap()
10250    };
10251    if (typeof document !== "undefined") {
10252      registerDocument13(document);
10253    }
10254    return globalScope.__wpStyleRuntime;
10255  }
10256  function documentContainsStyleHash13(targetDocument, hash) {
10257    if (!targetDocument.head) {
10258      return false;
10259    }
10260    for (const style of targetDocument.head.querySelectorAll(
10261      `style[$STYLE_HASH_ATTRIBUTE13}]`
10262    )) {
10263      if (style.getAttribute(STYLE_HASH_ATTRIBUTE13) === hash) {
10264        return true;
10265      }
10266    }
10267    return false;
10268  }
10269  function injectStyle13(targetDocument, hash, css) {
10270    if (!targetDocument.head) {
10271      return;
10272    }
10273    const runtime = getRuntime13();
10274    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10275    if (!injectedStyles) {
10276      injectedStyles = /* @__PURE__ */ new Set();
10277      runtime.injectedStyles.set(targetDocument, injectedStyles);
10278    }
10279    if (injectedStyles.has(hash)) {
10280      return;
10281    }
10282    if (documentContainsStyleHash13(targetDocument, hash)) {
10283      injectedStyles.add(hash);
10284      return;
10285    }
10286    const style = targetDocument.createElement("style");
10287    style.setAttribute(STYLE_HASH_ATTRIBUTE13, hash);
10288    style.appendChild(targetDocument.createTextNode(css));
10289    targetDocument.head.appendChild(style);
10290    injectedStyles.add(hash);
10291  }
10292  function registerDocument13(targetDocument) {
10293    const runtime = getRuntime13();
10294    runtime.documents.set(
10295      targetDocument,
10296      (runtime.documents.get(targetDocument) ?? 0) + 1
10297    );
10298    for (const [hash, css] of runtime.styles) {
10299      injectStyle13(targetDocument, hash, css);
10300    }
10301    return () => {
10302      const count = runtime.documents.get(targetDocument);
10303      if (count === void 0) {
10304        return;
10305      }
10306      if (count <= 1) {
10307        runtime.documents.delete(targetDocument);
10308        return;
10309      }
10310      runtime.documents.set(targetDocument, count - 1);
10311    };
10312  }
10313  function registerStyle13(hash, css) {
10314    const runtime = getRuntime13();
10315    runtime.styles.set(hash, css);
10316    for (const targetDocument of runtime.documents.keys()) {
10317      injectStyle13(targetDocument, hash, css);
10318    }
10319  }
10320  if (typeof process === "undefined" || true) {
10321    registerStyle13("726c480820", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
10322  }
10323  var style_default12 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
10324  var Description = (0, import_element25.forwardRef)(
10325    function NoticeDescription({ className, ...props }, ref) {
10326      return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10327        Text,
10328        {
10329          ref,
10330          variant: "body-md",
10331          className: clsx_default(style_default12.description, className),
10332          ...props
10333        }
10334      );
10335    }
10336  );
10337  
10338  // packages/ui/build-module/notice/actions.mjs
10339  var import_element26 = __toESM(require_element(), 1);
10340  var STYLE_HASH_ATTRIBUTE14 = "data-wp-hash";
10341  function getRuntime14() {
10342    const globalScope = globalThis;
10343    if (globalScope.__wpStyleRuntime) {
10344      return globalScope.__wpStyleRuntime;
10345    }
10346    globalScope.__wpStyleRuntime = {
10347      documents: /* @__PURE__ */ new Map(),
10348      styles: /* @__PURE__ */ new Map(),
10349      injectedStyles: /* @__PURE__ */ new WeakMap()
10350    };
10351    if (typeof document !== "undefined") {
10352      registerDocument14(document);
10353    }
10354    return globalScope.__wpStyleRuntime;
10355  }
10356  function documentContainsStyleHash14(targetDocument, hash) {
10357    if (!targetDocument.head) {
10358      return false;
10359    }
10360    for (const style of targetDocument.head.querySelectorAll(
10361      `style[$STYLE_HASH_ATTRIBUTE14}]`
10362    )) {
10363      if (style.getAttribute(STYLE_HASH_ATTRIBUTE14) === hash) {
10364        return true;
10365      }
10366    }
10367    return false;
10368  }
10369  function injectStyle14(targetDocument, hash, css) {
10370    if (!targetDocument.head) {
10371      return;
10372    }
10373    const runtime = getRuntime14();
10374    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10375    if (!injectedStyles) {
10376      injectedStyles = /* @__PURE__ */ new Set();
10377      runtime.injectedStyles.set(targetDocument, injectedStyles);
10378    }
10379    if (injectedStyles.has(hash)) {
10380      return;
10381    }
10382    if (documentContainsStyleHash14(targetDocument, hash)) {
10383      injectedStyles.add(hash);
10384      return;
10385    }
10386    const style = targetDocument.createElement("style");
10387    style.setAttribute(STYLE_HASH_ATTRIBUTE14, hash);
10388    style.appendChild(targetDocument.createTextNode(css));
10389    targetDocument.head.appendChild(style);
10390    injectedStyles.add(hash);
10391  }
10392  function registerDocument14(targetDocument) {
10393    const runtime = getRuntime14();
10394    runtime.documents.set(
10395      targetDocument,
10396      (runtime.documents.get(targetDocument) ?? 0) + 1
10397    );
10398    for (const [hash, css] of runtime.styles) {
10399      injectStyle14(targetDocument, hash, css);
10400    }
10401    return () => {
10402      const count = runtime.documents.get(targetDocument);
10403      if (count === void 0) {
10404        return;
10405      }
10406      if (count <= 1) {
10407        runtime.documents.delete(targetDocument);
10408        return;
10409      }
10410      runtime.documents.set(targetDocument, count - 1);
10411    };
10412  }
10413  function registerStyle14(hash, css) {
10414    const runtime = getRuntime14();
10415    runtime.styles.set(hash, css);
10416    for (const targetDocument of runtime.documents.keys()) {
10417      injectStyle14(targetDocument, hash, css);
10418    }
10419  }
10420  if (typeof process === "undefined" || true) {
10421    registerStyle14("726c480820", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
10422  }
10423  var style_default13 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
10424  var Actions = (0, import_element26.forwardRef)(
10425    function NoticeActions({ render, ...props }, ref) {
10426      const element = useRender({
10427        defaultTagName: "div",
10428        render,
10429        ref,
10430        props: mergeProps(
10431          {
10432            className: style_default13.actions
10433          },
10434          props
10435        )
10436      });
10437      return element;
10438    }
10439  );
10440  
10441  // packages/ui/build-module/notice/close-icon.mjs
10442  var import_element27 = __toESM(require_element(), 1);
10443  var import_i18n3 = __toESM(require_i18n(), 1);
10444  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
10445  var STYLE_HASH_ATTRIBUTE15 = "data-wp-hash";
10446  function getRuntime15() {
10447    const globalScope = globalThis;
10448    if (globalScope.__wpStyleRuntime) {
10449      return globalScope.__wpStyleRuntime;
10450    }
10451    globalScope.__wpStyleRuntime = {
10452      documents: /* @__PURE__ */ new Map(),
10453      styles: /* @__PURE__ */ new Map(),
10454      injectedStyles: /* @__PURE__ */ new WeakMap()
10455    };
10456    if (typeof document !== "undefined") {
10457      registerDocument15(document);
10458    }
10459    return globalScope.__wpStyleRuntime;
10460  }
10461  function documentContainsStyleHash15(targetDocument, hash) {
10462    if (!targetDocument.head) {
10463      return false;
10464    }
10465    for (const style of targetDocument.head.querySelectorAll(
10466      `style[$STYLE_HASH_ATTRIBUTE15}]`
10467    )) {
10468      if (style.getAttribute(STYLE_HASH_ATTRIBUTE15) === hash) {
10469        return true;
10470      }
10471    }
10472    return false;
10473  }
10474  function injectStyle15(targetDocument, hash, css) {
10475    if (!targetDocument.head) {
10476      return;
10477    }
10478    const runtime = getRuntime15();
10479    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10480    if (!injectedStyles) {
10481      injectedStyles = /* @__PURE__ */ new Set();
10482      runtime.injectedStyles.set(targetDocument, injectedStyles);
10483    }
10484    if (injectedStyles.has(hash)) {
10485      return;
10486    }
10487    if (documentContainsStyleHash15(targetDocument, hash)) {
10488      injectedStyles.add(hash);
10489      return;
10490    }
10491    const style = targetDocument.createElement("style");
10492    style.setAttribute(STYLE_HASH_ATTRIBUTE15, hash);
10493    style.appendChild(targetDocument.createTextNode(css));
10494    targetDocument.head.appendChild(style);
10495    injectedStyles.add(hash);
10496  }
10497  function registerDocument15(targetDocument) {
10498    const runtime = getRuntime15();
10499    runtime.documents.set(
10500      targetDocument,
10501      (runtime.documents.get(targetDocument) ?? 0) + 1
10502    );
10503    for (const [hash, css] of runtime.styles) {
10504      injectStyle15(targetDocument, hash, css);
10505    }
10506    return () => {
10507      const count = runtime.documents.get(targetDocument);
10508      if (count === void 0) {
10509        return;
10510      }
10511      if (count <= 1) {
10512        runtime.documents.delete(targetDocument);
10513        return;
10514      }
10515      runtime.documents.set(targetDocument, count - 1);
10516    };
10517  }
10518  function registerStyle15(hash, css) {
10519    const runtime = getRuntime15();
10520    runtime.styles.set(hash, css);
10521    for (const targetDocument of runtime.documents.keys()) {
10522      injectStyle15(targetDocument, hash, css);
10523    }
10524  }
10525  if (typeof process === "undefined" || true) {
10526    registerStyle15("726c480820", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
10527  }
10528  var style_default14 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
10529  var CloseIcon = (0, import_element27.forwardRef)(
10530    function NoticeCloseIcon({ className, icon = close_small_default, label = (0, import_i18n3.__)("Dismiss"), ...props }, ref) {
10531      return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
10532        IconButton,
10533        {
10534          ...props,
10535          ref,
10536          className: clsx_default(style_default14["close-icon"], className),
10537          variant: "minimal",
10538          size: "small",
10539          tone: "neutral",
10540          icon,
10541          label
10542        }
10543      );
10544    }
10545  );
10546  
10547  // packages/ui/build-module/notice/action-button.mjs
10548  var import_element28 = __toESM(require_element(), 1);
10549  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
10550  var STYLE_HASH_ATTRIBUTE16 = "data-wp-hash";
10551  function getRuntime16() {
10552    const globalScope = globalThis;
10553    if (globalScope.__wpStyleRuntime) {
10554      return globalScope.__wpStyleRuntime;
10555    }
10556    globalScope.__wpStyleRuntime = {
10557      documents: /* @__PURE__ */ new Map(),
10558      styles: /* @__PURE__ */ new Map(),
10559      injectedStyles: /* @__PURE__ */ new WeakMap()
10560    };
10561    if (typeof document !== "undefined") {
10562      registerDocument16(document);
10563    }
10564    return globalScope.__wpStyleRuntime;
10565  }
10566  function documentContainsStyleHash16(targetDocument, hash) {
10567    if (!targetDocument.head) {
10568      return false;
10569    }
10570    for (const style of targetDocument.head.querySelectorAll(
10571      `style[$STYLE_HASH_ATTRIBUTE16}]`
10572    )) {
10573      if (style.getAttribute(STYLE_HASH_ATTRIBUTE16) === hash) {
10574        return true;
10575      }
10576    }
10577    return false;
10578  }
10579  function injectStyle16(targetDocument, hash, css) {
10580    if (!targetDocument.head) {
10581      return;
10582    }
10583    const runtime = getRuntime16();
10584    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10585    if (!injectedStyles) {
10586      injectedStyles = /* @__PURE__ */ new Set();
10587      runtime.injectedStyles.set(targetDocument, injectedStyles);
10588    }
10589    if (injectedStyles.has(hash)) {
10590      return;
10591    }
10592    if (documentContainsStyleHash16(targetDocument, hash)) {
10593      injectedStyles.add(hash);
10594      return;
10595    }
10596    const style = targetDocument.createElement("style");
10597    style.setAttribute(STYLE_HASH_ATTRIBUTE16, hash);
10598    style.appendChild(targetDocument.createTextNode(css));
10599    targetDocument.head.appendChild(style);
10600    injectedStyles.add(hash);
10601  }
10602  function registerDocument16(targetDocument) {
10603    const runtime = getRuntime16();
10604    runtime.documents.set(
10605      targetDocument,
10606      (runtime.documents.get(targetDocument) ?? 0) + 1
10607    );
10608    for (const [hash, css] of runtime.styles) {
10609      injectStyle16(targetDocument, hash, css);
10610    }
10611    return () => {
10612      const count = runtime.documents.get(targetDocument);
10613      if (count === void 0) {
10614        return;
10615      }
10616      if (count <= 1) {
10617        runtime.documents.delete(targetDocument);
10618        return;
10619      }
10620      runtime.documents.set(targetDocument, count - 1);
10621    };
10622  }
10623  function registerStyle16(hash, css) {
10624    const runtime = getRuntime16();
10625    runtime.styles.set(hash, css);
10626    for (const targetDocument of runtime.documents.keys()) {
10627      injectStyle16(targetDocument, hash, css);
10628    }
10629  }
10630  if (typeof process === "undefined" || true) {
10631    registerStyle16("726c480820", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
10632  }
10633  var style_default15 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
10634  var ActionButton = (0, import_element28.forwardRef)(
10635    function NoticeActionButton({ className, loading, loadingAnnouncement, variant, ...props }, ref) {
10636      const loadingProps = loading !== void 0 ? { loading, loadingAnnouncement: loadingAnnouncement ?? "" } : {};
10637      return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
10638        Button4,
10639        {
10640          ...props,
10641          ...loadingProps,
10642          ref,
10643          size: "compact",
10644          tone: "neutral",
10645          variant,
10646          className: clsx_default(
10647            style_default15["action-button"],
10648            style_default15[`is-action-button-$variant}`],
10649            className
10650          )
10651        }
10652      );
10653    }
10654  );
10655  
10656  // packages/ui/build-module/notice/action-link.mjs
10657  var import_element29 = __toESM(require_element(), 1);
10658  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
10659  var STYLE_HASH_ATTRIBUTE17 = "data-wp-hash";
10660  function getRuntime17() {
10661    const globalScope = globalThis;
10662    if (globalScope.__wpStyleRuntime) {
10663      return globalScope.__wpStyleRuntime;
10664    }
10665    globalScope.__wpStyleRuntime = {
10666      documents: /* @__PURE__ */ new Map(),
10667      styles: /* @__PURE__ */ new Map(),
10668      injectedStyles: /* @__PURE__ */ new WeakMap()
10669    };
10670    if (typeof document !== "undefined") {
10671      registerDocument17(document);
10672    }
10673    return globalScope.__wpStyleRuntime;
10674  }
10675  function documentContainsStyleHash17(targetDocument, hash) {
10676    if (!targetDocument.head) {
10677      return false;
10678    }
10679    for (const style of targetDocument.head.querySelectorAll(
10680      `style[$STYLE_HASH_ATTRIBUTE17}]`
10681    )) {
10682      if (style.getAttribute(STYLE_HASH_ATTRIBUTE17) === hash) {
10683        return true;
10684      }
10685    }
10686    return false;
10687  }
10688  function injectStyle17(targetDocument, hash, css) {
10689    if (!targetDocument.head) {
10690      return;
10691    }
10692    const runtime = getRuntime17();
10693    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10694    if (!injectedStyles) {
10695      injectedStyles = /* @__PURE__ */ new Set();
10696      runtime.injectedStyles.set(targetDocument, injectedStyles);
10697    }
10698    if (injectedStyles.has(hash)) {
10699      return;
10700    }
10701    if (documentContainsStyleHash17(targetDocument, hash)) {
10702      injectedStyles.add(hash);
10703      return;
10704    }
10705    const style = targetDocument.createElement("style");
10706    style.setAttribute(STYLE_HASH_ATTRIBUTE17, hash);
10707    style.appendChild(targetDocument.createTextNode(css));
10708    targetDocument.head.appendChild(style);
10709    injectedStyles.add(hash);
10710  }
10711  function registerDocument17(targetDocument) {
10712    const runtime = getRuntime17();
10713    runtime.documents.set(
10714      targetDocument,
10715      (runtime.documents.get(targetDocument) ?? 0) + 1
10716    );
10717    for (const [hash, css] of runtime.styles) {
10718      injectStyle17(targetDocument, hash, css);
10719    }
10720    return () => {
10721      const count = runtime.documents.get(targetDocument);
10722      if (count === void 0) {
10723        return;
10724      }
10725      if (count <= 1) {
10726        runtime.documents.delete(targetDocument);
10727        return;
10728      }
10729      runtime.documents.set(targetDocument, count - 1);
10730    };
10731  }
10732  function registerStyle17(hash, css) {
10733    const runtime = getRuntime17();
10734    runtime.styles.set(hash, css);
10735    for (const targetDocument of runtime.documents.keys()) {
10736      injectStyle17(targetDocument, hash, css);
10737    }
10738  }
10739  if (typeof process === "undefined" || true) {
10740    registerStyle17("726c480820", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");
10741  }
10742  var style_default16 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "title": "b5397fb9d05389e3__title", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error", "is-action-button-outline": "_8ddb8fb33fbf3d38__is-action-button-outline", "is-action-button-minimal": "_77bbde495a8a0af3__is-action-button-minimal" };
10743  var ActionLink = (0, import_element29.forwardRef)(
10744    function NoticeActionLink({ className, render, ...props }, ref) {
10745      return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
10746        Text,
10747        {
10748          ref,
10749          className: clsx_default(style_default16["action-link"], className),
10750          ...props,
10751          variant: "body-md",
10752          render: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Link, { tone: "neutral", variant: "default", render })
10753        }
10754      );
10755    }
10756  );
10757  
10758  // packages/admin-ui/build-module/navigable-region/index.mjs
10759  var import_element30 = __toESM(require_element(), 1);
10760  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
10761  var NavigableRegion = (0, import_element30.forwardRef)(
10762    ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
10763      return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
10764        Tag,
10765        {
10766          ref,
10767          className: clsx_default("admin-ui-navigable-region", className),
10768          "aria-label": ariaLabel,
10769          role: "region",
10770          tabIndex: "-1",
10771          ...props,
10772          children
10773        }
10774      );
10775    }
10776  );
10777  NavigableRegion.displayName = "NavigableRegion";
10778  var navigable_region_default = NavigableRegion;
10779  
10780  // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
10781  var import_components = __toESM(require_components(), 1);
10782  var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");
10783  
10784  // packages/admin-ui/build-module/page/header.mjs
10785  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
10786  var STYLE_HASH_ATTRIBUTE18 = "data-wp-hash";
10787  function getRuntime18() {
10788    const globalScope = globalThis;
10789    if (globalScope.__wpStyleRuntime) {
10790      return globalScope.__wpStyleRuntime;
10791    }
10792    globalScope.__wpStyleRuntime = {
10793      documents: /* @__PURE__ */ new Map(),
10794      styles: /* @__PURE__ */ new Map(),
10795      injectedStyles: /* @__PURE__ */ new WeakMap()
10796    };
10797    if (typeof document !== "undefined") {
10798      registerDocument18(document);
10799    }
10800    return globalScope.__wpStyleRuntime;
10801  }
10802  function documentContainsStyleHash18(targetDocument, hash) {
10803    if (!targetDocument.head) {
10804      return false;
10805    }
10806    for (const style of targetDocument.head.querySelectorAll(
10807      `style[$STYLE_HASH_ATTRIBUTE18}]`
10808    )) {
10809      if (style.getAttribute(STYLE_HASH_ATTRIBUTE18) === hash) {
10810        return true;
10811      }
10812    }
10813    return false;
10814  }
10815  function injectStyle18(targetDocument, hash, css) {
10816    if (!targetDocument.head) {
10817      return;
10818    }
10819    const runtime = getRuntime18();
10820    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10821    if (!injectedStyles) {
10822      injectedStyles = /* @__PURE__ */ new Set();
10823      runtime.injectedStyles.set(targetDocument, injectedStyles);
10824    }
10825    if (injectedStyles.has(hash)) {
10826      return;
10827    }
10828    if (documentContainsStyleHash18(targetDocument, hash)) {
10829      injectedStyles.add(hash);
10830      return;
10831    }
10832    const style = targetDocument.createElement("style");
10833    style.setAttribute(STYLE_HASH_ATTRIBUTE18, hash);
10834    style.appendChild(targetDocument.createTextNode(css));
10835    targetDocument.head.appendChild(style);
10836    injectedStyles.add(hash);
10837  }
10838  function registerDocument18(targetDocument) {
10839    const runtime = getRuntime18();
10840    runtime.documents.set(
10841      targetDocument,
10842      (runtime.documents.get(targetDocument) ?? 0) + 1
10843    );
10844    for (const [hash, css] of runtime.styles) {
10845      injectStyle18(targetDocument, hash, css);
10846    }
10847    return () => {
10848      const count = runtime.documents.get(targetDocument);
10849      if (count === void 0) {
10850        return;
10851      }
10852      if (count <= 1) {
10853        runtime.documents.delete(targetDocument);
10854        return;
10855      }
10856      runtime.documents.set(targetDocument, count - 1);
10857    };
10858  }
10859  function registerStyle18(hash, css) {
10860    const runtime = getRuntime18();
10861    runtime.styles.set(hash, css);
10862    for (const targetDocument of runtime.documents.keys()) {
10863      injectStyle18(targetDocument, hash, css);
10864    }
10865  }
10866  if (typeof process === "undefined" || true) {
10867    registerStyle18("ddd9aab364", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
10868  }
10869  var style_default17 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
10870  function Header({
10871    headingLevel = 1,
10872    breadcrumbs,
10873    badges,
10874    visual,
10875    title,
10876    subTitle,
10877    actions,
10878    showSidebarToggle = true
10879  }) {
10880    const HeadingTag = `h$headingLevel}`;
10881    return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Stack, { direction: "column", className: style_default17.header, children: [
10882      /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
10883        Stack,
10884        {
10885          className: style_default17["header-content"],
10886          direction: "row",
10887          gap: "sm",
10888          justify: "space-between",
10889          children: [
10890            /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [
10891              showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10892                SidebarToggleSlot,
10893                {
10894                  bubblesVirtually: true,
10895                  className: style_default17["sidebar-toggle-slot"]
10896                }
10897              ),
10898              visual && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10899                "div",
10900                {
10901                  className: style_default17["header-visual"],
10902                  "aria-hidden": "true",
10903                  children: visual
10904                }
10905              ),
10906              title && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10907                Text,
10908                {
10909                  className: style_default17["header-title"],
10910                  render: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(HeadingTag, {}),
10911                  variant: "heading-lg",
10912                  children: title
10913                }
10914              ),
10915              breadcrumbs,
10916              badges
10917            ] }),
10918            actions && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10919              Stack,
10920              {
10921                align: "center",
10922                className: style_default17["header-actions"],
10923                direction: "row",
10924                gap: "sm",
10925                children: actions
10926              }
10927            )
10928          ]
10929        }
10930      ),
10931      subTitle && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10932        Text,
10933        {
10934          render: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", {}),
10935          variant: "body-md",
10936          className: style_default17["header-subtitle"],
10937          children: subTitle
10938        }
10939      )
10940    ] });
10941  }
10942  
10943  // packages/admin-ui/build-module/page/index.mjs
10944  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
10945  var STYLE_HASH_ATTRIBUTE19 = "data-wp-hash";
10946  function getRuntime19() {
10947    const globalScope = globalThis;
10948    if (globalScope.__wpStyleRuntime) {
10949      return globalScope.__wpStyleRuntime;
10950    }
10951    globalScope.__wpStyleRuntime = {
10952      documents: /* @__PURE__ */ new Map(),
10953      styles: /* @__PURE__ */ new Map(),
10954      injectedStyles: /* @__PURE__ */ new WeakMap()
10955    };
10956    if (typeof document !== "undefined") {
10957      registerDocument19(document);
10958    }
10959    return globalScope.__wpStyleRuntime;
10960  }
10961  function documentContainsStyleHash19(targetDocument, hash) {
10962    if (!targetDocument.head) {
10963      return false;
10964    }
10965    for (const style of targetDocument.head.querySelectorAll(
10966      `style[$STYLE_HASH_ATTRIBUTE19}]`
10967    )) {
10968      if (style.getAttribute(STYLE_HASH_ATTRIBUTE19) === hash) {
10969        return true;
10970      }
10971    }
10972    return false;
10973  }
10974  function injectStyle19(targetDocument, hash, css) {
10975    if (!targetDocument.head) {
10976      return;
10977    }
10978    const runtime = getRuntime19();
10979    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10980    if (!injectedStyles) {
10981      injectedStyles = /* @__PURE__ */ new Set();
10982      runtime.injectedStyles.set(targetDocument, injectedStyles);
10983    }
10984    if (injectedStyles.has(hash)) {
10985      return;
10986    }
10987    if (documentContainsStyleHash19(targetDocument, hash)) {
10988      injectedStyles.add(hash);
10989      return;
10990    }
10991    const style = targetDocument.createElement("style");
10992    style.setAttribute(STYLE_HASH_ATTRIBUTE19, hash);
10993    style.appendChild(targetDocument.createTextNode(css));
10994    targetDocument.head.appendChild(style);
10995    injectedStyles.add(hash);
10996  }
10997  function registerDocument19(targetDocument) {
10998    const runtime = getRuntime19();
10999    runtime.documents.set(
11000      targetDocument,
11001      (runtime.documents.get(targetDocument) ?? 0) + 1
11002    );
11003    for (const [hash, css] of runtime.styles) {
11004      injectStyle19(targetDocument, hash, css);
11005    }
11006    return () => {
11007      const count = runtime.documents.get(targetDocument);
11008      if (count === void 0) {
11009        return;
11010      }
11011      if (count <= 1) {
11012        runtime.documents.delete(targetDocument);
11013        return;
11014      }
11015      runtime.documents.set(targetDocument, count - 1);
11016    };
11017  }
11018  function registerStyle19(hash, css) {
11019    const runtime = getRuntime19();
11020    runtime.styles.set(hash, css);
11021    for (const targetDocument of runtime.documents.keys()) {
11022      injectStyle19(targetDocument, hash, css);
11023    }
11024  }
11025  if (typeof process === "undefined" || true) {
11026    registerStyle19("ddd9aab364", "._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-background-surface-neutral,#fcfcfc);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-background-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:var(--wpds-dimension-size-md,32px)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:var(--wpds-dimension-size-sm,24px);width:var(--wpds-dimension-size-sm,24px);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}");
11027  }
11028  var style_default18 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
11029  function Page({
11030    headingLevel,
11031    breadcrumbs,
11032    badges,
11033    visual,
11034    title,
11035    subTitle,
11036    children,
11037    className,
11038    actions,
11039    ariaLabel,
11040    hasPadding = false,
11041    showSidebarToggle = true
11042  }) {
11043    const classes = clsx_default(style_default18.page, className);
11044    const effectiveAriaLabel = ariaLabel ?? (typeof title === "string" ? title : "");
11045    return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
11046      (title || breadcrumbs || badges || actions || visual) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
11047        Header,
11048        {
11049          headingLevel,
11050          breadcrumbs,
11051          badges,
11052          visual,
11053          title,
11054          subTitle,
11055          actions,
11056          showSidebarToggle
11057        }
11058      ),
11059      hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
11060        "div",
11061        {
11062          className: clsx_default(
11063            style_default18.content,
11064            style_default18["has-padding"]
11065          ),
11066          children
11067        }
11068      ) : children
11069    ] });
11070  }
11071  Page.SidebarToggleFill = SidebarToggleFill;
11072  var page_default = Page;
11073  
11074  // routes/connectors-home/stage.tsx
11075  var import_components4 = __toESM(require_components());
11076  var import_data4 = __toESM(require_data());
11077  var import_element34 = __toESM(require_element());
11078  var import_i18n7 = __toESM(require_i18n());
11079  var import_core_data3 = __toESM(require_core_data());
11080  import {
11081    privateApis as connectorsPrivateApis2
11082  } from "@wordpress/connectors";
11083  
11084  // routes/lock-unlock/index.ts
11085  var import_private_apis2 = __toESM(require_private_apis());
11086  var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
11087    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
11088    "@wordpress/routes"
11089  );
11090  
11091  // routes/connectors-home/style.scss
11092  if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='09e9b056ea']")) {
11093    const style = document.createElement("style");
11094    style.setAttribute("data-wp-hash", "09e9b056ea");
11095    style.appendChild(document.createTextNode(".connectors-page{box-sizing:border-box;margin:0 auto;max-width:680px;padding:24px;width:100%}.connectors-page .components-item{background:#fff;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:20px;scroll-margin-top:120px}.connectors-page .connector-settings__error{color:#cc1818}.connectors-page .connector-settings .components-text-control__input{font-family:monospace;scroll-margin-top:120px}.connectors-page__file-mods-notice{margin-bottom:16px}.connectors-page--empty{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:32px;justify-content:center;text-align:center}.connectors-page .ai-plugin-callout{background-color:#e7d4e4;background-image:radial-gradient(ellipse 70% 120% at 18% 115%,rgba(202,158,198,.75) 0,rgba(202,158,198,0) 60%),radial-gradient(ellipse 55% 110% at 92% -15%,rgba(208,175,217,.7) 0,rgba(208,175,217,0) 65%),radial-gradient(ellipse 40% 85% at 58% -10%,rgba(170,130,184,.45) 0,rgba(170,130,184,0) 70%);border-radius:8px;overflow:hidden;padding:24px;padding-inline-end:150px;position:relative}[dir=rtl] .connectors-page .ai-plugin-callout{background-image:radial-gradient(ellipse 70% 120% at 82% 115%,rgba(202,158,198,.75) 0,rgba(202,158,198,0) 60%),radial-gradient(ellipse 55% 110% at 8% -15%,rgba(208,175,217,.7) 0,rgba(208,175,217,0) 65%),radial-gradient(ellipse 40% 85% at 42% -10%,rgba(170,130,184,.45) 0,rgba(170,130,184,0) 70%)}.connectors-page .ai-plugin-callout__content{align-items:flex-start;display:flex;flex-direction:column;gap:12px;padding-top:2px}.connectors-page .ai-plugin-callout__content p{font-size:13px;line-height:20px;margin:0}.connectors-page .ai-plugin-callout__decoration{height:110px;inset-inline-end:16px;position:absolute;top:12px;width:110px}.connectors-page>p{color:#949494}@media (max-width:680px){.connectors-page .ai-plugin-callout{padding:12px;padding-inline-end:100px}.connectors-page .ai-plugin-callout__decoration{height:75px;inset-inline-end:8px;top:8px;width:75px}}@media (max-width:480px){.connectors-page{padding:8px}.connectors-page .ai-plugin-callout{padding-inline-end:130px}.connectors-page .components-item{padding:12px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child svg{height:32px;width:32px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child>.components-h-stack:last-child{align-items:flex-end;flex-direction:column}}"));
11096    document.head.appendChild(style);
11097  }
11098  
11099  // routes/connectors-home/ai-plugin-callout.tsx
11100  var import_components3 = __toESM(require_components());
11101  var import_core_data2 = __toESM(require_core_data());
11102  var import_data3 = __toESM(require_data());
11103  var import_element33 = __toESM(require_element());
11104  var import_i18n6 = __toESM(require_i18n());
11105  var import_notices2 = __toESM(require_notices());
11106  var import_url = __toESM(require_url());
11107  
11108  // routes/connectors-home/default-connectors.tsx
11109  var import_components2 = __toESM(require_components());
11110  var import_element32 = __toESM(require_element());
11111  var import_data2 = __toESM(require_data());
11112  var import_i18n5 = __toESM(require_i18n());
11113  import {
11114    __experimentalRegisterConnector as registerConnector,
11115    __experimentalConnectorItem as ConnectorItem,
11116    __experimentalDefaultConnectorSettings as DefaultConnectorSettings,
11117    __experimentalApplicationPasswordConnectorSettings as ApplicationPasswordConnectorSettings,
11118    privateApis as connectorsPrivateApis
11119  } from "@wordpress/connectors";
11120  
11121  // routes/connectors-home/use-connector-plugin.ts
11122  var import_core_data = __toESM(require_core_data());
11123  var import_data = __toESM(require_data());
11124  var import_element31 = __toESM(require_element());
11125  var import_i18n4 = __toESM(require_i18n());
11126  var import_notices = __toESM(require_notices());
11127  function useConnectorPlugin({
11128    file: pluginFileFromServer,
11129    settingName,
11130    connectorName,
11131    isInstalled,
11132    isActivated,
11133    keySource = "none",
11134    initialIsConnected = false
11135  }) {
11136    const [isExpanded, setIsExpanded] = (0, import_element31.useState)(false);
11137    const [isBusy, setIsBusy] = (0, import_element31.useState)(false);
11138    const [connectedState, setConnectedState] = (0, import_element31.useState)(initialIsConnected);
11139    const [pluginStatusOverride, setPluginStatusOverride] = (0, import_element31.useState)(null);
11140    const pluginBasename = pluginFileFromServer?.replace(/\.php$/, "");
11141    const pluginSlug = pluginBasename?.includes("/") ? pluginBasename.split("/")[0] : pluginBasename;
11142    const {
11143      derivedPluginStatus,
11144      canManagePlugins,
11145      currentApiKey,
11146      currentUsername,
11147      hasStoredCredentials,
11148      hasResolvedSettings,
11149      canInstallPlugins
11150    } = (0, import_data.useSelect)(
11151      (select2) => {
11152        const store2 = select2(import_core_data.store);
11153        const siteSettings = store2.getEntityRecord("root", "site");
11154        const settingValue = siteSettings?.[settingName];
11155        const apiKey = typeof settingValue === "string" ? settingValue : "";
11156        const credentials = typeof settingValue === "object" && settingValue !== null ? settingValue : void 0;
11157        const credentialsExist = credentials !== void 0 ? !!credentials.username && !!credentials.password : !!apiKey;
11158        const settingsResolved = store2.hasFinishedResolution(
11159          "getEntityRecord",
11160          ["root", "site"]
11161        );
11162        const canCreate = !!store2.canUser("create", {
11163          kind: "root",
11164          name: "plugin"
11165        });
11166        const common = {
11167          currentApiKey: apiKey,
11168          currentUsername: credentials?.username ?? "",
11169          hasStoredCredentials: credentialsExist,
11170          hasResolvedSettings: settingsResolved,
11171          canInstallPlugins: canCreate
11172        };
11173        if (!pluginFileFromServer) {
11174          return {
11175            ...common,
11176            derivedPluginStatus: settingsResolved ? "active" : "checking",
11177            canManagePlugins: void 0
11178          };
11179        }
11180        const plugin = store2.getEntityRecord(
11181          "root",
11182          "plugin",
11183          pluginBasename
11184        );
11185        const hasFinished = store2.hasFinishedResolution(
11186          "getEntityRecord",
11187          ["root", "plugin", pluginBasename]
11188        );
11189        if (!hasFinished) {
11190          return {
11191            ...common,
11192            derivedPluginStatus: "checking",
11193            canManagePlugins: void 0
11194          };
11195        }
11196        if (plugin) {
11197          const isPluginActive = plugin.status === "active" || plugin.status === "network-active";
11198          return {
11199            ...common,
11200            derivedPluginStatus: isPluginActive ? "active" : "inactive",
11201            canManagePlugins: true
11202          };
11203        }
11204        let status = "not-installed";
11205        if (isActivated) {
11206          status = "active";
11207        } else if (isInstalled) {
11208          status = "inactive";
11209        }
11210        return {
11211          ...common,
11212          derivedPluginStatus: status,
11213          canManagePlugins: false
11214        };
11215      },
11216      [
11217        pluginFileFromServer,
11218        pluginBasename,
11219        settingName,
11220        isInstalled,
11221        isActivated
11222      ]
11223    );
11224    const pluginStatus = pluginStatusOverride ?? derivedPluginStatus;
11225    const canActivatePlugins = canManagePlugins;
11226    const isConnected = pluginStatus === "active" && connectedState || // After install/activate, if settings re-fetch reveals stored credentials,
11227    // update connected state (mirrors what the server would report on page load).
11228    pluginStatusOverride === "active" && hasStoredCredentials;
11229    const { saveEntityRecord, invalidateResolution } = (0, import_data.useDispatch)(import_core_data.store);
11230    const { createSuccessNotice, createErrorNotice } = (0, import_data.useDispatch)(import_notices.store);
11231    const saveConnectorSetting = (value) => saveEntityRecord(
11232      "root",
11233      "site",
11234      { [settingName]: value },
11235      { throwOnError: true }
11236    );
11237    const createConnectedNotice = () => {
11238      createSuccessNotice(
11239        (0, import_i18n4.sprintf)(
11240          /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11241          (0, import_i18n4.__)("%s connected successfully."),
11242          connectorName
11243        ),
11244        {
11245          id: "connector-connect-success",
11246          type: "snackbar"
11247        }
11248      );
11249    };
11250    const createDisconnectedNotice = () => {
11251      createSuccessNotice(
11252        (0, import_i18n4.sprintf)(
11253          /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11254          (0, import_i18n4.__)("%s disconnected."),
11255          connectorName
11256        ),
11257        {
11258          id: "connector-disconnect-success",
11259          type: "snackbar"
11260        }
11261      );
11262    };
11263    const createDisconnectErrorNotice = () => {
11264      createErrorNotice(
11265        (0, import_i18n4.sprintf)(
11266          /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11267          (0, import_i18n4.__)("Failed to disconnect %s."),
11268          connectorName
11269        ),
11270        {
11271          id: "connector-disconnect-error",
11272          type: "snackbar"
11273        }
11274      );
11275    };
11276    const installPlugin = async () => {
11277      if (!pluginSlug) {
11278        return;
11279      }
11280      setIsBusy(true);
11281      try {
11282        await saveEntityRecord(
11283          "root",
11284          "plugin",
11285          { slug: pluginSlug, status: "active" },
11286          { throwOnError: true }
11287        );
11288        setPluginStatusOverride("active");
11289        invalidateResolution("getEntityRecord", ["root", "site"]);
11290        setIsExpanded(true);
11291        createSuccessNotice(
11292          (0, import_i18n4.sprintf)(
11293            /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11294            (0, import_i18n4.__)("Plugin for %s installed and activated successfully."),
11295            connectorName
11296          ),
11297          {
11298            id: "connector-plugin-install-success",
11299            type: "snackbar"
11300          }
11301        );
11302      } catch {
11303        createErrorNotice(
11304          (0, import_i18n4.sprintf)(
11305            /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11306            (0, import_i18n4.__)("Failed to install plugin for %s."),
11307            connectorName
11308          ),
11309          {
11310            id: "connector-plugin-install-error",
11311            type: "snackbar"
11312          }
11313        );
11314      } finally {
11315        setIsBusy(false);
11316      }
11317    };
11318    const activatePlugin = async () => {
11319      if (!pluginFileFromServer) {
11320        return;
11321      }
11322      setIsBusy(true);
11323      try {
11324        await saveEntityRecord(
11325          "root",
11326          "plugin",
11327          {
11328            plugin: pluginBasename,
11329            status: "active"
11330          },
11331          { throwOnError: true }
11332        );
11333        setPluginStatusOverride("active");
11334        invalidateResolution("getEntityRecord", ["root", "site"]);
11335        setIsExpanded(true);
11336        createSuccessNotice(
11337          (0, import_i18n4.sprintf)(
11338            /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11339            (0, import_i18n4.__)("Plugin for %s activated successfully."),
11340            connectorName
11341          ),
11342          {
11343            id: "connector-plugin-activate-success",
11344            type: "snackbar"
11345          }
11346        );
11347      } catch {
11348        createErrorNotice(
11349          (0, import_i18n4.sprintf)(
11350            /* translators: %s: Name of the connector (e.g. "OpenAI"). */
11351            (0, import_i18n4.__)("Failed to activate plugin for %s."),
11352            connectorName
11353          ),
11354          {
11355            id: "connector-plugin-activate-error",
11356            type: "snackbar"
11357          }
11358        );
11359      } finally {
11360        setIsBusy(false);
11361      }
11362    };
11363    const handleButtonClick = () => {
11364      if (pluginStatus === "not-installed") {
11365        if (canInstallPlugins === false) {
11366          return;
11367        }
11368        installPlugin();
11369      } else if (pluginStatus === "inactive") {
11370        if (canActivatePlugins === false) {
11371          return;
11372        }
11373        activatePlugin();
11374      } else {
11375        setIsExpanded(!isExpanded);
11376      }
11377    };
11378    const getButtonLabel = () => {
11379      if (isBusy) {
11380        return pluginStatus === "not-installed" ? (0, import_i18n4.__)("Installing\u2026") : (0, import_i18n4.__)("Activating\u2026");
11381      }
11382      if (isExpanded) {
11383        return (0, import_i18n4.__)("Cancel");
11384      }
11385      if (isConnected) {
11386        return (0, import_i18n4.__)("Edit");
11387      }
11388      switch (pluginStatus) {
11389        case "checking":
11390          return (0, import_i18n4.__)("Checking\u2026");
11391        case "not-installed":
11392          return (0, import_i18n4.__)("Install");
11393        case "inactive":
11394          return (0, import_i18n4.__)("Activate");
11395        case "active":
11396          return (0, import_i18n4.__)("Set up");
11397      }
11398    };
11399    const saveApiKey = async (apiKey) => {
11400      const previousApiKey = currentApiKey;
11401      try {
11402        const updatedRecord = await saveConnectorSetting(apiKey);
11403        const record = updatedRecord;
11404        const returnedKey = record?.[settingName];
11405        if (apiKey && (returnedKey === previousApiKey || !returnedKey)) {
11406          throw new Error(
11407            "It was not possible to connect to the provider using this key."
11408          );
11409        }
11410        setConnectedState(true);
11411        createConnectedNotice();
11412      } catch (error2) {
11413        console.error("Failed to save API key:", error2);
11414        throw error2;
11415      }
11416    };
11417    const saveCredentials = async ({
11418      username,
11419      applicationPassword
11420    }) => {
11421      try {
11422        const updatedRecord = await saveConnectorSetting({
11423          username,
11424          password: applicationPassword
11425        });
11426        const record = updatedRecord;
11427        const credentials = record?.[settingName];
11428        if (!credentials?.username || !credentials?.password) {
11429          throw new Error(
11430            (0, import_i18n4.__)("It was not possible to save these credentials.")
11431          );
11432        }
11433        setConnectedState(true);
11434        createConnectedNotice();
11435      } catch (error2) {
11436        console.error("Failed to save credentials:", error2);
11437        throw error2;
11438      }
11439    };
11440    const removeApiKey = async () => {
11441      try {
11442        await saveConnectorSetting("");
11443        setConnectedState(false);
11444        createDisconnectedNotice();
11445      } catch (error2) {
11446        console.error("Failed to remove API key:", error2);
11447        createDisconnectErrorNotice();
11448      }
11449    };
11450    const removeCredentials = async () => {
11451      try {
11452        await saveConnectorSetting({
11453          username: "",
11454          password: ""
11455        });
11456        setConnectedState(false);
11457        createDisconnectedNotice();
11458      } catch (error2) {
11459        console.error("Failed to remove credentials:", error2);
11460        createDisconnectErrorNotice();
11461      }
11462    };
11463    return {
11464      pluginStatus,
11465      canInstallPlugins,
11466      canActivatePlugins,
11467      isExpanded,
11468      setIsExpanded,
11469      isBusy,
11470      isConnected,
11471      currentApiKey,
11472      currentUsername,
11473      hasResolvedSettings,
11474      keySource,
11475      handleButtonClick,
11476      getButtonLabel,
11477      saveApiKey,
11478      removeApiKey,
11479      saveCredentials,
11480      removeCredentials
11481    };
11482  }
11483  
11484  // routes/connectors-home/logos.tsx
11485  var OpenAILogo = () => /* @__PURE__ */ React.createElement(
11486    "svg",
11487    {
11488      width: "40",
11489      height: "40",
11490      viewBox: "0 0 24 24",
11491      fill: "none",
11492      xmlns: "http://www.w3.org/2000/svg",
11493      "aria-hidden": "true"
11494    },
11495    /* @__PURE__ */ React.createElement(
11496      "path",
11497      {
11498        d: "M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364l2.0201-1.1685a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.4043-.6813zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",
11499        fill: "currentColor"
11500      }
11501    )
11502  );
11503  var ClaudeLogo = () => /* @__PURE__ */ React.createElement(
11504    "svg",
11505    {
11506      width: "40",
11507      height: "40",
11508      viewBox: "0 0 32 32",
11509      fill: "none",
11510      xmlns: "http://www.w3.org/2000/svg",
11511      "aria-hidden": "true"
11512    },
11513    /* @__PURE__ */ React.createElement(
11514      "path",
11515      {
11516        d: "M6.2 21.024L12.416 17.536L12.52 17.232L12.416 17.064H12.112L11.072 17L7.52 16.904L4.44 16.776L1.456 16.616L0.704 16.456L0 15.528L0.072 15.064L0.704 14.64L1.608 14.72L3.608 14.856L6.608 15.064L8.784 15.192L12.008 15.528H12.52L12.592 15.32L12.416 15.192L12.28 15.064L9.176 12.96L5.816 10.736L4.056 9.456L3.104 8.808L2.624 8.2L2.416 6.872L3.28 5.92L4.44 6L4.736 6.08L5.912 6.984L8.424 8.928L11.704 11.344L12.184 11.744L12.376 11.608L12.4 11.512L12.184 11.152L10.4 7.928L8.496 4.648L7.648 3.288L7.424 2.472C7.344 2.136 7.288 1.856 7.288 1.512L8.272 0.176L8.816 0L10.128 0.176L10.68 0.656L11.496 2.52L12.816 5.456L14.864 9.448L15.464 10.632L15.784 11.728L15.904 12.064H16.112V11.872L16.28 9.624L16.592 6.864L16.896 3.312L17 2.312L17.496 1.112L18.48 0.464L19.248 0.832L19.88 1.736L19.792 2.32L19.416 4.76L18.68 8.584L18.2 11.144H18.48L18.8 10.824L20.096 9.104L22.272 6.384L23.232 5.304L24.352 4.112L25.072 3.544H26.432L27.432 5.032L26.984 6.568L25.584 8.344L24.424 9.848L22.76 12.088L21.72 13.88L21.816 14.024L22.064 14L25.824 13.2L27.856 12.832L30.28 12.416L31.376 12.928L31.496 13.448L31.064 14.512L28.472 15.152L25.432 15.76L20.904 16.832L20.848 16.872L20.912 16.952L22.952 17.144L23.824 17.192H25.96L29.936 17.488L30.976 18.176L31.6 19.016L31.496 19.656L29.896 20.472L27.736 19.96L22.696 18.76L20.968 18.328H20.728V18.472L22.168 19.88L24.808 22.264L28.112 25.336L28.28 26.096L27.856 26.696L27.408 26.632L24.504 24.448L23.384 23.464L20.848 21.328H20.68V21.552L21.264 22.408L24.352 27.048L24.512 28.472L24.288 28.936L23.488 29.216L22.608 29.056L20.8 26.52L18.936 23.664L17.432 21.104L17.248 21.208L16.36 30.768L15.944 31.256L14.984 31.624L14.184 31.016L13.76 30.032L14.184 28.088L14.696 25.552L15.112 23.536L15.488 21.032L15.712 20.2L15.696 20.144L15.512 20.168L13.624 22.76L10.752 26.64L8.48 29.072L7.936 29.288L6.992 28.8L7.08 27.928L7.608 27.152L10.752 23.152L12.648 20.672L13.872 19.24L13.864 19.032H13.792L5.44 24.456L3.952 24.648L3.312 24.048L3.392 23.064L3.696 22.744L6.208 21.016L6.2 21.024Z",
11517        fill: "#D97757"
11518      }
11519    )
11520  );
11521  var DefaultConnectorLogo = () => /* @__PURE__ */ React.createElement(
11522    "svg",
11523    {
11524      width: "40",
11525      height: "40",
11526      viewBox: "0 0 32 32",
11527      fill: "none",
11528      xmlns: "http://www.w3.org/2000/svg",
11529      "aria-hidden": "true"
11530    },
11531    /* @__PURE__ */ React.createElement(
11532      "path",
11533      {
11534        d: "M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4V28C32 30.2091 30.2091 32 28 32H4C1.79086 32 0 30.2091 0 28V4Z",
11535        fill: "#F0F0F0"
11536      }
11537    ),
11538    /* @__PURE__ */ React.createElement(
11539      "path",
11540      {
11541        d: "M14.5 8V12H17.5V8H19V12H20.5C20.7652 12 21.0196 12.1054 21.2071 12.2929C21.3946 12.4804 21.5 12.7348 21.5 13V17L18.5 21V23C18.5 23.2652 18.3946 23.5196 18.2071 23.7071C18.0196 23.8946 17.7652 24 17.5 24H14.5C14.2348 24 13.9804 23.8946 13.7929 23.7071C13.6054 23.5196 13.5 23.2652 13.5 23V21L10.5 17V13C10.5 12.7348 10.6054 12.4804 10.7929 12.2929C10.9804 12.1054 11.2348 12 11.5 12H13V8H14.5ZM15 20.5V22.5H17V20.5L20 16.5V13.5H12V16.5L15 20.5Z",
11542        fill: "#949494"
11543      }
11544    )
11545  );
11546  var AkismetLogo = () => /* @__PURE__ */ React.createElement(
11547    "svg",
11548    {
11549      width: "40",
11550      height: "40",
11551      viewBox: "0 0 44 44",
11552      fill: "none",
11553      xmlns: "http://www.w3.org/2000/svg",
11554      "aria-hidden": "true"
11555    },
11556    /* @__PURE__ */ React.createElement("rect", { width: "44", height: "44", fill: "#357B49", rx: "6" }),
11557    /* @__PURE__ */ React.createElement(
11558      "path",
11559      {
11560        fill: "#fff",
11561        fillRule: "evenodd",
11562        d: "m29.746 28.31-6.392-16.797c-.152-.397-.305-.672-.789-.675-.673 0-1.408.611-1.746 1.316l-7.378 16.154c-.072.16-.143.311-.214.454-.5.995-1.045 1.546-2.357 1.626a.399.399 0 0 0-.16.033l-.01.004a.399.399 0 0 0-.23.392v.01c0 .054.01.106.03.155l.004.01a.416.416 0 0 0 .394.252h6.212a.417.417 0 0 0 .307-.12.416.416 0 0 0 .124-.305.398.398 0 0 0-.105-.302.399.399 0 0 0-.294-.127c-.757 0-2.197-.062-2.197-1.164.02-.318.103-.63.245-.916l1.399-3.152c.52-1.163 1.654-1.163 2.572-1.163h5.843c.023 0 .044 0 .062.003.13.014.16.081.214.242l1.534 4.07a2.857 2.857 0 0 1 .216 1.04c0 .054-.003.104-.01.153-.09.726-.831.887-1.49.887a.4.4 0 0 0-.294.127l-.007.008-.007.008a.401.401 0 0 0-.092.286v.01c0 .054.01.106.03.155l.005.01a.42.42 0 0 0 .395.252h7.011a.413.413 0 0 0 .279-.13.412.412 0 0 0 .11-.297.387.387 0 0 0-.09-.294.388.388 0 0 0-.277-.135c-1.448-.122-2.295-.643-2.847-2.08Zm-11.985-5.844 2.847-6.304c.361-.728.659-1.486.889-2.265 0-.06.03-.092.06-.092s.061.032.061.091c.02.122.045.247.073.374.197.888.584 1.878.914 2.723l.176.453 1.684 4.529a.927.927 0 0 1 .092.4.473.473 0 0 1-.009.094c-.041.202-.228.272-.602.272h-6.063c-.122 0-.184-.03-.184-.092a.36.36 0 0 1 .062-.183Zm17.107-.721c0 .786-.446 1.231-1.25 1.231-.806 0-1.125-.409-1.125-1.034 0-.786.465-1.231 1.25-1.231.785 0 1.125.427 1.125 1.034ZM9.629 23.002c.803 0 1.25-.447 1.25-1.231 0-.607-.343-1.036-1.128-1.036-.785 0-1.25.447-1.25 1.231 0 .625.325 1.036 1.128 1.036Z",
11563        clipRule: "evenodd"
11564      }
11565    )
11566  );
11567  var GeminiLogo = () => /* @__PURE__ */ React.createElement(
11568    "svg",
11569    {
11570      width: "40",
11571      height: "40",
11572      style: { flex: "none", lineHeight: 1 },
11573      viewBox: "0 0 24 24",
11574      xmlns: "http://www.w3.org/2000/svg",
11575      "aria-hidden": "true"
11576    },
11577    /* @__PURE__ */ React.createElement(
11578      "path",
11579      {
11580        d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",
11581        fill: "#3186FF"
11582      }
11583    ),
11584    /* @__PURE__ */ React.createElement(
11585      "path",
11586      {
11587        d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",
11588        fill: "url(#lobe-icons-gemini-fill-0)"
11589      }
11590    ),
11591    /* @__PURE__ */ React.createElement(
11592      "path",
11593      {
11594        d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",
11595        fill: "url(#lobe-icons-gemini-fill-1)"
11596      }
11597    ),
11598    /* @__PURE__ */ React.createElement(
11599      "path",
11600      {
11601        d: "M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",
11602        fill: "url(#lobe-icons-gemini-fill-2)"
11603      }
11604    ),
11605    /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement(
11606      "linearGradient",
11607      {
11608        gradientUnits: "userSpaceOnUse",
11609        id: "lobe-icons-gemini-fill-0",
11610        x1: "7",
11611        x2: "11",
11612        y1: "15.5",
11613        y2: "12"
11614      },
11615      /* @__PURE__ */ React.createElement("stop", { stopColor: "#08B962" }),
11616      /* @__PURE__ */ React.createElement("stop", { offset: "1", stopColor: "#08B962", stopOpacity: "0" })
11617    ), /* @__PURE__ */ React.createElement(
11618      "linearGradient",
11619      {
11620        gradientUnits: "userSpaceOnUse",
11621        id: "lobe-icons-gemini-fill-1",
11622        x1: "8",
11623        x2: "11.5",
11624        y1: "5.5",
11625        y2: "11"
11626      },
11627      /* @__PURE__ */ React.createElement("stop", { stopColor: "#F94543" }),
11628      /* @__PURE__ */ React.createElement("stop", { offset: "1", stopColor: "#F94543", stopOpacity: "0" })
11629    ), /* @__PURE__ */ React.createElement(
11630      "linearGradient",
11631      {
11632        gradientUnits: "userSpaceOnUse",
11633        id: "lobe-icons-gemini-fill-2",
11634        x1: "3.5",
11635        x2: "17.5",
11636        y1: "13.5",
11637        y2: "12"
11638      },
11639      /* @__PURE__ */ React.createElement("stop", { stopColor: "#FABC12" }),
11640      /* @__PURE__ */ React.createElement("stop", { offset: ".46", stopColor: "#FABC12", stopOpacity: "0" })
11641    ))
11642  );
11643  
11644  // routes/connectors-home/default-connectors.tsx
11645  var { store: connectorsStore } = unlock2(connectorsPrivateApis);
11646  function getConnectorScriptModuleData() {
11647    try {
11648      return JSON.parse(
11649        document.getElementById(
11650          "wp-script-module-data-options-connectors-wp-admin"
11651        )?.textContent ?? "{}"
11652      );
11653    } catch {
11654      return {};
11655    }
11656  }
11657  function getConnectorData() {
11658    return getConnectorScriptModuleData().connectors ?? {};
11659  }
11660  function getIsFileModDisabled() {
11661    return !!getConnectorScriptModuleData().isFileModDisabled;
11662  }
11663  var CONNECTOR_LOGOS = {
11664    google: GeminiLogo,
11665    openai: OpenAILogo,
11666    anthropic: ClaudeLogo,
11667    akismet: AkismetLogo
11668  };
11669  function getConnectorLogo(connectorId, logoUrl) {
11670    if (logoUrl) {
11671      return /* @__PURE__ */ React.createElement("img", { src: logoUrl, alt: "", width: 40, height: 40 });
11672    }
11673    const Logo = CONNECTOR_LOGOS[connectorId];
11674    if (Logo) {
11675      return /* @__PURE__ */ React.createElement(Logo, null);
11676    }
11677    return /* @__PURE__ */ React.createElement(DefaultConnectorLogo, null);
11678  }
11679  var ConnectedBadge = () => /* @__PURE__ */ React.createElement(
11680    "span",
11681    {
11682      style: {
11683        color: "#345b37",
11684        backgroundColor: "#eff8f0",
11685        padding: "4px 12px",
11686        borderRadius: "2px",
11687        fontSize: "13px",
11688        fontWeight: "var(--wpds-typography-font-weight-emphasis)",
11689        whiteSpace: "nowrap"
11690      }
11691    },
11692    (0, import_i18n5.__)("Connected")
11693  );
11694  var PluginDirectoryLink = ({ slug }) => /* @__PURE__ */ React.createElement(
11695    Link,
11696    {
11697      href: (0, import_i18n5.sprintf)(
11698        /* translators: %s: plugin slug. */
11699        (0, import_i18n5.__)("https://wordpress.org/plugins/%s/"),
11700        slug
11701      ),
11702      openInNewTab: true
11703    },
11704    (0, import_i18n5.__)("Learn more")
11705  );
11706  var UnavailableActionBadge = () => /* @__PURE__ */ React.createElement(Badge, null, (0, import_i18n5.__)("Not available"));
11707  function ConnectorActionArea({
11708    isConnected,
11709    showUnavailableBadge,
11710    pluginSlug,
11711    isExpanded,
11712    isBusy,
11713    pluginStatus,
11714    actionButtonRef,
11715    handleButtonClick,
11716    getButtonLabel
11717  }) {
11718    return /* @__PURE__ */ React.createElement(import_components2.__experimentalHStack, { spacing: 3, expanded: false }, isConnected && /* @__PURE__ */ React.createElement(ConnectedBadge, null), showUnavailableBadge && (pluginSlug ? /* @__PURE__ */ React.createElement(PluginDirectoryLink, { slug: pluginSlug }) : /* @__PURE__ */ React.createElement(UnavailableActionBadge, null)), !showUnavailableBadge && /* @__PURE__ */ React.createElement(
11719      import_components2.Button,
11720      {
11721        ref: actionButtonRef,
11722        variant: isExpanded || isConnected ? "tertiary" : "secondary",
11723        size: "compact",
11724        onClick: handleButtonClick,
11725        disabled: pluginStatus === "checking" || isBusy,
11726        isBusy,
11727        accessibleWhenDisabled: true
11728      },
11729      getButtonLabel()
11730    ));
11731  }
11732  function getPluginSlug(pluginFile) {
11733    const pluginBasename = pluginFile?.replace(/\.php$/, "");
11734    return pluginBasename?.includes("/") ? pluginBasename.split("/")[0] : pluginBasename;
11735  }
11736  function ApiKeyConnector({
11737    name,
11738    description,
11739    logo,
11740    authentication,
11741    plugin
11742  }) {
11743    const auth = authentication?.method === "api_key" ? authentication : void 0;
11744    const settingName = auth?.settingName ?? "";
11745    const helpUrl = auth?.credentialsUrl ?? void 0;
11746    const pluginSlug = getPluginSlug(plugin?.file);
11747    const {
11748      pluginStatus,
11749      canInstallPlugins,
11750      canActivatePlugins,
11751      isExpanded,
11752      setIsExpanded,
11753      isBusy,
11754      isConnected,
11755      currentApiKey,
11756      hasResolvedSettings,
11757      keySource,
11758      handleButtonClick,
11759      getButtonLabel,
11760      saveApiKey,
11761      removeApiKey
11762    } = useConnectorPlugin({
11763      file: plugin?.file,
11764      settingName,
11765      connectorName: name,
11766      isInstalled: plugin?.isInstalled,
11767      isActivated: plugin?.isActivated,
11768      keySource: auth?.keySource,
11769      initialIsConnected: auth?.isConnected
11770    });
11771    const isExternallyConfigured = keySource === "env" || keySource === "constant";
11772    const showUnavailableBadge = pluginStatus === "not-installed" && canInstallPlugins === false || pluginStatus === "inactive" && canActivatePlugins === false;
11773    const actionButtonRef = (0, import_element32.useRef)(null);
11774    return /* @__PURE__ */ React.createElement(
11775      ConnectorItem,
11776      {
11777        className: pluginSlug ? `connector-item--$pluginSlug}` : void 0,
11778        logo,
11779        name,
11780        description,
11781        actionArea: /* @__PURE__ */ React.createElement(
11782          ConnectorActionArea,
11783          {
11784            isConnected,
11785            showUnavailableBadge,
11786            pluginSlug,
11787            isExpanded,
11788            isBusy,
11789            pluginStatus,
11790            actionButtonRef,
11791            handleButtonClick,
11792            getButtonLabel
11793          }
11794        )
11795      },
11796      isExpanded && pluginStatus === "active" && hasResolvedSettings && /* @__PURE__ */ React.createElement(
11797        DefaultConnectorSettings,
11798        {
11799          key: isConnected ? "connected" : "setup",
11800          initialValue: isExternallyConfigured ? "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" : currentApiKey,
11801          helpUrl,
11802          readOnly: isConnected || isExternallyConfigured,
11803          keySource,
11804          onRemove: isExternallyConfigured ? void 0 : async () => {
11805            await removeApiKey();
11806            actionButtonRef.current?.focus();
11807          },
11808          onSave: async (apiKey) => {
11809            await saveApiKey(apiKey);
11810            setIsExpanded(false);
11811            actionButtonRef.current?.focus();
11812          }
11813        }
11814      )
11815    );
11816  }
11817  function ApplicationPasswordConnector({
11818    name,
11819    description,
11820    logo,
11821    authentication,
11822    plugin
11823  }) {
11824    const auth = authentication?.method === "application_password" ? authentication : void 0;
11825    const settingName = auth?.settingName ?? "";
11826    const helpUrl = auth?.credentialsUrl ?? void 0;
11827    const pluginSlug = getPluginSlug(plugin?.file);
11828    const {
11829      pluginStatus,
11830      canInstallPlugins,
11831      canActivatePlugins,
11832      isExpanded,
11833      setIsExpanded,
11834      isBusy,
11835      isConnected,
11836      currentUsername,
11837      hasResolvedSettings,
11838      keySource,
11839      handleButtonClick,
11840      getButtonLabel,
11841      saveCredentials,
11842      removeCredentials
11843    } = useConnectorPlugin({
11844      file: plugin?.file,
11845      settingName,
11846      connectorName: name,
11847      isInstalled: plugin?.isInstalled,
11848      isActivated: plugin?.isActivated,
11849      keySource: auth?.keySource,
11850      initialIsConnected: auth?.isConnected
11851    });
11852    const isExternallyConfigured = keySource === "env" || keySource === "constant";
11853    const actionButtonRef = (0, import_element32.useRef)(null);
11854    const showUnavailableBadge = pluginStatus === "not-installed" && canInstallPlugins === false || pluginStatus === "inactive" && canActivatePlugins === false;
11855    return /* @__PURE__ */ React.createElement(
11856      ConnectorItem,
11857      {
11858        className: pluginSlug ? `connector-item--$pluginSlug}` : void 0,
11859        logo,
11860        name,
11861        description,
11862        actionArea: /* @__PURE__ */ React.createElement(
11863          ConnectorActionArea,
11864          {
11865            isConnected,
11866            showUnavailableBadge,
11867            pluginSlug,
11868            isExpanded,
11869            isBusy,
11870            pluginStatus,
11871            actionButtonRef,
11872            handleButtonClick,
11873            getButtonLabel
11874          }
11875        )
11876      },
11877      isExpanded && pluginStatus === "active" && hasResolvedSettings && /* @__PURE__ */ React.createElement(
11878        ApplicationPasswordConnectorSettings,
11879        {
11880          key: isConnected ? "connected" : "setup",
11881          initialUsername: isExternallyConfigured ? "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" : currentUsername,
11882          helpUrl,
11883          readOnly: isConnected || isExternallyConfigured,
11884          keySource,
11885          onRemove: isExternallyConfigured ? void 0 : async () => {
11886            await removeCredentials();
11887            actionButtonRef.current?.focus();
11888          },
11889          onSave: async (credentials) => {
11890            await saveCredentials(credentials);
11891            setIsExpanded(false);
11892            actionButtonRef.current?.focus();
11893          }
11894        }
11895      )
11896    );
11897  }
11898  function registerDefaultConnectors() {
11899    const connectors = getConnectorData();
11900    const sanitize = (s) => s.replace(/[^a-z0-9-_]/gi, "-");
11901    for (const [connectorId, data] of Object.entries(connectors)) {
11902      if (connectorId === "akismet" && !data.plugin?.isInstalled) {
11903        continue;
11904      }
11905      const { authentication } = data;
11906      const connectorName = sanitize(connectorId);
11907      const args = {
11908        name: data.name,
11909        description: data.description,
11910        type: data.type,
11911        logo: getConnectorLogo(connectorId, data.logoUrl),
11912        authentication,
11913        plugin: data.plugin
11914      };
11915      const existing = unlock2((0, import_data2.select)(connectorsStore)).getConnector(
11916        connectorName
11917      );
11918      if (authentication.method === "api_key" && !existing?.render) {
11919        args.render = ApiKeyConnector;
11920      } else if (authentication.method === "application_password" && !existing?.render) {
11921        args.render = ApplicationPasswordConnector;
11922      }
11923      registerConnector(connectorName, args);
11924    }
11925  }
11926  
11927  // routes/connectors-home/wp-logo-decoration.tsx
11928  function WpLogoDecoration() {
11929    return /* @__PURE__ */ React.createElement("div", { className: "ai-plugin-callout__decoration", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement(
11930      "svg",
11931      {
11932        viewBox: "0 0 248 248",
11933        xmlns: "http://www.w3.org/2000/svg",
11934        xmlnsXlink: "http://www.w3.org/1999/xlink",
11935        focusable: "false",
11936        style: { width: "100%", height: "100%" }
11937      },
11938      /* @__PURE__ */ React.createElement(
11939        "image",
11940        {
11941          href: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAQAElEQVR4AezdC3ojWW5tYflOzPbIbI/M9sh8+WdrdZ+KpiiKL5FB5KedwN7AeSFIpHRYmfX/PubXVGAqMBV4kQpMw3qRBzXbnApMBT4+pmHNq2AqMBV4mQpMw3qZR3X9RmeGqcCrV2Aa1qs/wdn/VOCNKjAN640e9hx1KvDqFZiG9epPcPY/FThWgZ1q07B2+mDnWFOBPVZgGtYen+qcaSqw0wpMw9rpg51jTQX2WIFpWMee6mhTganAU1ZgGtZTPpbZ1FRgKnCsAtOwjlVltKnAVOApKzAN6ykfy2zqcRWYlV6pAtOwXulpzV6nAm9egWlYb/4CmONPBV6pAtOwXulpve9e//Nw9P/7xL8d7Hy9aQWubFhvWrU59qMr8D+HBcPBna93rcA0rHd98q91bs3q3w9bBv7Bna93rMA0rHd86nPmqcCLVmAa1os+uF/Y9m8u6Q7rvw8bgLnDOhTiXb+mYb3rk3+tc//rYbsaVTjQP18amct4+h9hftt3BaZh7fv57v107rNg7+ec831WYBrWZyHGPHUF/vewu//6xNqg+HMRfyjMrb+edb5pWM/6ZGZfawX86Bc0qTU2/htVYBrWGz3sOepU4NUrMA3r1Z/g7H8q8EYVmIZ1h4c9U04FpgL3qcA0rPvUdWadCkwF7lCBaVh3KOpMORWYCtynAtOw7lPXmfVdKjDnfGgFpmE9tNyz2FRgKnBNBaZhXVO9GTsVmAo8tALTsB5a7llsKjAVuKYCv9uwrtn5jJ0KTAXergLTsN7ukc+BpwKvW4FpWK/77GbnU4G3q8A0rLd75L914Fl3KnB9BaZhXV/DmWEqMBV4UAWmYT2o0LPMVGAqcH0FpmFdX8OZYSowFfhrBe7GpmHdrbQz8VRgKnDrCkzDunVFZ76pwFTgbhWYhnW30s7EU4GpwK0rMA3r1hW9fr6ZYSowFfiiAtOwvijMyFOBqcDzVWAa1vM9k9nRVGAq8EUFpmF9UZiRpwKPqMCs8bMKTMP6Wb0meyowFfjFCkzD+sXiz9JTganAzyowDetn9ZrsqcBU4Bcr8NIN6xfrNktPBaYCv1CBaVi/UPRZciowFbisAtOwLqvbjJoKTAV+oQLTsH6h6LPkBRWYIVOBQwWmYR2KMF9TganAa1RgGtZrPKfZ5VRgKnCowDSsQxHmayowFXimCny9l2lYX9dmIlOBqcCTVWAa1pM9kNnOVGAq8HUFpmF9XZuJTAWmAk9WgWlYT/ZArt/OzDAV2G8FpmHt99nOyaYCu6vANKzdPdK7HOjfDrP+9yf4B/fP138efoeDma+pwP0rMA3r/jXewwqaVFjP8x8HAmIHd74eXIG3W24a1ts98pse+H8Os8HBzNdU4P4VmIZ1/xrvYQU/9v3L4SCwNqh/P2iwagdpvqYC96nANKz71HVmnQpMBe5QgXduWHco526n9B3W9tJ91fi7Pfwc7HkqMA3reZ7FM+/kXw+bc7EeDvTPV1z8jzC/TQXuWYFpWPes7sw9FZgK3LQC07BuWs7dTva/h5P91ye6YGfT2EP4eb9mZ/uowDSsfTzHe5/CHVXQqKzHbjX6YCpwtwpMw7pbaX808f8dsoN7oQOdr6nAVGBbgWlY24o8hvvEzXcnp1YTl3cq51ExTdRe7GldE6ev2vhTgbtV4KyGdbfV33diDeC7T9bE5T1LlezFntb94PRVG38qcLcKTMO6W2lPTuy/GPdfiJfED+6G6Lg8/m/Dnuxne7lOe5Y9/naNZv0HVGAa1gOKfMYSGkI4I/1XUp59f79SlFn0sRWYhvXYereaex/3PyunQT9iiePlPMbOKlOBJ67ANKzfeTiakvufVsdDmjgtPnYq8PYVmIb1Oy8B9z7uf06tLi7vVM7EpgJvVYFpWM/xuF1mB3dFz7Gr2cXOK/B6x5uG9RzPzH1VeI4dzS6mAk9YgWlYT/hQZktTganA8QpMwzpel1GnAlOBJ6zANKyLH8oMnApMBR5dgWlYj674rDcVmApcXIFpWBeXbgZOBaYCj67ANKxHV3zWe8UKzJ6fpALTsJ7kQcw2pgJTge8rMA3r+xpNxlRgKvAkFZiG9SQPYrYxFZgKfF+BRzSs73cxGVOBqcBU4IwKTMM6o0iTMhWYCjxHBaZhPcdzmF1MBaYCZ1RgGtYZRXrSFP9Wln/gD/htEwd/mTqNT4Nyj2ny+7/3sDgYh4NxNBYHcdrH4Tc8HOifL/E044hsmjgN0tj2Ko6DcfLE8EADcfmAg1w64IMXrcA0rNd5cN6Y3njrjnE4pvkHANP58iCNxQO+B3x11v84HA6c9+DO1ytWYBrW6zw1/6Df/FtZlz8vtYPLZ5iRv16BaVi//gjO3sD2zYb7F0mB30Q4aHBpfBqU68cjHPjl4iHNPy5oDljH4yBeLh7SxNN+Mr7cY+PFmpNtLf52/2suv9yx11TgF8ZOw/qFor/gkt7kKzrCJZox9xzf3GN3WIFpWK/xUN27hHbsuyIXyyBGZ/FAgzgrh7aO59PE5AQaiKfJ2WriNCiPPZabxsqBa8ebw9rAD9agmX+r0QcvVoFpWK/xwLzxvOFcGq87pof0OHtKE5MDLqpxwAMO4mksDfggjgMecBBPY2lsEKdBGouDOB5oEGdx4Ac8pLFpY1+sAtOwfuuBXb+uN/H1s9x2hm0zWH/8u+1KM9tbVmAa1ms8dj/SuEh2odyOXUSHtTGksadyjZETjuWm/e/BKc+4A/1g09iPw69j2kH+OHe8XHMF89GOjaeXx+LAD41nt5rcwYtVYBrWiz2wZbvehBoZ8IVYPNAgzuKw5vK32prLD8dy08xRHosDP5TLbrVtLg7lscbRWDzQIM7isObyaYMXrMA0rBd8aN9s2Y9lodQ4m/ZK1r7Duu80Np0f0n7ZzvK3qsA0rFtV8vHzeFP6r9+Bbwesy/lAgzgrh8YaC+t3I3SclRdoEGflbDU6TYwfaBBn5Ww1fN2nPB820ECcZiweaLDmyqGBcSunDV6sAtOwXuyBPWC73tTe9NulaNuLfhqsuY1nV13eOeONMRb4t4Q93HK+mevBFZiG9eCC33i5ay+S3efAui3fibjc3+o06625OH3VjKOZZ9V9aCB/1XC5q2YczTyrfq7vgt5YWMc076qN/2IVeIGG9WIVfdx2vSG9CaFVaRpDSI+zcuisxgDrHMXYFfLhO018m0eDrY6D2AoapNmjvUN7FcdDueLyQU762B1UYBrWDh7iHGEq8C4VmIa1vyfdJbTvNDqdi/Ww3g3JgfKe1TpT+2+/zpHGtne6HEgbu5MKTMPayYNcjuENC9sL7iXl765LaPi78MvOLZZ3dmc65/y3WG/meGAFpmE9sNhPuJQ7HhffT7i1i7fkTODy/eJJZuBzVmAa1nM+l2t21SW0S+fm4Qdv5lV/hR+dNNXt/p0jje1M6a9wrvY89swKTMM6s1AvnuZNHF7xKO092xnibNrYF6nAJduchnVJ1Z57jO8sQjt1aR3c8aS/inWe7f6dI43tLPSQNnYnFZiGtZMHuRzDhTOsl869gdkl9cOna7Bqz+g7i72H9hhnV00DU4O0sTupwDSsnTzIOcZU4B0qMA3rRZ/yiW27gAYX1aXxw3rf0wV9ec9qfeJ3bP9pbHv346NzqUHa2J1UYBrWTh7kcgwNKSR7E4e0V7LtnXU2e2fxQBvsvALTsHb+gD+P544nfEovZdo7u24cD6s+/k4rMA1rfw/WJTq4eO50/OANvtXjz2pdoLd/31HZp3OksTQQx1n89TEn+HsFpmH9vRRv6XjTw94O70w+Wdzbud7+PNOw9vcScLcDLqq/O52Lafgu75Xizu5M60X8K+1/9nqiAtOwThTnRUPerLD+SORTs+AN3dH4EH9W6zztv3PZdxrb3ukhbexOKrD/hrWTBzXHmApMBT4+pmHt71Xgwhn6TsQJXcIH9zs04AP/meE87b9z2Xca2/7pciBt7E4qMA1rJw9yOYY3LJxz6awRwDL85V1n96niOed/+cO+2wGmYb3bE//reXd21/PncJ3pnA8d/gyY316nAtOwXudZnbvTfzkkgovqg/vnix+8of+Ih9/SDu5Tf/nEr722fzaN7QDp8yNhFdmRnYa1o4d54ijexOFE2tOG2nu2jcbZtLE7rsA0rP09XN9ZhE7nniq440l/Fes82/07Rxr7KmeZfV5RgaVhXTHLDH2mCrhwhvXS2Zs7rHutEazaM/rO0v7Z9sgPac7kU8NpYlVkR3Ya1o4e5hzlLxWYS/e/lGMfZBrWPp7jeoouqNl0fljve3w3sl5Yl/9sVvM5tv80tj07kw8d2LSxO6nANKydPMjlGN6omhIk0wLt1dDe2c7F4uHVzjT7vaAC07AuKNoLDumeh33B7X/Yd/hYfqWxizzuXiswDWt/T9aFM6yXzvywvrnTnr0KPkRor76jsl/nSGNpII6z+GBHFZiGtaOHecFRvOnhgqFPPcSZfLL41Jt81Ob2tM40rD09zb+dxd0OuKj+m/L17y7c4euM14v4zsqZ1ov41zvF7PhoBaZhHS3LS4verOCN20F8ahY0s3Q+xJ/VOk/771z2ncauexeDVRt/BxWYhrWDhzhHmAq8SwWmYX3zpF8w7MIZ+k7EEVzCB/c7NOAD/5nhPO2/c9l3Gtv+6XIgbexOKjANaycPcjmGNyycc+msEcAy/OVdZ/ep4jnnf/nDvtsBpmG92xP/63nd88Bf1ddmzgPnfOjw2id9w91Pw9rfQ3cBDS6qOx0/eDNv9fizWp/4bffvHGlse0//+Y+EzTD2aSswDetpH81NN+ZNHG468YMma+/Zlo2zaWN3XIFpWPt7uL6zCJ0uzrrjSX+Utaa1gW9dFg+0r7Dm8strLJs2dscVmIa1v4frwhnWS2c8rCf26Rqs2j381mZrOCwO617pPghg24uckM6mseVqXs5kjrSxO6nA7RrWTgoyx3iaCmhIT7OZ2chzVGAa1nM8h1vuwgV1aN44u973uJyH8u5lfWJnbWh9Fg+tTXeJ7jultGPjxRrL4mCcM5kDH+yoAtOwdvQwP4/iDQve+J/SBx4+fuFXa7Pti8WBf2pbckK5bBp7avzEdlKBaVg7eZDfHMOPV+Gb1HPCP85pbbbB/BXpx+xXeV/px+YYbQcVmIa1g4e4OYILZ1gvnfnBm7wh8mDVil1jfcezzulSvPXFzC2eJk4DcTqLgzgN0tfxdHkgjrP4YEcVmIa1o4f5w6N4w/9wyFnp5tVgzkr+Iskc6yeHX6R9KV87/suJJ/C7FZiG9bv1v8fq7nbARfWp+eW4rIZTeT+NmdeFN/vTsfKNsyfAf4prx/90vb3nP9X5pmE91eO4yWY0C1h/JPKpWfCGbiE5sGrFrrHb+eyn9a1nbjZNnAbGirE4iJcrRhNPY2lAl8Pigx1VYBrWjh7mHGUqsPcKTMPa3xN24Qy+y+h0LtaD+x06Kwfwe8Ia9gTWtRaLgzjtK8hpoPtu7gAAEABJREFU/+Uan8Y2li4H0sbupALTsO77IH9jdm9YOOfS2uU4yL/3Xq0B6zo4nLPXddwp33zOdMs5T603sQdWYBrWA4s9Sz2kAu6u4LsPHR6ymVnkthWYhnXbej7DbC6gwUV1++EHb2Y6Kw/4tHvBj2fWgdZi29N3nwiKl2ucfbJpLA3SrYkPdlSBaVg7epgnjuJNHE6kPTzUnthTi4uvKPeYVuzhdha8fwWmYd2/xo9ewR0OrN9h8INYe+JD/FmtPR7bfxr7rHuffd2wAtOwbljMJ5nKJ2qwXjq7hA5tUxOQB/z0Z7TtnW2vLB7at+blU0PnShu7kwpMw9rJg5xjTAXeoQJP07DeodgPOqML6tCSx+56aC6rgV/uM1qf+NkjrPvDQ7rvsJxJDdLG7qQC07B28iCXY3jDgjdysjdwWHU+lPes1nnaP98+7TuNpQUxiI/dSQWmYe3kQX5zDPc94ZvUpwy3d3bdIB5WffydVmAa1v4erAtnWC+d+cEb3KlZecCnPQY/X8XFevvvOyx7TmObVRxn08bupALTsHbyIOcYf6mAZrZ+SvqX4JDXrcA0rNd9dl/t3N0NuKj+Kocux8U04HvBXs+1l+dz1TmmYV1Vvqcc7AIa1h+J/JWY4A3dxuXAqhV7Jus87d9+7c2e01ga0OWw+OBXK3Dbxadh3baeM9tUYCpwxwpMw7pjcR8wtbsaaCm+S/SQHmflpL+K9R2Ti3Ro/6zzhM4iJ8hJH7uDCkzDeu2H2Bvz0lNoBHDp+EeO03zCqXXLYU/lTewFKzAN66kf2rebc08D3yZ+kaBZXTP+i2lHngrcpwLTsO5T10fN6jIaWk/zwUN6nJWTzm457dmgsdo7tF8WD+05zspJH7uDCkzD2sFD3BzBmzQUirNpr2btPbT3OHtKKzb2xSswDet1H6A7Gt95AL+T4CFNPKTtwXZOtvPwgzNv9VUr9gx29nBGBaZhnVGkJ03xxvNXVoBvmyweaEC/9oLePM8EZ+qc63/Vnsa2Xw0MB+PSx75YBaZhvdgDm+1OBd65AtOwXvfpu7cJ6ynS2HTfYbiEhrQ9WH+tKHQe515Bx8vj0wYvWIG9NKwXLP3VW/bG04BAQzLhqtFpQQzir26dxbmB33mcO6SJywN++tgXq8A0rBd7YMt23cWERf5IYz/u+Mv8K1rqmFbsEfbY+se0R+xl1rhxBaZh3bigd5rOhfn2r6B4E9LBdw6WXjU67RZo3tYxZ5p1XGbTAA84GNf+jaMBH/iXwFhzs41vbTadxUF+uXScTRv7xBWYhvXED+fJtuZNvX4ad4vtmVMT+dFcS7Lxa7NcQme5144/a5FJul0FpmHdrpb3nMm/beXuBe65zqm5u7Q+lXMqZu+w5vjuZv2nYdbYOb753Fex5+Rvc6x/zfjtfMPvXIFpWHcu8I2m743lzdWUNG924NO9cfFAuwXMaw22+fDWWfeVxq65cmCdo/il1lywjrduKLbulb/ml7Nq4z9pBaZhPemDmW1NBaYCHx8fmyJMw9oU5AmoexXfBbBtpwtrNl2O+x9IK/8aay5Y57CGtcG6YiwO4jTAAw7iacbRrEGHNPq1MJc5oblop9Zfcxsz9gkrMA3r+R6KS2Twhv5ud3JCubg3aPyn1nhvYPanY3+abw245WW+ucwJ3+1HTvgud+JPUIFpWE/wEDZb6IJ9I59N3cnA2QM2ica6YGc3oaFTgd+twDSs363/sdV9d+Rymi2OhxqJ+FYr/285sZ9ZY829jtLAtmvJSRMvP41NE8fB/HQWB3HaLWAuc0LzrXu1Lp2VE2iDJ6/ANKwnf0Cf2/PmCp/SH5PG/hHu9Jv5V7TMJZoxp8YXu9SaP6xzpLHp/JA29okrMA3r+R6O7wZCu4uz7lzS+RC/hbVGaD5rpPHpbBpLA37AYc3lbzX5tHvBmtYAfuvgIU08jZ8+9gkqMA3rdx+CNwS0C74L95AeZ9PkuhwHfvq11hqhueJsa7E4uOg+lntMM47OGgvrePqtz2RO6wB/uz6dBvyAvwjeY5vTsH73OXvzwLFd+FHlmH5P7au93HPNY3PbBxyLjfbGFZiG9bsPvx891l1oVODTwnQ8rFoXxmLp11qX1qG57MUakMYP4sf0NPFy0+Ks+Kr7L9XVJu1aa43OxG8+fkizl2O5xcf+YgWmYf1i8Y8s7c1TE1rfsGmsnIbyIX6tNZd1Q/Ph1gY+XS4OaXQ84CCexqd9NV7s1rCWdYFvfrY9sTSQE/DBE1VgGtafh/FUv/lRKLSxOJt2L2uN0Bpx9pj2lX4q15gV5T7SHlv/mPbIPc1aJyowDetEce4c8qf4uX9dxCV08IZqa3yIX2vN1Tps87mExsG+6WuuOA3kBBzE04yjsWniNDA/ncVvAWtVa745WesEGsRZOTTg33JP5hz8sALTsH5YsCdL9yaCJ9vWVdvxiaEzsVdNdOPBmirceNqZ7icVmIb1k2rdNtcdSrh0Zn/iw6Xjn3GcS291YW+5P3PCpXO6iF/vui6dZ8ZdUYFpWFcU78qh3jzeAFDTofmELLREnJWTfmtrbmuE5rfHtPbKpomXm8amieNgHJ3FQZwGdJzFbwHnMifwzclaO9AgzsqhAR/4g1+qwDSsXyr8LDsVmAr8vALTsH5es0tGuJPxHQM0nu9iF8TpLB5oEGfl0G453lzmNLc1Ag3E0+RsNXEalMfiII7DT8Yfy01jzResA3FWDu3Y+mJygjyIs3Jo63g+bfALFfhpw/qFLe5iSZe1sF4k870hQgeNs6c0MTkBhziLAz/gIc1etppYmjge0uPiW00sTRwP6XHxrSaWJo6H9Dh7ShOTE3CIszjwAx7S7CVt7IMrMA3rwQWf5aYCU4HLKzAN6/La/WSky16XuGzj+tSJ1mUui4dy46wcuh9NcEhj8SAP4qwc2jreXmhicgINxNPk0I6Np5fH4nDp+NY6Nl7MGsE6EGfl0Na9prFygjyIs3Jo63h7oQ1+oQLTsH6h6J9LejOs+JQ/ztU+Dr/OzT2Wdxj+cUz/u/bxj1+rxi/CD+dq8s/NPZZ3yXjzGBdwiLM48AMe0ti0sQ+uwDSsxxTcn9DBXYhV2a1GT2Nx4AfjaOxWo6exOPCDcTQ2jaUBP+Cw5vK3mnwa8AMOxqTxaZDG4sAP5bJbbZuLQ3mscTQWBz4N8IBDnC2XxYM8iLP44M4VmIZ15wJ/Tu/CPXxKH3HWG4LO4oEGcRaHNZe/1dZcfpAHxqR1kbxqYvKAH+TQ2LTG09NYOV9p3uRy4KvxxoKc0JxsGisP+AGHNZe/1eTTgB9wMCbtu73KH9ypAtOw7lTYN53WG/tNj/7ix36R7U/DesyDcu+xwqr+6kkaHtLYn2ryjQs4xFkc+MFeaJDG4iCOAw78IL7VitHFV06Ls+I0wAMO4luNnsbiwA84xFk84OFczV7KdQEf0sbesQLTsO5Y3GVqnziFZD8SpfHp3jxpLA34QQ6NTbv3ePOfWkvcnqA8FgdxHPi0Y/unywlyaMak8WliaSwN+EEOjU271XjzmivggztXYBrWnQv8Ob0flcKn9BHPfnz+irOf0gc/fCy/0thkfjiliZXH4sAPOMSzNIizOPADDvEsDeIsDvyAQzxLgziLAz/gIY39qSbfuIBDnMUHd67ANKxbFPgfc3jh9u8u+ZO3iL/mEeTQXeJuNbE0Vh7wgxya+beaWBorD/hBDm0dby80sfJYGojjIId2bDxdTsDh0vGtdWy8WOuw1gF+kENb95rGlsfKA36QQ1vH2wtNrDyWFsTyx96wAtOwbljMmWoq8FkBDUyT+6RjblWBaVi3quQ/5nFfEv6hjvdOFfC3GrwG3unMDznrNKzbltmLtMtdfrN7AYd0eWn9aSyWxp4ab4wc4Mu9dLy9nBovbh1oLRYHceMBDziIpxlHY9PEaZDGOg9NHAfjaGJ4oEGclUMzBgc+TQwPNIizcmjG4P/y8fFhLzSxNJa2Qnzl49+gAtOwblDEmWIqMBV4TAWmYV1XZ5er0Cz+JHZ/Afx0PJQvvtXE0thHjbcXa321vrj9gBy5q8angZyAg3jaT8Yfy01jm5O1DvCDHNqx9cXKY+UBP8ihreP5NLHyWBqI4yCHNrhRBaZhXV5IL0Yvyj41aiY6rH+FAw/liaex6fxwShMrj8WBH3CIs3jAwV62Gj1NHA/pcfGtJpYmjof0uPhWE0sTx0N6nD2lickJOMRZHPgBD2n2stXE0sRxSBt7owo8uGHdaNfPM417ivW/fH6enc1OpgI7rMA0rMsfqmblAtaPAM1C669qsOn8IIeu0W01epq5cUhjG8/iwJcHOPxkvHxjgR9wOLZXa5bHygN+wOHS8db4ajy9dVgc+KHx7Fbb5uJQHmscjcUDDeIsDny1B+NogxtVYBrWjQr5OY0XqAYG/E/5Aw8fn7/ibLksDvzP1A88fHz+Ek/jk9mtRk9jcTiWu2prLj/I+Wo8vTwWB364x3hzWwf4AQdrpvG3mhgN+AEHY9L4W02MBuIBH9ywAtOwLi+mOwovVOCbicUDDeKsHBqLA58GeMAhzpbL4sCXB3jAIc6Wy+JBHsRZHNZc/lZbc/kA8sAYHPhbjU4DfjiWm7bNxaGxbLksDnx5gAcc4my5LB7kQZzFYc3lb7U1V2zwgwpMw/pBsTapLtvD+sJMc/nakDT2mHZs/Fe5jTdGDvDpLB5oEGdxWHPb66qtufwg56vx9PJYHPjhHuPNbR3gBxysmcbfamI04AccjEm7Za3MPfhBBaZh/aBYkzoVmAr8bgWmYV1efxfJ27uKOCve7HhIE99qYmksDvyAQ5zFAx7O1ezlVK74qTnFHz3eeu2JxYEfcIizeMDDudotz9qaL28fdYBpWJdX2l2ET4KAbyYvfhzS6HiQQxNP49PE0lga8IMcGpt27/HmP7WWuD1BeSwO4jjwacf2T5cT5NCMSePTxNJYGvCDHBqbdu/x5j+1lrg9DS6owDSsC4r2OcS9xopP+eMSzZiPz1/88Cl9xNmP5RcekuPsKU1MTsAhzuLAX0GDSzRjjAV+wCHO4sBfQYNztZ/kHpvz0vHmMhb4AR9cUIFpWOcVzZ+K/qt2thEuYWnghUgXx0GcBngoV3yriaWxxgI/yKGta6Wx5bHygB/k0Nbx9kITK4+lgTgOcmjHxtPlBBwuHd9ax8aLtQ5rHeAHObR1r2lseaw84Ac5tHW8vdDEymNpII6DHNqx8fTBDyswDeu8gvlkyIuPPW/ED7Im9a0r4B98fOsC/OTw07DOq5aLVvcg7HkjJmsqcF4Fjv3TNOeNfMOsaVjnPXTf0rtIZRuBe7FBOouDeLl40Pjo4mnG0cTSWBrwgxyaMWl8mlgaSwN+kEMzJs1eaGJpLA3EcTCOxuIgTgM84CCeZhyNTROnQRprPzRxHIyjieGBBnFWDs0YHPg0MTzQIM7KoRmDg73QxPBAA/E042hsmjhtcEEFpmFdUFjYef8AAA5ZSURBVLQZMhW4uAIz8KoKTMP65/K5q4I14gI1FPOn5ilNvDnKY0+NF5MTHjW+vX61vnh7kmNfq8anQXksDuI4/GT8sdw01nzBOhBn5dCOrS8mJ8iDOCuHto7n08TkBBqIp8nZauI0KI/FB99UYBrWPxfIiwd6scngBxxcwKexNOCDOA54wEE8jaUBP+AQZ/GAh59q8htrLziksTiI44EGcXEc0lgcxPFAg7g4DmksDuJ4oEGcxYEf8JDG/lSTbxzYCw54wEE8jaUBH8RxwAM++KYC07C+KdCEpwJTgeepwGs1rMfUrctRl6qt6N84Cuk+MdxqYmnsT8fLNw7Wy1k8WEMeu9XoaSwO/GAcjU1jacAPOFx6VmPh0vH2+NV4evtkceCD+jWepQFfHuABhzhbLosHeRBncfjJWe0xGDv4pgLTsL4p0GfYvUP4lD7irBf0x+EXiwP/IP35wsMf4fBbnC2XxYF/SPvzhYc/wuE38TT+Qfpg09iPz1/88Cl9rLn8j8Mvtjz2IP354gc5RHar0dNYHPjBOBq71ehpLA78YByNTWNpwAdxHPg04G81Og34AQdj0vhbTYwG/HAsN00uP+CDbyowDeuvBXKf0IuNLcoPcujsVqOnsTjwg3E0dqvR01gc+ME4GrvV6GksDvxgHI1NY2nADzisufytJp8G/ICDMWl8GqSxOPBDuexW2+biUB5rHI3FgU8DPOAgnsbfamI04AccjEnjbzUxGvADDsYEfLBUYBrWUoyD64Xir1bAejmKh0Pan684axzRiw+HS8abx9hgToizOKy5/K225vKDPDAmrb2umpg84Ac5NDat8fQ0Fgd+MI72Ta0+5MsDfmg8m8bKA37AYc3lbzX5NOAHHIxJ66yrJiYP+EEOjU1rPD2NxUGuD30AHywVmIa1FONM17fwZ6ZO2gtWQMN4wW2/x5anYf31OWtGweVp0TQ2TRyHNH4QP6aniZebxqaxOPADDnEWD3g4V7OXU7nip+YUf/R467UnFgd+wCHO4gEP52r3Pqv9uMSH9jT2swLTsD4L8Wm8WPrUxo8sn/Kf/z15epp4Gp9+zng5co05NV5MHvBD49k0c8lbNTEa8IMcGpv23XjxU7ni5oTyWBzEceDTjq1PlxPk0IxJ49PE0lga8IMcGpt27/HmP7WWuD1BeSwO9ioH8HfA2WechvXPpfIjQSgaZ49pX+nHco9pl4w3j3EBhziLAz/gIY09V/tJ7rE5f2O8fVg34BBnceAHPKSx52o/yT025zq++Fvbd29Y/hSDXgR8l52wXoTioVzxtF5Y54wv99h4seZkW4sf5NDXtdLY8lh5wA9yaOt4e6GJlcfSQBwHObRj4+lyAg6Xjm+tY+PFWoe1DvCDHNq61zS2PFYeHFtrHS8u79rx5rBuwMH8adagDT4r8M4Ny4vBi2P91OazLGOmAlOBZ6zAOzcsz8PFJvBfFbPv21bAH2S3nXFmu1kF3rlhdbnJVlDf+vdXc9aL0DS2XHEcjKOzOIjTAA+tJ55mnDyxNJYG/CCHZkwanyaWxtKAH+TQjEmzF5pYGksDcRyMo7E4iNMADziIpxlHY9PEaZDG2g9NHAfjaGJ4oEGclUMzBgc+TQwPNIizcmjG4GAvNDE80EA8zTgamyZOgzQWB3EcjKMNPivwzg3rswRjpgJTgVepwDs3LH96bS83V43fcyyPTRPHoR8jVo1frpxwLDeNLY991Pj2+tX64vYDcuxr1fg0kBNwEE/7yfhjuWlsc7LWAX6QQzu2vlh5rDw4lrtqfHnXjjeHdQMO5k+zBg3o/3lwVu1A3+vrnRuWy3YPP/Tk4+JbTSxNHA/pcfGtJpYmjof0OHtKE5MTcIizOPADHtLsZauJpYnjIT0uvtXE0sTxkB4X32piaeJ4SI+zpzQxOQGHOIvDuhYe5ID4VqOnieMhPS6+1cTSxPGQ7gMioKe9nX3nhvV2D3sOfFYF3rohnFWhX0x654blr1j4hBBcoHoMLB5oEGdxuHS8Nb4aT7dGwCHONp7FgS8P8IBDnC2XxYM8iLM4XHpWY+HS8fb41Xi6PQYc4i6vG8+m8+VBGosDP5TLprHygB9wuPSsxsKx8XSX8OBHQ/wt8VYNa/OEPfjgBSnMbjV6GosDPxhHY7caPY3FgR+Mo7FpLA34AYc1l7/V5NOAH3AwJo2/1cRowA/HctO2uTg0li2XxYEvD/CAQ5wtl8WDPIiL48Df6qsmJg/4AYc1l7/V5NOAH47lpm1zcWgsu+aKvT3epWH5Nj/00HEvCuDTWTzQIM7KobE48LcanQb8cCw3bZuLQ2PZclkc+PIADzjE2XJZPMiDOIvDmsvfamsuP8gDY9L4W02MBvxwLDdtm4tDY9lyWRz48gAPOIin8beaGA34AQdj0vhbTYwG/ICDMWn8rSZGe0u8S8PqUxe2B+0CM6wvjDSXn8dyj2n3GG8fx9ZKs6Yc4NNZPNAgzuKw5nbWVVtz+UHOV+Pp5bE48MM9xpvbOsAPOFgzjb/VxGjgNYIDDsbg8Ey1sre3wrs0rLd6qHPYj4+PKcIuK/AuDauLUbYH6XLTHQGk8YP4MT1NvNy0OCt+TE8TlwdpLB5wiLM48AMe0thzNXs5lStuPjiWJ35MTxM3FtL4QfyYniZebhqbxuLADzjEWTzg4VzNXk7lip+aU/xW45vnbey7NCw/94ceLu6TJODTvdBwSKPjQQ5NPI1PE9tq9DRWDs0YHPg0MTzQIM7KobE43Hu8+a0D/K/Wp8sJOBiTxqcd2z+9PFYOzRgc+DQxPNAgzsqhsTjce7z5rQP8r9anywk4GJPGpx3bP/3t8C4N6+0e7Bx4KrDHChxvWPs7qYtU6E8sJ8T/7+BAOouD+CH85wsPLmCJ4mnG0dg0cRqksafGi8kJxkKclUNb1+LTxOQEGsRZOTRjcGivYniQB+JpxtHYNHEapLE4iONgHI3FQZwGeLAfmniacTSxNJYG/CCHZkwanyaWxtKAH+TQjEmzF5pYGksDcRyMo7E4iNMADziIpxlHY9PEaW+Jd2lYXlzQJzxv+bDn0FOBV6/AuzQsdwCwXni++rOb/U8F3q4C79KwtpeYHjTNX3UA33LTWBzEaYAHjY8mnmYcjU0Tp0Eae2q8mJxgLMRZObR1LT5NTE6gQZyVQzPmXz4+PmjtVQwP8kA8zTgamyZOgzQWB3EcjKOxOIjTAA/2QxNPM44mlsbSgB/k0IxJ49PE0lga8IMcmjFp9kITS2NpII6DcTQWB3Ea4AEH8TTjaGyaOO0t8S4N6y0f7hx6KrC3Crxzw/KnlgtMcL/l2a4anwZywrHcNLa8a8ebx9rAD9agmX+riaWx8oAf5NDW8XyaWHksDcRxkLPVxGkgJ+AgnvaT8cdy09jmZK0D/CCHdmx9sfJYecAPcmjreD5NrDyWBuI4yNlq4jSQE3AQT2s8nQ/8t8U7NywX8F4AsL4AcBBPx0OaeBpLZ4M4DdJYHMTxQIM4iwM/4CGN/akm3ziwFxzwgIN4GksDPojjgAccxNNYGvBBHAc84CCextKAH3CIs3jAw081+Y21FxzSWBzE8UCDuDgOaSwO4niggb8WpJHR8Uvw8mPeuWG9/MObA7xVBXxg5N7srQ69Pew7Nyx/TccFJvRCYOmhesVZOXQvIBzSWDzIgzgrh3ZsPF1OwCHONp7FgS8PcHAuHPBQLpvGygN+wOHYXh8x3hpfrU9vnywO/NB4dqttc3EojzWOxuKBBnEWh3vUyrx+VPRM7QV/S7xzw/LgQw8f98IAfjoejmnlsuXxj+Ue08plG88ey01bc/l01jjg0wAPOIin8beaGA344Vhu2jYXh8ay5bI48OUBHnCIs+WyeJAHcRaHNZe/1dZcfpAHxqTxt5oYDfjhWG7aNheHxrJrrtjb450b1rGH735gRTlePEGczp7SxOQBPxhHY7caPY3FgR+Mo7FbjZ7G4sAPxtHYNJYG/IDDmsvfavJpwA84GJPG32piNOCHY7lp21wcGsuWy+LAlwd4wCHOlsviQR7EWRzWXP5WW3P5QR4YE/DBUoFpWEsxDq4XiotNcMl5kP588cMf4fBbnDXuIH2wOLg8/fj8hYdP6SPOGkdn8UCDOIvDmsvfamsuP8gDY9La66qJyQN+kENj0xpPT2Nx4AfjaGzatePNY07gBxzWtfhbTT4N+AEHY9La66qJyQN+kENj0xpPT2NxkOv1B3za4LMC07A+CzFmKjAVeP4KTMP66zNyZxBcnhZNY9PEcUjjB/Fjepp4uWlsGosDP+AQZ/GAh3M1ezmVK35qTvFHj7dee2Jx4Acc4iwe8PAX7UDoB/Pnix/ufVbruMQH/p8NzG9/q8A0rL/Vod+9QHwSA+4W0vEghy6exqeJbTV6GiuHZgwOfJoYHmgQZ+XQWBzuPd781gH+V+vT5QQcjEnj047tn14eK4dmDA58mhgeaBBn5dBYHO493vzWAf5X69PlBBzs1TjAB0sFpmEtxRh3KjAVeO4KTMN67ufzTLv7yQXwT3Kf6YyzlyevwF0a1pOfebZ3ugKajX8sbpvlkyyxVceP/ejiE641b/ypwE0qMA3rJmXc1STuUPxTJttDuWsRW3X8WMM6Nn4dN/5U4KIKTMO6qGwzaCowFfiNCkzD+o2q72nNOctU4IEVmIb1wGLPUlOBqcB1FZiGdV39ZvRUYCrwwApMw3pgsWepqcBrV+D3dz8N6/efwexgKjAVOLMC07DOLNSkTQWmAr9fgWlYv/8MZgdTganAmRWYhnVmoa5PmxmmAlOBayswDevaCs74qcBU4GEVmIb1sFLPQlOBqcC1FZiGdW0FZ/xU4J8rMMqdKjAN606FnWmnAlOB21dgGtbtazozTgWmAneqwDSsOxV2pp0KTAVuX4H/DwAA//9sB2hHAAAABklEQVQDAB9QlitZA9bLAAAAAElFTkSuQmCC",
11942          width: "248",
11943          height: "248",
11944          style: { mixBlendMode: "multiply" }
11945        }
11946      )
11947    ));
11948  }
11949  
11950  // routes/connectors-home/ai-plugin-callout.tsx
11951  var AI_PLUGIN_SLUG = "ai";
11952  var AI_PLUGIN_PAGE_SLUG = "ai-wp-admin";
11953  var AI_PLUGIN_ID = "ai/ai";
11954  var AI_PLUGIN_URL = "https://wordpress.org/plugins/ai/";
11955  var connectorDataValues = Object.values(getConnectorData());
11956  var hasAiProviders = connectorDataValues.some(
11957    (c) => c.type === "ai_provider"
11958  );
11959  var aiProviderSettingNames = [];
11960  for (const c of connectorDataValues) {
11961    if (c.type === "ai_provider" && c.authentication.method === "api_key") {
11962      aiProviderSettingNames.push(c.authentication.settingName);
11963    }
11964  }
11965  function AiPluginCallout() {
11966    const [isBusy, setIsBusy] = (0, import_element33.useState)(false);
11967    const [justActivated, setJustActivated] = (0, import_element33.useState)(false);
11968    const actionButtonRef = (0, import_element33.useRef)(null);
11969    (0, import_element33.useEffect)(() => {
11970      if (justActivated) {
11971        actionButtonRef.current?.focus();
11972      }
11973    }, [justActivated]);
11974    const initialHasConnectedProvider = (0, import_element33.useRef)(
11975      connectorDataValues.some(
11976        (c) => c.type === "ai_provider" && c.authentication.method === "api_key" && c.authentication.isConnected
11977      )
11978    ).current;
11979    const {
11980      pluginStatus,
11981      canInstallPlugins,
11982      canManagePlugins,
11983      hasConnectedProvider
11984    } = (0, import_data3.useSelect)((select2) => {
11985      const store2 = select2(import_core_data2.store);
11986      const canCreate = !!store2.canUser("create", {
11987        kind: "root",
11988        name: "plugin"
11989      });
11990      const siteSettings = store2.getEntityRecord("root", "site");
11991      const hasConnected = initialHasConnectedProvider || aiProviderSettingNames.some(
11992        (name) => !!siteSettings?.[name]
11993      );
11994      const plugin = store2.getEntityRecord(
11995        "root",
11996        "plugin",
11997        AI_PLUGIN_ID
11998      );
11999      const hasFinished = store2.hasFinishedResolution("getEntityRecord", [
12000        "root",
12001        "plugin",
12002        AI_PLUGIN_ID
12003      ]);
12004      if (!hasFinished) {
12005        return {
12006          pluginStatus: "checking",
12007          canInstallPlugins: canCreate,
12008          canManagePlugins: void 0,
12009          hasConnectedProvider: hasConnected
12010        };
12011      }
12012      if (!plugin) {
12013        return {
12014          pluginStatus: "not-installed",
12015          canInstallPlugins: canCreate,
12016          canManagePlugins: canCreate,
12017          hasConnectedProvider: hasConnected
12018        };
12019      }
12020      return {
12021        pluginStatus: plugin.status === "active" ? "active" : "inactive",
12022        canInstallPlugins: canCreate,
12023        canManagePlugins: true,
12024        hasConnectedProvider: hasConnected
12025      };
12026    }, []);
12027    const { saveEntityRecord } = (0, import_data3.useDispatch)(import_core_data2.store);
12028    const { createSuccessNotice, createErrorNotice } = (0, import_data3.useDispatch)(import_notices2.store);
12029    const installPlugin = async () => {
12030      setIsBusy(true);
12031      try {
12032        await saveEntityRecord(
12033          "root",
12034          "plugin",
12035          { slug: AI_PLUGIN_SLUG, status: "active" },
12036          { throwOnError: true }
12037        );
12038        setJustActivated(true);
12039        createSuccessNotice(
12040          (0, import_i18n6.__)("AI plugin installed and activated successfully."),
12041          {
12042            id: "ai-plugin-install-success",
12043            type: "snackbar"
12044          }
12045        );
12046      } catch {
12047        createErrorNotice((0, import_i18n6.__)("Failed to install the AI plugin."), {
12048          id: "ai-plugin-install-error",
12049          type: "snackbar"
12050        });
12051      } finally {
12052        setIsBusy(false);
12053      }
12054    };
12055    const activatePlugin = async () => {
12056      setIsBusy(true);
12057      try {
12058        await saveEntityRecord(
12059          "root",
12060          "plugin",
12061          { plugin: AI_PLUGIN_ID, status: "active" },
12062          { throwOnError: true }
12063        );
12064        setJustActivated(true);
12065        createSuccessNotice((0, import_i18n6.__)("AI plugin activated successfully."), {
12066          id: "ai-plugin-activate-success",
12067          type: "snackbar"
12068        });
12069      } catch {
12070        createErrorNotice((0, import_i18n6.__)("Failed to activate the AI plugin."), {
12071          id: "ai-plugin-activate-error",
12072          type: "snackbar"
12073        });
12074      } finally {
12075        setIsBusy(false);
12076      }
12077    };
12078    if (!hasAiProviders) {
12079      return null;
12080    }
12081    if (pluginStatus === "checking") {
12082      return null;
12083    }
12084    if (pluginStatus === "active" && initialHasConnectedProvider && !justActivated) {
12085      return null;
12086    }
12087    if (pluginStatus === "inactive" && canManagePlugins === false) {
12088      return null;
12089    }
12090    const isActiveNoProvider = pluginStatus === "active" && !hasConnectedProvider;
12091    const isJustConnected = pluginStatus === "active" && hasConnectedProvider && (!initialHasConnectedProvider || justActivated);
12092    const showInstallActivate = pluginStatus === "not-installed" || pluginStatus === "inactive";
12093    const hideButtons = pluginStatus === "not-installed" && canInstallPlugins === false;
12094    const getMessage = () => {
12095      if (isJustConnected) {
12096        return (0, import_i18n6.__)(
12097          "The <strong>AI plugin</strong> is ready to use. You can use it to generate featured images, alt text, titles, excerpts and more. <a>Learn more</a>"
12098        );
12099      }
12100      if (isActiveNoProvider) {
12101        return (0, import_i18n6.__)(
12102          "The <strong>AI plugin</strong> is installed. Connect an AI provider below to generate featured images, alt text, titles, excerpts, and more. <a>Learn more</a>"
12103        );
12104      }
12105      return (0, import_i18n6.__)(
12106        "The <strong>AI plugin</strong> can use your AI connectors to generate featured images, alt text, titles, excerpts and more. <a>Learn more</a>"
12107      );
12108    };
12109    const getPrimaryButtonProps = () => {
12110      if (pluginStatus === "not-installed") {
12111        return {
12112          label: isBusy ? (0, import_i18n6.__)("Installing\u2026") : (0, import_i18n6.__)("Install the AI plugin"),
12113          disabled: isBusy,
12114          onClick: isBusy ? void 0 : installPlugin
12115        };
12116      }
12117      return {
12118        label: isBusy ? (0, import_i18n6.__)("Activating\u2026") : (0, import_i18n6.__)("Activate the AI plugin"),
12119        disabled: isBusy,
12120        onClick: isBusy ? void 0 : activatePlugin
12121      };
12122    };
12123    return /* @__PURE__ */ React.createElement("div", { className: "ai-plugin-callout" }, /* @__PURE__ */ React.createElement("div", { className: "ai-plugin-callout__content" }, /* @__PURE__ */ React.createElement("p", null, (0, import_element33.createInterpolateElement)(getMessage(), {
12124      strong: /* @__PURE__ */ React.createElement("strong", null),
12125      // @ts-ignore children are injected by createInterpolateElement at runtime.
12126      a: /* @__PURE__ */ React.createElement(import_components3.ExternalLink, { href: AI_PLUGIN_URL })
12127    })), !hideButtons && (showInstallActivate ? /* @__PURE__ */ React.createElement(
12128      import_components3.Button,
12129      {
12130        variant: "primary",
12131        size: "compact",
12132        isBusy,
12133        disabled: getPrimaryButtonProps().disabled,
12134        accessibleWhenDisabled: true,
12135        onClick: getPrimaryButtonProps().onClick
12136      },
12137      getPrimaryButtonProps().label
12138    ) : /* @__PURE__ */ React.createElement(
12139      import_components3.Button,
12140      {
12141        ref: actionButtonRef,
12142        variant: "secondary",
12143        size: "compact",
12144        href: (0, import_url.addQueryArgs)("options-general.php", {
12145          page: AI_PLUGIN_PAGE_SLUG
12146        })
12147      },
12148      (0, import_i18n6.__)("Control features in the AI plugin")
12149    ))), /* @__PURE__ */ React.createElement(WpLogoDecoration, null));
12150  }
12151  
12152  // routes/connectors-home/stage.tsx
12153  var { store } = unlock2(connectorsPrivateApis2);
12154  registerDefaultConnectors();
12155  function ConnectorsPage() {
12156    const isFileModDisabled = getIsFileModDisabled();
12157    const { connectors, canInstallPlugins, isAiPluginInstalled } = (0, import_data4.useSelect)(
12158      (select2) => {
12159        const coreSelect = select2(import_core_data3.store);
12160        const aiPlugin = coreSelect.getEntityRecord(
12161          "root",
12162          "plugin",
12163          "ai/ai"
12164        );
12165        return {
12166          connectors: unlock2(select2(store)).getConnectors(),
12167          canInstallPlugins: coreSelect.canUser("create", {
12168            kind: "root",
12169            name: "plugin"
12170          }),
12171          isAiPluginInstalled: !!aiPlugin
12172        };
12173      },
12174      []
12175    );
12176    const renderableConnectors = connectors.filter(
12177      (connector) => connector.render
12178    );
12179    const aiProviderPluginSlugs = Array.from(
12180      new Set(
12181        connectors.filter(
12182          (connector) => connector.type === "ai_provider"
12183        ).map(
12184          (connector) => connector.plugin?.file?.split("/")[0]
12185        ).filter((slug) => !!slug)
12186      )
12187    ).sort();
12188    const installedPluginSlugs = new Set(
12189      connectors.filter(
12190        (connector) => connector.plugin?.isInstalled
12191      ).map(
12192        (connector) => connector.plugin?.file?.split("/")[0]
12193      ).filter((slug) => !!slug)
12194    );
12195    if (isAiPluginInstalled) {
12196      installedPluginSlugs.add("ai");
12197    }
12198    const manualInstallPluginSlugs = ["ai", ...aiProviderPluginSlugs].filter(
12199      (slug) => !installedPluginSlugs.has(slug)
12200    );
12201    const isEmpty = renderableConnectors.length === 0;
12202    return /* @__PURE__ */ React.createElement(
12203      page_default,
12204      {
12205        title: (0, import_i18n7.__)("Connectors"),
12206        subTitle: (0, import_i18n7.__)(
12207          "All of your API keys and credentials are stored here and shared across plugins. Configure once and use everywhere."
12208        )
12209      },
12210      /* @__PURE__ */ React.createElement(
12211        "div",
12212        {
12213          className: `connectors-page$isEmpty ? " connectors-page--empty" : ""}`
12214        },
12215        manualInstallPluginSlugs.length > 0 && (isFileModDisabled || !canInstallPlugins) && /* @__PURE__ */ React.createElement(
12216          notice_exports.Root,
12217          {
12218            intent: "info",
12219            className: "connectors-page__file-mods-notice"
12220          },
12221          /* @__PURE__ */ React.createElement(notice_exports.Description, null, isFileModDisabled ? (0, import_i18n7.__)(
12222            "Plugins cannot be installed here due to your site configuration. Install them manually using your normal deployment workflow."
12223          ) : (0, import_i18n7.__)(
12224            "You do not have permission to install plugins. Please ask a site administrator to install them for you."
12225          ))
12226        ),
12227        isEmpty ? /* @__PURE__ */ React.createElement(
12228          import_components4.__experimentalVStack,
12229          {
12230            alignment: "center",
12231            spacing: 3,
12232            style: { maxWidth: 480 }
12233          },
12234          /* @__PURE__ */ React.createElement(import_components4.__experimentalVStack, { alignment: "center", spacing: 2 }, /* @__PURE__ */ React.createElement(import_components4.__experimentalHeading, { level: 2, size: 15 }, (0, import_i18n7.__)("No connectors yet")), /* @__PURE__ */ React.createElement(import_components4.__experimentalText, { size: 12 }, (0, import_i18n7.__)(
12235            "Connectors appear here when you install plugins that use external services. Each plugin registers the API keys it needs, and you manage them all in one place."
12236          ))),
12237          /* @__PURE__ */ React.createElement(
12238            import_components4.Button,
12239            {
12240              variant: "secondary",
12241              href: "plugin-install.php",
12242              __next40pxDefaultSize: true
12243            },
12244            (0, import_i18n7.__)("Learn more")
12245          )
12246        ) : /* @__PURE__ */ React.createElement(import_components4.__experimentalVStack, { spacing: 3 }, /* @__PURE__ */ React.createElement(AiPluginCallout, null), /* @__PURE__ */ React.createElement(import_components4.__experimentalVStack, { spacing: 3, role: "list" }, connectors.map(
12247          (connector) => {
12248            if (connector.render) {
12249              return /* @__PURE__ */ React.createElement(
12250                connector.render,
12251                {
12252                  key: connector.slug,
12253                  slug: connector.slug,
12254                  name: connector.name,
12255                  description: connector.description,
12256                  type: connector.type,
12257                  logo: connector.logo,
12258                  authentication: connector.authentication,
12259                  plugin: connector.plugin
12260                }
12261              );
12262            }
12263            return null;
12264          }
12265        ))),
12266        canInstallPlugins && !isFileModDisabled && /* @__PURE__ */ React.createElement("p", null, (0, import_element34.createInterpolateElement)(
12267          (0, import_i18n7.__)(
12268            "If the connector you need is not listed, <a>search the plugin directory</a> to see if a connector is available."
12269          ),
12270          {
12271            a: (
12272              // eslint-disable-next-line jsx-a11y/anchor-has-content
12273              /* @__PURE__ */ React.createElement("a", { href: "plugin-install.php?s=connector&tab=search&type=tag" })
12274            )
12275          }
12276        ))
12277      )
12278    );
12279  }
12280  function Stage() {
12281    return /* @__PURE__ */ React.createElement(ConnectorsPage, null);
12282  }
12283  var stage = Stage;
12284  export {
12285    stage
12286  };
12287  /*! Bundled license information:
12288  
12289  use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
12290    (**
12291     * @license React
12292     * use-sync-external-store-shim.development.js
12293     *
12294     * Copyright (c) Meta Platforms, Inc. and affiliates.
12295     *
12296     * This source code is licensed under the MIT license found in the
12297     * LICENSE file in the root directory of this source tree.
12298     *)
12299  
12300  use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
12301    (**
12302     * @license React
12303     * use-sync-external-store-shim/with-selector.development.js
12304     *
12305     * Copyright (c) Meta Platforms, Inc. and affiliates.
12306     *
12307     * This source code is licensed under the MIT license found in the
12308     * LICENSE file in the root directory of this source tree.
12309     *)
12310  */


Generated : Fri Jul 24 08:20:19 2026 Cross-referenced by PHPXref