[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/build/routes/font-list/ -> 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 __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
   8    get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
   9  }) : x2)(function(x2) {
  10    if (typeof require !== "undefined") return require.apply(this, arguments);
  11    throw Error('Dynamic require of "' + x2 + '" is not supported');
  12  });
  13  var __commonJS = (cb, mod) => function __require4() {
  14    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  15  };
  16  var __export = (target, all) => {
  17    for (var name2 in all)
  18      __defProp(target, name2, { get: all[name2], enumerable: true });
  19  };
  20  var __copyProps = (to, from, except, desc) => {
  21    if (from && typeof from === "object" || typeof from === "function") {
  22      for (let key of __getOwnPropNames(from))
  23        if (!__hasOwnProp.call(to, key) && key !== except)
  24          __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  25    }
  26    return to;
  27  };
  28  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  29    // If the importer is in node compatibility mode or this is not an ESM
  30    // file that has been converted to a CommonJS file using a Babel-
  31    // compatible transform (i.e. "__esModule" has not been set), then set
  32    // "default" to the CommonJS "module.exports" for node compatibility.
  33    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  34    mod
  35  ));
  36  
  37  // package-external:@wordpress/i18n
  38  var require_i18n = __commonJS({
  39    "package-external:@wordpress/i18n"(exports, module) {
  40      module.exports = window.wp.i18n;
  41    }
  42  });
  43  
  44  // package-external:@wordpress/element
  45  var require_element = __commonJS({
  46    "package-external:@wordpress/element"(exports, module) {
  47      module.exports = window.wp.element;
  48    }
  49  });
  50  
  51  // vendor-external:react
  52  var require_react = __commonJS({
  53    "vendor-external:react"(exports, module) {
  54      module.exports = window.React;
  55    }
  56  });
  57  
  58  // vendor-external:react/jsx-runtime
  59  var require_jsx_runtime = __commonJS({
  60    "vendor-external:react/jsx-runtime"(exports, module) {
  61      module.exports = window.ReactJSXRuntime;
  62    }
  63  });
  64  
  65  // vendor-external:react-dom
  66  var require_react_dom = __commonJS({
  67    "vendor-external:react-dom"(exports, module) {
  68      module.exports = window.ReactDOM;
  69    }
  70  });
  71  
  72  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
  73  var require_use_sync_external_store_shim_development = __commonJS({
  74    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
  75      "use strict";
  76      (function() {
  77        function is(x2, y2) {
  78          return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
  79        }
  80        function useSyncExternalStore$2(subscribe, getSnapshot) {
  81          didWarnOld18Alpha || void 0 === React48.startTransition || (didWarnOld18Alpha = true, console.error(
  82            "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."
  83          ));
  84          var value = getSnapshot();
  85          if (!didWarnUncachedGetSnapshot) {
  86            var cachedValue = getSnapshot();
  87            objectIs(value, cachedValue) || (console.error(
  88              "The result of getSnapshot should be cached to avoid an infinite loop"
  89            ), didWarnUncachedGetSnapshot = true);
  90          }
  91          cachedValue = useState29({
  92            inst: { value, getSnapshot }
  93          });
  94          var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
  95          useLayoutEffect5(
  96            function() {
  97              inst.value = value;
  98              inst.getSnapshot = getSnapshot;
  99              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 100            },
 101            [subscribe, value, getSnapshot]
 102          );
 103          useEffect20(
 104            function() {
 105              checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 106              return subscribe(function() {
 107                checkIfSnapshotChanged(inst) && forceUpdate({ inst });
 108              });
 109            },
 110            [subscribe]
 111          );
 112          useDebugValue2(value);
 113          return value;
 114        }
 115        function checkIfSnapshotChanged(inst) {
 116          var latestGetSnapshot = inst.getSnapshot;
 117          inst = inst.value;
 118          try {
 119            var nextValue = latestGetSnapshot();
 120            return !objectIs(inst, nextValue);
 121          } catch (error) {
 122            return true;
 123          }
 124        }
 125        function useSyncExternalStore$1(subscribe, getSnapshot) {
 126          return getSnapshot();
 127        }
 128        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 129        var React48 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState29 = React48.useState, useEffect20 = React48.useEffect, useLayoutEffect5 = React48.useLayoutEffect, useDebugValue2 = React48.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
 130        exports.useSyncExternalStore = void 0 !== React48.useSyncExternalStore ? React48.useSyncExternalStore : shim;
 131        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 132      })();
 133    }
 134  });
 135  
 136  // node_modules/use-sync-external-store/shim/index.js
 137  var require_shim = __commonJS({
 138    "node_modules/use-sync-external-store/shim/index.js"(exports, module) {
 139      "use strict";
 140      if (false) {
 141        module.exports = null;
 142      } else {
 143        module.exports = require_use_sync_external_store_shim_development();
 144      }
 145    }
 146  });
 147  
 148  // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
 149  var require_with_selector_development = __commonJS({
 150    "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
 151      "use strict";
 152      (function() {
 153        function is(x2, y2) {
 154          return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
 155        }
 156        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
 157        var React48 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef23 = React48.useRef, useEffect20 = React48.useEffect, useMemo34 = React48.useMemo, useDebugValue2 = React48.useDebugValue;
 158        exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
 159          var instRef = useRef23(null);
 160          if (null === instRef.current) {
 161            var inst = { hasValue: false, value: null };
 162            instRef.current = inst;
 163          } else inst = instRef.current;
 164          instRef = useMemo34(
 165            function() {
 166              function memoizedSelector(nextSnapshot) {
 167                if (!hasMemo) {
 168                  hasMemo = true;
 169                  memoizedSnapshot = nextSnapshot;
 170                  nextSnapshot = selector(nextSnapshot);
 171                  if (void 0 !== isEqual && inst.hasValue) {
 172                    var currentSelection = inst.value;
 173                    if (isEqual(currentSelection, nextSnapshot))
 174                      return memoizedSelection = currentSelection;
 175                  }
 176                  return memoizedSelection = nextSnapshot;
 177                }
 178                currentSelection = memoizedSelection;
 179                if (objectIs(memoizedSnapshot, nextSnapshot))
 180                  return currentSelection;
 181                var nextSelection = selector(nextSnapshot);
 182                if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
 183                  return memoizedSnapshot = nextSnapshot, currentSelection;
 184                memoizedSnapshot = nextSnapshot;
 185                return memoizedSelection = nextSelection;
 186              }
 187              var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
 188              return [
 189                function() {
 190                  return memoizedSelector(getSnapshot());
 191                },
 192                null === maybeGetServerSnapshot ? void 0 : function() {
 193                  return memoizedSelector(maybeGetServerSnapshot());
 194                }
 195              ];
 196            },
 197            [getSnapshot, getServerSnapshot, selector, isEqual]
 198          );
 199          var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]);
 200          useEffect20(
 201            function() {
 202              inst.hasValue = true;
 203              inst.value = value;
 204            },
 205            [value]
 206          );
 207          useDebugValue2(value);
 208          return value;
 209        };
 210        "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
 211      })();
 212    }
 213  });
 214  
 215  // node_modules/use-sync-external-store/shim/with-selector.js
 216  var require_with_selector = __commonJS({
 217    "node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) {
 218      "use strict";
 219      if (false) {
 220        module.exports = null;
 221      } else {
 222        module.exports = require_with_selector_development();
 223      }
 224    }
 225  });
 226  
 227  // package-external:@wordpress/compose
 228  var require_compose = __commonJS({
 229    "package-external:@wordpress/compose"(exports, module) {
 230      module.exports = window.wp.compose;
 231    }
 232  });
 233  
 234  // package-external:@wordpress/theme
 235  var require_theme = __commonJS({
 236    "package-external:@wordpress/theme"(exports, module) {
 237      module.exports = window.wp.theme;
 238    }
 239  });
 240  
 241  // package-external:@wordpress/private-apis
 242  var require_private_apis = __commonJS({
 243    "package-external:@wordpress/private-apis"(exports, module) {
 244      module.exports = window.wp.privateApis;
 245    }
 246  });
 247  
 248  // package-external:@wordpress/primitives
 249  var require_primitives = __commonJS({
 250    "package-external:@wordpress/primitives"(exports, module) {
 251      module.exports = window.wp.primitives;
 252    }
 253  });
 254  
 255  // package-external:@wordpress/components
 256  var require_components = __commonJS({
 257    "package-external:@wordpress/components"(exports, module) {
 258      module.exports = window.wp.components;
 259    }
 260  });
 261  
 262  // package-external:@wordpress/editor
 263  var require_editor = __commonJS({
 264    "package-external:@wordpress/editor"(exports, module) {
 265      module.exports = window.wp.editor;
 266    }
 267  });
 268  
 269  // package-external:@wordpress/core-data
 270  var require_core_data = __commonJS({
 271    "package-external:@wordpress/core-data"(exports, module) {
 272      module.exports = window.wp.coreData;
 273    }
 274  });
 275  
 276  // package-external:@wordpress/data
 277  var require_data = __commonJS({
 278    "package-external:@wordpress/data"(exports, module) {
 279      module.exports = window.wp.data;
 280    }
 281  });
 282  
 283  // package-external:@wordpress/blocks
 284  var require_blocks = __commonJS({
 285    "package-external:@wordpress/blocks"(exports, module) {
 286      module.exports = window.wp.blocks;
 287    }
 288  });
 289  
 290  // package-external:@wordpress/block-editor
 291  var require_block_editor = __commonJS({
 292    "package-external:@wordpress/block-editor"(exports, module) {
 293      module.exports = window.wp.blockEditor;
 294    }
 295  });
 296  
 297  // package-external:@wordpress/style-engine
 298  var require_style_engine = __commonJS({
 299    "package-external:@wordpress/style-engine"(exports, module) {
 300      module.exports = window.wp.styleEngine;
 301    }
 302  });
 303  
 304  // node_modules/fast-deep-equal/es6/index.js
 305  var require_es6 = __commonJS({
 306    "node_modules/fast-deep-equal/es6/index.js"(exports, module) {
 307      "use strict";
 308      module.exports = function equal(a, b) {
 309        if (a === b) return true;
 310        if (a && b && typeof a == "object" && typeof b == "object") {
 311          if (a.constructor !== b.constructor) return false;
 312          var length, i, keys;
 313          if (Array.isArray(a)) {
 314            length = a.length;
 315            if (length != b.length) return false;
 316            for (i = length; i-- !== 0; )
 317              if (!equal(a[i], b[i])) return false;
 318            return true;
 319          }
 320          if (a instanceof Map && b instanceof Map) {
 321            if (a.size !== b.size) return false;
 322            for (i of a.entries())
 323              if (!b.has(i[0])) return false;
 324            for (i of a.entries())
 325              if (!equal(i[1], b.get(i[0]))) return false;
 326            return true;
 327          }
 328          if (a instanceof Set && b instanceof Set) {
 329            if (a.size !== b.size) return false;
 330            for (i of a.entries())
 331              if (!b.has(i[0])) return false;
 332            return true;
 333          }
 334          if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
 335            length = a.length;
 336            if (length != b.length) return false;
 337            for (i = length; i-- !== 0; )
 338              if (a[i] !== b[i]) return false;
 339            return true;
 340          }
 341          if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
 342          if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
 343          if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
 344          keys = Object.keys(a);
 345          length = keys.length;
 346          if (length !== Object.keys(b).length) return false;
 347          for (i = length; i-- !== 0; )
 348            if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
 349          for (i = length; i-- !== 0; ) {
 350            var key = keys[i];
 351            if (!equal(a[key], b[key])) return false;
 352          }
 353          return true;
 354        }
 355        return a !== a && b !== b;
 356      };
 357    }
 358  });
 359  
 360  // node_modules/deepmerge/dist/cjs.js
 361  var require_cjs = __commonJS({
 362    "node_modules/deepmerge/dist/cjs.js"(exports, module) {
 363      "use strict";
 364      var isMergeableObject = function isMergeableObject2(value) {
 365        return isNonNullObject(value) && !isSpecial(value);
 366      };
 367      function isNonNullObject(value) {
 368        return !!value && typeof value === "object";
 369      }
 370      function isSpecial(value) {
 371        var stringValue = Object.prototype.toString.call(value);
 372        return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
 373      }
 374      var canUseSymbol = typeof Symbol === "function" && Symbol.for;
 375      var REACT_ELEMENT_TYPE = canUseSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
 376      function isReactElement(value) {
 377        return value.$$typeof === REACT_ELEMENT_TYPE;
 378      }
 379      function emptyTarget(val) {
 380        return Array.isArray(val) ? [] : {};
 381      }
 382      function cloneUnlessOtherwiseSpecified(value, options) {
 383        return options.clone !== false && options.isMergeableObject(value) ? deepmerge2(emptyTarget(value), value, options) : value;
 384      }
 385      function defaultArrayMerge(target, source, options) {
 386        return target.concat(source).map(function(element) {
 387          return cloneUnlessOtherwiseSpecified(element, options);
 388        });
 389      }
 390      function getMergeFunction(key, options) {
 391        if (!options.customMerge) {
 392          return deepmerge2;
 393        }
 394        var customMerge = options.customMerge(key);
 395        return typeof customMerge === "function" ? customMerge : deepmerge2;
 396      }
 397      function getEnumerableOwnPropertySymbols(target) {
 398        return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
 399          return Object.propertyIsEnumerable.call(target, symbol);
 400        }) : [];
 401      }
 402      function getKeys(target) {
 403        return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
 404      }
 405      function propertyIsOnObject(object, property) {
 406        try {
 407          return property in object;
 408        } catch (_) {
 409          return false;
 410        }
 411      }
 412      function propertyIsUnsafe(target, key) {
 413        return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
 414      }
 415      function mergeObject(target, source, options) {
 416        var destination = {};
 417        if (options.isMergeableObject(target)) {
 418          getKeys(target).forEach(function(key) {
 419            destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
 420          });
 421        }
 422        getKeys(source).forEach(function(key) {
 423          if (propertyIsUnsafe(target, key)) {
 424            return;
 425          }
 426          if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
 427            destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
 428          } else {
 429            destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
 430          }
 431        });
 432        return destination;
 433      }
 434      function deepmerge2(target, source, options) {
 435        options = options || {};
 436        options.arrayMerge = options.arrayMerge || defaultArrayMerge;
 437        options.isMergeableObject = options.isMergeableObject || isMergeableObject;
 438        options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
 439        var sourceIsArray = Array.isArray(source);
 440        var targetIsArray = Array.isArray(target);
 441        var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
 442        if (!sourceAndTargetTypesMatch) {
 443          return cloneUnlessOtherwiseSpecified(source, options);
 444        } else if (sourceIsArray) {
 445          return options.arrayMerge(target, source, options);
 446        } else {
 447          return mergeObject(target, source, options);
 448        }
 449      }
 450      deepmerge2.all = function deepmergeAll(array, options) {
 451        if (!Array.isArray(array)) {
 452          throw new Error("first argument should be an array");
 453        }
 454        return array.reduce(function(prev, next) {
 455          return deepmerge2(prev, next, options);
 456        }, {});
 457      };
 458      var deepmerge_1 = deepmerge2;
 459      module.exports = deepmerge_1;
 460    }
 461  });
 462  
 463  // package-external:@wordpress/keycodes
 464  var require_keycodes = __commonJS({
 465    "package-external:@wordpress/keycodes"(exports, module) {
 466      module.exports = window.wp.keycodes;
 467    }
 468  });
 469  
 470  // package-external:@wordpress/api-fetch
 471  var require_api_fetch = __commonJS({
 472    "package-external:@wordpress/api-fetch"(exports, module) {
 473      module.exports = window.wp.apiFetch;
 474    }
 475  });
 476  
 477  // package-external:@wordpress/date
 478  var require_date = __commonJS({
 479    "package-external:@wordpress/date"(exports, module) {
 480      module.exports = window.wp.date;
 481    }
 482  });
 483  
 484  // node_modules/clsx/dist/clsx.mjs
 485  function r(e) {
 486    var t, f, n = "";
 487    if ("string" == typeof e || "number" == typeof e) n += e;
 488    else if ("object" == typeof e) if (Array.isArray(e)) {
 489      var o = e.length;
 490      for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
 491    } else for (f in e) e[f] && (n && (n += " "), n += f);
 492    return n;
 493  }
 494  function clsx() {
 495    for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
 496    return n;
 497  }
 498  var clsx_default = clsx;
 499  
 500  // node_modules/@base-ui/utils/createLogOnce.mjs
 501  var loggedMessages;
 502  if (true) {
 503    loggedMessages = /* @__PURE__ */ new Set();
 504  }
 505  function createLogOnce(severity, prefix) {
 506    return function logOnce(...messages) {
 507      if (true) {
 508        const message = messages.join(" ");
 509        const output = prefix ? `$prefix}: $message}` : message;
 510        const key = `$severity}:$output}`;
 511        if (!loggedMessages.has(key)) {
 512          loggedMessages.add(key);
 513          if (severity === "warn") {
 514            console.warn(output);
 515          } else {
 516            console.error(output);
 517          }
 518        }
 519      }
 520    };
 521  }
 522  
 523  // node_modules/@base-ui/utils/safeReact.mjs
 524  var React = __toESM(require_react(), 1);
 525  var SafeReact = {
 526    ...React
 527  };
 528  
 529  // node_modules/@base-ui/utils/useRefWithInit.mjs
 530  var React2 = __toESM(require_react(), 1);
 531  var UNINITIALIZED = {};
 532  function useRefWithInit(init, initArg) {
 533    const ref = React2.useRef(UNINITIALIZED);
 534    if (ref.current === UNINITIALIZED) {
 535      ref.current = init(initArg);
 536    }
 537    return ref;
 538  }
 539  
 540  // node_modules/@base-ui/utils/useStableCallback.mjs
 541  var useInsertionEffect = SafeReact.useInsertionEffect;
 542  var useSafeInsertionEffect = (
 543    // React 17 doesn't have useInsertionEffect.
 544    useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
 545    useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn()
 546  );
 547  function useStableCallback(callback) {
 548    const stable = useRefWithInit(createStableCallback).current;
 549    stable.next = callback;
 550    useSafeInsertionEffect(stable.effect);
 551    return stable.trampoline;
 552  }
 553  function createStableCallback() {
 554    const stable = {
 555      next: void 0,
 556      callback: assertNotCalled,
 557      trampoline: (...args) => stable.callback?.(...args),
 558      effect: () => {
 559        stable.callback = stable.next;
 560      }
 561    };
 562    return stable;
 563  }
 564  function assertNotCalled() {
 565    if (true) {
 566      throw (
 567        /* minify-error-disabled */
 568        new Error("Base UI: Cannot call an event handler while rendering.")
 569      );
 570    }
 571  }
 572  
 573  // node_modules/@base-ui/utils/warn.mjs
 574  var warn = createLogOnce("warn", "Base UI");
 575  
 576  // node_modules/@base-ui/utils/empty.mjs
 577  function NOOP() {
 578  }
 579  var EMPTY_ARRAY = Object.freeze([]);
 580  var EMPTY_OBJECT = Object.freeze({});
 581  
 582  // node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
 583  var React3 = __toESM(require_react(), 1);
 584  var noop = () => {
 585  };
 586  var useIsoLayoutEffect = typeof document !== "undefined" ? React3.useLayoutEffect : noop;
 587  
 588  // node_modules/@base-ui/react/internals/useRenderElement.mjs
 589  var React6 = __toESM(require_react(), 1);
 590  
 591  // node_modules/@base-ui/utils/useMergedRefs.mjs
 592  function useMergedRefs(a, b, c2, d) {
 593    const forkRef = useRefWithInit(createForkRef).current;
 594    if (didChange(forkRef, a, b, c2, d)) {
 595      update(forkRef, [a, b, c2, d]);
 596    }
 597    return forkRef.callback;
 598  }
 599  function useMergedRefsN(refs) {
 600    const forkRef = useRefWithInit(createForkRef).current;
 601    if (didChangeN(forkRef, refs)) {
 602      update(forkRef, refs);
 603    }
 604    return forkRef.callback;
 605  }
 606  function createForkRef() {
 607    return {
 608      callback: null,
 609      cleanup: null,
 610      refs: []
 611    };
 612  }
 613  function didChange(forkRef, a, b, c2, d) {
 614    return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c2 || forkRef.refs[3] !== d;
 615  }
 616  function didChangeN(forkRef, newRefs) {
 617    return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
 618  }
 619  function update(forkRef, refs) {
 620    forkRef.refs = refs;
 621    if (refs.every((ref) => ref == null)) {
 622      forkRef.callback = null;
 623      return;
 624    }
 625    forkRef.callback = (instance) => {
 626      if (forkRef.cleanup) {
 627        forkRef.cleanup();
 628        forkRef.cleanup = null;
 629      }
 630      if (instance != null) {
 631        const cleanupCallbacks = Array(refs.length).fill(null);
 632        for (let i = 0; i < refs.length; i += 1) {
 633          const ref = refs[i];
 634          if (ref == null) {
 635            continue;
 636          }
 637          switch (typeof ref) {
 638            case "function": {
 639              const refCleanup = ref(instance);
 640              if (typeof refCleanup === "function") {
 641                cleanupCallbacks[i] = refCleanup;
 642              }
 643              break;
 644            }
 645            case "object": {
 646              ref.current = instance;
 647              break;
 648            }
 649            default:
 650          }
 651        }
 652        forkRef.cleanup = () => {
 653          for (let i = 0; i < refs.length; i += 1) {
 654            const ref = refs[i];
 655            if (ref == null) {
 656              continue;
 657            }
 658            switch (typeof ref) {
 659              case "function": {
 660                const cleanupCallback = cleanupCallbacks[i];
 661                if (typeof cleanupCallback === "function") {
 662                  cleanupCallback();
 663                } else {
 664                  void ref(null);
 665                }
 666                break;
 667              }
 668              case "object": {
 669                ref.current = null;
 670                break;
 671              }
 672              default:
 673            }
 674          }
 675        };
 676      }
 677    };
 678  }
 679  
 680  // node_modules/@base-ui/utils/getReactElementRef.mjs
 681  var React5 = __toESM(require_react(), 1);
 682  
 683  // node_modules/@base-ui/utils/reactVersion.mjs
 684  var React4 = __toESM(require_react(), 1);
 685  var majorVersion = parseInt(React4.version, 10);
 686  function isReactVersionAtLeast(reactVersionToCheck) {
 687    return majorVersion >= reactVersionToCheck;
 688  }
 689  
 690  // node_modules/@base-ui/utils/getReactElementRef.mjs
 691  function getReactElementRef(element) {
 692    if (!/* @__PURE__ */ React5.isValidElement(element)) {
 693      return null;
 694    }
 695    const reactElement = element;
 696    const propsWithRef = reactElement.props;
 697    return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
 698  }
 699  
 700  // node_modules/@base-ui/utils/mergeObjects.mjs
 701  function mergeObjects(a, b) {
 702    if (a && !b) {
 703      return a;
 704    }
 705    if (!a && b) {
 706      return b;
 707    }
 708    if (a || b) {
 709      return {
 710        ...a,
 711        ...b
 712      };
 713    }
 714    return void 0;
 715  }
 716  
 717  // node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
 718  function getStateAttributesProps(state, customMapping) {
 719    const props = {};
 720    for (const key in state) {
 721      const value = state[key];
 722      if (customMapping?.hasOwnProperty(key)) {
 723        const customProps = customMapping[key](value);
 724        if (customProps != null) {
 725          Object.assign(props, customProps);
 726        }
 727        continue;
 728      }
 729      if (value === true) {
 730        props[`data-$key.toLowerCase()}`] = "";
 731      } else if (value) {
 732        props[`data-$key.toLowerCase()}`] = value.toString();
 733      }
 734    }
 735    return props;
 736  }
 737  
 738  // node_modules/@base-ui/react/utils/resolveClassName.mjs
 739  function resolveClassName(className, state) {
 740    return typeof className === "function" ? className(state) : className;
 741  }
 742  
 743  // node_modules/@base-ui/react/utils/resolveStyle.mjs
 744  function resolveStyle(style, state) {
 745    return typeof style === "function" ? style(state) : style;
 746  }
 747  
 748  // node_modules/@base-ui/react/merge-props/mergeProps.mjs
 749  var EMPTY_PROPS = {};
 750  function mergeProps(a, b, c2, d, e) {
 751    if (!c2 && !d && !e && !a) {
 752      return createInitialMergedProps(b);
 753    }
 754    let merged = createInitialMergedProps(a);
 755    if (b) {
 756      merged = mergeInto(merged, b);
 757    }
 758    if (c2) {
 759      merged = mergeInto(merged, c2);
 760    }
 761    if (d) {
 762      merged = mergeInto(merged, d);
 763    }
 764    if (e) {
 765      merged = mergeInto(merged, e);
 766    }
 767    return merged;
 768  }
 769  function mergePropsN(props) {
 770    if (props.length === 0) {
 771      return EMPTY_PROPS;
 772    }
 773    if (props.length === 1) {
 774      return createInitialMergedProps(props[0]);
 775    }
 776    let merged = createInitialMergedProps(props[0]);
 777    for (let i = 1; i < props.length; i += 1) {
 778      merged = mergeInto(merged, props[i]);
 779    }
 780    return merged;
 781  }
 782  function createInitialMergedProps(inputProps) {
 783    if (isPropsGetter(inputProps)) {
 784      return {
 785        ...resolvePropsGetter(inputProps, EMPTY_PROPS)
 786      };
 787    }
 788    return copyInitialProps(inputProps);
 789  }
 790  function mergeInto(merged, inputProps) {
 791    if (isPropsGetter(inputProps)) {
 792      return resolvePropsGetter(inputProps, merged);
 793    }
 794    return mutablyMergeInto(merged, inputProps);
 795  }
 796  function copyInitialProps(inputProps) {
 797    const copiedProps = {
 798      ...inputProps
 799    };
 800    for (const propName in copiedProps) {
 801      const propValue = copiedProps[propName];
 802      if (isEventHandler(propName, propValue)) {
 803        copiedProps[propName] = wrapEventHandler(propValue);
 804      }
 805    }
 806    return copiedProps;
 807  }
 808  function mutablyMergeInto(mergedProps, externalProps) {
 809    if (!externalProps) {
 810      return mergedProps;
 811    }
 812    for (const propName in externalProps) {
 813      const externalPropValue = externalProps[propName];
 814      switch (propName) {
 815        case "style": {
 816          mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
 817          break;
 818        }
 819        case "className": {
 820          mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
 821          break;
 822        }
 823        default: {
 824          if (isEventHandler(propName, externalPropValue)) {
 825            mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
 826          } else {
 827            mergedProps[propName] = externalPropValue;
 828          }
 829        }
 830      }
 831    }
 832    return mergedProps;
 833  }
 834  function isEventHandler(key, value) {
 835    const code0 = key.charCodeAt(0);
 836    const code1 = key.charCodeAt(1);
 837    const code2 = key.charCodeAt(2);
 838    return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
 839  }
 840  function isPropsGetter(inputProps) {
 841    return typeof inputProps === "function";
 842  }
 843  function resolvePropsGetter(inputProps, previousProps) {
 844    if (isPropsGetter(inputProps)) {
 845      return inputProps(previousProps);
 846    }
 847    return inputProps ?? EMPTY_PROPS;
 848  }
 849  function mergeEventHandlers(ourHandler, theirHandler) {
 850    if (!theirHandler) {
 851      return ourHandler;
 852    }
 853    if (!ourHandler) {
 854      return wrapEventHandler(theirHandler);
 855    }
 856    return (...args) => {
 857      const event = args[0];
 858      if (isSyntheticEvent(event)) {
 859        const baseUIEvent = event;
 860        makeEventPreventable(baseUIEvent);
 861        const result2 = theirHandler(...args);
 862        if (!baseUIEvent.baseUIHandlerPrevented) {
 863          ourHandler?.(...args);
 864        }
 865        return result2;
 866      }
 867      const result = theirHandler(...args);
 868      ourHandler?.(...args);
 869      return result;
 870    };
 871  }
 872  function wrapEventHandler(handler) {
 873    if (!handler) {
 874      return handler;
 875    }
 876    return (...args) => {
 877      const event = args[0];
 878      if (isSyntheticEvent(event)) {
 879        makeEventPreventable(event);
 880      }
 881      return handler(...args);
 882    };
 883  }
 884  function makeEventPreventable(event) {
 885    event.preventBaseUIHandler = () => {
 886      event.baseUIHandlerPrevented = true;
 887    };
 888    return event;
 889  }
 890  function mergeClassNames(ourClassName, theirClassName) {
 891    if (theirClassName) {
 892      if (ourClassName) {
 893        return theirClassName + " " + ourClassName;
 894      }
 895      return theirClassName;
 896    }
 897    return ourClassName;
 898  }
 899  function isSyntheticEvent(event) {
 900    return event != null && typeof event === "object" && "nativeEvent" in event;
 901  }
 902  
 903  // node_modules/@base-ui/react/internals/useRenderElement.mjs
 904  var import_react = __toESM(require_react(), 1);
 905  function useRenderElement(element, componentProps, params = {}) {
 906    let renderProp = componentProps.render;
 907    if (params.enabled !== false) {
 908      renderProp = unwrapLazyRenderProp(renderProp);
 909    }
 910    const outProps = useRenderElementProps(componentProps, params, renderProp);
 911    if (params.enabled === false) {
 912      return null;
 913    }
 914    const state = params.state ?? EMPTY_OBJECT;
 915    return evaluateRenderProp(element, renderProp, outProps, state);
 916  }
 917  function useRenderElementProps(componentProps, params, renderProp) {
 918    const {
 919      className: classNameProp,
 920      style: styleProp
 921    } = componentProps;
 922    const {
 923      state = EMPTY_OBJECT,
 924      ref,
 925      props,
 926      stateAttributesMapping,
 927      enabled = true
 928    } = params;
 929    const className = enabled ? resolveClassName(classNameProp, state) : void 0;
 930    const style = enabled ? resolveStyle(styleProp, state) : void 0;
 931    const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
 932    const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
 933    const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
 934    if (typeof document !== "undefined") {
 935      if (!enabled) {
 936        void useMergedRefs(null, null);
 937      } else if (Array.isArray(ref)) {
 938        outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
 939      } else {
 940        outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
 941      }
 942    }
 943    if (!enabled) {
 944      return EMPTY_OBJECT;
 945    }
 946    if (className !== void 0) {
 947      outProps.className = mergeClassNames(outProps.className, className);
 948    }
 949    if (style !== void 0) {
 950      outProps.style = mergeObjects(outProps.style, style);
 951    }
 952    return outProps;
 953  }
 954  function resolveRenderFunctionProps(props) {
 955    if (Array.isArray(props)) {
 956      return mergePropsN(props);
 957    }
 958    return mergeProps(void 0, props);
 959  }
 960  var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
 961  var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
 962  var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
 963  function unwrapLazyRenderProp(render) {
 964    if (render?.$$typeof !== REACT_LAZY_TYPE) {
 965      return render;
 966    }
 967    const unwrapped = React6.Children.toArray(render)[0];
 968    return /* @__PURE__ */ React6.isValidElement(unwrapped) ? unwrapped : render;
 969  }
 970  function evaluateRenderProp(element, render, props, state) {
 971    if (render) {
 972      if (typeof render === "function") {
 973        if (true) {
 974          warnIfRenderPropLooksLikeComponent(render);
 975        }
 976        return render(props, state);
 977      }
 978      const mergedProps = mergeProps(props, render.props);
 979      mergedProps.ref = props.ref;
 980      if (true) {
 981        if (!/* @__PURE__ */ React6.isValidElement(render)) {
 982          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"));
 983        }
 984      }
 985      return /* @__PURE__ */ React6.cloneElement(render, mergedProps);
 986    }
 987    if (element) {
 988      if (typeof element === "string") {
 989        return renderTag(element, props);
 990      }
 991    }
 992    throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
 993  }
 994  function warnIfRenderPropLooksLikeComponent(renderFn) {
 995    const functionName = renderFn.name;
 996    if (functionName.length === 0) {
 997      return;
 998    }
 999    if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
1000      return;
1001    }
1002    if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
1003      return;
1004    }
1005    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");
1006  }
1007  function renderTag(Tag, props) {
1008    if (Tag === "button") {
1009      return /* @__PURE__ */ (0, import_react.createElement)("button", {
1010        type: "button",
1011        ...props,
1012        key: props.key
1013      });
1014    }
1015    if (Tag === "img") {
1016      return /* @__PURE__ */ (0, import_react.createElement)("img", {
1017        alt: "",
1018        ...props,
1019        key: props.key
1020      });
1021    }
1022    return /* @__PURE__ */ React6.createElement(Tag, props);
1023  }
1024  
1025  // node_modules/@base-ui/utils/useId.mjs
1026  var React7 = __toESM(require_react(), 1);
1027  var globalId = 0;
1028  function useGlobalId(idOverride, prefix = "mui") {
1029    const [defaultId, setDefaultId] = React7.useState(idOverride);
1030    const id = idOverride || defaultId;
1031    React7.useEffect(() => {
1032      if (defaultId == null) {
1033        globalId += 1;
1034        setDefaultId(`$prefix}-$globalId}`);
1035      }
1036    }, [defaultId, prefix]);
1037    return id;
1038  }
1039  var maybeReactUseId = SafeReact.useId;
1040  function useId(idOverride, prefix) {
1041    if (maybeReactUseId !== void 0) {
1042      const reactId = maybeReactUseId();
1043      return idOverride ?? (prefix ? `$prefix}-$reactId}` : reactId);
1044    }
1045    return useGlobalId(idOverride, prefix);
1046  }
1047  
1048  // node_modules/@base-ui/react/internals/useBaseUiId.mjs
1049  function useBaseUiId(idOverride) {
1050    return useId(idOverride, "base-ui");
1051  }
1052  
1053  // node_modules/@base-ui/react/internals/reason-parts.mjs
1054  var reason_parts_exports = {};
1055  __export(reason_parts_exports, {
1056    cancelOpen: () => cancelOpen,
1057    chipRemovePress: () => chipRemovePress,
1058    clearPress: () => clearPress,
1059    closePress: () => closePress,
1060    closeWatcher: () => closeWatcher,
1061    decrementPress: () => decrementPress,
1062    disabled: () => disabled,
1063    drag: () => drag,
1064    escapeKey: () => escapeKey,
1065    focusOut: () => focusOut,
1066    imperativeAction: () => imperativeAction,
1067    incrementPress: () => incrementPress,
1068    initial: () => initial,
1069    inputBlur: () => inputBlur,
1070    inputChange: () => inputChange,
1071    inputClear: () => inputClear,
1072    inputPaste: () => inputPaste,
1073    inputPress: () => inputPress,
1074    itemPress: () => itemPress,
1075    keyboard: () => keyboard,
1076    linkPress: () => linkPress,
1077    listNavigation: () => listNavigation,
1078    missing: () => missing,
1079    none: () => none,
1080    outsidePress: () => outsidePress,
1081    pointer: () => pointer,
1082    scrub: () => scrub,
1083    siblingOpen: () => siblingOpen,
1084    swipe: () => swipe,
1085    trackPress: () => trackPress,
1086    triggerFocus: () => triggerFocus,
1087    triggerHover: () => triggerHover,
1088    triggerPress: () => triggerPress,
1089    wheel: () => wheel,
1090    windowResize: () => windowResize
1091  });
1092  var none = "none";
1093  var triggerPress = "trigger-press";
1094  var triggerHover = "trigger-hover";
1095  var triggerFocus = "trigger-focus";
1096  var outsidePress = "outside-press";
1097  var itemPress = "item-press";
1098  var closePress = "close-press";
1099  var linkPress = "link-press";
1100  var clearPress = "clear-press";
1101  var chipRemovePress = "chip-remove-press";
1102  var trackPress = "track-press";
1103  var incrementPress = "increment-press";
1104  var decrementPress = "decrement-press";
1105  var inputChange = "input-change";
1106  var inputClear = "input-clear";
1107  var inputBlur = "input-blur";
1108  var inputPaste = "input-paste";
1109  var inputPress = "input-press";
1110  var focusOut = "focus-out";
1111  var escapeKey = "escape-key";
1112  var closeWatcher = "close-watcher";
1113  var listNavigation = "list-navigation";
1114  var keyboard = "keyboard";
1115  var pointer = "pointer";
1116  var drag = "drag";
1117  var wheel = "wheel";
1118  var scrub = "scrub";
1119  var cancelOpen = "cancel-open";
1120  var siblingOpen = "sibling-open";
1121  var disabled = "disabled";
1122  var missing = "missing";
1123  var initial = "initial";
1124  var imperativeAction = "imperative-action";
1125  var swipe = "swipe";
1126  var windowResize = "window-resize";
1127  
1128  // node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
1129  function createChangeEventDetails(reason, event, trigger, customProperties) {
1130    let canceled = false;
1131    let allowPropagation = false;
1132    const custom = customProperties ?? EMPTY_OBJECT;
1133    const details = {
1134      reason,
1135      event: event ?? new Event("base-ui"),
1136      cancel() {
1137        canceled = true;
1138      },
1139      allowPropagation() {
1140        allowPropagation = true;
1141      },
1142      get isCanceled() {
1143        return canceled;
1144      },
1145      get isPropagationAllowed() {
1146        return allowPropagation;
1147      },
1148      trigger,
1149      ...custom
1150    };
1151    return details;
1152  }
1153  
1154  // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1155  var React9 = __toESM(require_react(), 1);
1156  
1157  // node_modules/@base-ui/utils/useOnMount.mjs
1158  var React8 = __toESM(require_react(), 1);
1159  function useOnMount(fn) {
1160    React8.useEffect(fn, EMPTY_ARRAY);
1161  }
1162  
1163  // node_modules/@base-ui/utils/useAnimationFrame.mjs
1164  var EMPTY = null;
1165  var LAST_RAF = globalThis.requestAnimationFrame;
1166  var Scheduler = class {
1167    /* This implementation uses an array as a backing data-structure for frame callbacks.
1168     * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
1169     * never calls the native `cancelAnimationFrame` if there are no frames left. This can
1170     * be much more efficient if there is a call pattern that alterns as
1171     * "request-cancel-request-cancel-…".
1172     * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
1173     * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
1174    callbacks = [];
1175    callbacksCount = 0;
1176    nextId = 1;
1177    startId = 1;
1178    isScheduled = false;
1179    tick = (timestamp) => {
1180      this.isScheduled = false;
1181      const currentCallbacks = this.callbacks;
1182      const currentCallbacksCount = this.callbacksCount;
1183      this.callbacks = [];
1184      this.callbacksCount = 0;
1185      this.startId = this.nextId;
1186      if (currentCallbacksCount > 0) {
1187        for (let i = 0; i < currentCallbacks.length; i += 1) {
1188          currentCallbacks[i]?.(timestamp);
1189        }
1190      }
1191    };
1192    request(fn) {
1193      const id = this.nextId;
1194      this.nextId += 1;
1195      this.callbacks.push(fn);
1196      this.callbacksCount += 1;
1197      const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
1198      if (!this.isScheduled || didRAFChange) {
1199        requestAnimationFrame(this.tick);
1200        this.isScheduled = true;
1201      }
1202      return id;
1203    }
1204    cancel(id) {
1205      const index2 = id - this.startId;
1206      if (index2 < 0 || index2 >= this.callbacks.length) {
1207        return;
1208      }
1209      if (this.callbacks[index2] === null) {
1210        return;
1211      }
1212      this.callbacks[index2] = null;
1213      this.callbacksCount -= 1;
1214    }
1215  };
1216  var scheduler = new Scheduler();
1217  var AnimationFrame = class _AnimationFrame {
1218    static create() {
1219      return new _AnimationFrame();
1220    }
1221    static request(fn) {
1222      return scheduler.request(fn);
1223    }
1224    static cancel(id) {
1225      return scheduler.cancel(id);
1226    }
1227    currentId = EMPTY;
1228    /**
1229     * Executes `fn` after `delay`, clearing any previously scheduled call.
1230     */
1231    request(fn) {
1232      this.cancel();
1233      this.currentId = scheduler.request(() => {
1234        this.currentId = EMPTY;
1235        fn();
1236      });
1237    }
1238    cancel = () => {
1239      if (this.currentId !== EMPTY) {
1240        scheduler.cancel(this.currentId);
1241        this.currentId = EMPTY;
1242      }
1243    };
1244    disposeEffect = () => {
1245      return this.cancel;
1246    };
1247  };
1248  function useAnimationFrame() {
1249    const timeout = useRefWithInit(AnimationFrame.create).current;
1250    useOnMount(timeout.disposeEffect);
1251    return timeout;
1252  }
1253  
1254  // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1255  function useTransitionStatus(open2, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) {
1256    const [transitionStatus, setTransitionStatus] = React9.useState(open2 && enableIdleState ? "idle" : void 0);
1257    const [mounted, setMounted] = React9.useState(open2 && !animateInitialOpen);
1258    if (open2 && !mounted) {
1259      setMounted(true);
1260      setTransitionStatus("starting");
1261    }
1262    if (!open2 && mounted && transitionStatus !== "ending" && !deferEndingState) {
1263      setTransitionStatus("ending");
1264    }
1265    if (!open2 && !mounted && transitionStatus === "ending") {
1266      setTransitionStatus(void 0);
1267    }
1268    useIsoLayoutEffect(() => {
1269      if (!open2 && mounted && transitionStatus !== "ending" && deferEndingState) {
1270        const frame = AnimationFrame.request(() => {
1271          setTransitionStatus("ending");
1272        });
1273        return () => {
1274          AnimationFrame.cancel(frame);
1275        };
1276      }
1277      return void 0;
1278    }, [open2, mounted, transitionStatus, deferEndingState]);
1279    useIsoLayoutEffect(() => {
1280      if (!open2 || enableIdleState) {
1281        return void 0;
1282      }
1283      const frame = AnimationFrame.request(() => {
1284        setTransitionStatus(void 0);
1285      });
1286      return () => {
1287        AnimationFrame.cancel(frame);
1288      };
1289    }, [enableIdleState, open2]);
1290    useIsoLayoutEffect(() => {
1291      if (!open2 || !enableIdleState) {
1292        return void 0;
1293      }
1294      if (open2 && mounted && transitionStatus !== "idle") {
1295        setTransitionStatus("starting");
1296      }
1297      const frame = AnimationFrame.request(() => {
1298        setTransitionStatus("idle");
1299      });
1300      return () => {
1301        AnimationFrame.cancel(frame);
1302      };
1303    }, [enableIdleState, open2, mounted, transitionStatus]);
1304    return {
1305      mounted,
1306      setMounted,
1307      transitionStatus
1308    };
1309  }
1310  
1311  // node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
1312  var startingStyle = "data-starting-style";
1313  var endingStyle = "data-ending-style";
1314  
1315  // node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
1316  var STARTING_HOOK = {
1317    [startingStyle]: ""
1318  };
1319  var ENDING_HOOK = {
1320    [endingStyle]: ""
1321  };
1322  var transitionStatusMapping = {
1323    transitionStatus(value) {
1324      if (value === "starting") {
1325        return STARTING_HOOK;
1326      }
1327      if (value === "ending") {
1328        return ENDING_HOOK;
1329      }
1330      return null;
1331    }
1332  };
1333  
1334  // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1335  function hasWindow() {
1336    return typeof window !== "undefined";
1337  }
1338  function getNodeName(node) {
1339    if (isNode(node)) {
1340      return (node.nodeName || "").toLowerCase();
1341    }
1342    return "#document";
1343  }
1344  function getWindow(node) {
1345    var _node$ownerDocument;
1346    return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1347  }
1348  function getDocumentElement(node) {
1349    var _ref;
1350    return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1351  }
1352  function isNode(value) {
1353    if (!hasWindow()) {
1354      return false;
1355    }
1356    return value instanceof Node || value instanceof getWindow(value).Node;
1357  }
1358  function isElement(value) {
1359    if (!hasWindow()) {
1360      return false;
1361    }
1362    return value instanceof Element || value instanceof getWindow(value).Element;
1363  }
1364  function isHTMLElement(value) {
1365    if (!hasWindow()) {
1366      return false;
1367    }
1368    return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1369  }
1370  function isShadowRoot(value) {
1371    if (!hasWindow() || typeof ShadowRoot === "undefined") {
1372      return false;
1373    }
1374    return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1375  }
1376  function isOverflowElement(element) {
1377    const {
1378      overflow,
1379      overflowX,
1380      overflowY,
1381      display
1382    } = getComputedStyle2(element);
1383    return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
1384  }
1385  function isTableElement(element) {
1386    return /^(table|td|th)$/.test(getNodeName(element));
1387  }
1388  function isTopLayer(element) {
1389    try {
1390      if (element.matches(":popover-open")) {
1391        return true;
1392      }
1393    } catch (_e) {
1394    }
1395    try {
1396      return element.matches(":modal");
1397    } catch (_e) {
1398      return false;
1399    }
1400  }
1401  var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1402  var containRe = /paint|layout|strict|content/;
1403  var isNotNone = (value) => !!value && value !== "none";
1404  var isWebKitValue;
1405  function isContainingBlock(elementOrCss) {
1406    const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
1407    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 || "");
1408  }
1409  function getContainingBlock(element) {
1410    let currentNode = getParentNode(element);
1411    while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1412      if (isContainingBlock(currentNode)) {
1413        return currentNode;
1414      } else if (isTopLayer(currentNode)) {
1415        return null;
1416      }
1417      currentNode = getParentNode(currentNode);
1418    }
1419    return null;
1420  }
1421  function isWebKit() {
1422    if (isWebKitValue == null) {
1423      isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
1424    }
1425    return isWebKitValue;
1426  }
1427  function isLastTraversableNode(node) {
1428    return /^(html|body|#document)$/.test(getNodeName(node));
1429  }
1430  function getComputedStyle2(element) {
1431    return getWindow(element).getComputedStyle(element);
1432  }
1433  function getNodeScroll(element) {
1434    if (isElement(element)) {
1435      return {
1436        scrollLeft: element.scrollLeft,
1437        scrollTop: element.scrollTop
1438      };
1439    }
1440    return {
1441      scrollLeft: element.scrollX,
1442      scrollTop: element.scrollY
1443    };
1444  }
1445  function getParentNode(node) {
1446    if (getNodeName(node) === "html") {
1447      return node;
1448    }
1449    const result = (
1450      // Step into the shadow DOM of the parent of a slotted node.
1451      node.assignedSlot || // DOM Element detected.
1452      node.parentNode || // ShadowRoot detected.
1453      isShadowRoot(node) && node.host || // Fallback.
1454      getDocumentElement(node)
1455    );
1456    return isShadowRoot(result) ? result.host : result;
1457  }
1458  function getNearestOverflowAncestor(node) {
1459    const parentNode = getParentNode(node);
1460    if (isLastTraversableNode(parentNode)) {
1461      return (node.ownerDocument || node).body;
1462    }
1463    if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1464      return parentNode;
1465    }
1466    return getNearestOverflowAncestor(parentNode);
1467  }
1468  function getOverflowAncestors(node, list, traverseIframes) {
1469    var _node$ownerDocument2;
1470    if (list === void 0) {
1471      list = [];
1472    }
1473    if (traverseIframes === void 0) {
1474      traverseIframes = true;
1475    }
1476    const scrollableAncestor = getNearestOverflowAncestor(node);
1477    const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1478    const win = getWindow(scrollableAncestor);
1479    if (isBody) {
1480      const frameElement = getFrameElement(win);
1481      return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1482    } else {
1483      return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1484    }
1485  }
1486  function getFrameElement(win) {
1487    return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1488  }
1489  
1490  // node_modules/@base-ui/utils/owner.mjs
1491  function ownerDocument(node) {
1492    return node?.ownerDocument || document;
1493  }
1494  
1495  // node_modules/@base-ui/utils/addEventListener.mjs
1496  function addEventListener(target, type, listener, options) {
1497    target.addEventListener(type, listener, options);
1498    return () => {
1499      target.removeEventListener(type, listener, options);
1500    };
1501  }
1502  
1503  // node_modules/@base-ui/utils/useValueAsRef.mjs
1504  function useValueAsRef(value) {
1505    const latest = useRefWithInit(createLatestRef, value).current;
1506    latest.next = value;
1507    useIsoLayoutEffect(latest.effect);
1508    return latest;
1509  }
1510  function createLatestRef(value) {
1511    const latest = {
1512      current: value,
1513      next: value,
1514      effect: () => {
1515        latest.current = latest.next;
1516      }
1517    };
1518    return latest;
1519  }
1520  
1521  // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1522  var React10 = __toESM(require_react(), 1);
1523  
1524  // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1525  var ReactDOM = __toESM(require_react_dom(), 1);
1526  
1527  // node_modules/@base-ui/react/utils/resolveRef.mjs
1528  function resolveRef(maybeRef) {
1529    if (maybeRef == null) {
1530      return maybeRef;
1531    }
1532    return "current" in maybeRef ? maybeRef.current : maybeRef;
1533  }
1534  
1535  // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1536  var pendingCallbacks = null;
1537  function flushBeforePaint(fn) {
1538    if (!pendingCallbacks) {
1539      const callbacks = [];
1540      pendingCallbacks = callbacks;
1541      queueMicrotask(() => {
1542        pendingCallbacks = null;
1543        ReactDOM.flushSync(() => {
1544          for (const callback of callbacks) {
1545            callback();
1546          }
1547        });
1548      });
1549    }
1550    pendingCallbacks.push(fn);
1551  }
1552  function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) {
1553    const frame = useAnimationFrame();
1554    return useStableCallback((fnToExecute, signal = null) => {
1555      frame.cancel();
1556      const element = resolveRef(elementOrRef);
1557      if (element == null) {
1558        return;
1559      }
1560      const resolvedElement = element;
1561      const done = () => {
1562        if (!batch) {
1563          ReactDOM.flushSync(fnToExecute);
1564          return;
1565        }
1566        flushBeforePaint(() => {
1567          if (!signal?.aborted) {
1568            fnToExecute();
1569          }
1570        });
1571      };
1572      if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
1573        fnToExecute();
1574        return;
1575      }
1576      function exec() {
1577        Promise.all(resolvedElement.getAnimations().map((animation) => animation.finished)).then(() => {
1578          if (!signal?.aborted) {
1579            done();
1580          }
1581        }, () => {
1582          if (signal?.aborted) {
1583            return;
1584          }
1585          const currentAnimations = resolvedElement.getAnimations();
1586          if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
1587            exec();
1588            return;
1589          }
1590          done();
1591        });
1592      }
1593      if (waitForStartingStyleRemoved) {
1594        const startingStyleAttribute = startingStyle;
1595        if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1596          frame.request(exec);
1597          return;
1598        }
1599        const attributeObserver = new MutationObserver(() => {
1600          if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1601            attributeObserver.disconnect();
1602            exec();
1603          }
1604        });
1605        attributeObserver.observe(resolvedElement, {
1606          attributes: true,
1607          attributeFilter: [startingStyleAttribute]
1608        });
1609        signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
1610          once: true
1611        });
1612        return;
1613      }
1614      frame.request(exec);
1615    });
1616  }
1617  
1618  // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1619  function useOpenChangeComplete(parameters) {
1620    const {
1621      enabled = true,
1622      open: open2,
1623      ref,
1624      batch = false,
1625      onComplete: onCompleteParam
1626    } = parameters;
1627    const onComplete = useStableCallback(onCompleteParam);
1628    const runOnceAnimationsFinish = useAnimationsFinished(ref, open2, batch);
1629    React10.useEffect(() => {
1630      if (!enabled) {
1631        return void 0;
1632      }
1633      const abortController = new AbortController();
1634      runOnceAnimationsFinish(onComplete, abortController.signal);
1635      return () => {
1636        abortController.abort();
1637      };
1638    }, [enabled, open2, onComplete, runOnceAnimationsFinish]);
1639  }
1640  
1641  // node_modules/@base-ui/utils/platform/parts.mjs
1642  var parts_exports = {};
1643  __export(parts_exports, {
1644    engine: () => engine_exports,
1645    env: () => env_exports,
1646    mediaQuery: () => media_query_exports,
1647    os: () => os_exports,
1648    screenReader: () => screen_reader_exports
1649  });
1650  
1651  // node_modules/@base-ui/utils/platform/os.mjs
1652  var os_exports = {};
1653  __export(os_exports, {
1654    android: () => android,
1655    apple: () => apple,
1656    ios: () => ios,
1657    linux: () => linux,
1658    mac: () => mac,
1659    windows: () => windows
1660  });
1661  
1662  // node_modules/@base-ui/utils/platform/shared.mjs
1663  function readRawData() {
1664    if (typeof navigator === "undefined") {
1665      return {
1666        userAgent: "",
1667        platform: "",
1668        maxTouchPoints: 0
1669      };
1670    }
1671    if (true) {
1672      const uaData = navigator.userAgentData;
1673      if (uaData && Array.isArray(uaData.brands)) {
1674        return {
1675          userAgent: uaData.brands.map(({
1676            brand,
1677            version: version2
1678          }) => `$brand}/$version2}`).join(" "),
1679          platform: uaData.platform ?? navigator.platform ?? "",
1680          maxTouchPoints: navigator.maxTouchPoints ?? 0
1681        };
1682      }
1683    }
1684    return {
1685      userAgent: navigator.userAgent,
1686      platform: navigator.platform ?? "",
1687      maxTouchPoints: navigator.maxTouchPoints ?? 0
1688    };
1689  }
1690  var {
1691    userAgent,
1692    platform,
1693    maxTouchPoints
1694  } = readRawData();
1695  var lowerUserAgent = userAgent.toLowerCase();
1696  var lowerPlatform = platform.toLowerCase();
1697  
1698  // node_modules/@base-ui/utils/platform/os.mjs
1699  var ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1;
1700  var ANDROID_STRING = "android";
1701  var android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
1702  var mac = !ios && lowerPlatform.startsWith("mac");
1703  var windows = lowerPlatform.startsWith("win");
1704  var linux = !android && /^(linux|chrome os)/.test(lowerPlatform);
1705  var apple = mac || ios;
1706  
1707  // node_modules/@base-ui/utils/platform/engine.mjs
1708  var engine_exports = {};
1709  __export(engine_exports, {
1710    blink: () => blink,
1711    gecko: () => gecko,
1712    webkit: () => webkit
1713  });
1714  var webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none");
1715  var gecko = !webkit && lowerUserAgent.includes("firefox");
1716  var blink = !webkit && lowerUserAgent.includes("chrom");
1717  
1718  // node_modules/@base-ui/utils/platform/screen-reader.mjs
1719  var screen_reader_exports = {};
1720  __export(screen_reader_exports, {
1721    voiceOver: () => voiceOver
1722  });
1723  var voiceOver = apple;
1724  
1725  // node_modules/@base-ui/utils/platform/env.mjs
1726  var env_exports = {};
1727  __export(env_exports, {
1728    jsdom: () => jsdom
1729  });
1730  var jsdom = /jsdom|happydom/.test(lowerUserAgent);
1731  
1732  // node_modules/@base-ui/utils/platform/media-query.mjs
1733  var media_query_exports = {};
1734  __export(media_query_exports, {
1735    iOS: () => iOS
1736  });
1737  var iOS = "@supports (-webkit-touch-callout: none)";
1738  
1739  // node_modules/@base-ui/utils/useTimeout.mjs
1740  var EMPTY2 = 0;
1741  var Timeout = class _Timeout {
1742    static create() {
1743      return new _Timeout();
1744    }
1745    currentId = EMPTY2;
1746    /**
1747     * Executes `fn` after `delay`, clearing any previously scheduled call.
1748     */
1749    start(delay, fn) {
1750      this.clear();
1751      this.currentId = setTimeout(() => {
1752        this.currentId = EMPTY2;
1753        fn();
1754      }, delay);
1755    }
1756    isStarted() {
1757      return this.currentId !== EMPTY2;
1758    }
1759    clear = () => {
1760      if (this.currentId !== EMPTY2) {
1761        clearTimeout(this.currentId);
1762        this.currentId = EMPTY2;
1763      }
1764    };
1765    disposeEffect = () => {
1766      return this.clear;
1767    };
1768  };
1769  function useTimeout() {
1770    const timeout = useRefWithInit(Timeout.create).current;
1771    useOnMount(timeout.disposeEffect);
1772    return timeout;
1773  }
1774  
1775  // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1776  var React11 = __toESM(require_react(), 1);
1777  
1778  // node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
1779  function isReactEvent(event) {
1780    return "nativeEvent" in event;
1781  }
1782  function isVirtualClick(event) {
1783    if (event.pointerType === "" && event.isTrusted) {
1784      return true;
1785    }
1786    if (parts_exports.os.android && event.pointerType) {
1787      return event.type === "click" && event.buttons === 1;
1788    }
1789    return event.detail === 0 && !event.pointerType;
1790  }
1791  function isMouseLikePointerType(pointerType, strict) {
1792    const values = ["mouse", "pen"];
1793    if (!strict) {
1794      values.push("", void 0);
1795    }
1796    return values.includes(pointerType);
1797  }
1798  function isClickLikeEvent(event) {
1799    const type = event.type;
1800    return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
1801  }
1802  
1803  // node_modules/@base-ui/utils/shadowDom.mjs
1804  function activeElement(doc) {
1805    let element = doc.activeElement;
1806    while (element?.shadowRoot?.activeElement != null) {
1807      element = element.shadowRoot.activeElement;
1808    }
1809    return element;
1810  }
1811  function contains(parent, child) {
1812    if (!parent || !child) {
1813      return false;
1814    }
1815    const rootNode = child.getRootNode?.();
1816    if (parent.contains(child)) {
1817      return true;
1818    }
1819    if (rootNode && isShadowRoot(rootNode)) {
1820      let next = child;
1821      while (next) {
1822        if (parent === next) {
1823          return true;
1824        }
1825        next = next.parentNode || next.host;
1826      }
1827    }
1828    return false;
1829  }
1830  function getTarget(event) {
1831    if ("composedPath" in event) {
1832      return event.composedPath()[0] ?? event.target;
1833    }
1834    return event.target;
1835  }
1836  
1837  // node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
1838  var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
1839  var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
1840  
1841  // node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs
1842  var open = "data-open";
1843  var closed = "data-closed";
1844  var anchorHidden = "data-anchor-hidden";
1845  
1846  // node_modules/@base-ui/react/utils/CommonTriggerDataAttributes.mjs
1847  var CommonTriggerDataAttributes_exports = {};
1848  __export(CommonTriggerDataAttributes_exports, {
1849    popupOpen: () => popupOpen,
1850    pressed: () => pressed
1851  });
1852  var popupOpen = "data-popup-open";
1853  var pressed = "data-pressed";
1854  
1855  // node_modules/@base-ui/react/utils/popupStateMapping.mjs
1856  var TRIGGER_HOOK = {
1857    [popupOpen]: ""
1858  };
1859  var PRESSABLE_TRIGGER_HOOK = {
1860    [popupOpen]: "",
1861    [pressed]: ""
1862  };
1863  var POPUP_OPEN_HOOK = {
1864    [open]: ""
1865  };
1866  var POPUP_CLOSED_HOOK = {
1867    [closed]: ""
1868  };
1869  var ANCHOR_HIDDEN_HOOK = {
1870    [anchorHidden]: ""
1871  };
1872  var triggerOpenStateMapping = {
1873    open(value) {
1874      if (value) {
1875        return TRIGGER_HOOK;
1876      }
1877      return null;
1878    }
1879  };
1880  var popupStateMapping = {
1881    open(value) {
1882      if (value) {
1883        return POPUP_OPEN_HOOK;
1884      }
1885      return POPUP_CLOSED_HOOK;
1886    },
1887    anchorHidden(value) {
1888      if (value) {
1889        return ANCHOR_HIDDEN_HOOK;
1890      }
1891      return null;
1892    }
1893  };
1894  var popupTransitionStateMapping = {
1895    ...popupStateMapping,
1896    ...transitionStatusMapping
1897  };
1898  
1899  // node_modules/@base-ui/react/tooltip/trigger/TooltipTriggerDataAttributes.mjs
1900  var popupOpen2 = CommonTriggerDataAttributes_exports.popupOpen;
1901  var triggerDisabled = "data-trigger-disabled";
1902  
1903  // node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
1904  function isTargetInsideEnabledTrigger(target, triggerElements) {
1905    if (!isElement(target)) {
1906      return false;
1907    }
1908    const targetElement = target;
1909    if (triggerElements.hasElement(targetElement)) {
1910      return !targetElement.hasAttribute(triggerDisabled);
1911    }
1912    for (const [, trigger] of triggerElements.entries()) {
1913      if (contains(trigger, targetElement)) {
1914        return !trigger.hasAttribute(triggerDisabled);
1915      }
1916    }
1917    return false;
1918  }
1919  function isEventTargetWithin(event, node) {
1920    if (node == null) {
1921      return false;
1922    }
1923    if ("composedPath" in event) {
1924      return event.composedPath().includes(node);
1925    }
1926    const eventAgain = event;
1927    return eventAgain.target != null && node.contains(eventAgain.target);
1928  }
1929  function isRootElement(element) {
1930    return element.matches("html,body");
1931  }
1932  function isTypeableElement(element) {
1933    return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
1934  }
1935  function isInteractiveElement(element) {
1936    return element?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),$TYPEABLE_SELECTOR}`) != null;
1937  }
1938  function matchesFocusVisible(element) {
1939    if (!element || parts_exports.env.jsdom) {
1940      return true;
1941    }
1942    try {
1943      return element.matches(":focus-visible");
1944    } catch (_e) {
1945      return true;
1946    }
1947  }
1948  
1949  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs
1950  function resolveValue(value, pointerType) {
1951    if (pointerType != null && !isMouseLikePointerType(pointerType)) {
1952      return 0;
1953    }
1954    if (typeof value === "function") {
1955      return value();
1956    }
1957    return value;
1958  }
1959  function getDelay(value, prop, pointerType) {
1960    const result = resolveValue(value, pointerType);
1961    if (typeof result === "number") {
1962      return result;
1963    }
1964    return result?.[prop];
1965  }
1966  function getRestMs(value) {
1967    if (typeof value === "function") {
1968      return value();
1969    }
1970    return value;
1971  }
1972  function isClickLikeOpenEvent(openEventType, interactedInside) {
1973    return interactedInside || openEventType === "click" || openEventType === "mousedown";
1974  }
1975  function isHoverOpenEvent(openEventType) {
1976    return openEventType?.includes("mouse") && openEventType !== "mousedown";
1977  }
1978  
1979  // node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs
1980  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
1981  var FloatingDelayGroupContext = /* @__PURE__ */ React11.createContext({
1982    hasProvider: false,
1983    timeoutMs: 0,
1984    delayRef: {
1985      current: 0
1986    },
1987    initialDelayRef: {
1988      current: 0
1989    },
1990    timeout: new Timeout(),
1991    currentIdRef: {
1992      current: null
1993    },
1994    currentContextRef: {
1995      current: null
1996    }
1997  });
1998  if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext";
1999  function resetDelayRef(delayRef, initialDelayRef) {
2000    delayRef.current = initialDelayRef.current;
2001  }
2002  function FloatingDelayGroup(props) {
2003    const {
2004      children,
2005      delay,
2006      timeoutMs = 0
2007    } = props;
2008    const delayRef = React11.useRef(delay);
2009    const initialDelayRef = React11.useRef(delay);
2010    const currentIdRef = React11.useRef(null);
2011    const currentContextRef = React11.useRef(null);
2012    const timeout = useTimeout();
2013    useIsoLayoutEffect(() => {
2014      initialDelayRef.current = delay;
2015      if (!currentIdRef.current) {
2016        delayRef.current = delay;
2017        return;
2018      }
2019      delayRef.current = {
2020        open: getDelay(delayRef.current, "open"),
2021        close: getDelay(delay, "close")
2022      };
2023    }, [delay, currentIdRef, delayRef, initialDelayRef]);
2024    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FloatingDelayGroupContext.Provider, {
2025      value: React11.useMemo(() => ({
2026        hasProvider: true,
2027        delayRef,
2028        initialDelayRef,
2029        currentIdRef,
2030        timeoutMs,
2031        currentContextRef,
2032        timeout
2033      }), [timeoutMs, timeout]),
2034      children
2035    });
2036  }
2037  function useDelayGroup(context, options = {
2038    open: false
2039  }) {
2040    const {
2041      open: open2
2042    } = options;
2043    const store = "rootStore" in context ? context.rootStore : context;
2044    const floatingId = store.useState("floatingId");
2045    const groupContext = React11.useContext(FloatingDelayGroupContext);
2046    const {
2047      currentIdRef,
2048      delayRef,
2049      timeoutMs,
2050      initialDelayRef,
2051      currentContextRef,
2052      hasProvider,
2053      timeout
2054    } = groupContext;
2055    const [isInstantPhase, setIsInstantPhase] = React11.useState(false);
2056    const openRef = React11.useRef(open2);
2057    useIsoLayoutEffect(() => {
2058      openRef.current = open2;
2059    }, [open2]);
2060    useIsoLayoutEffect(() => {
2061      function unset() {
2062        currentContextRef.current?.setIsInstantPhase(false);
2063        currentIdRef.current = null;
2064        currentContextRef.current = null;
2065        delayRef.current = initialDelayRef.current;
2066        timeout.clear();
2067      }
2068      if (!currentIdRef.current) {
2069        return void 0;
2070      }
2071      if (!open2 && currentIdRef.current === floatingId) {
2072        setIsInstantPhase(false);
2073        if (timeoutMs) {
2074          const closingId = floatingId;
2075          timeout.start(timeoutMs, () => {
2076            if (store.select("open") || currentIdRef.current && currentIdRef.current !== closingId) {
2077              return;
2078            }
2079            unset();
2080          });
2081          return () => {
2082            if (openRef.current || currentIdRef.current !== closingId) {
2083              timeout.clear();
2084            }
2085          };
2086        }
2087        unset();
2088      }
2089      return void 0;
2090    }, [open2, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store]);
2091    useIsoLayoutEffect(() => {
2092      if (!open2) {
2093        return;
2094      }
2095      const prevContext = currentContextRef.current;
2096      const prevId = currentIdRef.current;
2097      timeout.clear();
2098      currentContextRef.current = {
2099        onOpenChange: store.setOpen,
2100        setIsInstantPhase
2101      };
2102      currentIdRef.current = floatingId;
2103      delayRef.current = {
2104        open: 0,
2105        close: getDelay(initialDelayRef.current, "close")
2106      };
2107      if (prevId !== null && prevId !== floatingId) {
2108        setIsInstantPhase(true);
2109        prevContext?.setIsInstantPhase(true);
2110        prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none));
2111      } else {
2112        setIsInstantPhase(false);
2113        prevContext?.setIsInstantPhase(false);
2114      }
2115    }, [open2, floatingId, store, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]);
2116    useIsoLayoutEffect(() => {
2117      return () => {
2118        if (currentIdRef.current === floatingId) {
2119          currentContextRef.current = null;
2120          if (!openRef.current) {
2121            return;
2122          }
2123          currentIdRef.current = null;
2124          resetDelayRef(delayRef, initialDelayRef);
2125          timeout.clear();
2126        }
2127      };
2128    }, [currentContextRef, currentIdRef, delayRef, floatingId, initialDelayRef, timeout]);
2129    return React11.useMemo(() => ({
2130      activeIdRef: currentIdRef,
2131      hasProvider,
2132      delayRef,
2133      isInstantPhase
2134    }), [currentIdRef, hasProvider, delayRef, isInstantPhase]);
2135  }
2136  
2137  // node_modules/@base-ui/utils/mergeCleanups.mjs
2138  function mergeCleanups(...cleanups) {
2139    return () => {
2140      for (let i = 0; i < cleanups.length; i += 1) {
2141        const cleanup = cleanups[i];
2142        if (cleanup) {
2143          cleanup();
2144        }
2145      }
2146    };
2147  }
2148  
2149  // node_modules/@base-ui/react/utils/FocusGuard.mjs
2150  var React12 = __toESM(require_react(), 1);
2151  
2152  // node_modules/@base-ui/utils/visuallyHidden.mjs
2153  var visuallyHiddenBase = {
2154    clipPath: "inset(50%)",
2155    overflow: "hidden",
2156    whiteSpace: "nowrap",
2157    border: 0,
2158    padding: 0,
2159    width: 1,
2160    height: 1,
2161    margin: -1
2162  };
2163  var visuallyHidden = {
2164    ...visuallyHiddenBase,
2165    position: "fixed",
2166    top: 0,
2167    left: 0
2168  };
2169  var visuallyHiddenInput = {
2170    ...visuallyHiddenBase,
2171    position: "absolute"
2172  };
2173  
2174  // node_modules/@base-ui/react/utils/FocusGuard.mjs
2175  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
2176  var FocusGuard = /* @__PURE__ */ React12.forwardRef(function FocusGuard2(props, ref) {
2177    const [role, setRole] = React12.useState();
2178    useIsoLayoutEffect(() => {
2179      if (parts_exports.screenReader.voiceOver && parts_exports.engine.webkit) {
2180        setRole("button");
2181      }
2182    }, []);
2183    const restProps = {
2184      tabIndex: 0,
2185      // Role is only for VoiceOver
2186      role
2187    };
2188    return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
2189      ...props,
2190      ref,
2191      style: visuallyHidden,
2192      "aria-hidden": role ? void 0 : true,
2193      ...restProps,
2194      "data-base-ui-focus-guard": ""
2195    });
2196  });
2197  if (true) FocusGuard.displayName = "FocusGuard";
2198  
2199  // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
2200  var min = Math.min;
2201  var max = Math.max;
2202  var round = Math.round;
2203  var floor = Math.floor;
2204  var createCoords = (v2) => ({
2205    x: v2,
2206    y: v2
2207  });
2208  var oppositeSideMap = {
2209    left: "right",
2210    right: "left",
2211    bottom: "top",
2212    top: "bottom"
2213  };
2214  function clamp(start, value, end) {
2215    return max(start, min(value, end));
2216  }
2217  function evaluate(value, param) {
2218    return typeof value === "function" ? value(param) : value;
2219  }
2220  function getSide(placement) {
2221    return placement.split("-")[0];
2222  }
2223  function getAlignment(placement) {
2224    return placement.split("-")[1];
2225  }
2226  function getOppositeAxis(axis) {
2227    return axis === "x" ? "y" : "x";
2228  }
2229  function getAxisLength(axis) {
2230    return axis === "y" ? "height" : "width";
2231  }
2232  function getSideAxis(placement) {
2233    const firstChar = placement[0];
2234    return firstChar === "t" || firstChar === "b" ? "y" : "x";
2235  }
2236  function getAlignmentAxis(placement) {
2237    return getOppositeAxis(getSideAxis(placement));
2238  }
2239  function getAlignmentSides(placement, rects, rtl) {
2240    if (rtl === void 0) {
2241      rtl = false;
2242    }
2243    const alignment = getAlignment(placement);
2244    const alignmentAxis = getAlignmentAxis(placement);
2245    const length = getAxisLength(alignmentAxis);
2246    let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
2247    if (rects.reference[length] > rects.floating[length]) {
2248      mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
2249    }
2250    return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
2251  }
2252  function getExpandedPlacements(placement) {
2253    const oppositePlacement = getOppositePlacement(placement);
2254    return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
2255  }
2256  function getOppositeAlignmentPlacement(placement) {
2257    return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
2258  }
2259  var lrPlacement = ["left", "right"];
2260  var rlPlacement = ["right", "left"];
2261  var tbPlacement = ["top", "bottom"];
2262  var btPlacement = ["bottom", "top"];
2263  function getSideList(side, isStart, rtl) {
2264    switch (side) {
2265      case "top":
2266      case "bottom":
2267        if (rtl) return isStart ? rlPlacement : lrPlacement;
2268        return isStart ? lrPlacement : rlPlacement;
2269      case "left":
2270      case "right":
2271        return isStart ? tbPlacement : btPlacement;
2272      default:
2273        return [];
2274    }
2275  }
2276  function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
2277    const alignment = getAlignment(placement);
2278    let list = getSideList(getSide(placement), direction === "start", rtl);
2279    if (alignment) {
2280      list = list.map((side) => side + "-" + alignment);
2281      if (flipAlignment) {
2282        list = list.concat(list.map(getOppositeAlignmentPlacement));
2283      }
2284    }
2285    return list;
2286  }
2287  function getOppositePlacement(placement) {
2288    const side = getSide(placement);
2289    return oppositeSideMap[side] + placement.slice(side.length);
2290  }
2291  function expandPaddingObject(padding) {
2292    var _padding$top, _padding$right, _padding$bottom, _padding$left;
2293    return {
2294      top: (_padding$top = padding.top) != null ? _padding$top : 0,
2295      right: (_padding$right = padding.right) != null ? _padding$right : 0,
2296      bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
2297      left: (_padding$left = padding.left) != null ? _padding$left : 0
2298    };
2299  }
2300  function getPaddingObject(padding) {
2301    return typeof padding !== "number" ? expandPaddingObject(padding) : {
2302      top: padding,
2303      right: padding,
2304      bottom: padding,
2305      left: padding
2306    };
2307  }
2308  function rectToClientRect(rect) {
2309    const {
2310      x: x2,
2311      y: y2,
2312      width,
2313      height
2314    } = rect;
2315    return {
2316      width,
2317      height,
2318      top: y2,
2319      left: x2,
2320      right: x2 + width,
2321      bottom: y2 + height,
2322      x: x2,
2323      y: y2
2324    };
2325  }
2326  
2327  // node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
2328  function isHiddenByStyles(styles) {
2329    return styles.visibility === "hidden" || styles.visibility === "collapse";
2330  }
2331  function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) {
2332    if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
2333      return false;
2334    }
2335    if (typeof element.checkVisibility === "function") {
2336      return element.checkVisibility();
2337    }
2338    return styles.display !== "none" && styles.display !== "contents";
2339  }
2340  
2341  // node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs
2342  var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
2343  function getParentElement(element) {
2344    const assignedSlot = element.assignedSlot;
2345    if (assignedSlot) {
2346      return assignedSlot;
2347    }
2348    if (element.parentElement) {
2349      return element.parentElement;
2350    }
2351    const rootNode = element.getRootNode();
2352    return isShadowRoot(rootNode) ? rootNode.host : null;
2353  }
2354  function getDetailsSummary(details) {
2355    for (const child of Array.from(details.children)) {
2356      if (getNodeName(child) === "summary") {
2357        return child;
2358      }
2359    }
2360    return null;
2361  }
2362  function isWithinOpenDetailsSummary(element, details) {
2363    const summary = getDetailsSummary(details);
2364    return !!summary && (element === summary || contains(summary, element));
2365  }
2366  function isFocusableCandidate(element) {
2367    const nodeName = element ? getNodeName(element) : "";
2368    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");
2369  }
2370  function isFocusableElement(element) {
2371    if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) {
2372      return false;
2373    }
2374    for (let current = element; current; current = getParentElement(current)) {
2375      const isAncestor = current !== element;
2376      const isSlot = getNodeName(current) === "slot";
2377      if (current.hasAttribute("inert")) {
2378        return false;
2379      }
2380      if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {
2381        return false;
2382      }
2383    }
2384    return true;
2385  }
2386  function isVisibleInTabbableTree(element, isAncestor) {
2387    const styles = getComputedStyle2(element);
2388    if (!isAncestor) {
2389      return isElementVisible(element, styles);
2390    }
2391    return styles.display !== "none";
2392  }
2393  function getTabIndex(element) {
2394    const tabIndex = element.tabIndex;
2395    if (tabIndex < 0) {
2396      const nodeName = getNodeName(element);
2397      if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) {
2398        return 0;
2399      }
2400    }
2401    return tabIndex;
2402  }
2403  function getNamedRadioInput(element) {
2404    if (getNodeName(element) !== "input") {
2405      return null;
2406    }
2407    const input = element;
2408    return input.type === "radio" && input.name !== "" ? input : null;
2409  }
2410  function isTabbableRadio(element, candidates) {
2411    const input = getNamedRadioInput(element);
2412    if (!input) {
2413      return true;
2414    }
2415    const checkedRadio = candidates.find((candidate) => {
2416      const radio = getNamedRadioInput(candidate);
2417      return radio?.name === input.name && radio.form === input.form && radio.checked;
2418    });
2419    if (checkedRadio) {
2420      return checkedRadio === input;
2421    }
2422    return candidates.find((candidate) => {
2423      const radio = getNamedRadioInput(candidate);
2424      return radio?.name === input.name && radio.form === input.form;
2425    }) === input;
2426  }
2427  function getComposedChildren(container) {
2428    if (isHTMLElement(container) && getNodeName(container) === "slot") {
2429      const assignedElements = container.assignedElements({
2430        flatten: true
2431      });
2432      if (assignedElements.length > 0) {
2433        return assignedElements;
2434      }
2435    }
2436    if (isHTMLElement(container) && container.shadowRoot) {
2437      return Array.from(container.shadowRoot.children);
2438    }
2439    return Array.from(container.children);
2440  }
2441  function appendCandidates(container, list) {
2442    getComposedChildren(container).forEach((child) => {
2443      if (isFocusableCandidate(child)) {
2444        list.push(child);
2445      }
2446      appendCandidates(child, list);
2447    });
2448  }
2449  function appendMatchingElements(container, selector, list) {
2450    getComposedChildren(container).forEach((child) => {
2451      if (isHTMLElement(child) && child.matches(selector)) {
2452        list.push(child);
2453      }
2454      appendMatchingElements(child, selector, list);
2455    });
2456  }
2457  function focusable(container) {
2458    const candidates = [];
2459    appendCandidates(container, candidates);
2460    return candidates.filter(isFocusableElement);
2461  }
2462  function tabbable(container) {
2463    const candidates = focusable(container);
2464    return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
2465  }
2466  function getTabbableIn(container, dir) {
2467    const list = tabbable(container);
2468    const len = list.length;
2469    if (len === 0) {
2470      return void 0;
2471    }
2472    const active = activeElement(ownerDocument(container));
2473    const index2 = list.indexOf(active);
2474    const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir;
2475    return list[nextIndex];
2476  }
2477  function getNextTabbable(referenceElement) {
2478    return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
2479  }
2480  function getPreviousTabbable(referenceElement) {
2481    return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
2482  }
2483  function isOutsideEvent(event, container) {
2484    const containerElement = container || event.currentTarget;
2485    const relatedTarget = event.relatedTarget;
2486    return !relatedTarget || !contains(containerElement, relatedTarget);
2487  }
2488  function disableFocusInside(container) {
2489    const tabbableElements = tabbable(container);
2490    tabbableElements.forEach((element) => {
2491      element.dataset.tabindex = element.getAttribute("tabindex") || "";
2492      element.setAttribute("tabindex", "-1");
2493    });
2494  }
2495  function enableFocusInside(container) {
2496    const elements2 = [];
2497    appendMatchingElements(container, "[data-tabindex]", elements2);
2498    elements2.forEach((element) => {
2499      const tabindex = element.dataset.tabindex;
2500      delete element.dataset.tabindex;
2501      if (tabindex) {
2502        element.setAttribute("tabindex", tabindex);
2503      } else {
2504        element.removeAttribute("tabindex");
2505      }
2506    });
2507  }
2508  
2509  // node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs
2510  function getNodeChildren(nodes, id, onlyOpenChildren = true) {
2511    const directChildren = nodes.filter((node) => node.parentId === id);
2512    return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
2513  }
2514  
2515  // node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs
2516  function createAttribute(name2) {
2517    return `data-base-ui-$name2}`;
2518  }
2519  
2520  // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2521  var React13 = __toESM(require_react(), 1);
2522  var ReactDOM2 = __toESM(require_react_dom(), 1);
2523  
2524  // node_modules/@base-ui/react/internals/constants.mjs
2525  var DISABLED_TRANSITIONS_STYLE = {
2526    style: {
2527      transition: "none"
2528    }
2529  };
2530  var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
2531  var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
2532  var BASE_UI_SWIPE_IGNORE_SELECTOR = `[$BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
2533  var LEGACY_SWIPE_IGNORE_SELECTOR = `[$LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
2534  var POPUP_COLLISION_AVOIDANCE = {
2535    fallbackAxisSide: "end"
2536  };
2537  var ownerVisuallyHidden = {
2538    clipPath: "inset(50%)",
2539    position: "fixed",
2540    top: 0,
2541    left: 0
2542  };
2543  
2544  // node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs
2545  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
2546  var PortalContext = /* @__PURE__ */ React13.createContext(null);
2547  if (true) PortalContext.displayName = "PortalContext";
2548  var usePortalContext = () => React13.useContext(PortalContext);
2549  var attr = createAttribute("portal");
2550  function useFloatingPortalNode(props = {}) {
2551    const {
2552      ref,
2553      container: containerProp,
2554      componentProps = EMPTY_OBJECT,
2555      elementProps
2556    } = props;
2557    const uniqueId = useId();
2558    const portalContext = usePortalContext();
2559    const parentPortalNode = portalContext?.portalNode;
2560    const [containerElement, setContainerElement] = React13.useState(null);
2561    const [portalNode, setPortalNode] = React13.useState(null);
2562    const setPortalNodeRef = useStableCallback((node) => {
2563      if (node !== null) {
2564        setPortalNode(node);
2565      }
2566    });
2567    const containerRef = React13.useRef(null);
2568    useIsoLayoutEffect(() => {
2569      if (containerProp === null) {
2570        if (containerRef.current) {
2571          containerRef.current = null;
2572          setPortalNode(null);
2573          setContainerElement(null);
2574        }
2575        return;
2576      }
2577      const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;
2578      if (resolvedContainer == null) {
2579        if (containerRef.current) {
2580          containerRef.current = null;
2581          setPortalNode(null);
2582          setContainerElement(null);
2583        }
2584        return;
2585      }
2586      if (containerRef.current !== resolvedContainer) {
2587        containerRef.current = resolvedContainer;
2588        setPortalNode(null);
2589        setContainerElement(resolvedContainer);
2590      }
2591    }, [containerProp, parentPortalNode]);
2592    const portalElement = useRenderElement("div", componentProps, {
2593      ref: [ref, setPortalNodeRef],
2594      props: [{
2595        id: uniqueId,
2596        [attr]: ""
2597      }, elementProps]
2598    });
2599    const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null;
2600    return {
2601      node: portalNode,
2602      // `id` and `render` props can override or remove the generated ID. Use the exact
2603      // rendered value so `aria-owns` never points at an ID absent from the DOM.
2604      nodeId: /* @__PURE__ */ React13.isValidElement(portalElement) ? portalElement.props.id : void 0,
2605      subtree: portalSubtree
2606    };
2607  }
2608  var FloatingPortal = /* @__PURE__ */ React13.forwardRef(function FloatingPortal2(componentProps, forwardedRef) {
2609    const {
2610      render,
2611      className,
2612      style,
2613      children,
2614      container,
2615      portalOwnerRole,
2616      ...elementProps
2617    } = componentProps;
2618    const {
2619      node: portalNode,
2620      nodeId: portalNodeId,
2621      subtree: portalSubtree
2622    } = useFloatingPortalNode({
2623      container,
2624      ref: forwardedRef,
2625      componentProps,
2626      elementProps
2627    });
2628    const beforeOutsideRef = React13.useRef(null);
2629    const afterOutsideRef = React13.useRef(null);
2630    const beforeInsideRef = React13.useRef(null);
2631    const afterInsideRef = React13.useRef(null);
2632    const [focusManagerState, setFocusManagerState] = React13.useState(null);
2633    const focusInsideDisabledRef = React13.useRef(false);
2634    const modal = focusManagerState?.modal;
2635    const open2 = focusManagerState?.open;
2636    const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;
2637    React13.useEffect(() => {
2638      if (!portalNode || modal) {
2639        return void 0;
2640      }
2641      function onFocus(event) {
2642        if (portalNode && event.relatedTarget && isOutsideEvent(event)) {
2643          if (event.type === "focusin") {
2644            if (focusInsideDisabledRef.current) {
2645              enableFocusInside(portalNode);
2646              focusInsideDisabledRef.current = false;
2647            }
2648          } else {
2649            disableFocusInside(portalNode);
2650            focusInsideDisabledRef.current = true;
2651          }
2652        }
2653      }
2654      return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true));
2655    }, [portalNode, modal]);
2656    useIsoLayoutEffect(() => {
2657      if (!portalNode || open2 !== true || !focusInsideDisabledRef.current) {
2658        return;
2659      }
2660      enableFocusInside(portalNode);
2661      focusInsideDisabledRef.current = false;
2662    }, [open2, portalNode]);
2663    const portalContextValue = React13.useMemo(() => ({
2664      beforeOutsideRef,
2665      afterOutsideRef,
2666      beforeInsideRef,
2667      afterInsideRef,
2668      portalNode,
2669      setFocusManagerState
2670    }), [portalNode]);
2671    return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(React13.Fragment, {
2672      children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(PortalContext.Provider, {
2673        value: portalContextValue,
2674        children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2675          "data-type": "outside",
2676          ref: beforeOutsideRef,
2677          onFocus: (event) => {
2678            if (isOutsideEvent(event, portalNode)) {
2679              beforeInsideRef.current?.focus();
2680            } else {
2681              const domReference = focusManagerState ? focusManagerState.domReference : null;
2682              const prevTabbable = getPreviousTabbable(domReference);
2683              prevTabbable?.focus();
2684            }
2685          }
2686        }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", {
2687          role: portalOwnerRole,
2688          "aria-owns": portalNodeId,
2689          style: ownerVisuallyHidden
2690        }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FocusGuard, {
2691          "data-type": "outside",
2692          ref: afterOutsideRef,
2693          onFocus: (event) => {
2694            if (isOutsideEvent(event, portalNode)) {
2695              afterInsideRef.current?.focus();
2696            } else {
2697              const domReference = focusManagerState ? focusManagerState.domReference : null;
2698              const nextTabbable = getNextTabbable(domReference);
2699              nextTabbable?.focus();
2700              if (focusManagerState?.closeOnFocusOut) {
2701                focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent));
2702              }
2703            }
2704          }
2705        })]
2706      })]
2707    });
2708  });
2709  if (true) FloatingPortal.displayName = "FloatingPortal";
2710  
2711  // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2712  var React14 = __toESM(require_react(), 1);
2713  
2714  // node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs
2715  function createEventEmitter() {
2716    const map = /* @__PURE__ */ new Map();
2717    return {
2718      emit(event, data) {
2719        map.get(event)?.forEach((listener) => listener(data));
2720      },
2721      on(event, listener) {
2722        if (!map.has(event)) {
2723          map.set(event, /* @__PURE__ */ new Set());
2724        }
2725        map.get(event).add(listener);
2726      },
2727      off(event, listener) {
2728        map.get(event)?.delete(listener);
2729      }
2730    };
2731  }
2732  
2733  // node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs
2734  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
2735  var FloatingNodeContext = /* @__PURE__ */ React14.createContext(null);
2736  if (true) FloatingNodeContext.displayName = "FloatingNodeContext";
2737  var FloatingTreeContext = /* @__PURE__ */ React14.createContext(null);
2738  if (true) FloatingTreeContext.displayName = "FloatingTreeContext";
2739  var useFloatingParentNodeId = () => React14.useContext(FloatingNodeContext)?.id || null;
2740  var useFloatingTree = (externalTree) => {
2741    const contextTree = React14.useContext(FloatingTreeContext);
2742    return externalTree ?? contextTree;
2743  };
2744  
2745  // node_modules/@base-ui/react/floating-ui-react/hooks/useClientPoint.mjs
2746  var React15 = __toESM(require_react(), 1);
2747  function createVirtualElement(domElement, data) {
2748    let offsetX = null;
2749    let offsetY = null;
2750    let isAutoUpdateEvent = false;
2751    return {
2752      contextElement: domElement || void 0,
2753      getBoundingClientRect() {
2754        const domRect = domElement?.getBoundingClientRect() || {
2755          width: 0,
2756          height: 0,
2757          x: 0,
2758          y: 0
2759        };
2760        const isXAxis = data.axis === "x" || data.axis === "both";
2761        const isYAxis = data.axis === "y" || data.axis === "both";
2762        const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch";
2763        let width = domRect.width;
2764        let height = domRect.height;
2765        let x2 = domRect.x;
2766        let y2 = domRect.y;
2767        if (offsetX == null && data.x && isXAxis) {
2768          offsetX = domRect.x - data.x;
2769        }
2770        if (offsetY == null && data.y && isYAxis) {
2771          offsetY = domRect.y - data.y;
2772        }
2773        x2 -= offsetX || 0;
2774        y2 -= offsetY || 0;
2775        width = 0;
2776        height = 0;
2777        if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {
2778          width = data.axis === "y" ? domRect.width : 0;
2779          height = data.axis === "x" ? domRect.height : 0;
2780          x2 = isXAxis && data.x != null ? data.x : x2;
2781          y2 = isYAxis && data.y != null ? data.y : y2;
2782        } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {
2783          height = data.axis === "x" ? domRect.height : height;
2784          width = data.axis === "y" ? domRect.width : width;
2785        }
2786        isAutoUpdateEvent = true;
2787        return {
2788          width,
2789          height,
2790          x: x2,
2791          y: y2,
2792          top: y2,
2793          right: x2 + width,
2794          bottom: y2 + height,
2795          left: x2
2796        };
2797      }
2798    };
2799  }
2800  function isMouseBasedEvent(event) {
2801    return event != null && event.clientX != null;
2802  }
2803  function useClientPoint(context, props = {}) {
2804    const {
2805      enabled = true,
2806      axis = "both"
2807    } = props;
2808    const store = "rootStore" in context ? context.rootStore : context;
2809    const open2 = store.useState("open");
2810    const floating = store.useState("floatingElement");
2811    const domReference = store.useState("domReferenceElement");
2812    const dataRef = store.context.dataRef;
2813    const initialRef = React15.useRef(false);
2814    const cleanupListenerRef = React15.useRef(null);
2815    const [pointerType, setPointerType] = React15.useState();
2816    const [reactive, setReactive] = React15.useState([]);
2817    const resetReference = useStableCallback((reference2) => {
2818      store.set("positionReference", reference2);
2819    });
2820    const setReference = useStableCallback((newX, newY, referenceElement) => {
2821      if (initialRef.current) {
2822        return;
2823      }
2824      if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {
2825        return;
2826      }
2827      store.set("positionReference", createVirtualElement(referenceElement ?? domReference, {
2828        x: newX,
2829        y: newY,
2830        axis,
2831        dataRef,
2832        pointerType
2833      }));
2834    });
2835    const handleReferenceEnterOrMove = useStableCallback((event) => {
2836      if (!open2) {
2837        setReference(event.clientX, event.clientY, event.currentTarget);
2838      } else if (!cleanupListenerRef.current) {
2839        setReference(event.clientX, event.clientY, event.currentTarget);
2840        setReactive([]);
2841      }
2842    });
2843    const openCheck = isMouseLikePointerType(pointerType) ? floating : open2;
2844    React15.useEffect(() => {
2845      if (!enabled) {
2846        resetReference(domReference);
2847        return void 0;
2848      }
2849      if (!openCheck) {
2850        return void 0;
2851      }
2852      function cleanupListener() {
2853        cleanupListenerRef.current?.();
2854        cleanupListenerRef.current = null;
2855      }
2856      const win = getWindow(floating);
2857      function handleMouseMove(event) {
2858        const target = getTarget(event);
2859        if (!contains(floating, target)) {
2860          setReference(event.clientX, event.clientY);
2861        } else {
2862          cleanupListener();
2863        }
2864      }
2865      if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {
2866        cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove);
2867      } else {
2868        resetReference(domReference);
2869      }
2870      return cleanupListener;
2871    }, [openCheck, enabled, floating, dataRef, domReference, store, setReference, resetReference, reactive]);
2872    React15.useEffect(() => () => {
2873      store.set("positionReference", null);
2874    }, [store]);
2875    React15.useEffect(() => {
2876      if (enabled && !floating) {
2877        initialRef.current = false;
2878      }
2879    }, [enabled, floating]);
2880    React15.useEffect(() => {
2881      if (!enabled && open2) {
2882        initialRef.current = true;
2883      }
2884    }, [enabled, open2]);
2885    const reference = React15.useMemo(() => {
2886      function setPointerTypeRef(event) {
2887        setPointerType(event.pointerType);
2888      }
2889      return {
2890        onPointerDown: setPointerTypeRef,
2891        onPointerEnter: setPointerTypeRef,
2892        onMouseMove: handleReferenceEnterOrMove,
2893        onMouseEnter: handleReferenceEnterOrMove
2894      };
2895    }, [handleReferenceEnterOrMove]);
2896    return React15.useMemo(() => enabled ? {
2897      reference,
2898      trigger: reference
2899    } : {}, [enabled, reference]);
2900  }
2901  
2902  // node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs
2903  var React16 = __toESM(require_react(), 1);
2904  function alwaysFalse() {
2905    return false;
2906  }
2907  function normalizeProp(normalizable) {
2908    return {
2909      escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false,
2910      outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true
2911    };
2912  }
2913  function useDismiss(context, props = {}) {
2914    const {
2915      enabled = true,
2916      escapeKey: escapeKey2 = true,
2917      outsidePress: outsidePressProp = true,
2918      outsidePressEvent = "sloppy",
2919      referencePress = alwaysFalse,
2920      bubbles,
2921      externalTree
2922    } = props;
2923    const store = "rootStore" in context ? context.rootStore : context;
2924    const open2 = store.useState("open");
2925    const floatingElement = store.useState("floatingElement");
2926    const {
2927      dataRef,
2928      events
2929    } = store.context;
2930    const tree = useFloatingTree(externalTree);
2931    const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false);
2932    const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp;
2933    const outsidePressEnabled = outsidePress2 !== false;
2934    const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent);
2935    const {
2936      escapeKey: escapeKeyBubbles,
2937      outsidePress: outsidePressBubbles
2938    } = normalizeProp(bubbles);
2939    const pressStartedInsideRef = React16.useRef(false);
2940    const pressStartPreventedRef = React16.useRef(false);
2941    const suppressNextOutsideClickRef = React16.useRef(false);
2942    const sawPressWhileOpenRef = React16.useRef(false);
2943    const isComposingRef = React16.useRef(false);
2944    const currentPointerTypeRef = React16.useRef("");
2945    const touchStateRef = React16.useRef(null);
2946    const cancelDismissOnEndTimeout = useTimeout();
2947    const clearInsideReactTreeTimeout = useTimeout();
2948    const clearInsideReactTree = useStableCallback(() => {
2949      clearInsideReactTreeTimeout.clear();
2950      dataRef.current.insideReactTree = false;
2951    });
2952    const hasBlockingChild = useStableCallback((bubbleKey) => {
2953      const nodeId = dataRef.current.floatingContext?.nodeId;
2954      const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];
2955      return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]);
2956    });
2957    const isEventWithinOwnElements = useStableCallback((event) => {
2958      return isEventTargetWithin(event, store.select("floatingElement")) || isEventTargetWithin(event, store.select("domReferenceElement"));
2959    });
2960    const closeOnReferencePress = useStableCallback((event) => {
2961      if (!referencePress()) {
2962        return;
2963      }
2964      store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent));
2965    });
2966    const closeOnEscapeKeyDown = useStableCallback((event) => {
2967      if (!open2 || !enabled || !escapeKey2 || event.key !== "Escape") {
2968        return;
2969      }
2970      if (isComposingRef.current) {
2971        return;
2972      }
2973      if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) {
2974        return;
2975      }
2976      const native = isReactEvent(event) ? event.nativeEvent : event;
2977      const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native);
2978      store.setOpen(false, eventDetails);
2979      if (!eventDetails.isCanceled) {
2980        event.preventDefault();
2981      }
2982      if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {
2983        event.stopPropagation();
2984      }
2985    });
2986    const markInsideReactTree = useStableCallback(() => {
2987      dataRef.current.insideReactTree = true;
2988      clearInsideReactTreeTimeout.start(0, clearInsideReactTree);
2989    });
2990    const markPressStartedInsideReactTree = useStableCallback((event) => {
2991      if (!open2 || !enabled || event.button !== 0) {
2992        return;
2993      }
2994      const target = getTarget(event.nativeEvent);
2995      if (!contains(store.select("floatingElement"), target)) {
2996        return;
2997      }
2998      if (!pressStartedInsideRef.current) {
2999        pressStartedInsideRef.current = true;
3000        pressStartPreventedRef.current = false;
3001      }
3002    });
3003    const markInsidePressStartPrevented = useStableCallback((event) => {
3004      if (!open2 || !enabled) {
3005        return;
3006      }
3007      if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) {
3008        return;
3009      }
3010      if (pressStartedInsideRef.current) {
3011        pressStartPreventedRef.current = true;
3012      }
3013    });
3014    React16.useEffect(() => {
3015      function handleOpenChange(details) {
3016        if (!details.open) {
3017          sawPressWhileOpenRef.current = false;
3018        }
3019      }
3020      events.on("openchange", handleOpenChange);
3021      return () => {
3022        events.off("openchange", handleOpenChange);
3023      };
3024    }, [events]);
3025    React16.useEffect(() => {
3026      if (!open2 || !enabled) {
3027        if (!open2) {
3028          sawPressWhileOpenRef.current = false;
3029        }
3030        return clearInsideReactTree;
3031      }
3032      dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;
3033      dataRef.current.__outsidePressBubbles = outsidePressBubbles;
3034      const compositionTimeout = new Timeout();
3035      const preventedPressSuppressionTimeout = new Timeout();
3036      const doc = ownerDocument(floatingElement);
3037      function handleCompositionStart() {
3038        compositionTimeout.clear();
3039        isComposingRef.current = true;
3040      }
3041      function handleCompositionEnd() {
3042        compositionTimeout.start(
3043          // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
3044          // Only apply to WebKit for the test to remain 0ms.
3045          parts_exports.engine.webkit ? 5 : 0,
3046          () => {
3047            isComposingRef.current = false;
3048          }
3049        );
3050      }
3051      function suppressImmediateOutsideClickAfterPreventedStart() {
3052        suppressNextOutsideClickRef.current = true;
3053        preventedPressSuppressionTimeout.start(0, () => {
3054          suppressNextOutsideClickRef.current = false;
3055        });
3056      }
3057      function resetPressStartState() {
3058        pressStartedInsideRef.current = false;
3059        pressStartPreventedRef.current = false;
3060      }
3061      function getOutsidePressEvent() {
3062        const type = currentPointerTypeRef.current;
3063        const computedType = type === "pen" || !type ? "mouse" : type;
3064        const outsidePressEventValue = getOutsidePressEventProp();
3065        const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue;
3066        if (typeof resolved === "string") {
3067          return resolved;
3068        }
3069        return resolved[computedType];
3070      }
3071      function shouldIgnoreEvent(event) {
3072        const computedOutsidePressEvent = getOutsidePressEvent();
3073        return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click";
3074      }
3075      function isEventWithinFloatingTree(event) {
3076        const nodeId = dataRef.current.floatingContext?.nodeId;
3077        const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating));
3078        return isEventWithinOwnElements(event) || targetIsInsideChildren;
3079      }
3080      function closeOnPressOutside(event) {
3081        if (shouldIgnoreEvent(event)) {
3082          if (event.type !== "click" && !isEventWithinOwnElements(event)) {
3083            preventedPressSuppressionTimeout.clear();
3084            suppressNextOutsideClickRef.current = false;
3085          }
3086          clearInsideReactTree();
3087          return;
3088        }
3089        if (dataRef.current.insideReactTree) {
3090          clearInsideReactTree();
3091          return;
3092        }
3093        const target = getTarget(event);
3094        const inertSelector = `[$createAttribute("inert")}]`;
3095        const targetRoot = isElement(target) ? target.getRootNode() : null;
3096        const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store.select("floatingElement"))).querySelectorAll(inertSelector));
3097        const triggers = store.context.triggerElements;
3098        if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) {
3099          return;
3100        }
3101        let targetRootAncestor = isElement(target) ? target : null;
3102        while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {
3103          const nextParent = getParentNode(targetRootAncestor);
3104          if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {
3105            break;
3106          }
3107          targetRootAncestor = nextParent;
3108        }
3109        if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
3110        !contains(target, store.select("floatingElement")) && // If the target root element contains none of the markers, then the
3111        // element was injected after the floating element rendered.
3112        markers.every((marker) => !contains(targetRootAncestor, marker))) {
3113          return;
3114        }
3115        if (isHTMLElement(target) && !("touches" in event)) {
3116          const lastTraversableNode = isLastTraversableNode(target);
3117          const style = getComputedStyle2(target);
3118          const scrollRe = /auto|scroll/;
3119          const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);
3120          const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);
3121          const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;
3122          const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;
3123          const isRTL12 = style.direction === "rtl";
3124          const pressedVerticalScrollbar = canScrollY && (isRTL12 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);
3125          const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;
3126          if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {
3127            return;
3128          }
3129        }
3130        if (isEventWithinFloatingTree(event)) {
3131          return;
3132        }
3133        if (getOutsidePressEvent() === "intentional") {
3134          if (event.detail !== 0 && !isVirtualClick(event) && !sawPressWhileOpenRef.current) {
3135            return;
3136          }
3137          if (suppressNextOutsideClickRef.current) {
3138            preventedPressSuppressionTimeout.clear();
3139            suppressNextOutsideClickRef.current = false;
3140            return;
3141          }
3142        }
3143        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3144          return;
3145        }
3146        if (hasBlockingChild("__outsidePressBubbles")) {
3147          return;
3148        }
3149        store.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event));
3150        clearInsideReactTree();
3151      }
3152      function handlePointerDown(event) {
3153        if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store.select("open") || !enabled || isEventWithinOwnElements(event)) {
3154          return;
3155        }
3156        closeOnPressOutside(event);
3157      }
3158      function handleTouchStart(event) {
3159        if (getOutsidePressEvent() !== "sloppy" || !store.select("open") || !enabled || isEventWithinOwnElements(event)) {
3160          return;
3161        }
3162        const touch = event.touches[0];
3163        if (touch) {
3164          touchStateRef.current = {
3165            startTime: Date.now(),
3166            startX: touch.clientX,
3167            startY: touch.clientY,
3168            dismissOnTouchEnd: false,
3169            dismissOnMouseDown: true
3170          };
3171          cancelDismissOnEndTimeout.start(1e3, () => {
3172            if (touchStateRef.current) {
3173              touchStateRef.current.dismissOnTouchEnd = false;
3174              touchStateRef.current.dismissOnMouseDown = false;
3175            }
3176          });
3177        }
3178      }
3179      function addTargetEventListenerOnce(event, listener) {
3180        const target = getTarget(event);
3181        if (!target) {
3182          return;
3183        }
3184        const unsubscribe2 = addEventListener(target, event.type, () => {
3185          listener(event);
3186          unsubscribe2();
3187        });
3188      }
3189      function handleTouchStartCapture(event) {
3190        currentPointerTypeRef.current = "touch";
3191        addTargetEventListenerOnce(event, handleTouchStart);
3192      }
3193      function closeOnPressOutsideCapture(event) {
3194        cancelDismissOnEndTimeout.clear();
3195        if (event.type === "pointerdown") {
3196          if (event.button === 0) {
3197            sawPressWhileOpenRef.current = true;
3198          }
3199          currentPointerTypeRef.current = event.pointerType;
3200        }
3201        if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {
3202          return;
3203        }
3204        addTargetEventListenerOnce(event, (targetEvent) => {
3205          if (targetEvent.type === "pointerdown") {
3206            handlePointerDown(targetEvent);
3207          } else {
3208            closeOnPressOutside(targetEvent);
3209          }
3210        });
3211      }
3212      function handlePressEndCapture(event) {
3213        if (event.type === "pointercancel") {
3214          sawPressWhileOpenRef.current = false;
3215        }
3216        if (!pressStartedInsideRef.current) {
3217          return;
3218        }
3219        const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current;
3220        resetPressStartState();
3221        if (getOutsidePressEvent() !== "intentional") {
3222          return;
3223        }
3224        if (event.type === "pointercancel") {
3225          if (pressStartedInsideDefaultPrevented) {
3226            suppressImmediateOutsideClickAfterPreventedStart();
3227          }
3228          return;
3229        }
3230        if (isEventWithinFloatingTree(event)) {
3231          return;
3232        }
3233        if (pressStartedInsideDefaultPrevented) {
3234          suppressImmediateOutsideClickAfterPreventedStart();
3235          return;
3236        }
3237        if (typeof outsidePress2 === "function" && !outsidePress2(event)) {
3238          return;
3239        }
3240        preventedPressSuppressionTimeout.clear();
3241        suppressNextOutsideClickRef.current = true;
3242        clearInsideReactTree();
3243      }
3244      function handleTouchMove(event) {
3245        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3246          return;
3247        }
3248        const touch = event.touches[0];
3249        if (!touch) {
3250          return;
3251        }
3252        const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);
3253        const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);
3254        const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
3255        if (distance > 5) {
3256          touchStateRef.current.dismissOnTouchEnd = true;
3257        }
3258        if (distance > 10) {
3259          closeOnPressOutside(event);
3260          cancelDismissOnEndTimeout.clear();
3261          touchStateRef.current = null;
3262        }
3263      }
3264      function handleTouchMoveCapture(event) {
3265        addTargetEventListenerOnce(event, handleTouchMove);
3266      }
3267      function handleTouchEnd(event) {
3268        if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) {
3269          return;
3270        }
3271        if (touchStateRef.current.dismissOnTouchEnd) {
3272          closeOnPressOutside(event);
3273        }
3274        cancelDismissOnEndTimeout.clear();
3275        touchStateRef.current = null;
3276      }
3277      function handleTouchEndCapture(event) {
3278        addTargetEventListenerOnce(event, handleTouchEnd);
3279      }
3280      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, {
3281        capture: true,
3282        passive: true
3283      }), addEventListener(doc, "touchmove", handleTouchMoveCapture, {
3284        capture: true,
3285        passive: true
3286      }), addEventListener(doc, "touchend", handleTouchEndCapture, {
3287        capture: true,
3288        passive: true
3289      })));
3290      return () => {
3291        unsubscribe();
3292        compositionTimeout.clear();
3293        preventedPressSuppressionTimeout.clear();
3294        resetPressStartState();
3295        suppressNextOutsideClickRef.current = false;
3296        clearInsideReactTree();
3297      };
3298    }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open2, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store, cancelDismissOnEndTimeout]);
3299    const reference = React16.useMemo(() => ({
3300      onKeyDown: closeOnEscapeKeyDown,
3301      onPointerDown: closeOnReferencePress,
3302      onClick: closeOnReferencePress
3303    }), [closeOnEscapeKeyDown, closeOnReferencePress]);
3304    const floating = React16.useMemo(() => ({
3305      onKeyDown: closeOnEscapeKeyDown,
3306      // `onMouseDown` may be blocked if `event.preventDefault()` is called in
3307      // `onPointerDown`, such as with <NumberField.ScrubArea>.
3308      // See https://github.com/mui/base-ui/pull/3379
3309      onPointerDown: markInsidePressStartPrevented,
3310      onMouseDown: markInsidePressStartPrevented,
3311      onClickCapture: markInsideReactTree,
3312      onMouseDownCapture(event) {
3313        markInsideReactTree();
3314        markPressStartedInsideReactTree(event);
3315      },
3316      onPointerDownCapture(event) {
3317        markInsideReactTree();
3318        markPressStartedInsideReactTree(event);
3319      },
3320      onMouseUpCapture: markInsideReactTree,
3321      onTouchEndCapture: markInsideReactTree,
3322      onTouchMoveCapture: markInsideReactTree
3323    }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]);
3324    return React16.useMemo(() => enabled ? {
3325      reference,
3326      floating,
3327      trigger: reference
3328    } : {}, [enabled, reference, floating]);
3329  }
3330  
3331  // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
3332  var React24 = __toESM(require_react(), 1);
3333  
3334  // node_modules/@floating-ui/core/dist/floating-ui.core.mjs
3335  function computeCoordsFromPlacement(_ref, placement, rtl) {
3336    let {
3337      reference,
3338      floating
3339    } = _ref;
3340    const sideAxis = getSideAxis(placement);
3341    const alignmentAxis = getAlignmentAxis(placement);
3342    const alignLength = getAxisLength(alignmentAxis);
3343    const side = getSide(placement);
3344    const isVertical = sideAxis === "y";
3345    const commonX = reference.x + reference.width / 2 - floating.width / 2;
3346    const commonY = reference.y + reference.height / 2 - floating.height / 2;
3347    const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
3348    let coords;
3349    switch (side) {
3350      case "top":
3351        coords = {
3352          x: commonX,
3353          y: reference.y - floating.height
3354        };
3355        break;
3356      case "bottom":
3357        coords = {
3358          x: commonX,
3359          y: reference.y + reference.height
3360        };
3361        break;
3362      case "right":
3363        coords = {
3364          x: reference.x + reference.width,
3365          y: commonY
3366        };
3367        break;
3368      case "left":
3369        coords = {
3370          x: reference.x - floating.width,
3371          y: commonY
3372        };
3373        break;
3374      default:
3375        coords = {
3376          x: reference.x,
3377          y: reference.y
3378        };
3379    }
3380    const alignment = getAlignment(placement);
3381    if (alignment) {
3382      coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1);
3383    }
3384    return coords;
3385  }
3386  async function detectOverflow(state, options) {
3387    var _await$platform$isEle;
3388    if (options === void 0) {
3389      options = {};
3390    }
3391    const {
3392      x: x2,
3393      y: y2,
3394      platform: platform3,
3395      rects,
3396      elements: elements2,
3397      strategy
3398    } = state;
3399    const {
3400      boundary = "clippingAncestors",
3401      rootBoundary = "viewport",
3402      elementContext = "floating",
3403      altBoundary = false,
3404      padding = 0
3405    } = evaluate(options, state);
3406    const paddingObject = getPaddingObject(padding);
3407    const altContext = elementContext === "floating" ? "reference" : "floating";
3408    const element = elements2[altBoundary ? altContext : elementContext];
3409    const clippingClientRect = rectToClientRect(await platform3.getClippingRect({
3410      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(elements2.floating)),
3411      boundary,
3412      rootBoundary,
3413      strategy
3414    }));
3415    const rect = elementContext === "floating" ? {
3416      x: x2,
3417      y: y2,
3418      width: rects.floating.width,
3419      height: rects.floating.height
3420    } : rects.reference;
3421    const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements2.floating));
3422    const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) && await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || {
3423      x: 1,
3424      y: 1
3425    };
3426    const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({
3427      elements: elements2,
3428      rect,
3429      offsetParent,
3430      strategy
3431    }) : rect);
3432    return {
3433      top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
3434      bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
3435      left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
3436      right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
3437    };
3438  }
3439  var MAX_RESET_COUNT = 50;
3440  var computePosition = async (reference, floating, config) => {
3441    const {
3442      placement = "bottom",
3443      strategy = "absolute",
3444      middleware = [],
3445      platform: platform3
3446    } = config;
3447    const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : {
3448      ...platform3,
3449      detectOverflow
3450    };
3451    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating));
3452    let rects = await platform3.getElementRects({
3453      reference,
3454      floating,
3455      strategy
3456    });
3457    let {
3458      x: x2,
3459      y: y2
3460    } = computeCoordsFromPlacement(rects, placement, rtl);
3461    let statefulPlacement = placement;
3462    let resetCount = 0;
3463    const middlewareData = {};
3464    for (let i = 0; i < middleware.length; i++) {
3465      const currentMiddleware = middleware[i];
3466      if (!currentMiddleware) {
3467        continue;
3468      }
3469      const {
3470        name: name2,
3471        fn
3472      } = currentMiddleware;
3473      const {
3474        x: nextX,
3475        y: nextY,
3476        data,
3477        reset
3478      } = await fn({
3479        x: x2,
3480        y: y2,
3481        initialPlacement: placement,
3482        placement: statefulPlacement,
3483        strategy,
3484        middlewareData,
3485        rects,
3486        platform: platformWithDetectOverflow,
3487        elements: {
3488          reference,
3489          floating
3490        }
3491      });
3492      x2 = nextX != null ? nextX : x2;
3493      y2 = nextY != null ? nextY : y2;
3494      middlewareData[name2] = {
3495        ...middlewareData[name2],
3496        ...data
3497      };
3498      if (reset && resetCount < MAX_RESET_COUNT) {
3499        resetCount++;
3500        if (typeof reset === "object") {
3501          if (reset.placement) {
3502            statefulPlacement = reset.placement;
3503          }
3504          if (reset.rects) {
3505            rects = reset.rects === true ? await platform3.getElementRects({
3506              reference,
3507              floating,
3508              strategy
3509            }) : reset.rects;
3510          }
3511          ({
3512            x: x2,
3513            y: y2
3514          } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
3515        }
3516        i = -1;
3517      }
3518    }
3519    return {
3520      x: x2,
3521      y: y2,
3522      placement: statefulPlacement,
3523      strategy,
3524      middlewareData
3525    };
3526  };
3527  var flip = function(options) {
3528    if (options === void 0) {
3529      options = {};
3530    }
3531    return {
3532      name: "flip",
3533      options,
3534      async fn(state) {
3535        var _middlewareData$arrow, _middlewareData$flip;
3536        const {
3537          placement,
3538          middlewareData,
3539          rects,
3540          initialPlacement,
3541          platform: platform3,
3542          elements: elements2
3543        } = state;
3544        const {
3545          mainAxis: checkMainAxis = true,
3546          crossAxis: checkCrossAxis = true,
3547          fallbackPlacements: specifiedFallbackPlacements,
3548          fallbackStrategy = "bestFit",
3549          fallbackAxisSideDirection = "none",
3550          flipAlignment = true,
3551          ...detectOverflowOptions
3552        } = evaluate(options, state);
3553        if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3554          return {};
3555        }
3556        const side = getSide(placement);
3557        const initialSideAxis = getSideAxis(initialPlacement);
3558        const isBasePlacement = getSide(initialPlacement) === initialPlacement;
3559        const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements2.floating));
3560        const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
3561        const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
3562        if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
3563          fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
3564        }
3565        const placements2 = [initialPlacement, ...fallbackPlacements];
3566        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3567        const overflows = [];
3568        let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
3569        if (checkMainAxis) {
3570          overflows.push(overflow[side]);
3571        }
3572        if (checkCrossAxis) {
3573          const sides2 = getAlignmentSides(placement, rects, rtl);
3574          overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
3575        }
3576        overflowsData = [...overflowsData, {
3577          placement,
3578          overflows
3579        }];
3580        if (!overflows.every((side2) => side2 <= 0)) {
3581          var _middlewareData$flip2, _overflowsData$filter;
3582          const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
3583          const nextPlacement = placements2[nextIndex];
3584          if (nextPlacement) {
3585            const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
3586            if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
3587            // overflows the main axis.
3588            overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
3589              return {
3590                data: {
3591                  index: nextIndex,
3592                  overflows: overflowsData
3593                },
3594                reset: {
3595                  placement: nextPlacement
3596                }
3597              };
3598            }
3599          }
3600          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;
3601          if (!resetPlacement) {
3602            switch (fallbackStrategy) {
3603              case "bestFit": {
3604                var _overflowsData$filter2;
3605                const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
3606                  if (hasFallbackAxisSideDirection) {
3607                    const currentSideAxis = getSideAxis(d.placement);
3608                    return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
3609                    // reading directions favoring greater width.
3610                    currentSideAxis === "y";
3611                  }
3612                  return true;
3613                }).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];
3614                if (placement2) {
3615                  resetPlacement = placement2;
3616                }
3617                break;
3618              }
3619              case "initialPlacement":
3620                resetPlacement = initialPlacement;
3621                break;
3622            }
3623          }
3624          if (placement !== resetPlacement) {
3625            return {
3626              reset: {
3627                placement: resetPlacement
3628              }
3629            };
3630          }
3631        }
3632        return {};
3633      }
3634    };
3635  };
3636  var originSides = /* @__PURE__ */ new Set(["left", "top"]);
3637  async function convertValueToCoords(state, options) {
3638    const {
3639      placement,
3640      platform: platform3,
3641      elements: elements2
3642    } = state;
3643    const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements2.floating));
3644    const side = getSide(placement);
3645    const alignment = getAlignment(placement);
3646    const isVertical = getSideAxis(placement) === "y";
3647    const mainAxisMulti = originSides.has(side) ? -1 : 1;
3648    const crossAxisMulti = rtl && isVertical ? -1 : 1;
3649    const rawValue = evaluate(options, state);
3650    let {
3651      mainAxis,
3652      crossAxis,
3653      alignmentAxis
3654    } = typeof rawValue === "number" ? {
3655      mainAxis: rawValue,
3656      crossAxis: 0,
3657      alignmentAxis: null
3658    } : {
3659      mainAxis: rawValue.mainAxis || 0,
3660      crossAxis: rawValue.crossAxis || 0,
3661      alignmentAxis: rawValue.alignmentAxis
3662    };
3663    if (alignment && typeof alignmentAxis === "number") {
3664      crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
3665    }
3666    return isVertical ? {
3667      x: crossAxis * crossAxisMulti,
3668      y: mainAxis * mainAxisMulti
3669    } : {
3670      x: mainAxis * mainAxisMulti,
3671      y: crossAxis * crossAxisMulti
3672    };
3673  }
3674  var offset = function(options) {
3675    if (options === void 0) {
3676      options = 0;
3677    }
3678    return {
3679      name: "offset",
3680      options,
3681      async fn(state) {
3682        var _middlewareData$offse, _middlewareData$arrow;
3683        const {
3684          x: x2,
3685          y: y2,
3686          placement,
3687          middlewareData
3688        } = state;
3689        const diffCoords = await convertValueToCoords(state, options);
3690        if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3691          return {};
3692        }
3693        return {
3694          x: x2 + diffCoords.x,
3695          y: y2 + diffCoords.y,
3696          data: {
3697            ...diffCoords,
3698            placement
3699          }
3700        };
3701      }
3702    };
3703  };
3704  var shift = function(options) {
3705    if (options === void 0) {
3706      options = {};
3707    }
3708    return {
3709      name: "shift",
3710      options,
3711      async fn(state) {
3712        const {
3713          x: x2,
3714          y: y2,
3715          placement,
3716          platform: platform3
3717        } = state;
3718        const {
3719          mainAxis: checkMainAxis = true,
3720          crossAxis: checkCrossAxis = false,
3721          limiter = {
3722            fn: (_ref) => {
3723              let {
3724                x: x3,
3725                y: y3
3726              } = _ref;
3727              return {
3728                x: x3,
3729                y: y3
3730              };
3731            }
3732          },
3733          ...detectOverflowOptions
3734        } = evaluate(options, state);
3735        const coords = {
3736          x: x2,
3737          y: y2
3738        };
3739        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3740        const crossAxis = getSideAxis(placement);
3741        const mainAxis = getOppositeAxis(crossAxis);
3742        let mainAxisCoord = coords[mainAxis];
3743        let crossAxisCoord = coords[crossAxis];
3744        const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]);
3745        if (checkMainAxis) {
3746          mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
3747        }
3748        if (checkCrossAxis) {
3749          crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
3750        }
3751        const limitedCoords = limiter.fn({
3752          ...state,
3753          [mainAxis]: mainAxisCoord,
3754          [crossAxis]: crossAxisCoord
3755        });
3756        return {
3757          ...limitedCoords,
3758          data: {
3759            x: limitedCoords.x - x2,
3760            y: limitedCoords.y - y2,
3761            enabled: {
3762              [mainAxis]: checkMainAxis,
3763              [crossAxis]: checkCrossAxis
3764            }
3765          }
3766        };
3767      }
3768    };
3769  };
3770  var limitShift = function(options) {
3771    if (options === void 0) {
3772      options = {};
3773    }
3774    return {
3775      options,
3776      fn(state) {
3777        var _rawOffset$mainAxis, _rawOffset$crossAxis;
3778        const {
3779          x: x2,
3780          y: y2,
3781          placement,
3782          rects,
3783          middlewareData
3784        } = state;
3785        const {
3786          offset: offset4 = 0,
3787          mainAxis: checkMainAxis = true,
3788          crossAxis: checkCrossAxis = true
3789        } = evaluate(options, state);
3790        const coords = {
3791          x: x2,
3792          y: y2
3793        };
3794        const crossAxis = getSideAxis(placement);
3795        const mainAxis = getOppositeAxis(crossAxis);
3796        let mainAxisCoord = coords[mainAxis];
3797        let crossAxisCoord = coords[crossAxis];
3798        const rawOffset = evaluate(offset4, state);
3799        const computedOffset = typeof rawOffset === "number" ? {
3800          mainAxis: rawOffset,
3801          crossAxis: 0
3802        } : {
3803          mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,
3804          crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0
3805        };
3806        if (checkMainAxis) {
3807          const len = mainAxis === "y" ? "height" : "width";
3808          const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
3809          const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
3810          if (mainAxisCoord < limitMin) {
3811            mainAxisCoord = limitMin;
3812          } else if (mainAxisCoord > limitMax) {
3813            mainAxisCoord = limitMax;
3814          }
3815        }
3816        if (checkCrossAxis) {
3817          var _middlewareData$offse, _middlewareData$offse2;
3818          const len = mainAxis === "y" ? "width" : "height";
3819          const isOriginSide = originSides.has(getSide(placement));
3820          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);
3821          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);
3822          if (crossAxisCoord < limitMin) {
3823            crossAxisCoord = limitMin;
3824          } else if (crossAxisCoord > limitMax) {
3825            crossAxisCoord = limitMax;
3826          }
3827        }
3828        return {
3829          [mainAxis]: mainAxisCoord,
3830          [crossAxis]: crossAxisCoord
3831        };
3832      }
3833    };
3834  };
3835  var size = function(options) {
3836    if (options === void 0) {
3837      options = {};
3838    }
3839    return {
3840      name: "size",
3841      options,
3842      async fn(state) {
3843        const {
3844          placement,
3845          rects,
3846          platform: platform3,
3847          elements: elements2
3848        } = state;
3849        const {
3850          apply = () => {
3851          },
3852          ...detectOverflowOptions
3853        } = evaluate(options, state);
3854        const overflow = await platform3.detectOverflow(state, detectOverflowOptions);
3855        const side = getSide(placement);
3856        const alignment = getAlignment(placement);
3857        const isYAxis = getSideAxis(placement) === "y";
3858        const {
3859          width,
3860          height
3861        } = rects.floating;
3862        let heightSide;
3863        let widthSide;
3864        if (side === "top" || side === "bottom") {
3865          heightSide = side;
3866          widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements2.floating)) ? "start" : "end") ? "left" : "right";
3867        } else {
3868          widthSide = side;
3869          heightSide = alignment === "end" ? "top" : "bottom";
3870        }
3871        const maximumClippingHeight = height - overflow.top - overflow.bottom;
3872        const maximumClippingWidth = width - overflow.left - overflow.right;
3873        const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
3874        const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
3875        const shiftData = state.middlewareData.shift;
3876        const noShift = !shiftData;
3877        let availableHeight2 = overflowAvailableHeight;
3878        let availableWidth2 = overflowAvailableWidth;
3879        if (shiftData != null && shiftData.enabled.x) {
3880          availableWidth2 = maximumClippingWidth;
3881        }
3882        if (shiftData != null && shiftData.enabled.y) {
3883          availableHeight2 = maximumClippingHeight;
3884        }
3885        if (noShift && !alignment) {
3886          if (isYAxis) {
3887            availableWidth2 = width - 2 * max(overflow.left, overflow.right);
3888          } else {
3889            availableHeight2 = height - 2 * max(overflow.top, overflow.bottom);
3890          }
3891        }
3892        await apply({
3893          ...state,
3894          availableWidth: availableWidth2,
3895          availableHeight: availableHeight2
3896        });
3897        const nextDimensions = await platform3.getDimensions(elements2.floating);
3898        if (width !== nextDimensions.width || height !== nextDimensions.height) {
3899          return {
3900            reset: {
3901              rects: true
3902            }
3903          };
3904        }
3905        return {};
3906      }
3907    };
3908  };
3909  
3910  // node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
3911  function getCssDimensions(element) {
3912    const css = getComputedStyle2(element);
3913    let width = parseFloat(css.width) || 0;
3914    let height = parseFloat(css.height) || 0;
3915    const hasOffset = isHTMLElement(element);
3916    const offsetWidth = hasOffset ? element.offsetWidth : width;
3917    const offsetHeight = hasOffset ? element.offsetHeight : height;
3918    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
3919    if (shouldFallback) {
3920      width = offsetWidth;
3921      height = offsetHeight;
3922    }
3923    return {
3924      width,
3925      height,
3926      $: shouldFallback
3927    };
3928  }
3929  function unwrapElement(element) {
3930    return !isElement(element) ? element.contextElement : element;
3931  }
3932  function getScale(element) {
3933    const domElement = unwrapElement(element);
3934    if (!isHTMLElement(domElement)) {
3935      return createCoords(1);
3936    }
3937    const rect = domElement.getBoundingClientRect();
3938    const {
3939      width,
3940      height,
3941      $: $2
3942    } = getCssDimensions(domElement);
3943    let x2 = ($2 ? round(rect.width) : rect.width) / width;
3944    let y2 = ($2 ? round(rect.height) : rect.height) / height;
3945    if (!x2 || !Number.isFinite(x2)) {
3946      x2 = 1;
3947    }
3948    if (!y2 || !Number.isFinite(y2)) {
3949      y2 = 1;
3950    }
3951    return {
3952      x: x2,
3953      y: y2
3954    };
3955  }
3956  var noOffsets = /* @__PURE__ */ createCoords(0);
3957  function getVisualOffsets(element) {
3958    const win = getWindow(element);
3959    if (!isWebKit() || !win.visualViewport) {
3960      return noOffsets;
3961    }
3962    return {
3963      x: win.visualViewport.offsetLeft,
3964      y: win.visualViewport.offsetTop
3965    };
3966  }
3967  function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
3968    if (isFixed === void 0) {
3969      isFixed = false;
3970    }
3971    return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
3972  }
3973  function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
3974    if (includeScale === void 0) {
3975      includeScale = false;
3976    }
3977    if (isFixedStrategy === void 0) {
3978      isFixedStrategy = false;
3979    }
3980    const clientRect = element.getBoundingClientRect();
3981    const domElement = unwrapElement(element);
3982    let scale = createCoords(1);
3983    if (includeScale) {
3984      if (offsetParent) {
3985        if (isElement(offsetParent)) {
3986          scale = getScale(offsetParent);
3987        }
3988      } else {
3989        scale = getScale(element);
3990      }
3991    }
3992    const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
3993    let x2 = (clientRect.left + visualOffsets.x) / scale.x;
3994    let y2 = (clientRect.top + visualOffsets.y) / scale.y;
3995    let width = clientRect.width / scale.x;
3996    let height = clientRect.height / scale.y;
3997    if (domElement && offsetParent) {
3998      const win = getWindow(domElement);
3999      const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
4000      let currentWin = win;
4001      let currentIFrame = getFrameElement(currentWin);
4002      while (currentIFrame && offsetWin !== currentWin) {
4003        const iframeScale = getScale(currentIFrame);
4004        const iframeRect = currentIFrame.getBoundingClientRect();
4005        const css = getComputedStyle2(currentIFrame);
4006        const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
4007        const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
4008        x2 *= iframeScale.x;
4009        y2 *= iframeScale.y;
4010        width *= iframeScale.x;
4011        height *= iframeScale.y;
4012        x2 += left;
4013        y2 += top;
4014        currentWin = getWindow(currentIFrame);
4015        currentIFrame = getFrameElement(currentWin);
4016      }
4017    }
4018    return rectToClientRect({
4019      width,
4020      height,
4021      x: x2,
4022      y: y2
4023    });
4024  }
4025  function getWindowScrollBarX(element, rect) {
4026    const leftScroll = getNodeScroll(element).scrollLeft;
4027    if (!rect) {
4028      return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
4029    }
4030    return rect.left + leftScroll;
4031  }
4032  function getHTMLOffset(documentElement, scroll) {
4033    const htmlRect = documentElement.getBoundingClientRect();
4034    const x2 = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
4035    const y2 = htmlRect.top + scroll.scrollTop;
4036    return {
4037      x: x2,
4038      y: y2
4039    };
4040  }
4041  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
4042    let {
4043      elements: elements2,
4044      rect,
4045      offsetParent,
4046      strategy
4047    } = _ref;
4048    const isFixed = strategy === "fixed";
4049    const documentElement = getDocumentElement(offsetParent);
4050    const topLayer = elements2 ? isTopLayer(elements2.floating) : false;
4051    if (offsetParent === documentElement || topLayer && isFixed) {
4052      return rect;
4053    }
4054    let scroll = {
4055      scrollLeft: 0,
4056      scrollTop: 0
4057    };
4058    let scale = createCoords(1);
4059    const offsets = createCoords(0);
4060    const isOffsetParentAnElement = isHTMLElement(offsetParent);
4061    if (isOffsetParentAnElement || !isFixed) {
4062      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
4063        scroll = getNodeScroll(offsetParent);
4064      }
4065      if (isOffsetParentAnElement) {
4066        const offsetRect = getBoundingClientRect(offsetParent);
4067        scale = getScale(offsetParent);
4068        offsets.x = offsetRect.x + offsetParent.clientLeft;
4069        offsets.y = offsetRect.y + offsetParent.clientTop;
4070      }
4071    }
4072    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4073    return {
4074      width: rect.width * scale.x,
4075      height: rect.height * scale.y,
4076      x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
4077      y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
4078    };
4079  }
4080  function getClientRects(element) {
4081    return element.getClientRects ? Array.from(element.getClientRects()) : [];
4082  }
4083  function getDocumentRect(html) {
4084    const scroll = getNodeScroll(html);
4085    const body = html.ownerDocument.body;
4086    const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
4087    const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
4088    let x2 = -scroll.scrollLeft + getWindowScrollBarX(html);
4089    const y2 = -scroll.scrollTop;
4090    if (getComputedStyle2(body).direction === "rtl") {
4091      x2 += max(html.clientWidth, body.clientWidth) - width;
4092    }
4093    return {
4094      width,
4095      height,
4096      x: x2,
4097      y: y2
4098    };
4099  }
4100  var SCROLLBAR_MAX = 25;
4101  function getViewportRect(element, strategy, rootBoundary) {
4102    if (rootBoundary === void 0) {
4103      rootBoundary = "viewport";
4104    }
4105    const isLayoutViewport = rootBoundary === "layoutViewport";
4106    const win = getWindow(element);
4107    const html = getDocumentElement(element);
4108    const visualViewport = win.visualViewport;
4109    let width = html.clientWidth;
4110    let height = html.clientHeight;
4111    let x2 = 0;
4112    let y2 = 0;
4113    if (visualViewport) {
4114      const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed";
4115      if (isLayoutViewport) {
4116        if (!layoutRelativeClientCoords) {
4117          x2 = -visualViewport.offsetLeft;
4118          y2 = -visualViewport.offsetTop;
4119        }
4120      } else {
4121        width = visualViewport.width;
4122        height = visualViewport.height;
4123        if (layoutRelativeClientCoords) {
4124          x2 = visualViewport.offsetLeft;
4125          y2 = visualViewport.offsetTop;
4126        }
4127      }
4128    }
4129    const windowScrollbarX = getWindowScrollBarX(html);
4130    if (windowScrollbarX <= 0) {
4131      const doc = html.ownerDocument;
4132      const body = doc.body;
4133      const bodyStyles = getComputedStyle(body);
4134      const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
4135      const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
4136      const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth;
4137      if (gutter <= SCROLLBAR_MAX) {
4138        width -= gutter;
4139      }
4140    }
4141    return {
4142      width,
4143      height,
4144      x: x2,
4145      y: y2
4146    };
4147  }
4148  function getInnerBoundingClientRect(element, strategy) {
4149    const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
4150    const top = clientRect.top + element.clientTop;
4151    const left = clientRect.left + element.clientLeft;
4152    const scale = getScale(element);
4153    const width = element.clientWidth * scale.x;
4154    const height = element.clientHeight * scale.y;
4155    const x2 = left * scale.x;
4156    const y2 = top * scale.y;
4157    return {
4158      width,
4159      height,
4160      x: x2,
4161      y: y2
4162    };
4163  }
4164  function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
4165    let rect;
4166    if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") {
4167      rect = getViewportRect(element, strategy, clippingAncestor);
4168    } else if (clippingAncestor === "document") {
4169      rect = getDocumentRect(getDocumentElement(element));
4170    } else if (isElement(clippingAncestor)) {
4171      rect = getInnerBoundingClientRect(clippingAncestor, strategy);
4172    } else {
4173      const visualOffsets = getVisualOffsets(element);
4174      rect = {
4175        x: clippingAncestor.x - visualOffsets.x,
4176        y: clippingAncestor.y - visualOffsets.y,
4177        width: clippingAncestor.width,
4178        height: clippingAncestor.height
4179      };
4180    }
4181    return rectToClientRect(rect);
4182  }
4183  function getClippingElementAncestors(element, cache) {
4184    const cachedResult = cache.get(element);
4185    if (cachedResult) {
4186      return cachedResult;
4187    }
4188    let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
4189    let lastKeptComputedStyle = null;
4190    const elementIsFixed = getComputedStyle2(element).position === "fixed";
4191    let currentNode = elementIsFixed ? getParentNode(element) : element;
4192    while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
4193      const computedStyle = getComputedStyle2(currentNode);
4194      const currentNodeIsContaining = isContainingBlock(currentNode);
4195      const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : "";
4196      const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static");
4197      if (shouldDropCurrentNode) {
4198        result = result.filter((ancestor) => ancestor !== currentNode);
4199      } else {
4200        lastKeptComputedStyle = computedStyle;
4201      }
4202      currentNode = getParentNode(currentNode);
4203    }
4204    cache.set(element, result);
4205    return result;
4206  }
4207  function getClippingRect(_ref) {
4208    let {
4209      element,
4210      boundary,
4211      rootBoundary,
4212      strategy
4213    } = _ref;
4214    const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
4215    const clippingAncestors = [...elementClippingAncestors, rootBoundary];
4216    const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
4217    let top = firstRect.top;
4218    let right = firstRect.right;
4219    let bottom = firstRect.bottom;
4220    let left = firstRect.left;
4221    for (let i = 1; i < clippingAncestors.length; i++) {
4222      const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
4223      top = max(rect.top, top);
4224      right = min(rect.right, right);
4225      bottom = min(rect.bottom, bottom);
4226      left = max(rect.left, left);
4227    }
4228    return {
4229      width: right - left,
4230      height: bottom - top,
4231      x: left,
4232      y: top
4233    };
4234  }
4235  function getDimensions(element) {
4236    const {
4237      width,
4238      height
4239    } = getCssDimensions(element);
4240    return {
4241      width,
4242      height
4243    };
4244  }
4245  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
4246    const isOffsetParentAnElement = isHTMLElement(offsetParent);
4247    const documentElement = getDocumentElement(offsetParent);
4248    const isFixed = strategy === "fixed";
4249    const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
4250    let scroll = {
4251      scrollLeft: 0,
4252      scrollTop: 0
4253    };
4254    const offsets = createCoords(0);
4255    if (isOffsetParentAnElement || !isFixed) {
4256      if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
4257        scroll = getNodeScroll(offsetParent);
4258      }
4259      if (isOffsetParentAnElement) {
4260        const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
4261        offsets.x = offsetRect.x + offsetParent.clientLeft;
4262        offsets.y = offsetRect.y + offsetParent.clientTop;
4263      }
4264    }
4265    if (!isOffsetParentAnElement && documentElement) {
4266      offsets.x = getWindowScrollBarX(documentElement);
4267    }
4268    const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
4269    const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
4270    const y2 = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
4271    return {
4272      x: x2,
4273      y: y2,
4274      width: rect.width,
4275      height: rect.height
4276    };
4277  }
4278  function isStaticPositioned(element) {
4279    return getComputedStyle2(element).position === "static";
4280  }
4281  function getTrueOffsetParent(element, polyfill) {
4282    if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
4283      return null;
4284    }
4285    if (polyfill) {
4286      return polyfill(element);
4287    }
4288    let rawOffsetParent = element.offsetParent;
4289    if (getDocumentElement(element) === rawOffsetParent) {
4290      rawOffsetParent = rawOffsetParent.ownerDocument.body;
4291    }
4292    return rawOffsetParent;
4293  }
4294  function getOffsetParent(element, polyfill) {
4295    const win = getWindow(element);
4296    if (isTopLayer(element)) {
4297      return win;
4298    }
4299    if (!isHTMLElement(element)) {
4300      let svgOffsetParent = getParentNode(element);
4301      while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
4302        if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
4303          return svgOffsetParent;
4304        }
4305        svgOffsetParent = getParentNode(svgOffsetParent);
4306      }
4307      return win;
4308    }
4309    let offsetParent = getTrueOffsetParent(element, polyfill);
4310    while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
4311      offsetParent = getTrueOffsetParent(offsetParent, polyfill);
4312    }
4313    if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
4314      return win;
4315    }
4316    return offsetParent || getContainingBlock(element) || win;
4317  }
4318  var getElementRects = async function(data) {
4319    const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
4320    const getDimensionsFn = this.getDimensions;
4321    const floatingDimensions = await getDimensionsFn(data.floating);
4322    return {
4323      reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
4324      floating: {
4325        x: 0,
4326        y: 0,
4327        width: floatingDimensions.width,
4328        height: floatingDimensions.height
4329      }
4330    };
4331  };
4332  function isRTL(element) {
4333    return getComputedStyle2(element).direction === "rtl";
4334  }
4335  var platform2 = {
4336    convertOffsetParentRelativeRectToViewportRelativeRect,
4337    getDocumentElement,
4338    getClippingRect,
4339    getOffsetParent,
4340    getElementRects,
4341    getClientRects,
4342    getDimensions,
4343    getScale,
4344    isElement,
4345    isRTL
4346  };
4347  function rectsAreEqual(a, b) {
4348    return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
4349  }
4350  function observeMove(element, onMove, ancestorResize) {
4351    let io = null;
4352    let timeoutId;
4353    const root = getDocumentElement(element);
4354    function cleanup() {
4355      var _io;
4356      clearTimeout(timeoutId);
4357      (_io = io) == null || _io.disconnect();
4358      io = null;
4359    }
4360    function refresh(skip, threshold) {
4361      if (skip === void 0) {
4362        skip = false;
4363      }
4364      if (threshold === void 0) {
4365        threshold = 1;
4366      }
4367      cleanup();
4368      const elementRectForRootMargin = element.getBoundingClientRect();
4369      const {
4370        left,
4371        top,
4372        width,
4373        height
4374      } = elementRectForRootMargin;
4375      if (!skip) {
4376        onMove();
4377      }
4378      if (!width || !height) {
4379        return;
4380      }
4381      const insetTop = floor(top);
4382      const insetRight = floor(root.clientWidth - (left + width));
4383      const insetBottom = floor(root.clientHeight - (top + height));
4384      const insetLeft = floor(left);
4385      const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
4386      const options = {
4387        rootMargin,
4388        threshold: max(0, min(1, threshold)) || 1
4389      };
4390      let isFirstUpdate = true;
4391      function handleObserve(entries) {
4392        const ratio = entries[0].intersectionRatio;
4393        if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
4394          return refresh();
4395        }
4396        if (ratio !== threshold) {
4397          if (!isFirstUpdate) {
4398            return refresh();
4399          }
4400          if (!ratio) {
4401            timeoutId = setTimeout(() => {
4402              refresh(false, 1e-7);
4403            }, 1e3);
4404          } else {
4405            refresh(false, ratio);
4406          }
4407        }
4408        isFirstUpdate = false;
4409      }
4410      try {
4411        io = new IntersectionObserver(handleObserve, {
4412          ...options,
4413          // Handle <iframe>s
4414          root: root.ownerDocument
4415        });
4416      } catch (_e) {
4417        io = new IntersectionObserver(handleObserve, options);
4418      }
4419      io.observe(element);
4420    }
4421    const win = getWindow(element);
4422    const handleResize = () => refresh(ancestorResize);
4423    win.addEventListener("resize", handleResize);
4424    refresh(true);
4425    return () => {
4426      win.removeEventListener("resize", handleResize);
4427      cleanup();
4428    };
4429  }
4430  function autoUpdate(reference, floating, update2, options) {
4431    if (options === void 0) {
4432      options = {};
4433    }
4434    const {
4435      ancestorScroll = true,
4436      ancestorResize = true,
4437      elementResize = typeof ResizeObserver === "function",
4438      layoutShift = typeof IntersectionObserver === "function",
4439      animationFrame = false
4440    } = options;
4441    const referenceEl = unwrapElement(reference);
4442    const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
4443    ancestors.forEach((ancestor) => {
4444      ancestorScroll && ancestor.addEventListener("scroll", update2);
4445      ancestorResize && ancestor.addEventListener("resize", update2);
4446    });
4447    const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2, ancestorResize) : null;
4448    let reobserveFrame = -1;
4449    let resizeObserver = null;
4450    if (elementResize) {
4451      resizeObserver = new ResizeObserver((_ref) => {
4452        let [firstEntry] = _ref;
4453        if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
4454          resizeObserver.unobserve(floating);
4455          cancelAnimationFrame(reobserveFrame);
4456          reobserveFrame = requestAnimationFrame(() => {
4457            var _resizeObserver;
4458            (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
4459          });
4460        }
4461        update2();
4462      });
4463      if (referenceEl && !animationFrame) {
4464        resizeObserver.observe(referenceEl);
4465      }
4466      if (floating) {
4467        resizeObserver.observe(floating);
4468      }
4469    }
4470    let frameId;
4471    let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
4472    if (animationFrame) {
4473      frameLoop();
4474    }
4475    function frameLoop() {
4476      const nextRefRect = getBoundingClientRect(reference);
4477      if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
4478        update2();
4479      }
4480      prevRefRect = nextRefRect;
4481      frameId = requestAnimationFrame(frameLoop);
4482    }
4483    update2();
4484    return () => {
4485      var _resizeObserver2;
4486      ancestors.forEach((ancestor) => {
4487        ancestorScroll && ancestor.removeEventListener("scroll", update2);
4488        ancestorResize && ancestor.removeEventListener("resize", update2);
4489      });
4490      cleanupIo == null || cleanupIo();
4491      (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
4492      resizeObserver = null;
4493      if (animationFrame) {
4494        cancelAnimationFrame(frameId);
4495      }
4496    };
4497  }
4498  var offset2 = offset;
4499  var shift2 = shift;
4500  var flip2 = flip;
4501  var size2 = size;
4502  var limitShift2 = limitShift;
4503  var computePosition2 = (reference, floating, options) => {
4504    const cache = /* @__PURE__ */ new Map();
4505    const mergedOptions = options != null ? options : {};
4506    const platformWithCache = {
4507      ...platform2,
4508      ...mergedOptions.platform,
4509      _c: cache
4510    };
4511    return computePosition(reference, floating, {
4512      ...mergedOptions,
4513      platform: platformWithCache
4514    });
4515  };
4516  
4517  // node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
4518  var React17 = __toESM(require_react(), 1);
4519  var import_react2 = __toESM(require_react(), 1);
4520  var ReactDOM3 = __toESM(require_react_dom(), 1);
4521  var isClient = typeof document !== "undefined";
4522  var noop2 = function noop3() {
4523  };
4524  var index = isClient ? import_react2.useLayoutEffect : noop2;
4525  function deepEqual(a, b) {
4526    if (a === b) {
4527      return true;
4528    }
4529    if (typeof a !== typeof b) {
4530      return false;
4531    }
4532    if (typeof a === "function" && a.toString() === b.toString()) {
4533      return true;
4534    }
4535    let length;
4536    let i;
4537    let keys;
4538    if (a && b && typeof a === "object") {
4539      if (Array.isArray(a)) {
4540        length = a.length;
4541        if (length !== b.length) return false;
4542        for (i = length; i-- !== 0; ) {
4543          if (!deepEqual(a[i], b[i])) {
4544            return false;
4545          }
4546        }
4547        return true;
4548      }
4549      keys = Object.keys(a);
4550      length = keys.length;
4551      if (length !== Object.keys(b).length) {
4552        return false;
4553      }
4554      for (i = length; i-- !== 0; ) {
4555        if (!{}.hasOwnProperty.call(b, keys[i])) {
4556          return false;
4557        }
4558      }
4559      for (i = length; i-- !== 0; ) {
4560        const key = keys[i];
4561        if (key === "_owner" && a.$$typeof) {
4562          continue;
4563        }
4564        if (!deepEqual(a[key], b[key])) {
4565          return false;
4566        }
4567      }
4568      return true;
4569    }
4570    return a !== a && b !== b;
4571  }
4572  function getDPR(element) {
4573    if (typeof window === "undefined") {
4574      return 1;
4575    }
4576    const win = element.ownerDocument.defaultView || window;
4577    return win.devicePixelRatio || 1;
4578  }
4579  function roundByDPR(element, value) {
4580    const dpr = getDPR(element);
4581    return Math.round(value * dpr) / dpr;
4582  }
4583  function useLatestRef(value) {
4584    const ref = React17.useRef(value);
4585    index(() => {
4586      ref.current = value;
4587    });
4588    return ref;
4589  }
4590  function useFloating(options) {
4591    if (options === void 0) {
4592      options = {};
4593    }
4594    const {
4595      placement = "bottom",
4596      strategy = "absolute",
4597      middleware = [],
4598      platform: platform3,
4599      elements: {
4600        reference: externalReference,
4601        floating: externalFloating
4602      } = {},
4603      transform = true,
4604      whileElementsMounted,
4605      open: open2
4606    } = options;
4607    const [data, setData] = React17.useState({
4608      x: 0,
4609      y: 0,
4610      strategy,
4611      placement,
4612      middlewareData: {},
4613      isPositioned: false
4614    });
4615    const [latestMiddleware, setLatestMiddleware] = React17.useState(middleware);
4616    if (!deepEqual(latestMiddleware, middleware)) {
4617      setLatestMiddleware(middleware);
4618    }
4619    const [_reference, _setReference] = React17.useState(null);
4620    const [_floating, _setFloating] = React17.useState(null);
4621    const setReference = React17.useCallback((node) => {
4622      if (node !== referenceRef.current) {
4623        referenceRef.current = node;
4624        _setReference(node);
4625      }
4626    }, []);
4627    const setFloating = React17.useCallback((node) => {
4628      if (node !== floatingRef.current) {
4629        floatingRef.current = node;
4630        _setFloating(node);
4631      }
4632    }, []);
4633    const referenceEl = externalReference || _reference;
4634    const floatingEl = externalFloating || _floating;
4635    const referenceRef = React17.useRef(null);
4636    const floatingRef = React17.useRef(null);
4637    const dataRef = React17.useRef(data);
4638    const hasWhileElementsMounted = whileElementsMounted != null;
4639    const whileElementsMountedRef = useLatestRef(whileElementsMounted);
4640    const platformRef = useLatestRef(platform3);
4641    const openRef = useLatestRef(open2);
4642    const update2 = React17.useCallback(() => {
4643      if (!referenceRef.current || !floatingRef.current) {
4644        return;
4645      }
4646      const config = {
4647        placement,
4648        strategy,
4649        middleware: latestMiddleware
4650      };
4651      if (platformRef.current) {
4652        config.platform = platformRef.current;
4653      }
4654      computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => {
4655        const fullData = {
4656          ...data2,
4657          // The floating element's position may be recomputed while it's closed
4658          // but still mounted (such as when transitioning out). To ensure
4659          // `isPositioned` will be `false` initially on the next open, avoid
4660          // setting it to `true` when `open === false` (must be specified).
4661          isPositioned: openRef.current !== false
4662        };
4663        if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
4664          dataRef.current = fullData;
4665          ReactDOM3.flushSync(() => {
4666            setData(fullData);
4667          });
4668        }
4669      });
4670    }, [latestMiddleware, placement, strategy, platformRef, openRef]);
4671    index(() => {
4672      if (open2 === false && dataRef.current.isPositioned) {
4673        dataRef.current.isPositioned = false;
4674        setData((data2) => ({
4675          ...data2,
4676          isPositioned: false
4677        }));
4678      }
4679    }, [open2]);
4680    const isMountedRef = React17.useRef(false);
4681    index(() => {
4682      isMountedRef.current = true;
4683      return () => {
4684        isMountedRef.current = false;
4685      };
4686    }, []);
4687    index(() => {
4688      if (referenceEl) referenceRef.current = referenceEl;
4689      if (floatingEl) floatingRef.current = floatingEl;
4690      if (referenceEl && floatingEl) {
4691        if (whileElementsMountedRef.current) {
4692          return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
4693        }
4694        update2();
4695      }
4696    }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
4697    const refs = React17.useMemo(() => ({
4698      reference: referenceRef,
4699      floating: floatingRef,
4700      setReference,
4701      setFloating
4702    }), [setReference, setFloating]);
4703    const elements2 = React17.useMemo(() => ({
4704      reference: referenceEl,
4705      floating: floatingEl
4706    }), [referenceEl, floatingEl]);
4707    const floatingStyles = React17.useMemo(() => {
4708      const initialStyles = {
4709        position: strategy,
4710        left: 0,
4711        top: 0
4712      };
4713      if (!elements2.floating) {
4714        return initialStyles;
4715      }
4716      const x2 = roundByDPR(elements2.floating, data.x);
4717      const y2 = roundByDPR(elements2.floating, data.y);
4718      if (transform) {
4719        return {
4720          ...initialStyles,
4721          transform: "translate(" + x2 + "px, " + y2 + "px)",
4722          ...getDPR(elements2.floating) >= 1.5 && {
4723            willChange: "transform"
4724          }
4725        };
4726      }
4727      return {
4728        position: strategy,
4729        left: x2,
4730        top: y2
4731      };
4732    }, [strategy, transform, elements2.floating, data.x, data.y]);
4733    return React17.useMemo(() => ({
4734      ...data,
4735      update: update2,
4736      refs,
4737      elements: elements2,
4738      floatingStyles
4739    }), [data, update2, refs, elements2, floatingStyles]);
4740  }
4741  var offset3 = (options, deps) => {
4742    const result = offset2(options);
4743    return {
4744      name: result.name,
4745      fn: result.fn,
4746      options: [options, deps]
4747    };
4748  };
4749  var shift3 = (options, deps) => {
4750    const result = shift2(options);
4751    return {
4752      name: result.name,
4753      fn: result.fn,
4754      options: [options, deps]
4755    };
4756  };
4757  var limitShift3 = (options, deps) => {
4758    const result = limitShift2(options);
4759    return {
4760      fn: result.fn,
4761      options: [options, deps]
4762    };
4763  };
4764  var flip3 = (options, deps) => {
4765    const result = flip2(options);
4766    return {
4767      name: result.name,
4768      fn: result.fn,
4769      options: [options, deps]
4770    };
4771  };
4772  var size3 = (options, deps) => {
4773    const result = size2(options);
4774    return {
4775      name: result.name,
4776      fn: result.fn,
4777      options: [options, deps]
4778    };
4779  };
4780  
4781  // node_modules/@base-ui/react/utils/popups/popupHandle.mjs
4782  var BasePopupHandle = class {
4783    /**
4784     * Stores of every root currently using this handle, in attach order. A handle is meant to be used
4785     * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
4786     * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
4787     * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
4788     */
4789    attachedStores = [];
4790    /**
4791     * Store of the root that currently controls the handle: the most recently attached one still
4792     * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
4793     */
4794    attachedStoreValue = null;
4795    /**
4796     * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
4797     */
4798    storeListeners = /* @__PURE__ */ new Set();
4799    /**
4800     * Creates a handle backed by the store used while no root is attached.
4801     *
4802     * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
4803     * so they can render and register without a mounted root. Triggers register into whichever store
4804     * `store` currently resolves to, so while detached they live in this store's trigger map and
4805     * migrate themselves to the root's store (and back) as it attaches/detaches.
4806     * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
4807     * `MenuHandle.open()` in warning text.
4808     * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
4809     * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
4810     * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
4811     */
4812    constructor(fallbackStore, componentName, throwOnMissingTrigger = true) {
4813      this.fallbackStore = fallbackStore;
4814      this.componentName = componentName;
4815      this.throwOnMissingTrigger = throwOnMissingTrigger;
4816    }
4817    get attachedStore() {
4818      return this.attachedStoreValue;
4819    }
4820    /**
4821     * Store that detached triggers read from: the attached root's store, or an inert fallback store
4822     * used while no root is attached.
4823     * @internal
4824     */
4825    get store() {
4826      return this.attachedStoreValue ?? this.fallbackStore;
4827    }
4828    /**
4829     * Stable fallback store used for server rendering and hydration. Root stores cannot be recorded on
4830     * the handle during render because a handle can be shared by concurrent server-rendered requests.
4831     * @internal
4832     */
4833    get serverStore() {
4834      return this.fallbackStore;
4835    }
4836    /**
4837     * Subscribes to changes of the attached store pointer so detached triggers re-render and re-bind
4838     * when a root attaches or detaches. Returns a function that removes the listener.
4839     * @internal
4840     */
4841    subscribeStore(listener) {
4842      this.storeListeners.add(listener);
4843      return () => {
4844        this.storeListeners.delete(listener);
4845      };
4846    }
4847    /**
4848     * Points the handle at a root's store and notifies subscribers so detached triggers re-render and
4849     * re-register into it (their registration effect migrates them when the store pointer changes).
4850     * Returns a cleanup function that detaches the store again.
4851     * @internal
4852     */
4853    attachStore(newStore) {
4854      this.attachedStores.push(newStore);
4855      this.setActiveStore(newStore);
4856      if (true) {
4857        if (this.attachedStores.length > 1) {
4858          const dev = this;
4859          (dev.overlapWarningFrame ??= AnimationFrame.create()).request(() => {
4860            if (this.attachedStores.length > 1) {
4861              console.warn("Base UI: A handle is attached to more than one mounted root at the same time. The most recently mounted root takes over and the previous one stops being controlled by the handle. A handle should be used by a single root that stays mounted for the lifetime of the handle.");
4862            }
4863          });
4864        }
4865      }
4866      return () => {
4867        const index2 = this.attachedStores.lastIndexOf(newStore);
4868        if (index2 !== -1) {
4869          this.attachedStores.splice(index2, 1);
4870        }
4871        this.setActiveStore(this.attachedStores[this.attachedStores.length - 1] ?? null);
4872      };
4873    }
4874    /**
4875     * Sets the store that currently controls the handle and notifies subscribers when it changes, so
4876     * detached triggers re-render and migrate their registration to the new store.
4877     */
4878    setActiveStore(store) {
4879      if (this.attachedStoreValue !== store) {
4880        this.attachedStoreValue = store;
4881        this.storeListeners.forEach((listener) => {
4882          listener();
4883        });
4884      }
4885    }
4886    /**
4887     * Opens the attached root's store and associates it with the trigger with the given id, or a
4888     * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
4889     * `open()` method, which only narrows the parameter type.
4890     *
4891     * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
4892     * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
4893     *
4894     * This method should only be called in an event handler or an effect (not during rendering).
4895     *
4896     * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
4897     * without associating any trigger.
4898     */
4899    openByTrigger(triggerId) {
4900      const attachedStore = this.attachedStore;
4901      if (attachedStore === null) {
4902        if (true) {
4903          console.warn(`Base UI: $this.componentName}Handle.open() was called while no root using this handle is mounted. The call was ignored; mount a root with this handle before opening it imperatively.`);
4904        }
4905        return;
4906      }
4907      let triggerElement;
4908      if (triggerId) {
4909        for (let i = this.attachedStores.length - 1; i >= 0 && !triggerElement; i -= 1) {
4910          triggerElement = this.attachedStores[i].context.triggerElements.getById(triggerId);
4911        }
4912        triggerElement ??= this.fallbackStore.context.triggerElements.getById(triggerId);
4913      }
4914      if (triggerId && !triggerElement) {
4915        if (this.throwOnMissingTrigger) {
4916          throw new Error(true ? `Base UI: $this.componentName}Handle.open() was called with the trigger id "$triggerId}", but no matching trigger is registered with this handle. An anchored popup cannot open without a trigger to anchor to. Pass the id of a mounted $this.componentName}.Trigger that has this handle set on its "handle" prop.` : formatErrorMessage_default(99, this.componentName, triggerId, this.componentName));
4917        }
4918        if (true) {
4919          console.warn(`Base UI: $this.componentName}Handle.open: No trigger found with id "$triggerId}". The popup will open, but the trigger will not be associated with it.`);
4920        }
4921      }
4922      attachedStore.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement));
4923    }
4924    /**
4925     * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
4926     * while no root is attached. Shared by every concrete handle's public `close()` method.
4927     *
4928     * This method should only be called in an event handler or an effect (not during rendering).
4929     */
4930    closePopup() {
4931      const attachedStore = this.attachedStore;
4932      if (attachedStore === null) {
4933        if (true) {
4934          console.warn(`Base UI: $this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`);
4935        }
4936        return;
4937      }
4938      attachedStore.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction));
4939    }
4940  };
4941  
4942  // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
4943  var React22 = __toESM(require_react(), 1);
4944  var ReactDOM4 = __toESM(require_react_dom(), 1);
4945  
4946  // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
4947  var React21 = __toESM(require_react(), 1);
4948  
4949  // node_modules/@base-ui/utils/store/useStore.mjs
4950  var React19 = __toESM(require_react(), 1);
4951  var import_shim = __toESM(require_shim(), 1);
4952  var import_with_selector = __toESM(require_with_selector(), 1);
4953  
4954  // node_modules/@base-ui/utils/fastHooks.mjs
4955  var React18 = __toESM(require_react(), 1);
4956  var hooks = [];
4957  var currentInstance = void 0;
4958  function getInstance() {
4959    return currentInstance;
4960  }
4961  function register(hook) {
4962    hooks.push(hook);
4963  }
4964  function fastComponent(fn) {
4965    const FastComponent = (props, forwardedRef) => {
4966      const instance = useRefWithInit(createInstance).current;
4967      let result;
4968      try {
4969        currentInstance = instance;
4970        for (const hook of hooks) {
4971          hook.before(instance);
4972        }
4973        result = fn(props, forwardedRef);
4974        for (const hook of hooks) {
4975          hook.after(instance);
4976        }
4977        instance.didInitialize = true;
4978      } finally {
4979        currentInstance = void 0;
4980      }
4981      return result;
4982    };
4983    FastComponent.displayName = fn.displayName || fn.name;
4984    return FastComponent;
4985  }
4986  function fastComponentRef(fn) {
4987    return /* @__PURE__ */ React18.forwardRef(fastComponent(fn));
4988  }
4989  function createInstance() {
4990    return {
4991      didInitialize: false
4992    };
4993  }
4994  
4995  // node_modules/@base-ui/utils/store/useStore.mjs
4996  var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19);
4997  var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy;
4998  function useStore(store, selector, a1, a2, a3) {
4999    return useStoreImplementation(store, selector, a1, a2, a3);
5000  }
5001  function useStoreR19(store, selector, a1, a2, a3) {
5002    const getSelection = React19.useCallback(() => selector(store.getSnapshot(), a1, a2, a3), [store, selector, a1, a2, a3]);
5003    return (0, import_shim.useSyncExternalStore)(store.subscribe, getSelection, getSelection);
5004  }
5005  register({
5006    before(instance) {
5007      instance.syncIndex = 0;
5008      if (!instance.didInitialize) {
5009        instance.syncTick = 1;
5010        instance.syncHooks = [];
5011        instance.didChangeStore = true;
5012        instance.getSnapshot = () => {
5013          let didChange2 = false;
5014          for (let i = 0; i < instance.syncHooks.length; i += 1) {
5015            const hook = instance.syncHooks[i];
5016            const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
5017            if (!Object.is(hook.value, value)) {
5018              didChange2 = true;
5019              hook.value = value;
5020            }
5021          }
5022          if (didChange2) {
5023            instance.syncTick += 1;
5024          }
5025          return instance.syncTick;
5026        };
5027      }
5028    },
5029    after(instance) {
5030      if (instance.syncHooks.length > 0) {
5031        if (instance.didChangeStore) {
5032          instance.didChangeStore = false;
5033          instance.subscribe = (onStoreChange) => {
5034            const stores = /* @__PURE__ */ new Set();
5035            for (const hook of instance.syncHooks) {
5036              stores.add(hook.store);
5037            }
5038            const unsubscribes = [];
5039            for (const store of stores) {
5040              unsubscribes.push(store.subscribe(onStoreChange));
5041            }
5042            return () => {
5043              for (const unsubscribe of unsubscribes) {
5044                unsubscribe();
5045              }
5046            };
5047          };
5048        }
5049        (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
5050      }
5051    }
5052  });
5053  function useStoreFast(store, selector, a1, a2, a3) {
5054    const instance = getInstance();
5055    if (!instance) {
5056      return useStoreR19(store, selector, a1, a2, a3);
5057    }
5058    const index2 = instance.syncIndex;
5059    instance.syncIndex += 1;
5060    let hook;
5061    if (!instance.didInitialize) {
5062      hook = {
5063        store,
5064        selector,
5065        a1,
5066        a2,
5067        a3,
5068        value: selector(store.getSnapshot(), a1, a2, a3)
5069      };
5070      instance.syncHooks.push(hook);
5071    } else {
5072      hook = instance.syncHooks[index2];
5073      if (hook.store !== store || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
5074        if (hook.store !== store) {
5075          instance.didChangeStore = true;
5076        }
5077        hook.store = store;
5078        hook.selector = selector;
5079        hook.a1 = a1;
5080        hook.a2 = a2;
5081        hook.a3 = a3;
5082        hook.value = selector(store.getSnapshot(), a1, a2, a3);
5083      }
5084    }
5085    return hook.value;
5086  }
5087  function useStoreLegacy(store, selector, a1, a2, a3) {
5088    return (0, import_with_selector.useSyncExternalStoreWithSelector)(store.subscribe, store.getSnapshot, store.getSnapshot, (state) => selector(state, a1, a2, a3));
5089  }
5090  
5091  // node_modules/@base-ui/utils/store/Store.mjs
5092  var Store = class {
5093    /**
5094     * Creates a store with the given initial state, constructing the class it is called on.
5095     * Calling it on a generic base class (e.g. `ReactStore.create(...)`) constructs that
5096     * class but degrades the inferred instance type to `Store`; use `new` there instead.
5097     */
5098    static create(state) {
5099      return new this(state);
5100    }
5101    /**
5102     * The current state of the store.
5103     * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
5104     * 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).
5105     * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
5106     *
5107     * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
5108     */
5109    // Internal state to handle recursive `setState()` calls
5110    constructor(state) {
5111      this.state = state;
5112      this.listeners = /* @__PURE__ */ new Set();
5113      this.updateTick = 0;
5114    }
5115    /**
5116     * Registers a listener that will be called whenever the store's state changes.
5117     *
5118     * @param fn The listener function to be called on state changes.
5119     * @returns A function to unsubscribe the listener.
5120     */
5121    subscribe = (fn) => {
5122      this.listeners.add(fn);
5123      return () => {
5124        this.listeners.delete(fn);
5125      };
5126    };
5127    /**
5128     * Returns the current state of the store.
5129     */
5130    getSnapshot = () => {
5131      return this.state;
5132    };
5133    /**
5134     * Updates the entire store's state and notifies all registered listeners.
5135     *
5136     * @param newState The new state to set for the store.
5137     */
5138    setState(newState) {
5139      if (this.state === newState) {
5140        return;
5141      }
5142      this.state = newState;
5143      this.updateTick += 1;
5144      const currentTick = this.updateTick;
5145      for (const listener of this.listeners) {
5146        if (currentTick !== this.updateTick) {
5147          return;
5148        }
5149        listener(newState);
5150      }
5151    }
5152    /**
5153     * Merges the provided changes into the current state and notifies listeners if there are changes.
5154     * Each value must match its state key. Pass an exact known subset rather than a broad
5155     * `Partial<State>`, which may contain `undefined` for required state fields.
5156     *
5157     * @param changes An object containing the changes to apply to the current state.
5158     */
5159    update(changes) {
5160      for (const key in changes) {
5161        if (!Object.is(this.state[key], changes[key])) {
5162          this.setState({
5163            ...this.state,
5164            ...changes
5165          });
5166          return;
5167        }
5168      }
5169    }
5170    /**
5171     * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
5172     *
5173     * @param key The key in the store's state to update.
5174     * @param value The new value to set for the specified key.
5175     */
5176    set(key, value) {
5177      if (!Object.is(this.state[key], value)) {
5178        this.setState({
5179          ...this.state,
5180          [key]: value
5181        });
5182      }
5183    }
5184    /**
5185     * Gives the state a new reference and updates all registered listeners.
5186     */
5187    notifyAll() {
5188      const newState = {
5189        ...this.state
5190      };
5191      this.setState(newState);
5192    }
5193    use(selector, a1, a2, a3) {
5194      return useStore(this, selector, a1, a2, a3);
5195    }
5196  };
5197  
5198  // node_modules/@base-ui/utils/store/ReactStore.mjs
5199  var React20 = __toESM(require_react(), 1);
5200  var ReactStore = class extends Store {
5201    /**
5202     * Creates a new ReactStore instance.
5203     *
5204     * @param state Initial state of the store.
5205     * @param context Non-reactive context values.
5206     * @param selectors Optional selectors for use with `useState`.
5207     */
5208    constructor(state, context = {}, selectors3) {
5209      super(state);
5210      this.context = context;
5211      this.selectors = selectors3;
5212    }
5213    /**
5214     * Non-reactive values such as refs, callbacks, etc.
5215     */
5216    /**
5217     * Synchronizes a single external value into the store.
5218     *
5219     * Note that the while the value in `state` is updated immediately, the value returned
5220     * by `useState` is updated before the next render (similarly to React's `useState`).
5221     */
5222    useSyncedValue(key, value) {
5223      React20.useDebugValue(key);
5224      const store = this;
5225      useIsoLayoutEffect(() => {
5226        if (store.state[key] !== value) {
5227          store.set(key, value);
5228        }
5229      }, [store, key, value]);
5230    }
5231    /**
5232     * Synchronizes a single external value into the store and
5233     * cleans it up (sets to `undefined`) on unmount.
5234     *
5235     * Note that the while the value in `state` is updated immediately, the value returned
5236     * by `useState` is updated before the next render (similarly to React's `useState`).
5237     */
5238    useSyncedValueWithCleanup(key, value) {
5239      const store = this;
5240      useIsoLayoutEffect(() => {
5241        if (store.state[key] !== value) {
5242          store.set(key, value);
5243        }
5244        return () => {
5245          store.set(key, void 0);
5246        };
5247      }, [store, key, value]);
5248    }
5249    /**
5250     * Synchronizes multiple external values into the store.
5251     * Each value must match its state key. Pass an exact known subset rather than a broad
5252     * `Partial<State>`, which may contain `undefined` for required state fields.
5253     *
5254     * Note that the while the values in `state` are updated immediately, the values returned
5255     * by `useState` are updated before the next render (similarly to React's `useState`).
5256     *
5257     * @param statePart An exact subset of state fields to synchronize. Unknown keys are not accepted.
5258     */
5259    useSyncedValues(statePart) {
5260      const store = this;
5261      if (true) {
5262        React20.useDebugValue(statePart, (p3) => Object.keys(p3));
5263        const keys = React20.useRef(Object.keys(statePart)).current;
5264        const nextKeys = Object.keys(statePart);
5265        if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) {
5266          console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
5267        }
5268      }
5269      const dependencies = Object.values(statePart);
5270      useIsoLayoutEffect(() => {
5271        store.update(statePart);
5272      }, [store, ...dependencies]);
5273    }
5274    /**
5275     * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
5276     * is non-undefined, the store's state at `key` is updated to match `controlled`.
5277     */
5278    useControlledProp(key, controlled) {
5279      React20.useDebugValue(key);
5280      const store = this;
5281      const isControlled = controlled !== void 0;
5282      useIsoLayoutEffect(() => {
5283        if (isControlled && !Object.is(store.state[key], controlled)) {
5284          store.setState({
5285            ...store.state,
5286            [key]: controlled
5287          });
5288        }
5289      }, [store, key, controlled, isControlled]);
5290      if (true) {
5291        const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
5292        if (!cache.has(key)) {
5293          cache.set(key, isControlled);
5294        }
5295        const previouslyControlled = cache.get(key);
5296        if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) {
5297          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).`);
5298        }
5299      }
5300    }
5301    /** Gets the current value from the store using a selector with the provided key.
5302     *
5303     * @param key Key of the selector to use.
5304     */
5305    select(key, a1, a2, a3) {
5306      const selector = this.selectors[key];
5307      return selector(this.state, a1, a2, a3);
5308    }
5309    /**
5310     * Returns a value from the store's state using a selector function.
5311     * Used to subscribe to specific parts of the state.
5312     * This methods causes a rerender whenever the selected state changes.
5313     *
5314     * @param key Key of the selector to use.
5315     */
5316    useState(key, a1, a2, a3) {
5317      React20.useDebugValue(key);
5318      return useStore(this, this.selectors[key], a1, a2, a3);
5319    }
5320    /**
5321     * Wraps a function with `useStableCallback` to ensure it has a stable reference
5322     * and assigns it to the context.
5323     *
5324     * @param key Key of the event callback. Must be a function in the context.
5325     * @param fn Function to assign.
5326     */
5327    useContextCallback(key, fn) {
5328      React20.useDebugValue(key);
5329      const stableFunction = useStableCallback(fn ?? NOOP);
5330      this.context[key] = stableFunction;
5331    }
5332    /**
5333     * Returns a stable setter function for a specific key in the store's state.
5334     * It's commonly used to pass as a ref callback to React elements.
5335     *
5336     * @param key Key of the state to set.
5337     */
5338    useStateSetter(key) {
5339      const ref = React20.useRef(void 0);
5340      if (ref.current === void 0) {
5341        ref.current = (value) => {
5342          this.set(key, value);
5343        };
5344      }
5345      return ref.current;
5346    }
5347    /**
5348     * Observes changes derived from the store's selectors and calls the listener when the selected value changes.
5349     *
5350     * @param key Key of the selector to observe.
5351     * @param listener Listener function called when the selector result changes.
5352     */
5353    observe(selector, listener) {
5354      let selectFn;
5355      if (typeof selector === "function") {
5356        selectFn = selector;
5357      } else {
5358        selectFn = this.selectors[selector];
5359      }
5360      let prevValue = selectFn(this.state);
5361      listener(prevValue, prevValue, this);
5362      return this.subscribe((nextState) => {
5363        const nextValue = selectFn(nextState);
5364        if (!Object.is(prevValue, nextValue)) {
5365          const oldValue = prevValue;
5366          prevValue = nextValue;
5367          listener(nextValue, oldValue, this);
5368        }
5369      });
5370    }
5371  };
5372  
5373  // node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs
5374  var selectors = {
5375    open: (state) => state.open,
5376    transitionStatus: (state) => state.transitionStatus,
5377    domReferenceElement: (state) => state.domReferenceElement,
5378    referenceElement: (state) => state.positionReference ?? state.referenceElement,
5379    floatingElement: (state) => state.floatingElement,
5380    floatingId: (state) => state.floatingId
5381  };
5382  var FloatingRootStore = class extends ReactStore {
5383    constructor(options) {
5384      const {
5385        syncOnly,
5386        nested,
5387        onOpenChange,
5388        triggerElements,
5389        ...initialState
5390      } = options;
5391      super({
5392        ...initialState,
5393        positionReference: initialState.referenceElement,
5394        domReferenceElement: initialState.referenceElement
5395      }, {
5396        onOpenChange,
5397        dataRef: {
5398          current: {}
5399        },
5400        events: createEventEmitter(),
5401        nested,
5402        triggerElements
5403      }, selectors);
5404      this.syncOnly = syncOnly;
5405    }
5406    /**
5407     * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
5408     */
5409    syncOpenEvent = (newOpen, event) => {
5410      if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
5411      // click events to upgrade a hover-open.
5412      event != null && isClickLikeEvent(event)) {
5413        this.context.dataRef.current.openEvent = newOpen ? event : void 0;
5414      }
5415    };
5416    /**
5417     * Runs the root-owned side effects for an open state change.
5418     */
5419    dispatchOpenChange = (newOpen, eventDetails) => {
5420      this.syncOpenEvent(newOpen, eventDetails.event);
5421      const details = {
5422        open: newOpen,
5423        reason: eventDetails.reason,
5424        nativeEvent: eventDetails.event,
5425        nested: this.context.nested,
5426        triggerElement: eventDetails.trigger
5427      };
5428      this.context.events.emit("openchange", details);
5429    };
5430    /**
5431     * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
5432     *
5433     * @param newOpen The new open state.
5434     * @param eventDetails Details about the event that triggered the open state change.
5435     */
5436    setOpen = (newOpen, eventDetails) => {
5437      if (this.syncOnly) {
5438        this.context.onOpenChange?.(newOpen, eventDetails);
5439        return;
5440      }
5441      this.dispatchOpenChange(newOpen, eventDetails);
5442      this.context.onOpenChange?.(newOpen, eventDetails);
5443    };
5444  };
5445  
5446  // node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
5447  function useSyncedFloatingRootContext(options) {
5448    const {
5449      popupStore,
5450      treatPopupAsFloatingElement = false,
5451      floatingRootContext: floatingRootContextProp,
5452      floatingId,
5453      nested,
5454      onOpenChange
5455    } = options;
5456    const open2 = popupStore.useState("open");
5457    const referenceElement = popupStore.useState("activeTriggerElement");
5458    const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
5459    const triggerElements = popupStore.context.triggerElements;
5460    const handleOpenChange = onOpenChange;
5461    const internalStoreRef = React21.useRef(null);
5462    if (floatingRootContextProp === void 0 && internalStoreRef.current === null) {
5463      internalStoreRef.current = new FloatingRootStore({
5464        open: open2,
5465        transitionStatus: void 0,
5466        referenceElement,
5467        floatingElement,
5468        triggerElements,
5469        onOpenChange: handleOpenChange,
5470        floatingId,
5471        syncOnly: true,
5472        nested
5473      });
5474    }
5475    const store = floatingRootContextProp ?? internalStoreRef.current;
5476    popupStore.useSyncedValue("floatingId", floatingId);
5477    useIsoLayoutEffect(() => {
5478      const valuesToSync = {
5479        open: open2,
5480        floatingId,
5481        referenceElement,
5482        floatingElement
5483      };
5484      if (isElement(referenceElement)) {
5485        valuesToSync.domReferenceElement = referenceElement;
5486      }
5487      if (store.state.positionReference === store.state.referenceElement) {
5488        valuesToSync.positionReference = referenceElement;
5489      }
5490      store.update(valuesToSync);
5491    }, [open2, floatingId, referenceElement, floatingElement, store]);
5492    store.context.onOpenChange = handleOpenChange;
5493    store.context.nested = nested;
5494    return store;
5495  }
5496  
5497  // node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
5498  var FOCUSABLE_POPUP_PROPS = {
5499    tabIndex: -1,
5500    [FOCUSABLE_ATTRIBUTE]: ""
5501  };
5502  function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) {
5503    const floatingId = useId();
5504    const nested = useFloatingParentNodeId() != null;
5505    const store = useRefWithInit(() => createStore(floatingId, nested)).current;
5506    useSyncedFloatingRootContext({
5507      popupStore: store,
5508      treatPopupAsFloatingElement,
5509      floatingRootContext: store.state.floatingRootContext,
5510      floatingId,
5511      nested,
5512      onOpenChange: store.setOpen
5513    });
5514    return store;
5515  }
5516  function PopupHandleAttachment({
5517    handle,
5518    store
5519  }) {
5520    useIsoLayoutEffect(() => {
5521      return handle.attachStore(store);
5522    }, [handle, store]);
5523    return null;
5524  }
5525  function syncTriggerCount(store) {
5526    const triggerCount = store.context.triggerElements.size;
5527    if (store.select("open") && store.state.triggerCount !== triggerCount) {
5528      store.set("triggerCount", triggerCount);
5529    }
5530  }
5531  function useTriggerRegistration(id, store) {
5532    const registrationRef = React22.useRef(null);
5533    return useStableCallback((element) => {
5534      const registration = registrationRef.current;
5535      if (registration !== null) {
5536        if (registration.element === element && registration.store === store && registration.id === id) {
5537          return;
5538        }
5539        registrationRef.current = null;
5540        const registeredStore = registration.store;
5541        if (registeredStore.context.triggerElements.getById(registration.id) === registration.element) {
5542          registeredStore.context.triggerElements.delete(registration.id);
5543          syncTriggerCount(registeredStore);
5544        }
5545      }
5546      if (element !== null && id !== void 0) {
5547        registrationRef.current = {
5548          store,
5549          id,
5550          element
5551        };
5552        store.context.triggerElements.add(id, element);
5553        syncTriggerCount(store);
5554      }
5555    });
5556  }
5557  function createPopupOpenState(state, open2, trigger, preventUnmountOnClose = false) {
5558    let preventUnmountingOnClose = state.preventUnmountingOnClose;
5559    if (open2) {
5560      preventUnmountingOnClose = false;
5561    } else if (preventUnmountOnClose) {
5562      preventUnmountingOnClose = true;
5563    }
5564    const triggerId = trigger?.id ?? null;
5565    let activeTriggerId = state.activeTriggerId;
5566    let activeTriggerElement = state.activeTriggerElement;
5567    if (triggerId || open2) {
5568      activeTriggerId = triggerId;
5569      activeTriggerElement = trigger ?? null;
5570    }
5571    return {
5572      open: open2,
5573      preventUnmountingOnClose,
5574      activeTriggerId,
5575      activeTriggerElement
5576    };
5577  }
5578  function attachPreventUnmountOnClose(eventDetails) {
5579    let preventUnmountOnClose = false;
5580    eventDetails.preventUnmountOnClose = () => {
5581      preventUnmountOnClose = true;
5582    };
5583    return () => preventUnmountOnClose;
5584  }
5585  function applyPopupOpenChange(store, nextOpen, eventDetails, options = {}) {
5586    const reason = eventDetails.reason;
5587    const isHover = reason === reason_parts_exports.triggerHover;
5588    const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus;
5589    const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey);
5590    const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);
5591    store.context.onOpenChange?.(nextOpen, eventDetails);
5592    if (eventDetails.isCanceled) {
5593      return;
5594    }
5595    options.onBeforeDispatch?.();
5596    store.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
5597    const changeState = () => {
5598      const popupOpenState = createPopupOpenState(store.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
5599      const updatedState = {
5600        ...options.extraState,
5601        ...popupOpenState
5602      };
5603      if (isFocusOpen) {
5604        updatedState.instantType = "focus";
5605      } else if (isDismissClose) {
5606        updatedState.instantType = "dismiss";
5607      } else if (isHover) {
5608        updatedState.instantType = void 0;
5609      }
5610      store.update(updatedState);
5611    };
5612    if (isHover) {
5613      ReactDOM4.flushSync(changeState);
5614    } else {
5615      changeState();
5616    }
5617  }
5618  function useTriggerDataForwarding(triggerId, triggerElementRef, store, stateUpdates) {
5619    const isMountedByThisTrigger = store.useState("isMountedByTrigger", triggerId);
5620    const baseRegisterTrigger = useTriggerRegistration(triggerId, store);
5621    const applyTriggerData = useStableCallback((element) => {
5622      const open2 = store.select("open");
5623      const activeTriggerId = store.select("activeTriggerId");
5624      if (activeTriggerId === triggerId) {
5625        const changes = {
5626          activeTriggerElement: element,
5627          ...open2 ? stateUpdates : null
5628        };
5629        store.update(changes);
5630        return;
5631      }
5632      if (activeTriggerId == null && open2) {
5633        const changes = {
5634          activeTriggerId: triggerId ?? null,
5635          activeTriggerElement: element,
5636          ...stateUpdates
5637        };
5638        store.update(changes);
5639      }
5640    });
5641    const registerTrigger = useStableCallback((element) => {
5642      baseRegisterTrigger(element);
5643      if (element) {
5644        applyTriggerData(element);
5645      }
5646    });
5647    useIsoLayoutEffect(() => {
5648      registerTrigger(triggerElementRef.current);
5649      return () => registerTrigger(null);
5650    }, [registerTrigger, triggerElementRef, store, triggerId]);
5651    useIsoLayoutEffect(() => {
5652      if (isMountedByThisTrigger) {
5653        const changes = {
5654          activeTriggerElement: triggerElementRef.current,
5655          ...stateUpdates
5656        };
5657        store.update(changes);
5658      }
5659    }, [isMountedByThisTrigger, store, triggerElementRef, ...Object.values(stateUpdates)]);
5660    return {
5661      registerTrigger,
5662      isMountedByThisTrigger
5663    };
5664  }
5665  function useImplicitActiveTrigger(store, options = {}) {
5666    const {
5667      closeOnActiveTriggerUnmount = false
5668    } = options;
5669    const resolvedActiveTriggerIdRef = React22.useRef(null);
5670    const open2 = store.useState("open");
5671    const reactiveTriggerCount = store.useState("triggerCount");
5672    const activeTriggerId = store.useState("activeTriggerId");
5673    const reactiveActiveTriggerElement = store.useState("activeTriggerElement");
5674    useIsoLayoutEffect(() => {
5675      if (!open2) {
5676        resolvedActiveTriggerIdRef.current = null;
5677        if (store.state.triggerCount !== 0) {
5678          store.set("triggerCount", 0);
5679        }
5680        return;
5681      }
5682      const triggerCount = store.context.triggerElements.size;
5683      const stateUpdates = {};
5684      if (store.state.triggerCount !== triggerCount) {
5685        stateUpdates.triggerCount = triggerCount;
5686      }
5687      const currentActiveTriggerId = store.select("activeTriggerId");
5688      let lostActiveTriggerId = null;
5689      if (currentActiveTriggerId) {
5690        const activeTriggerElement = store.context.triggerElements.getById(currentActiveTriggerId);
5691        if (!activeTriggerElement) {
5692          for (const [triggerId, triggerElement] of store.context.triggerElements.entries()) {
5693            if (triggerElement === store.state.activeTriggerElement) {
5694              stateUpdates.activeTriggerId = triggerId;
5695              stateUpdates.activeTriggerElement = triggerElement;
5696              resolvedActiveTriggerIdRef.current = triggerId;
5697              break;
5698            }
5699          }
5700          if (stateUpdates.activeTriggerId === void 0) {
5701            if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) {
5702              lostActiveTriggerId = currentActiveTriggerId;
5703            } else {
5704              resolvedActiveTriggerIdRef.current = null;
5705            }
5706          }
5707        } else {
5708          resolvedActiveTriggerIdRef.current = currentActiveTriggerId;
5709          if (activeTriggerElement !== store.state.activeTriggerElement) {
5710            stateUpdates.activeTriggerElement = activeTriggerElement;
5711          }
5712        }
5713      } else {
5714        resolvedActiveTriggerIdRef.current = null;
5715      }
5716      if (!lostActiveTriggerId && !currentActiveTriggerId && triggerCount === 1) {
5717        const iteratorResult = store.context.triggerElements.entries().next();
5718        if (!iteratorResult.done) {
5719          const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;
5720          stateUpdates.activeTriggerId = implicitTriggerId;
5721          stateUpdates.activeTriggerElement = implicitTriggerElement;
5722          resolvedActiveTriggerIdRef.current = implicitTriggerId;
5723        }
5724      }
5725      if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0 || stateUpdates.activeTriggerElement !== void 0) {
5726        store.update(stateUpdates);
5727      }
5728      if (lostActiveTriggerId) {
5729        if (closeOnActiveTriggerUnmount) {
5730          queueMicrotask(() => {
5731            if (store.select("open") && store.select("activeTriggerId") === lostActiveTriggerId && !store.context.triggerElements.getById(lostActiveTriggerId)) {
5732              const eventDetails = createChangeEventDetails(reason_parts_exports.none);
5733              store.setOpen(false, eventDetails);
5734              if (!eventDetails.isCanceled) {
5735                store.update({
5736                  activeTriggerId: null,
5737                  activeTriggerElement: null
5738                });
5739              }
5740            }
5741          });
5742        }
5743      }
5744    }, [open2, store, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]);
5745  }
5746  function useOpenStateTransitions(open2, store, onUnmount, animateInitialOpen) {
5747    const {
5748      mounted,
5749      setMounted,
5750      transitionStatus
5751    } = useTransitionStatus(open2, false, false, animateInitialOpen);
5752    const preventUnmountingOnClose = store.useState("preventUnmountingOnClose");
5753    const syncedPreventUnmountingOnClose = open2 ? false : preventUnmountingOnClose;
5754    store.useSyncedValues({
5755      mounted,
5756      transitionStatus,
5757      preventUnmountingOnClose: syncedPreventUnmountingOnClose
5758    });
5759    const forceUnmount = useStableCallback(() => {
5760      setMounted(false);
5761      store.update({
5762        activeTriggerId: null,
5763        activeTriggerElement: null,
5764        mounted: false,
5765        preventUnmountingOnClose: false
5766      });
5767      onUnmount?.();
5768      store.context.onOpenChangeComplete?.(false);
5769    });
5770    useOpenChangeComplete({
5771      enabled: mounted && !open2 && !syncedPreventUnmountingOnClose,
5772      open: open2,
5773      ref: store.context.popupRef,
5774      onComplete() {
5775        if (!open2) {
5776          forceUnmount();
5777        }
5778      }
5779    });
5780    return {
5781      forceUnmount,
5782      transitionStatus
5783    };
5784  }
5785  function usePopupInteractionProps(store, statePart) {
5786    store.useSyncedValues(statePart);
5787    useIsoLayoutEffect(() => () => {
5788      store.update({
5789        activeTriggerProps: EMPTY_OBJECT,
5790        inactiveTriggerProps: EMPTY_OBJECT,
5791        popupProps: EMPTY_OBJECT
5792      });
5793    }, [store]);
5794  }
5795  
5796  // node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs
5797  var devElementIdsByMap;
5798  function getDevElementIds(map) {
5799    devElementIdsByMap ??= /* @__PURE__ */ new WeakMap();
5800    let elementIds = devElementIdsByMap.get(map);
5801    if (!elementIds) {
5802      elementIds = /* @__PURE__ */ new WeakMap();
5803      devElementIdsByMap.set(map, elementIds);
5804    }
5805    return elementIds;
5806  }
5807  var PopupTriggerMap = class {
5808    constructor() {
5809      this.idMap = /* @__PURE__ */ new Map();
5810    }
5811    /**
5812     * Adds a trigger element with the given ID.
5813     *
5814     * Note: The provided element is assumed to not be registered under multiple IDs.
5815     */
5816    add(id, element) {
5817      if (true) {
5818        const elementIds = getDevElementIds(this);
5819        const existingId = elementIds.get(element);
5820        if (existingId !== void 0 && existingId !== id) {
5821          throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
5822        }
5823        const previousElement = this.idMap.get(id);
5824        if (previousElement !== void 0 && previousElement !== element) {
5825          elementIds.delete(previousElement);
5826        }
5827        elementIds.set(element, id);
5828      }
5829      this.idMap.set(id, element);
5830    }
5831    /**
5832     * Removes the trigger element with the given ID.
5833     */
5834    delete(id) {
5835      if (true) {
5836        const element = this.idMap.get(id);
5837        if (element !== void 0) {
5838          devElementIdsByMap?.get(this)?.delete(element);
5839        }
5840      }
5841      this.idMap.delete(id);
5842    }
5843    /**
5844     * Whether the given element is registered as a trigger.
5845     */
5846    hasElement(element) {
5847      for (const registered of this.idMap.values()) {
5848        if (registered === element) {
5849          return true;
5850        }
5851      }
5852      return false;
5853    }
5854    /**
5855     * Whether there is a registered trigger element matching the given predicate.
5856     */
5857    hasMatchingElement(predicate) {
5858      for (const element of this.idMap.values()) {
5859        if (predicate(element)) {
5860          return true;
5861        }
5862      }
5863      return false;
5864    }
5865    /**
5866     * Returns the trigger element associated with the given ID, or undefined if no such element exists.
5867     */
5868    getById(id) {
5869      return this.idMap.get(id);
5870    }
5871    /**
5872     * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
5873     */
5874    entries() {
5875      return this.idMap.entries();
5876    }
5877    /**
5878     * Returns an iterable of all registered trigger elements.
5879     */
5880    elements() {
5881      return this.idMap.values();
5882    }
5883    /**
5884     * Returns the number of registered trigger elements.
5885     */
5886    get size() {
5887      return this.idMap.size;
5888    }
5889  };
5890  
5891  // node_modules/@base-ui/react/utils/popups/store.mjs
5892  function createInitialPopupStoreState(triggerElements, floatingId, nested = false) {
5893    return {
5894      open: false,
5895      openProp: void 0,
5896      mounted: false,
5897      transitionStatus: void 0,
5898      floatingRootContext: new FloatingRootStore({
5899        open: false,
5900        transitionStatus: void 0,
5901        floatingElement: null,
5902        referenceElement: null,
5903        triggerElements,
5904        floatingId,
5905        syncOnly: true,
5906        nested,
5907        onOpenChange: void 0
5908      }),
5909      floatingId,
5910      triggerCount: 0,
5911      preventUnmountingOnClose: false,
5912      payload: void 0,
5913      activeTriggerId: null,
5914      activeTriggerElement: null,
5915      triggerIdProp: void 0,
5916      popupElement: null,
5917      positionerElement: null,
5918      activeTriggerProps: EMPTY_OBJECT,
5919      inactiveTriggerProps: EMPTY_OBJECT,
5920      popupProps: EMPTY_OBJECT
5921    };
5922  }
5923  var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId;
5924  var openSelector = (state) => state.openProp ?? state.open;
5925  var popupIdSelector = (state) => {
5926    const popupId = state.popupElement?.id ?? state.floatingId;
5927    return popupId || void 0;
5928  };
5929  function triggerOwnsOpenPopup(state, triggerId) {
5930    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId;
5931  }
5932  function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) {
5933    if (triggerOwnsOpenPopup(state, triggerId)) {
5934      return true;
5935    }
5936    return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && state.triggerCount === 1;
5937  }
5938  var popupStoreSelectors = {
5939    open: openSelector,
5940    mounted: (state) => state.mounted,
5941    transitionStatus: (state) => state.transitionStatus,
5942    floatingRootContext: (state) => state.floatingRootContext,
5943    triggerCount: (state) => state.triggerCount,
5944    preventUnmountingOnClose: (state) => state.preventUnmountingOnClose,
5945    payload: (state) => state.payload,
5946    activeTriggerId: activeTriggerIdSelector,
5947    activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null,
5948    popupId: popupIdSelector,
5949    /**
5950     * Whether the trigger with the given ID was used to open the popup.
5951     */
5952    isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId,
5953    /**
5954     * Whether the popup is open and was activated by a trigger with the given ID.
5955     */
5956    isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId),
5957    /**
5958     * Whether the popup is mounted and was activated by a trigger with the given ID.
5959     */
5960    isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted,
5961    triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps,
5962    /**
5963     * Popup id for the trigger that currently owns the open popup.
5964     */
5965    triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0,
5966    popupProps: (state) => state.popupProps,
5967    popupElement: (state) => state.popupElement,
5968    positionerElement: (state) => state.positionerElement
5969  };
5970  
5971  // node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs
5972  var React23 = __toESM(require_react(), 1);
5973  var import_shim2 = __toESM(require_shim(), 1);
5974  function usePopupHandleStore(handle) {
5975    const subscribe = React23.useCallback((listener) => {
5976      if (handle === void 0) {
5977        return NOOP;
5978      }
5979      return handle.subscribeStore(listener);
5980    }, [handle]);
5981    const getSnapshot = React23.useCallback(() => {
5982      return handle === void 0 ? void 0 : handle.store;
5983    }, [handle]);
5984    return (0, import_shim2.useSyncExternalStore)(subscribe, getSnapshot, () => handle?.serverStore);
5985  }
5986  
5987  // node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs
5988  function useBaseUIFloating(options) {
5989    return useFloatingWithStore(options, options.rootContext);
5990  }
5991  function useFloatingWithStore(options, store) {
5992    const {
5993      nodeId,
5994      externalTree
5995    } = options;
5996    const referenceElement = store.useState("referenceElement");
5997    const floatingElement = store.useState("floatingElement");
5998    const domReferenceElement = store.useState("domReferenceElement");
5999    const open2 = store.useState("open");
6000    const floatingId = store.useState("floatingId");
6001    const [positionReference, setPositionReferenceRaw] = React24.useState(null);
6002    const [localDomReference, setLocalDomReference] = React24.useState(void 0);
6003    const [localFloatingElement, setLocalFloatingElement] = React24.useState(void 0);
6004    const domReferenceRef = React24.useRef(null);
6005    const tree = useFloatingTree(externalTree);
6006    const storeElements = React24.useMemo(() => ({
6007      reference: referenceElement,
6008      floating: floatingElement,
6009      domReference: domReferenceElement
6010    }), [referenceElement, floatingElement, domReferenceElement]);
6011    const position = useFloating({
6012      ...options,
6013      elements: {
6014        ...storeElements,
6015        ...positionReference && {
6016          reference: positionReference
6017        }
6018      }
6019    });
6020    const localDomReferenceElement = isElement(localDomReference) ? localDomReference : null;
6021    const syncedFloatingElement = localFloatingElement === void 0 ? store.state.floatingElement : localFloatingElement;
6022    store.useSyncedValue("referenceElement", localDomReference ?? null);
6023    store.useSyncedValue("domReferenceElement", localDomReference === void 0 ? domReferenceElement : localDomReferenceElement);
6024    store.useSyncedValue("floatingElement", syncedFloatingElement);
6025    const setPositionReference = React24.useCallback((node) => {
6026      const computedPositionReference = isElement(node) ? {
6027        getBoundingClientRect: () => node.getBoundingClientRect(),
6028        getClientRects: () => node.getClientRects(),
6029        contextElement: node
6030      } : node;
6031      setPositionReferenceRaw(computedPositionReference);
6032      position.refs.setReference(computedPositionReference);
6033    }, [position.refs]);
6034    const setReference = React24.useCallback((node) => {
6035      if (isElement(node) || node === null) {
6036        domReferenceRef.current = node;
6037        setLocalDomReference(node);
6038      }
6039      if (isElement(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
6040      // `null` to support `positionReference` + an unstable `reference`
6041      // callback ref.
6042      node !== null && !isElement(node)) {
6043        position.refs.setReference(node);
6044      }
6045    }, [position.refs, setLocalDomReference]);
6046    const setFloating = React24.useCallback((node) => {
6047      setLocalFloatingElement(node);
6048      position.refs.setFloating(node);
6049    }, [position.refs]);
6050    const refs = React24.useMemo(() => ({
6051      ...position.refs,
6052      setReference,
6053      setFloating,
6054      setPositionReference,
6055      domReference: domReferenceRef
6056    }), [position.refs, setReference, setFloating, setPositionReference]);
6057    const elements2 = React24.useMemo(() => ({
6058      ...position.elements,
6059      domReference: domReferenceElement
6060    }), [position.elements, domReferenceElement]);
6061    const context = React24.useMemo(() => ({
6062      ...position,
6063      dataRef: store.context.dataRef,
6064      open: open2,
6065      onOpenChange: store.setOpen,
6066      events: store.context.events,
6067      floatingId,
6068      refs,
6069      elements: elements2,
6070      nodeId,
6071      rootStore: store
6072    }), [position, refs, elements2, nodeId, store, open2, floatingId]);
6073    useIsoLayoutEffect(() => {
6074      if (domReferenceElement) {
6075        domReferenceRef.current = domReferenceElement;
6076      }
6077    }, [domReferenceElement]);
6078    useIsoLayoutEffect(() => {
6079      store.context.dataRef.current.floatingContext = context;
6080      const node = tree?.nodesRef.current.find((n) => n.id === nodeId);
6081      if (node) {
6082        node.context = context;
6083      }
6084    });
6085    return React24.useMemo(() => ({
6086      ...position,
6087      context,
6088      refs,
6089      elements: elements2,
6090      rootStore: store
6091    }), [position, refs, elements2, context, store]);
6092  }
6093  
6094  // node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs
6095  var React25 = __toESM(require_react(), 1);
6096  var isMacSafari = parts_exports.os.mac && parts_exports.engine.webkit;
6097  function useFocus(context, props = {}) {
6098    const {
6099      enabled = true,
6100      delay
6101    } = props;
6102    const store = "rootStore" in context ? context.rootStore : context;
6103    const {
6104      events,
6105      dataRef
6106    } = store.context;
6107    const blockFocusRef = React25.useRef(false);
6108    const blockedReferenceRef = React25.useRef(null);
6109    const keyboardModalityRef = React25.useRef(true);
6110    const timeout = useTimeout();
6111    React25.useEffect(() => {
6112      const domReference = store.select("domReferenceElement");
6113      if (!enabled) {
6114        return void 0;
6115      }
6116      const win = getWindow(domReference);
6117      function onBlur() {
6118        const currentDomReference = store.select("domReferenceElement");
6119        if (!store.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) {
6120          blockFocusRef.current = true;
6121          blockedReferenceRef.current = currentDomReference;
6122        }
6123      }
6124      function onKeyDown() {
6125        keyboardModalityRef.current = true;
6126      }
6127      function onPointerDown() {
6128        keyboardModalityRef.current = false;
6129      }
6130      return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true));
6131    }, [store, enabled]);
6132    React25.useEffect(() => {
6133      if (!enabled) {
6134        return void 0;
6135      }
6136      function onOpenChangeLocal(details) {
6137        if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) {
6138          const referenceElement = store.select("domReferenceElement");
6139          if (isElement(referenceElement)) {
6140            blockedReferenceRef.current = referenceElement;
6141            blockFocusRef.current = true;
6142          }
6143        }
6144      }
6145      events.on("openchange", onOpenChangeLocal);
6146      return () => {
6147        events.off("openchange", onOpenChangeLocal);
6148      };
6149    }, [events, enabled, store]);
6150    const reference = React25.useMemo(() => {
6151      function resetBlockedFocus() {
6152        blockFocusRef.current = false;
6153        blockedReferenceRef.current = null;
6154      }
6155      return {
6156        onMouseLeave() {
6157          resetBlockedFocus();
6158        },
6159        onFocus(event) {
6160          const focusTarget = event.currentTarget;
6161          if (blockFocusRef.current) {
6162            if (blockedReferenceRef.current === focusTarget) {
6163              return;
6164            }
6165            resetBlockedFocus();
6166          }
6167          const target = getTarget(event.nativeEvent);
6168          if (isElement(target)) {
6169            if (isMacSafari && !event.relatedTarget) {
6170              if (!keyboardModalityRef.current && !isTypeableElement(target)) {
6171                return;
6172              }
6173            } else if (!matchesFocusVisible(target)) {
6174              return;
6175            }
6176          }
6177          const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements);
6178          const {
6179            nativeEvent,
6180            currentTarget
6181          } = event;
6182          const delayValue = typeof delay === "function" ? delay() : delay;
6183          if (store.select("open") && movedFromOtherEnabledTrigger || delayValue === 0 || delayValue === void 0) {
6184            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6185            return;
6186          }
6187          timeout.start(delayValue, () => {
6188            if (blockFocusRef.current) {
6189              return;
6190            }
6191            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget));
6192          });
6193        },
6194        onBlur(event) {
6195          resetBlockedFocus();
6196          const relatedTarget = event.relatedTarget;
6197          const nativeEvent = event.nativeEvent;
6198          const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside";
6199          timeout.start(0, () => {
6200            const domReference = store.select("domReferenceElement");
6201            const activeEl = activeElement(ownerDocument(domReference));
6202            if (!relatedTarget && activeEl === domReference) {
6203              return;
6204            }
6205            if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {
6206              return;
6207            }
6208            const nextFocusedElement = relatedTarget ?? activeEl;
6209            if (isTargetInsideEnabledTrigger(nextFocusedElement, store.context.triggerElements)) {
6210              return;
6211            }
6212            store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent));
6213          });
6214        }
6215      };
6216    }, [dataRef, delay, store, timeout]);
6217    return React25.useMemo(() => enabled ? {
6218      reference,
6219      trigger: reference
6220    } : {}, [enabled, reference]);
6221  }
6222  
6223  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6224  var React26 = __toESM(require_react(), 1);
6225  
6226  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs
6227  var HoverInteraction = class _HoverInteraction {
6228    constructor() {
6229      this.pointerType = void 0;
6230      this.interactedInside = false;
6231      this.handler = void 0;
6232      this.blockMouseMove = true;
6233      this.performedPointerEventsMutation = false;
6234      this.pointerEventsScopeElement = null;
6235      this.pointerEventsReferenceElement = null;
6236      this.pointerEventsFloatingElement = null;
6237      this.restTimeoutPending = false;
6238      this.openChangeTimeout = new Timeout();
6239      this.restTimeout = new Timeout();
6240      this.handleCloseOptions = void 0;
6241    }
6242    static create() {
6243      return new _HoverInteraction();
6244    }
6245    dispose = () => {
6246      this.openChangeTimeout.clear();
6247      this.restTimeout.clear();
6248    };
6249    disposeEffect = () => {
6250      return this.dispose;
6251    };
6252  };
6253  var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap();
6254  function clearSafePolygonPointerEventsMutation(instance) {
6255    if (!instance.performedPointerEventsMutation) {
6256      return;
6257    }
6258    const scopeElement = instance.pointerEventsScopeElement;
6259    if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) {
6260      instance.pointerEventsScopeElement?.style.removeProperty("pointer-events");
6261      instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events");
6262      instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events");
6263      pointerEventsMutationOwnerByScopeElement.delete(scopeElement);
6264    }
6265    instance.performedPointerEventsMutation = false;
6266    instance.pointerEventsScopeElement = null;
6267    instance.pointerEventsReferenceElement = null;
6268    instance.pointerEventsFloatingElement = null;
6269  }
6270  function applySafePolygonPointerEventsMutation(instance, options) {
6271    const {
6272      scopeElement,
6273      referenceElement,
6274      floatingElement
6275    } = options;
6276    const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement);
6277    if (existingOwner && existingOwner !== instance) {
6278      clearSafePolygonPointerEventsMutation(existingOwner);
6279    }
6280    clearSafePolygonPointerEventsMutation(instance);
6281    instance.performedPointerEventsMutation = true;
6282    instance.pointerEventsScopeElement = scopeElement;
6283    instance.pointerEventsReferenceElement = referenceElement;
6284    instance.pointerEventsFloatingElement = floatingElement;
6285    pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance);
6286    scopeElement.style.pointerEvents = "none";
6287    referenceElement.style.pointerEvents = "auto";
6288    floatingElement.style.pointerEvents = "auto";
6289  }
6290  function useHoverInteractionSharedState(store) {
6291    const data = store.context.dataRef.current;
6292    const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current;
6293    if (!data.hoverInteractionState) {
6294      data.hoverInteractionState = instance;
6295    }
6296    useOnMount(data.hoverInteractionState.disposeEffect);
6297    return data.hoverInteractionState;
6298  }
6299  
6300  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs
6301  function useHoverFloatingInteraction(context, parameters = {}) {
6302    const {
6303      enabled = true,
6304      closeDelay: closeDelayProp = 0,
6305      nodeId: nodeIdProp
6306    } = parameters;
6307    const store = "rootStore" in context ? context.rootStore : context;
6308    const open2 = store.useState("open");
6309    const floatingElement = store.useState("floatingElement");
6310    const domReferenceElement = store.useState("domReferenceElement");
6311    const {
6312      dataRef
6313    } = store.context;
6314    const tree = useFloatingTree();
6315    const parentId = useFloatingParentNodeId();
6316    const instance = useHoverInteractionSharedState(store);
6317    const childClosedTimeout = useTimeout();
6318    const isClickLikeOpenEvent2 = useStableCallback(() => {
6319      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6320    });
6321    const isHoverOpen = useStableCallback(() => {
6322      return isHoverOpenEvent(dataRef.current.openEvent?.type);
6323    });
6324    const clearPointerEvents = useStableCallback(() => {
6325      clearSafePolygonPointerEventsMutation(instance);
6326    });
6327    useIsoLayoutEffect(() => {
6328      if (!open2) {
6329        instance.pointerType = void 0;
6330        instance.restTimeoutPending = false;
6331        instance.interactedInside = false;
6332        clearPointerEvents();
6333      }
6334    }, [open2, instance, clearPointerEvents]);
6335    React26.useEffect(() => {
6336      return clearPointerEvents;
6337    }, [clearPointerEvents]);
6338    useIsoLayoutEffect(() => {
6339      if (!enabled) {
6340        return void 0;
6341      }
6342      if (open2 && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {
6343        const ref = domReferenceElement;
6344        const floatingEl = floatingElement;
6345        const doc = ownerDocument(floatingElement);
6346        const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating;
6347        if (parentFloating) {
6348          parentFloating.style.pointerEvents = "";
6349        }
6350        const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null;
6351        const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null;
6352        const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? ref.closest("[data-rootownerid]") ?? doc.body;
6353        applySafePolygonPointerEventsMutation(instance, {
6354          scopeElement,
6355          referenceElement: ref,
6356          floatingElement: floatingEl
6357        });
6358        return () => {
6359          clearPointerEvents();
6360        };
6361      }
6362      return void 0;
6363    }, [enabled, open2, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]);
6364    React26.useEffect(() => {
6365      if (!enabled) {
6366        return void 0;
6367      }
6368      function hasParentChildren() {
6369        return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0);
6370      }
6371      function closeWithDelay(event) {
6372        const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType);
6373        const close = () => {
6374          store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6375          tree?.events.emit("floating.closed", event);
6376        };
6377        if (closeDelay) {
6378          instance.openChangeTimeout.start(closeDelay, close);
6379        } else {
6380          instance.openChangeTimeout.clear();
6381          close();
6382        }
6383      }
6384      function handleInteractInside(event) {
6385        const target = getTarget(event);
6386        if (!isInteractiveElement(target)) {
6387          instance.interactedInside = false;
6388          return;
6389        }
6390        instance.interactedInside = target?.closest("[aria-haspopup]") != null;
6391      }
6392      function onFloatingMouseEnter() {
6393        instance.openChangeTimeout.clear();
6394        childClosedTimeout.clear();
6395        tree?.events.off("floating.closed", onNodeClosed);
6396        clearPointerEvents();
6397      }
6398      function onFloatingMouseLeave(event) {
6399        if (hasParentChildren() && tree) {
6400          tree.events.on("floating.closed", onNodeClosed);
6401          return;
6402        }
6403        if (isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) {
6404          return;
6405        }
6406        const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp;
6407        const relatedTarget = event.relatedTarget;
6408        const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget));
6409        if (isMovingIntoDescendantFloating) {
6410          return;
6411        }
6412        if (instance.handler) {
6413          instance.handler(event);
6414          return;
6415        }
6416        clearPointerEvents();
6417        if (isHoverOpen() && !isClickLikeOpenEvent2()) {
6418          closeWithDelay(event);
6419        }
6420      }
6421      function onNodeClosed(event) {
6422        if (!tree || !parentId || hasParentChildren()) {
6423          return;
6424        }
6425        childClosedTimeout.start(0, () => {
6426          tree.events.off("floating.closed", onNodeClosed);
6427          store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6428          tree.events.emit("floating.closed", event);
6429        });
6430      }
6431      const floating = floatingElement;
6432      return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => {
6433        tree?.events.off("floating.closed", onNodeClosed);
6434      });
6435    }, [enabled, floatingElement, store, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]);
6436  }
6437  
6438  // node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs
6439  var React27 = __toESM(require_react(), 1);
6440  var ReactDOM5 = __toESM(require_react_dom(), 1);
6441  var EMPTY_REF = {
6442    current: null
6443  };
6444  function useHoverReferenceInteraction(context, props = {}) {
6445    const {
6446      enabled = true,
6447      delay = 0,
6448      handleClose = null,
6449      mouseOnly = false,
6450      restMs = 0,
6451      move = true,
6452      triggerElementRef = EMPTY_REF,
6453      externalTree,
6454      isActiveTrigger = true,
6455      getHandleCloseContext,
6456      isClosing,
6457      shouldOpen: shouldOpenProp,
6458      guardStaleOpen = false
6459    } = props;
6460    const store = "rootStore" in context ? context.rootStore : context;
6461    const {
6462      dataRef,
6463      events
6464    } = store.context;
6465    const tree = useFloatingTree(externalTree);
6466    const instance = useHoverInteractionSharedState(store);
6467    const isHoverCloseActiveRef = React27.useRef(false);
6468    const handleCloseRef = useValueAsRef(handleClose);
6469    const delayRef = useValueAsRef(delay);
6470    const restMsRef = useValueAsRef(restMs);
6471    const enabledRef = useValueAsRef(enabled);
6472    const shouldOpenRef = useValueAsRef(shouldOpenProp);
6473    const isClosingRef = useValueAsRef(isClosing);
6474    const isClickLikeOpenEvent2 = useStableCallback(() => {
6475      return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside);
6476    });
6477    const checkShouldOpen = useStableCallback(() => {
6478      return shouldOpenRef.current?.() !== false;
6479    });
6480    const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => {
6481      const allTriggers = store.context.triggerElements;
6482      if (allTriggers.hasElement(currentTarget)) {
6483        return !currentDomReference || !contains(currentDomReference, currentTarget);
6484      }
6485      if (!isElement(target)) {
6486        return false;
6487      }
6488      const targetElement = target;
6489      return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement));
6490    });
6491    const cleanupMouseMoveHandler = useStableCallback(() => {
6492      if (!instance.handler) {
6493        return;
6494      }
6495      const doc = ownerDocument(store.select("domReferenceElement"));
6496      doc.removeEventListener("mousemove", instance.handler);
6497      instance.handler = void 0;
6498    });
6499    const clearPointerEvents = useStableCallback(() => {
6500      clearSafePolygonPointerEventsMutation(instance);
6501    });
6502    if (isActiveTrigger) {
6503      instance.handleCloseOptions = handleClose?.__options;
6504    }
6505    React27.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]);
6506    React27.useEffect(() => {
6507      if (!enabled) {
6508        return void 0;
6509      }
6510      function onOpenChangeLocal(details) {
6511        if (!details.open) {
6512          isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover;
6513          cleanupMouseMoveHandler();
6514          instance.openChangeTimeout.clear();
6515          instance.restTimeout.clear();
6516          instance.blockMouseMove = true;
6517          instance.restTimeoutPending = false;
6518        } else {
6519          isHoverCloseActiveRef.current = false;
6520        }
6521      }
6522      events.on("openchange", onOpenChangeLocal);
6523      return () => {
6524        events.off("openchange", onOpenChangeLocal);
6525      };
6526    }, [enabled, events, instance, cleanupMouseMoveHandler]);
6527    React27.useEffect(() => {
6528      if (!enabled) {
6529        return void 0;
6530      }
6531      function closeWithDelay(event, runElseBranch = true) {
6532        const closeDelay = getDelay(delayRef.current, "close", instance.pointerType);
6533        if (closeDelay) {
6534          instance.openChangeTimeout.start(closeDelay, () => {
6535            store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6536            tree?.events.emit("floating.closed", event);
6537          });
6538        } else if (runElseBranch) {
6539          instance.openChangeTimeout.clear();
6540          store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
6541          tree?.events.emit("floating.closed", event);
6542        }
6543      }
6544      const trigger = triggerElementRef.current ?? (isActiveTrigger ? store.select("domReferenceElement") : null);
6545      if (!isElement(trigger)) {
6546        return void 0;
6547      }
6548      function onMouseEnter(event) {
6549        instance.openChangeTimeout.clear();
6550        instance.blockMouseMove = false;
6551        if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6552          return;
6553        }
6554        const restMsValue = getRestMs(restMsRef.current);
6555        const openDelay = getDelay(delayRef.current, "open", instance.pointerType);
6556        const eventTarget = getTarget(event);
6557        const currentTarget = event.currentTarget ?? null;
6558        const currentDomReference = store.select("domReferenceElement");
6559        let triggerNode = currentTarget;
6560        if (isElement(eventTarget) && !store.context.triggerElements.hasElement(eventTarget)) {
6561          for (const triggerElement of store.context.triggerElements.elements()) {
6562            if (contains(triggerElement, eventTarget)) {
6563              triggerNode = triggerElement;
6564              break;
6565            }
6566          }
6567        }
6568        if (isElement(currentTarget) && isElement(currentDomReference) && !store.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) {
6569          triggerNode = currentDomReference;
6570        }
6571        const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget);
6572        const isOpen = store.select("open");
6573        const isInClosingTransition = isClosingRef.current?.() ?? store.select("transitionStatus") === "ending";
6574        const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current;
6575        const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition;
6576        const isRestOnlyDelay = restMsValue > 0 && !openDelay;
6577        const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition;
6578        const shouldOpen = !isOpen || isOverInactive;
6579        if (shouldOpenImmediately) {
6580          if (checkShouldOpen()) {
6581            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6582          }
6583          return;
6584        }
6585        if (isRestOnlyDelay) {
6586          return;
6587        }
6588        if (openDelay) {
6589          instance.openChangeTimeout.start(openDelay, () => {
6590            if (shouldOpen && checkShouldOpen()) {
6591              store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6592            }
6593          });
6594        } else if (shouldOpen) {
6595          if (checkShouldOpen()) {
6596            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode));
6597          }
6598        }
6599      }
6600      function onMouseLeave(event) {
6601        if (isClickLikeOpenEvent2()) {
6602          clearPointerEvents();
6603          return;
6604        }
6605        cleanupMouseMoveHandler();
6606        const domReferenceElement = store.select("domReferenceElement");
6607        const doc = ownerDocument(domReferenceElement);
6608        instance.restTimeout.clear();
6609        instance.restTimeoutPending = false;
6610        const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.();
6611        if (isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) {
6612          return;
6613        }
6614        if (handleCloseRef.current && handleCloseContextBase) {
6615          if (!store.select("open")) {
6616            instance.openChangeTimeout.clear();
6617          }
6618          const currentTrigger = triggerElementRef.current;
6619          instance.handler = handleCloseRef.current({
6620            ...handleCloseContextBase,
6621            tree,
6622            x: event.clientX,
6623            y: event.clientY,
6624            onClose() {
6625              clearPointerEvents();
6626              cleanupMouseMoveHandler();
6627              if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store.select("domReferenceElement")) {
6628                closeWithDelay(event, true);
6629              }
6630            }
6631          });
6632          doc.addEventListener("mousemove", instance.handler);
6633          instance.handler(event);
6634          return;
6635        }
6636        const shouldClose = instance.pointerType === "touch" ? !contains(store.select("floatingElement"), event.relatedTarget) : true;
6637        if (shouldClose) {
6638          closeWithDelay(event);
6639        }
6640      }
6641      function onMouseOut(event) {
6642        if (contains(trigger, event.relatedTarget)) {
6643          return;
6644        }
6645        instance.openChangeTimeout.clear();
6646        instance.restTimeout.clear();
6647        instance.restTimeoutPending = false;
6648      }
6649      const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, "mouseout", onMouseOut) : void 0;
6650      if (move) {
6651        return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, {
6652          once: true
6653        }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
6654      }
6655      return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard);
6656    }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]);
6657    return React27.useMemo(() => {
6658      if (!enabled) {
6659        return void 0;
6660      }
6661      function setPointerRef(event) {
6662        instance.pointerType = event.pointerType;
6663      }
6664      return {
6665        onPointerDown: setPointerRef,
6666        onPointerEnter: setPointerRef,
6667        onMouseMove(event) {
6668          const {
6669            nativeEvent
6670          } = event;
6671          const trigger = event.currentTarget;
6672          const currentDomReference = store.select("domReferenceElement");
6673          const currentOpen = store.select("open");
6674          const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target);
6675          if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) {
6676            return;
6677          }
6678          if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) {
6679            const floatingElement = store.select("floatingElement");
6680            if (floatingElement) {
6681              const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body;
6682              applySafePolygonPointerEventsMutation(instance, {
6683                scopeElement,
6684                referenceElement: trigger,
6685                floatingElement
6686              });
6687            }
6688          }
6689          const restMsValue = getRestMs(restMsRef.current);
6690          if (currentOpen && !isOverInactive || restMsValue === 0) {
6691            return;
6692          }
6693          if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) {
6694            return;
6695          }
6696          instance.restTimeout.clear();
6697          function handleMouseMove() {
6698            instance.restTimeoutPending = false;
6699            if (isClickLikeOpenEvent2()) {
6700              return;
6701            }
6702            const latestOpen = store.select("open");
6703            if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) {
6704              store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger));
6705            }
6706          }
6707          if (instance.pointerType === "touch") {
6708            ReactDOM5.flushSync(() => {
6709              handleMouseMove();
6710            });
6711          } else if (isOverInactive && currentOpen) {
6712            handleMouseMove();
6713          } else {
6714            instance.restTimeoutPending = true;
6715            instance.restTimeout.start(restMsValue, handleMouseMove);
6716          }
6717        }
6718      };
6719    }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store, restMsRef, checkShouldOpen]);
6720  }
6721  
6722  // node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs
6723  var CURSOR_SPEED_THRESHOLD = 0.1;
6724  var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD;
6725  var POLYGON_BUFFER = 0.5;
6726  function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) {
6727    return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi;
6728  }
6729  function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) {
6730    let isInsideValue = false;
6731    if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) {
6732      isInsideValue = !isInsideValue;
6733    }
6734    if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) {
6735      isInsideValue = !isInsideValue;
6736    }
6737    if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) {
6738      isInsideValue = !isInsideValue;
6739    }
6740    if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) {
6741      isInsideValue = !isInsideValue;
6742    }
6743    return isInsideValue;
6744  }
6745  function isInsideRect(pointX, pointY, rect) {
6746    return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height;
6747  }
6748  function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) {
6749    const minX = Math.min(x1, x2);
6750    const maxX = Math.max(x1, x2);
6751    const minY = Math.min(y1, y2);
6752    const maxY = Math.max(y1, y2);
6753    return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY;
6754  }
6755  function safePolygon(options = {}) {
6756    const {
6757      blockPointerEvents = false
6758    } = options;
6759    const timeout = new Timeout();
6760    const fn = ({
6761      x: x2,
6762      y: y2,
6763      placement,
6764      elements: elements2,
6765      onClose,
6766      nodeId,
6767      tree
6768    }) => {
6769      const side = placement?.split("-")[0];
6770      let hasLanded = false;
6771      let lastX = null;
6772      let lastY = null;
6773      let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0;
6774      function isCursorMovingSlowly(nextX, nextY) {
6775        const currentTime = performance.now();
6776        const elapsedTime = currentTime - lastCursorTime;
6777        if (lastX === null || lastY === null || elapsedTime === 0) {
6778          lastX = nextX;
6779          lastY = nextY;
6780          lastCursorTime = currentTime;
6781          return false;
6782        }
6783        const deltaX = nextX - lastX;
6784        const deltaY = nextY - lastY;
6785        const distanceSquared = deltaX * deltaX + deltaY * deltaY;
6786        const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED;
6787        lastX = nextX;
6788        lastY = nextY;
6789        lastCursorTime = currentTime;
6790        return distanceSquared < thresholdSquared;
6791      }
6792      function close() {
6793        timeout.clear();
6794        onClose();
6795      }
6796      return function onMouseMove(event) {
6797        timeout.clear();
6798        const domReference = elements2.domReference;
6799        const floating = elements2.floating;
6800        if (!domReference || !floating || side == null || x2 == null || y2 == null) {
6801          return void 0;
6802        }
6803        const {
6804          clientX,
6805          clientY
6806        } = event;
6807        const target = getTarget(event);
6808        const isLeave = event.type === "mouseleave";
6809        const isOverFloatingEl = contains(floating, target);
6810        const isOverReferenceEl = contains(domReference, target);
6811        if (isOverFloatingEl) {
6812          hasLanded = true;
6813          if (!isLeave) {
6814            return void 0;
6815          }
6816        }
6817        if (isOverReferenceEl) {
6818          hasLanded = false;
6819          if (!isLeave) {
6820            hasLanded = true;
6821            return void 0;
6822          }
6823        }
6824        if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) {
6825          return void 0;
6826        }
6827        function hasOpenChildNode() {
6828          return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0);
6829        }
6830        function closeIfNoOpenChild() {
6831          if (!hasOpenChildNode()) {
6832            close();
6833          }
6834        }
6835        if (hasOpenChildNode()) {
6836          return void 0;
6837        }
6838        const refRect = domReference.getBoundingClientRect();
6839        const rect = floating.getBoundingClientRect();
6840        const cursorLeaveFromRight = x2 > rect.right - rect.width / 2;
6841        const cursorLeaveFromBottom = y2 > rect.bottom - rect.height / 2;
6842        const isFloatingWider = rect.width > refRect.width;
6843        const isFloatingTaller = rect.height > refRect.height;
6844        const left = (isFloatingWider ? refRect : rect).left;
6845        const right = (isFloatingWider ? refRect : rect).right;
6846        const top = (isFloatingTaller ? refRect : rect).top;
6847        const bottom = (isFloatingTaller ? refRect : rect).bottom;
6848        if (side === "top" && y2 >= refRect.bottom - 1 || side === "bottom" && y2 <= refRect.top + 1 || side === "left" && x2 >= refRect.right - 1 || side === "right" && x2 <= refRect.left + 1) {
6849          closeIfNoOpenChild();
6850          return void 0;
6851        }
6852        let isInsideTroughRect = false;
6853        switch (side) {
6854          case "top":
6855            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1);
6856            break;
6857          case "bottom":
6858            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1);
6859            break;
6860          case "left":
6861            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top);
6862            break;
6863          case "right":
6864            isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top);
6865            break;
6866          default:
6867        }
6868        if (isInsideTroughRect) {
6869          return void 0;
6870        }
6871        if (hasLanded && !isInsideRect(clientX, clientY, refRect)) {
6872          closeIfNoOpenChild();
6873          return void 0;
6874        }
6875        if (!isLeave && isCursorMovingSlowly(clientX, clientY)) {
6876          closeIfNoOpenChild();
6877          return void 0;
6878        }
6879        let isInsidePolygon = false;
6880        switch (side) {
6881          case "top": {
6882            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6883            const cursorPointOneX = isFloatingWider ? x2 + cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset;
6884            const cursorPointTwoX = isFloatingWider ? x2 - cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset;
6885            const cursorPointY = y2 + POLYGON_BUFFER + 1;
6886            const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top;
6887            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER;
6888            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6889            break;
6890          }
6891          case "bottom": {
6892            const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6893            const cursorPointOneX = isFloatingWider ? x2 + cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset;
6894            const cursorPointTwoX = isFloatingWider ? x2 - cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset;
6895            const cursorPointY = y2 - POLYGON_BUFFER;
6896            const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom;
6897            const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER;
6898            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight);
6899            break;
6900          }
6901          case "left": {
6902            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6903            const cursorPointOneY = isFloatingTaller ? y2 + cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset;
6904            const cursorPointTwoY = isFloatingTaller ? y2 - cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset;
6905            const cursorPointX = x2 + POLYGON_BUFFER + 1;
6906            const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left;
6907            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER;
6908            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY);
6909            break;
6910          }
6911          case "right": {
6912            const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4;
6913            const cursorPointOneY = isFloatingTaller ? y2 + cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset;
6914            const cursorPointTwoY = isFloatingTaller ? y2 - cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset;
6915            const cursorPointX = x2 - POLYGON_BUFFER;
6916            const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right;
6917            const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER;
6918            isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom);
6919            break;
6920          }
6921          default:
6922        }
6923        if (!isInsidePolygon) {
6924          closeIfNoOpenChild();
6925        } else if (!hasLanded) {
6926          timeout.start(40, closeIfNoOpenChild);
6927        }
6928        return void 0;
6929      };
6930    };
6931    fn.__options = {
6932      ...options,
6933      blockPointerEvents
6934    };
6935    return fn;
6936  }
6937  
6938  // node_modules/@base-ui/react/utils/NullStore.mjs
6939  var NullStore = class extends ReactStore {
6940    // `update`/`set`/`notifyAll` funnel through `setState` in the base `Store`, so overriding
6941    // `setState` alone would neutralize them today. They are overridden explicitly so the store stays
6942    // inert even if a future base-class change stops routing a mutator through `setState`.
6943    setState(_newState) {
6944    }
6945    update(_changes) {
6946    }
6947    set(_key, _value) {
6948    }
6949    notifyAll() {
6950    }
6951  };
6952  
6953  // node_modules/@base-ui/utils/inertValue.mjs
6954  function inertValue(value) {
6955    if (isReactVersionAtLeast(19)) {
6956      return value;
6957    }
6958    return value ? "true" : void 0;
6959  }
6960  
6961  // node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
6962  var React28 = __toESM(require_react(), 1);
6963  var DirectionContext = /* @__PURE__ */ React28.createContext(void 0);
6964  if (true) DirectionContext.displayName = "DirectionContext";
6965  function useDirection() {
6966    const context = React28.useContext(DirectionContext);
6967    return context?.direction ?? "ltr";
6968  }
6969  
6970  // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
6971  var React29 = __toESM(require_react(), 1);
6972  
6973  // node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs
6974  var baseArrow = (options) => ({
6975    name: "arrow",
6976    options,
6977    async fn(state) {
6978      const {
6979        x: x2,
6980        y: y2,
6981        placement,
6982        rects,
6983        platform: platform3,
6984        elements: elements2,
6985        middlewareData
6986      } = state;
6987      const {
6988        element,
6989        padding = 0,
6990        offsetParent = "real"
6991      } = evaluate(options, state) || {};
6992      if (element == null) {
6993        return {};
6994      }
6995      const paddingObject = getPaddingObject(padding);
6996      const coords = {
6997        x: x2,
6998        y: y2
6999      };
7000      const axis = getAlignmentAxis(placement);
7001      const length = getAxisLength(axis);
7002      const arrowDimensions = await platform3.getDimensions(element);
7003      const isYAxis = axis === "y";
7004      const minProp = isYAxis ? "top" : "left";
7005      const maxProp = isYAxis ? "bottom" : "right";
7006      const clientProp = isYAxis ? "clientHeight" : "clientWidth";
7007      const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
7008      const startDiff = coords[axis] - rects.reference[axis];
7009      const arrowOffsetParent = offsetParent === "real" ? await platform3.getOffsetParent?.(element) : elements2.floating;
7010      let clientSize = elements2.floating[clientProp] || rects.floating[length];
7011      if (!clientSize || !await platform3.isElement?.(arrowOffsetParent)) {
7012        clientSize = elements2.floating[clientProp] || rects.floating[length];
7013      }
7014      const centerToReference = endDiff / 2 - startDiff / 2;
7015      const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
7016      const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);
7017      const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);
7018      const min2 = minPadding;
7019      const max2 = clientSize - arrowDimensions[length] - maxPadding;
7020      const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
7021      const offset4 = clamp(min2, center, max2);
7022      const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
7023      const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0;
7024      return {
7025        [axis]: coords[axis] + alignmentOffset,
7026        data: {
7027          [axis]: offset4,
7028          centerOffset: center - offset4 - alignmentOffset,
7029          ...shouldAddOffset && {
7030            alignmentOffset
7031          }
7032        },
7033        reset: shouldAddOffset
7034      };
7035    }
7036  });
7037  var arrow4 = (options, deps) => {
7038    const {
7039      name: name2,
7040      fn
7041    } = baseArrow(options);
7042    return {
7043      name: name2,
7044      fn,
7045      options: [options, deps]
7046    };
7047  };
7048  
7049  // node_modules/@base-ui/react/utils/hideMiddleware.mjs
7050  var hide4 = {
7051    name: "hide",
7052    async fn(state) {
7053      const {
7054        width,
7055        height,
7056        x: x2,
7057        y: y2
7058      } = state.rects.reference;
7059      const anchorHidden2 = width === 0 && height === 0 && x2 === 0 && y2 === 0;
7060      const overflow = await state.platform.detectOverflow(state, {
7061        elementContext: "reference"
7062      });
7063      const referenceHidden = overflow.top - height >= 0 || overflow.right - width >= 0 || overflow.bottom - height >= 0 || overflow.left - width >= 0;
7064      return {
7065        data: {
7066          referenceHidden: referenceHidden || anchorHidden2
7067        }
7068      };
7069    }
7070  };
7071  
7072  // node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs
7073  var DEFAULT_SIDES = {
7074    sideX: "left",
7075    sideY: "top"
7076  };
7077  
7078  // node_modules/@base-ui/react/utils/CommonPositionerCssVars.mjs
7079  var availableWidth = "--available-width";
7080  var availableHeight = "--available-height";
7081  var anchorWidth = "--anchor-width";
7082  var anchorHeight = "--anchor-height";
7083  var transformOrigin = "--transform-origin";
7084  var positionerWidth = "--positioner-width";
7085  var positionerHeight = "--positioner-height";
7086  
7087  // node_modules/@base-ui/react/internals/useAnchorPositioning.mjs
7088  var AVAILABLE_WIDTH_VAR = availableWidth;
7089  var AVAILABLE_HEIGHT_VAR = availableHeight;
7090  function getLogicalSide(sideParam, renderedSide, isRtl) {
7091    const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end";
7092    const logicalRight = isRtl ? "inline-start" : "inline-end";
7093    const logicalLeft = isRtl ? "inline-end" : "inline-start";
7094    return {
7095      top: "top",
7096      right: isLogicalSideParam ? logicalRight : "right",
7097      bottom: "bottom",
7098      left: isLogicalSideParam ? logicalLeft : "left"
7099    }[renderedSide];
7100  }
7101  function getOffsetData(state, sideParam, isRtl) {
7102    const {
7103      rects,
7104      placement
7105    } = state;
7106    const data = {
7107      side: getLogicalSide(sideParam, getSide(placement), isRtl),
7108      align: getAlignment(placement) || "center",
7109      anchor: {
7110        width: rects.reference.width,
7111        height: rects.reference.height
7112      },
7113      positioner: {
7114        width: rects.floating.width,
7115        height: rects.floating.height
7116      }
7117    };
7118    return data;
7119  }
7120  function useAnchorPositioning(params) {
7121    return useAnchorPositioningWithHook(params, useBaseUIFloating);
7122  }
7123  function useAnchorPositioningWithHook(params, useFloatingHook) {
7124    const {
7125      // Public parameters
7126      anchor,
7127      positionMethod = "absolute",
7128      side: sideParam = "bottom",
7129      sideOffset = 0,
7130      align = "center",
7131      alignOffset = 0,
7132      collisionBoundary,
7133      collisionPadding: collisionPaddingParam = 5,
7134      sticky = false,
7135      arrowPadding = 5,
7136      disableAnchorTracking = false,
7137      inline: inlineMiddleware,
7138      // Private parameters
7139      keepMounted = false,
7140      floatingRootContext,
7141      mounted,
7142      collisionAvoidance,
7143      shift: shift4,
7144      nodeId,
7145      adaptiveOrigin: adaptiveOrigin2,
7146      lazyFlip = false,
7147      externalTree
7148    } = params;
7149    const [mountSide, setMountSide] = React29.useState(null);
7150    if (!mounted && mountSide !== null) {
7151      setMountSide(null);
7152    }
7153    const collisionAvoidanceSide = collisionAvoidance.side || "flip";
7154    const collisionAvoidanceAlign = collisionAvoidance.align || "flip";
7155    const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end";
7156    const shiftCrossAxis = shift4?.crossAxis ?? false;
7157    const shiftRootBoundary = shift4?.rootBoundary;
7158    const anchorFn = typeof anchor === "function" ? anchor : void 0;
7159    const anchorFnCallback = useStableCallback(anchorFn);
7160    const anchorDep = anchorFn ? anchorFnCallback : anchor;
7161    const anchorValueRef = useValueAsRef(anchor);
7162    const mountedRef = useValueAsRef(mounted);
7163    const direction = useDirection();
7164    const isRtl = direction === "rtl";
7165    const side = mountSide || {
7166      top: "top",
7167      right: "right",
7168      bottom: "bottom",
7169      left: "left",
7170      "inline-end": isRtl ? "left" : "right",
7171      "inline-start": isRtl ? "right" : "left"
7172    }[sideParam];
7173    const placement = align === "center" ? side : `$side}-$align}`;
7174    let collisionPadding = collisionPaddingParam;
7175    if (typeof collisionPadding === "number") {
7176      collisionPadding = {
7177        top: collisionPadding,
7178        right: collisionPadding,
7179        bottom: collisionPadding,
7180        left: collisionPadding
7181      };
7182    } else if (collisionPadding) {
7183      collisionPadding = {
7184        top: collisionPadding.top || 0,
7185        right: collisionPadding.right || 0,
7186        bottom: collisionPadding.bottom || 0,
7187        left: collisionPadding.left || 0
7188      };
7189    }
7190    const bias = 1;
7191    const biasTop = sideParam === "bottom" ? bias : 0;
7192    const biasBottom = sideParam === "top" ? bias : 0;
7193    const biasLeft = sideParam === "right" ? bias : 0;
7194    const biasRight = sideParam === "left" ? bias : 0;
7195    const commonCollisionProps = {
7196      boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary,
7197      padding: collisionPadding
7198    };
7199    const arrowRef = React29.useRef(null);
7200    const sideOffsetRef = useValueAsRef(sideOffset);
7201    const alignOffsetRef = useValueAsRef(alignOffset);
7202    const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0;
7203    const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0;
7204    const middleware = [];
7205    if (inlineMiddleware) {
7206      middleware.push(inlineMiddleware);
7207    }
7208    middleware.push(offset3((state) => {
7209      const data = getOffsetData(state, sideParam, isRtl);
7210      const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current;
7211      const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current;
7212      return {
7213        mainAxis: sideAxis,
7214        crossAxis: alignAxis,
7215        alignmentAxis: alignAxis
7216      };
7217    }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam]));
7218    const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift";
7219    const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift");
7220    const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({
7221      ...commonCollisionProps,
7222      // Ensure the popup flips if it's been limited by its --available-height and it resizes.
7223      // Since the size() padding is smaller than the flip() padding, flip() will take precedence.
7224      padding: {
7225        top: collisionPadding.top + bias + biasTop,
7226        right: collisionPadding.right + bias + biasRight,
7227        bottom: collisionPadding.bottom + bias + biasBottom,
7228        left: collisionPadding.left + bias + biasLeft
7229      },
7230      mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip",
7231      crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false,
7232      fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide
7233    });
7234    const shiftMiddleware = shiftDisabled ? null : shift3({
7235      ...commonCollisionProps,
7236      // Use the Layout Viewport to avoid shifting around when pinch-zooming.
7237      rootBoundary: shiftRootBoundary,
7238      mainAxis: collisionAvoidanceAlign !== "none",
7239      crossAxis: crossAxisShiftEnabled,
7240      limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => {
7241        if (!arrowRef.current) {
7242          return {};
7243        }
7244        const {
7245          width,
7246          height
7247        } = arrowRef.current.getBoundingClientRect();
7248        const sideAxis = getSideAxis(getSide(limitData.placement));
7249        const arrowSize = sideAxis === "y" ? width : height;
7250        const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;
7251        return {
7252          offset: arrowSize / 2 + offsetAmount / 2
7253        };
7254      })
7255    }, [commonCollisionProps, sticky, shiftCrossAxis, shiftRootBoundary, collisionPadding, collisionAvoidanceAlign]);
7256    if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || align === "center") {
7257      middleware.push(shiftMiddleware, flipMiddleware);
7258    } else {
7259      middleware.push(flipMiddleware, shiftMiddleware);
7260    }
7261    middleware.push(size3({
7262      ...commonCollisionProps,
7263      apply({
7264        elements: {
7265          floating
7266        },
7267        availableWidth: availableWidth2,
7268        availableHeight: availableHeight2,
7269        rects
7270      }) {
7271        if (!mountedRef.current) {
7272          return;
7273        }
7274        const floatingStyle = floating.style;
7275        floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `$availableWidth2}px`);
7276        floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `$availableHeight2}px`);
7277        const dpr = getWindow(floating).devicePixelRatio || 1;
7278        const {
7279          x: x3,
7280          y: y3,
7281          width,
7282          height
7283        } = rects.reference;
7284        const anchorWidth2 = (Math.round((x3 + width) * dpr) - Math.round(x3 * dpr)) / dpr;
7285        const anchorHeight2 = (Math.round((y3 + height) * dpr) - Math.round(y3 * dpr)) / dpr;
7286        floatingStyle.setProperty(anchorWidth, `$anchorWidth2}px`);
7287        floatingStyle.setProperty(anchorHeight, `$anchorHeight2}px`);
7288      }
7289    }), arrow4((state) => ({
7290      // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
7291      // we'll create a fake element.
7292      element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"),
7293      // No padding for the fake arrow: it would displace aligned popups on narrow anchors.
7294      padding: arrowRef.current ? arrowPadding : 0,
7295      offsetParent: "floating"
7296    }), [arrowPadding]), {
7297      name: "transformOrigin",
7298      fn(state) {
7299        const {
7300          elements: {
7301            floating
7302          },
7303          middlewareData: middlewareData2,
7304          placement: renderedPlacement2,
7305          platform: platform3,
7306          rects,
7307          y: y3
7308        } = state;
7309        const renderedSide2 = getSide(renderedPlacement2);
7310        const renderedAlign2 = getAlignment(renderedPlacement2);
7311        const isVertical = getSideAxis(renderedSide2) === "y";
7312        const arrowEl = arrowRef.current;
7313        const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;
7314        let crossOrigin;
7315        if (!arrowEl && renderedAlign2 && Math.abs(isVertical ? middlewareData2.shift?.x || 0 : middlewareData2.shift?.y || 0) <= 1) {
7316          crossOrigin = renderedAlign2 === "start" === (isVertical && platform3.isRTL?.(floating) === true) ? "100%" : "0%";
7317        } else {
7318          const arrowOffset = isVertical ? middlewareData2.arrow?.x || 0 : middlewareData2.arrow?.y || 0;
7319          const arrowSize = isVertical ? arrowEl?.clientWidth || 0 : arrowEl?.clientHeight || 0;
7320          crossOrigin = `$arrowOffset + arrowSize / 2}px`;
7321        }
7322        let sideOrigin = renderedSide2 === "top" || renderedSide2 === "left" ? `calc(100% + $sideOffsetValue}px)` : `${-sideOffsetValue}px`;
7323        if (crossAxisShiftEnabled && isVertical && Math.abs(middlewareData2.shift?.y || 0) > sideOffsetValue) {
7324          sideOrigin = `$rects.reference.y + rects.reference.height / 2 - y3}px`;
7325        }
7326        floating.style.setProperty(transformOrigin, isVertical ? `$crossOrigin} $sideOrigin}` : `$sideOrigin} $crossOrigin}`);
7327        return {};
7328      }
7329    }, hide4, adaptiveOrigin2);
7330    useIsoLayoutEffect(() => {
7331      if (!mounted && floatingRootContext) {
7332        floatingRootContext.update({
7333          referenceElement: null,
7334          floatingElement: null,
7335          domReferenceElement: null,
7336          positionReference: null
7337        });
7338      }
7339    }, [mounted, floatingRootContext]);
7340    const autoUpdateOptions = React29.useMemo(() => ({
7341      ancestorScroll: !disableAnchorTracking,
7342      elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined",
7343      layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined"
7344    }), [disableAnchorTracking]);
7345    const {
7346      refs,
7347      elements: elements2,
7348      x: x2,
7349      y: y2,
7350      middlewareData,
7351      update: update2,
7352      placement: renderedPlacement,
7353      context,
7354      isPositioned,
7355      floatingStyles: originalFloatingStyles
7356    } = useFloatingHook({
7357      rootContext: floatingRootContext,
7358      open: keepMounted ? mounted : void 0,
7359      placement,
7360      middleware,
7361      strategy: positionMethod,
7362      whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions),
7363      nodeId,
7364      externalTree
7365    });
7366    const {
7367      sideX,
7368      sideY
7369    } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;
7370    const resolvedPosition = isPositioned ? positionMethod : "fixed";
7371    const floatingStyles = React29.useMemo(() => {
7372      let base;
7373      if (!isPositioned) {
7374        base = {
7375          position: resolvedPosition,
7376          top: 0,
7377          left: 0
7378        };
7379      } else if (adaptiveOrigin2) {
7380        base = {
7381          position: resolvedPosition,
7382          [sideX]: x2,
7383          [sideY]: y2
7384        };
7385      } else {
7386        base = {
7387          ...originalFloatingStyles,
7388          position: resolvedPosition
7389        };
7390      }
7391      base[AVAILABLE_WIDTH_VAR] = "100vw";
7392      base[AVAILABLE_HEIGHT_VAR] = "100vh";
7393      if (!isPositioned) {
7394        base.opacity = 0;
7395      }
7396      return base;
7397    }, [adaptiveOrigin2, resolvedPosition, sideX, x2, sideY, y2, originalFloatingStyles, isPositioned]);
7398    const registeredPositionReferenceRef = React29.useRef(null);
7399    useIsoLayoutEffect(() => {
7400      if (!mounted) {
7401        return;
7402      }
7403      const anchorValue = anchorValueRef.current;
7404      const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue;
7405      const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;
7406      const finalAnchor = unwrappedElement || null;
7407      if (finalAnchor !== registeredPositionReferenceRef.current) {
7408        refs.setPositionReference(finalAnchor);
7409        registeredPositionReferenceRef.current = finalAnchor;
7410      }
7411    }, [mounted, refs, anchorDep, anchorValueRef]);
7412    React29.useEffect(() => {
7413      if (!mounted) {
7414        return;
7415      }
7416      const anchorValue = anchorValueRef.current;
7417      if (typeof anchorValue === "function") {
7418        return;
7419      }
7420      if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {
7421        refs.setPositionReference(anchorValue.current);
7422        registeredPositionReferenceRef.current = anchorValue.current;
7423      }
7424    }, [mounted, refs, anchorDep, anchorValueRef]);
7425    React29.useEffect(() => {
7426      if (keepMounted && mounted && elements2.reference && elements2.floating) {
7427        return autoUpdate(elements2.reference, elements2.floating, update2, autoUpdateOptions);
7428      }
7429      return void 0;
7430    }, [keepMounted, mounted, elements2, update2, autoUpdateOptions]);
7431    const renderedSide = getSide(renderedPlacement);
7432    const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);
7433    const renderedAlign = getAlignment(renderedPlacement) || "center";
7434    const anchorHidden2 = Boolean(middlewareData.hide?.referenceHidden);
7435    useIsoLayoutEffect(() => {
7436      if (lazyFlip && mounted && isPositioned && renderedSide !== side) {
7437        setMountSide(renderedSide);
7438      }
7439    }, [lazyFlip, mounted, isPositioned, renderedSide, side]);
7440    const arrowStyles = React29.useMemo(() => ({
7441      position: "absolute",
7442      top: middlewareData.arrow?.y,
7443      left: middlewareData.arrow?.x
7444    }), [middlewareData.arrow]);
7445    const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;
7446    return React29.useMemo(() => ({
7447      positionerStyles: floatingStyles,
7448      arrowStyles,
7449      arrowRef,
7450      arrowUncentered,
7451      side: logicalRenderedSide,
7452      align: renderedAlign,
7453      physicalSide: renderedSide,
7454      anchorHidden: anchorHidden2,
7455      refs,
7456      context,
7457      isPositioned,
7458      update: update2
7459    }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden2, refs, context, isPositioned, update2]);
7460  }
7461  function isRef(param) {
7462    return param != null && "current" in param;
7463  }
7464  
7465  // node_modules/@base-ui/react/internals/getDisabledMountTransitionStyles.mjs
7466  function getDisabledMountTransitionStyles(transitionStatus) {
7467    return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;
7468  }
7469  
7470  // node_modules/@base-ui/react/utils/usePositioner.mjs
7471  function usePositioner(componentProps, state, {
7472    styles,
7473    transitionStatus,
7474    props,
7475    refs,
7476    hidden,
7477    inert = false
7478  }) {
7479    const style = {
7480      ...styles
7481    };
7482    if (inert) {
7483      style.pointerEvents = "none";
7484    }
7485    return useRenderElement("div", componentProps, {
7486      state,
7487      ref: refs,
7488      props: [{
7489        role: "presentation",
7490        hidden,
7491        style
7492      }, getDisabledMountTransitionStyles(transitionStatus), props],
7493      stateAttributesMapping: popupStateMapping
7494    });
7495  }
7496  
7497  // node_modules/@base-ui/react/utils/usePopupViewport.mjs
7498  var React33 = __toESM(require_react(), 1);
7499  var ReactDOM6 = __toESM(require_react_dom(), 1);
7500  
7501  // node_modules/@base-ui/utils/usePreviousValue.mjs
7502  var React30 = __toESM(require_react(), 1);
7503  function usePreviousValue(value) {
7504    const [state, setState] = React30.useState({
7505      current: value,
7506      previous: null
7507    });
7508    if (!Object.is(value, state.current)) {
7509      setState({
7510        current: value,
7511        previous: state.current
7512      });
7513    }
7514    return state.previous;
7515  }
7516  
7517  // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7518  var React31 = __toESM(require_react(), 1);
7519  
7520  // node_modules/@base-ui/react/utils/getCssDimensions.mjs
7521  function getCssDimensions2(element) {
7522    const css = getComputedStyle2(element);
7523    let width = parseFloat(css.width) || 0;
7524    let height = parseFloat(css.height) || 0;
7525    const hasOffset = isHTMLElement(element);
7526    const offsetWidth = hasOffset ? element.offsetWidth : width;
7527    const offsetHeight = hasOffset ? element.offsetHeight : height;
7528    const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
7529    if (shouldFallback) {
7530      width = offsetWidth;
7531      height = offsetHeight;
7532    }
7533    return {
7534      width,
7535      height
7536    };
7537  }
7538  
7539  // node_modules/@base-ui/react/utils/CommonPopupCssVars.mjs
7540  var popupWidth = "--popup-width";
7541  var popupHeight = "--popup-height";
7542  
7543  // node_modules/@base-ui/react/utils/usePopupAutoResize.mjs
7544  function usePopupAutoResize(parameters) {
7545    const {
7546      popupElement,
7547      positionerElement,
7548      content,
7549      mounted,
7550      onMeasureLayout: onMeasureLayoutParam,
7551      onMeasureLayoutComplete: onMeasureLayoutCompleteParam,
7552      side,
7553      direction
7554    } = parameters;
7555    const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true);
7556    const animationFrame = useAnimationFrame();
7557    const committedDimensionsRef = React31.useRef(null);
7558    const isInitialRenderRef = React31.useRef(true);
7559    const restoreAnchoringStylesRef = React31.useRef(NOOP);
7560    const onMeasureLayout = useStableCallback(onMeasureLayoutParam);
7561    const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam);
7562    const anchoringStyles = React31.useMemo(() => getPopupAnchoringStyles(side, direction), [side, direction]);
7563    useIsoLayoutEffect(() => {
7564      if (!mounted) {
7565        restoreAnchoringStylesRef.current = NOOP;
7566        isInitialRenderRef.current = true;
7567        committedDimensionsRef.current = null;
7568        return void 0;
7569      }
7570      if (!popupElement || !positionerElement) {
7571        return void 0;
7572      }
7573      restoreAnchoringStylesRef.current = applyElementStyles(popupElement, anchoringStyles);
7574      setPopupCssSize(popupElement, "auto");
7575      const restorePopupPosition = overrideElementStyle(popupElement, "position", "static");
7576      const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none");
7577      const restorePopupScale = overrideElementStyle(popupElement, "scale", "1");
7578      const restorePositionerAvailableSize = applyElementStyles(positionerElement, {
7579        [availableWidth]: "max-content",
7580        [availableHeight]: "max-content"
7581      });
7582      function restoreMeasurementOverrides() {
7583        restorePopupPosition();
7584        restorePopupTransform();
7585        restorePositionerAvailableSize();
7586      }
7587      function restoreMeasurementOverridesIncludingScale() {
7588        restoreMeasurementOverrides();
7589        restorePopupScale();
7590      }
7591      onMeasureLayout?.();
7592      if (isInitialRenderRef.current || committedDimensionsRef.current === null) {
7593        setPositionerCssSize(positionerElement, "max-content");
7594        const dimensions = getCssDimensions2(popupElement);
7595        committedDimensionsRef.current = dimensions;
7596        setPositionerCssSize(positionerElement, dimensions);
7597        restoreMeasurementOverridesIncludingScale();
7598        onMeasureLayoutComplete?.(null, dimensions);
7599        isInitialRenderRef.current = false;
7600        return () => {
7601          restoreAnchoringStylesRef.current();
7602          restoreAnchoringStylesRef.current = NOOP;
7603        };
7604      }
7605      setPositionerCssSize(positionerElement, "max-content");
7606      const previousDimensions = committedDimensionsRef.current;
7607      const newDimensions = getCssDimensions2(popupElement);
7608      committedDimensionsRef.current = newDimensions;
7609      setPopupCssSize(popupElement, previousDimensions);
7610      restoreMeasurementOverridesIncludingScale();
7611      onMeasureLayoutComplete?.(previousDimensions, newDimensions);
7612      setPositionerCssSize(positionerElement, newDimensions);
7613      const abortController = new AbortController();
7614      animationFrame.request(() => {
7615        setPopupCssSize(popupElement, newDimensions);
7616        runOnceAnimationsFinish(() => {
7617          popupElement.style.setProperty(popupWidth, "auto");
7618          popupElement.style.setProperty(popupHeight, "auto");
7619        }, abortController.signal);
7620      });
7621      return () => {
7622        abortController.abort();
7623        animationFrame.cancel();
7624        restoreAnchoringStylesRef.current();
7625        restoreAnchoringStylesRef.current = NOOP;
7626      };
7627    }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]);
7628  }
7629  function getPopupAnchoringStyles(side, direction) {
7630    const isPhysicalTop = side === "top";
7631    const isPhysicalLeft = side === "left" || side === (direction === "rtl" ? "inline-end" : "inline-start");
7632    if (!isPhysicalTop && !isPhysicalLeft) {
7633      return EMPTY_OBJECT;
7634    }
7635    return {
7636      position: "absolute",
7637      [isPhysicalTop ? "bottom" : "top"]: "0",
7638      [isPhysicalLeft ? "right" : "left"]: "0"
7639    };
7640  }
7641  function overrideElementStyle(element, property, value) {
7642    const originalValue = element.style.getPropertyValue(property);
7643    element.style.setProperty(property, value);
7644    return () => {
7645      element.style.setProperty(property, originalValue);
7646    };
7647  }
7648  function applyElementStyles(element, styles) {
7649    const restorers = [];
7650    for (const [key, value] of Object.entries(styles)) {
7651      restorers.push(overrideElementStyle(element, key, value));
7652    }
7653    return restorers.length ? () => {
7654      restorers.forEach((restore) => restore());
7655    } : NOOP;
7656  }
7657  function setPopupCssSize(popupElement, size4) {
7658    const width = size4 === "auto" ? "auto" : `$size4.width}px`;
7659    const height = size4 === "auto" ? "auto" : `$size4.height}px`;
7660    popupElement.style.setProperty(popupWidth, width);
7661    popupElement.style.setProperty(popupHeight, height);
7662  }
7663  function setPositionerCssSize(positionerElement, size4) {
7664    const width = size4 === "max-content" ? "max-content" : `$size4.width}px`;
7665    const height = size4 === "max-content" ? "max-content" : `$size4.height}px`;
7666    positionerElement.style.setProperty(positionerWidth, width);
7667    positionerElement.style.setProperty(positionerHeight, height);
7668  }
7669  
7670  // node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs
7671  var React32 = __toESM(require_react(), 1);
7672  var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
7673  var DirectionProvider = function DirectionProvider2(props) {
7674    const {
7675      direction = "ltr"
7676    } = props;
7677    const contextValue = React32.useMemo(() => ({
7678      direction
7679    }), [direction]);
7680    return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DirectionContext.Provider, {
7681      value: contextValue,
7682      children: props.children
7683    });
7684  };
7685  if (true) DirectionProvider.displayName = "DirectionProvider";
7686  
7687  // node_modules/@base-ui/react/utils/adaptiveOriginMiddleware.mjs
7688  var adaptiveOrigin = {
7689    name: "adaptiveOrigin",
7690    async fn(state) {
7691      const {
7692        x: rawX,
7693        y: rawY,
7694        rects: {
7695          floating: floatRect
7696        },
7697        elements: {
7698          floating
7699        },
7700        platform: platform3,
7701        strategy,
7702        placement
7703      } = state;
7704      const win = getWindow(floating);
7705      const styles = win.getComputedStyle(floating);
7706      const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== "";
7707      if (!hasTransition) {
7708        return {
7709          x: rawX,
7710          y: rawY,
7711          data: DEFAULT_SIDES
7712        };
7713      }
7714      const offsetParent = await platform3.getOffsetParent?.(floating);
7715      let offsetDimensions = {
7716        width: 0,
7717        height: 0
7718      };
7719      if (strategy === "fixed" && win?.visualViewport) {
7720        offsetDimensions = {
7721          width: win.visualViewport.width,
7722          height: win.visualViewport.height
7723        };
7724      } else if (offsetParent === win) {
7725        const doc = ownerDocument(floating);
7726        offsetDimensions = {
7727          width: doc.documentElement.clientWidth,
7728          height: doc.documentElement.clientHeight
7729        };
7730      } else if (await platform3.isElement?.(offsetParent)) {
7731        offsetDimensions = await platform3.getDimensions(offsetParent);
7732      }
7733      const currentSide = getSide(placement);
7734      let x2 = rawX;
7735      let y2 = rawY;
7736      if (currentSide === "left") {
7737        x2 = offsetDimensions.width - (rawX + floatRect.width);
7738      }
7739      if (currentSide === "top") {
7740        y2 = offsetDimensions.height - (rawY + floatRect.height);
7741      }
7742      const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX;
7743      const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY;
7744      return {
7745        x: x2,
7746        y: y2,
7747        data: {
7748          sideX,
7749          sideY
7750        }
7751      };
7752    }
7753  };
7754  
7755  // node_modules/@base-ui/react/utils/CommonViewportDataAttributes.mjs
7756  var activationDirection = "data-activation-direction";
7757  
7758  // node_modules/@base-ui/react/utils/usePopupViewport.mjs
7759  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
7760  var popupViewportStateMapping = {
7761    activationDirection: (value) => value ? {
7762      [activationDirection]: value
7763    } : null
7764  };
7765  function usePopupViewport(parameters) {
7766    const {
7767      store,
7768      side,
7769      children
7770    } = parameters;
7771    const direction = useDirection();
7772    const activeTrigger = store.useState("activeTriggerElement");
7773    const activeTriggerId = store.useState("activeTriggerId");
7774    const open2 = store.useState("open");
7775    const payload = store.useState("payload");
7776    const mounted = store.useState("mounted");
7777    const popupElement = store.useState("popupElement");
7778    const positionerElement = store.useState("positionerElement");
7779    const previousActiveTrigger = usePreviousValue(open2 ? activeTrigger : null);
7780    const currentContentKey = usePopupContentKey(activeTriggerId, payload);
7781    const capturedNodeRef = React33.useRef(null);
7782    const [previousContentNode, setPreviousContentNode] = React33.useState(null);
7783    const [newTriggerOffset, setNewTriggerOffset] = React33.useState(null);
7784    const currentContainerRef = React33.useRef(null);
7785    const previousContainerRef = React33.useRef(null);
7786    const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true);
7787    const cleanupFrame = useAnimationFrame();
7788    const cleanupControllerRef = React33.useRef(null);
7789    const [previousContentDimensions, setPreviousContentDimensions] = React33.useState(null);
7790    const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React33.useState(false);
7791    useIsoLayoutEffect(() => {
7792      store.set("adaptiveOrigin", adaptiveOrigin);
7793      return () => {
7794        store.set("adaptiveOrigin", void 0);
7795      };
7796    }, [store]);
7797    const handleMeasureLayout = useStableCallback(() => {
7798      currentContainerRef.current?.style.setProperty("animation", "none");
7799      currentContainerRef.current?.style.setProperty("transition", "none");
7800      previousContainerRef.current?.style.setProperty("display", "none");
7801    });
7802    const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => {
7803      currentContainerRef.current?.style.removeProperty("animation");
7804      currentContainerRef.current?.style.removeProperty("transition");
7805      previousContainerRef.current?.style.removeProperty("display");
7806      if (previousDimensions) {
7807        setPreviousContentDimensions(previousDimensions);
7808      }
7809    });
7810    const armViewportCleanup = useStableCallback(() => {
7811      cleanupControllerRef.current?.abort();
7812      const controller = new AbortController();
7813      cleanupControllerRef.current = controller;
7814      onAnimationsFinished(() => {
7815        setPreviousContentNode(null);
7816        setPreviousContentDimensions(null);
7817        capturedNodeRef.current = null;
7818      }, controller.signal);
7819    });
7820    const lastHandledTriggerRef = React33.useRef(null);
7821    useIsoLayoutEffect(() => {
7822      if (!open2 || !mounted) {
7823        lastHandledTriggerRef.current = null;
7824      }
7825    }, [open2, mounted]);
7826    useIsoLayoutEffect(() => {
7827      if (activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) {
7828        setPreviousContentNode(capturedNodeRef.current);
7829        setShowStartingStyleAttribute(true);
7830        const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger);
7831        setNewTriggerOffset(offset4);
7832        lastHandledTriggerRef.current = activeTrigger;
7833      }
7834    }, [activeTrigger, previousActiveTrigger]);
7835    useIsoLayoutEffect(() => {
7836      if (previousContentNode == null) {
7837        return;
7838      }
7839      cleanupControllerRef.current?.abort();
7840      setShowStartingStyleAttribute(true);
7841      cleanupFrame.request(() => {
7842        ReactDOM6.flushSync(() => {
7843          setShowStartingStyleAttribute(false);
7844        });
7845        armViewportCleanup();
7846      });
7847    }, [currentContentKey, previousContentNode, armViewportCleanup, cleanupFrame]);
7848    useIsoLayoutEffect(() => {
7849      const source = currentContainerRef.current;
7850      if (!source) {
7851        return;
7852      }
7853      const wrapper = ownerDocument(source).createElement("div");
7854      for (const child of Array.from(source.childNodes)) {
7855        wrapper.appendChild(child.cloneNode(true));
7856      }
7857      capturedNodeRef.current = wrapper;
7858    });
7859    const isTransitioning = previousContentNode != null;
7860    let childrenToRender;
7861    if (!isTransitioning) {
7862      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7863        "data-current": true,
7864        ref: currentContainerRef,
7865        children
7866      }, currentContentKey);
7867    } else {
7868      childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(React33.Fragment, {
7869        children: [/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7870          "data-previous": true,
7871          inert: inertValue(true),
7872          ref: previousContainerRef,
7873          style: {
7874            ...previousContentDimensions ? {
7875              [popupWidth]: `$previousContentDimensions.width}px`,
7876              [popupHeight]: `$previousContentDimensions.height}px`
7877            } : null,
7878            position: "absolute"
7879          },
7880          "data-ending-style": showStartingStyleAttribute ? void 0 : ""
7881        }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
7882          "data-current": true,
7883          ref: currentContainerRef,
7884          "data-starting-style": showStartingStyleAttribute ? "" : void 0,
7885          children
7886        }, currentContentKey)]
7887      });
7888    }
7889    useIsoLayoutEffect(() => {
7890      const container = previousContainerRef.current;
7891      if (!container || !previousContentNode) {
7892        return;
7893      }
7894      container.replaceChildren(...Array.from(previousContentNode.childNodes));
7895    }, [previousContentNode]);
7896    usePopupAutoResize({
7897      popupElement,
7898      positionerElement,
7899      mounted,
7900      content: payload,
7901      onMeasureLayout: handleMeasureLayout,
7902      onMeasureLayoutComplete: handleMeasureLayoutComplete,
7903      side,
7904      direction
7905    });
7906    const state = {
7907      activationDirection: getActivationDirection(newTriggerOffset),
7908      transitioning: isTransitioning
7909    };
7910    return {
7911      children: childrenToRender,
7912      state
7913    };
7914  }
7915  function getActivationDirection(offset4) {
7916    if (!offset4) {
7917      return void 0;
7918    }
7919    return `$getValueWithTolerance(offset4.horizontal, 5, "right", "left")} $getValueWithTolerance(offset4.vertical, 5, "down", "up")}`;
7920  }
7921  function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) {
7922    if (value > tolerance) {
7923      return positiveLabel;
7924    }
7925    if (value < -tolerance) {
7926      return negativeLabel;
7927    }
7928    return "";
7929  }
7930  function calculateRelativePosition(from, to) {
7931    const fromRect = from.getBoundingClientRect();
7932    const toRect = to.getBoundingClientRect();
7933    const fromCenter = {
7934      x: fromRect.left + fromRect.width / 2,
7935      y: fromRect.top + fromRect.height / 2
7936    };
7937    const toCenter = {
7938      x: toRect.left + toRect.width / 2,
7939      y: toRect.top + toRect.height / 2
7940    };
7941    return {
7942      horizontal: toCenter.x - fromCenter.x,
7943      vertical: toCenter.y - fromCenter.y
7944    };
7945  }
7946  function usePopupContentKey(activeTriggerId, payload) {
7947    const [contentKey, setContentKey] = React33.useState(0);
7948    const previousActiveTriggerIdRef = React33.useRef(activeTriggerId);
7949    const previousPayloadRef = React33.useRef(payload);
7950    const pendingPayloadUpdateRef = React33.useRef(false);
7951    useIsoLayoutEffect(() => {
7952      const previousActiveTriggerId = previousActiveTriggerIdRef.current;
7953      const previousPayload = previousPayloadRef.current;
7954      const triggerIdChanged = activeTriggerId !== previousActiveTriggerId;
7955      const payloadChanged = payload !== previousPayload;
7956      if (triggerIdChanged) {
7957        setContentKey((value) => value + 1);
7958        pendingPayloadUpdateRef.current = !payloadChanged;
7959      } else if (pendingPayloadUpdateRef.current && payloadChanged) {
7960        setContentKey((value) => value + 1);
7961        pendingPayloadUpdateRef.current = false;
7962      }
7963      previousActiveTriggerIdRef.current = activeTriggerId;
7964      previousPayloadRef.current = payload;
7965    }, [activeTriggerId, payload]);
7966    return `$activeTriggerId ?? "current"}-$contentKey}`;
7967  }
7968  
7969  // node_modules/@base-ui/react/utils/FloatingPortalLite.mjs
7970  var React34 = __toESM(require_react(), 1);
7971  var ReactDOM7 = __toESM(require_react_dom(), 1);
7972  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
7973  var FloatingPortalLite = /* @__PURE__ */ React34.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) {
7974    const {
7975      children,
7976      container,
7977      className,
7978      render,
7979      style,
7980      ...elementProps
7981    } = componentProps;
7982    const {
7983      node: portalNode,
7984      subtree: portalSubtree
7985    } = useFloatingPortalNode({
7986      container,
7987      ref: forwardedRef,
7988      componentProps,
7989      elementProps
7990    });
7991    if (!portalSubtree && !portalNode) {
7992      return null;
7993    }
7994    return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(React34.Fragment, {
7995      children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM7.createPortal(children, portalNode)]
7996    });
7997  });
7998  if (true) FloatingPortalLite.displayName = "FloatingPortalLite";
7999  
8000  // node_modules/@base-ui/react/tooltip/index.parts.mjs
8001  var index_parts_exports = {};
8002  __export(index_parts_exports, {
8003    Arrow: () => TooltipArrow,
8004    Handle: () => TooltipHandle,
8005    Popup: () => TooltipPopup,
8006    Portal: () => TooltipPortal,
8007    Positioner: () => TooltipPositioner,
8008    Provider: () => TooltipProvider,
8009    Root: () => TooltipRoot,
8010    Trigger: () => TooltipTrigger,
8011    Viewport: () => TooltipViewport,
8012    createHandle: () => createTooltipHandle
8013  });
8014  
8015  // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
8016  var React37 = __toESM(require_react(), 1);
8017  
8018  // node_modules/@base-ui/react/tooltip/root/TooltipRootContext.mjs
8019  var React35 = __toESM(require_react(), 1);
8020  var TooltipRootContext = /* @__PURE__ */ React35.createContext(void 0);
8021  if (true) TooltipRootContext.displayName = "TooltipRootContext";
8022  function useTooltipRootContext(optional) {
8023    const context = React35.useContext(TooltipRootContext);
8024    if (context === void 0 && !optional) {
8025      throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72));
8026    }
8027    return context;
8028  }
8029  
8030  // node_modules/@base-ui/react/tooltip/store/TooltipStore.mjs
8031  var React36 = __toESM(require_react(), 1);
8032  var selectors2 = {
8033    ...popupStoreSelectors,
8034    disabled: (state) => state.disabled,
8035    instantType: (state) => state.instantType,
8036    isInstantPhase: (state) => state.isInstantPhase,
8037    trackCursorAxis: (state) => state.trackCursorAxis,
8038    disableHoverablePopup: (state) => state.disableHoverablePopup,
8039    lastOpenChangeReason: (state) => state.openChangeReason,
8040    closeOnClick: (state) => state.closeOnClick,
8041    closeDelay: (state) => state.closeDelay,
8042    adaptiveOrigin: (state) => state.adaptiveOrigin
8043  };
8044  var TooltipStore = class extends ReactStore {
8045    constructor(initialState, floatingId, nested) {
8046      const triggerElements = new PopupTriggerMap();
8047      super(createInitialState(initialState, triggerElements, floatingId, nested), createInitialContext(triggerElements), selectors2);
8048    }
8049    setOpen = (nextOpen, eventDetails) => {
8050      applyPopupOpenChange(this, nextOpen, eventDetails, {
8051        extraState: {
8052          openChangeReason: eventDetails.reason
8053        }
8054      });
8055    };
8056    // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change.
8057    cancelPendingOpen(event) {
8058      this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event));
8059    }
8060  };
8061  function createNullTooltipStore() {
8062    const triggerElements = new PopupTriggerMap();
8063    const store = new NullStore(Object.freeze(createInitialState(void 0, triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors2);
8064    return Object.assign(store, {
8065      setOpen: NOOP,
8066      cancelPendingOpen: NOOP
8067    });
8068  }
8069  function createInitialState(initialState, triggerElements, floatingId, nested = false) {
8070    const state = {
8071      ...createInitialPopupStoreState(triggerElements, floatingId, nested),
8072      disabled: false,
8073      instantType: void 0,
8074      isInstantPhase: false,
8075      trackCursorAxis: "none",
8076      disableHoverablePopup: false,
8077      openChangeReason: null,
8078      closeOnClick: true,
8079      closeDelay: 0,
8080      adaptiveOrigin: void 0,
8081      ...initialState
8082    };
8083    return state;
8084  }
8085  function createInitialContext(triggerElements) {
8086    return {
8087      popupRef: /* @__PURE__ */ React36.createRef(),
8088      onOpenChange: void 0,
8089      onOpenChangeComplete: void 0,
8090      triggerElements
8091    };
8092  }
8093  
8094  // node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs
8095  var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
8096  var TooltipRoot = fastComponent(function TooltipRoot2(props) {
8097    const {
8098      disabled: disabled2 = false,
8099      defaultOpen = false,
8100      open: openProp,
8101      disableHoverablePopup = false,
8102      trackCursorAxis = "none",
8103      actionsRef,
8104      onOpenChange,
8105      onOpenChangeComplete,
8106      handle,
8107      triggerId: triggerIdProp,
8108      defaultTriggerId: defaultTriggerIdProp = null,
8109      children
8110    } = props;
8111    const store = usePopupRootStore((floatingId, nested) => new TooltipStore({
8112      open: defaultOpen,
8113      openProp,
8114      activeTriggerId: defaultTriggerIdProp,
8115      triggerIdProp
8116    }, floatingId, nested));
8117    store.useControlledProp("openProp", openProp);
8118    store.useControlledProp("triggerIdProp", triggerIdProp);
8119    store.useContextCallback("onOpenChange", onOpenChange);
8120    store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
8121    const openState = store.useState("open");
8122    const open2 = !disabled2 && openState;
8123    const activeTriggerId = store.useState("activeTriggerId");
8124    const mounted = store.useState("mounted");
8125    const payload = store.useState("payload");
8126    store.useSyncedValues({
8127      trackCursorAxis,
8128      disableHoverablePopup,
8129      disabled: disabled2
8130    });
8131    useImplicitActiveTrigger(store, {
8132      closeOnActiveTriggerUnmount: true
8133    });
8134    const {
8135      forceUnmount,
8136      transitionStatus
8137    } = useOpenStateTransitions(open2, store);
8138    const isInstantPhase = store.useState("isInstantPhase");
8139    const instantType = store.useState("instantType");
8140    const lastOpenChangeReason = store.useState("lastOpenChangeReason");
8141    const previousInstantTypeRef = React37.useRef(null);
8142    useIsoLayoutEffect(() => {
8143      if (openState && disabled2) {
8144        store.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled));
8145      }
8146    }, [openState, disabled2, store]);
8147    useIsoLayoutEffect(() => {
8148      if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) {
8149        if (instantType !== "delay") {
8150          previousInstantTypeRef.current = instantType;
8151        }
8152        store.set("instantType", "delay");
8153      } else if (previousInstantTypeRef.current !== null) {
8154        store.set("instantType", previousInstantTypeRef.current);
8155        previousInstantTypeRef.current = null;
8156      }
8157    }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store]);
8158    useIsoLayoutEffect(() => {
8159      if (open2) {
8160        if (activeTriggerId == null) {
8161          store.set("payload", void 0);
8162        }
8163      }
8164    }, [store, activeTriggerId, open2]);
8165    React37.useImperativeHandle(actionsRef, () => ({
8166      unmount: forceUnmount,
8167      close: () => store.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction))
8168    }), [forceUnmount, store]);
8169    const shouldRenderInteractions = open2 || mounted || !disabled2 && trackCursorAxis !== "none";
8170    return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(TooltipRootContext.Provider, {
8171      value: store,
8172      children: [handle && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PopupHandleAttachment, {
8173        handle,
8174        store
8175      }), shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TooltipInteractions, {
8176        store,
8177        disabled: disabled2,
8178        trackCursorAxis
8179      }), typeof children === "function" ? children({
8180        payload
8181      }) : children]
8182    });
8183  });
8184  if (true) TooltipRoot.displayName = "TooltipRoot";
8185  function TooltipInteractions({
8186    store,
8187    disabled: disabled2,
8188    trackCursorAxis
8189  }) {
8190    const floatingRootContext = store.useState("floatingRootContext");
8191    const dismiss = useDismiss(floatingRootContext, {
8192      enabled: !disabled2,
8193      referencePress: () => store.select("closeOnClick")
8194    });
8195    const clientPoint = useClientPoint(floatingRootContext, {
8196      enabled: !disabled2 && trackCursorAxis !== "none",
8197      axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis
8198    });
8199    const triggerProps = React37.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]);
8200    usePopupInteractionProps(store, {
8201      activeTriggerProps: triggerProps,
8202      inactiveTriggerProps: triggerProps,
8203      popupProps: dismiss.floating ?? EMPTY_OBJECT
8204    });
8205    return null;
8206  }
8207  
8208  // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8209  var React39 = __toESM(require_react(), 1);
8210  
8211  // node_modules/@base-ui/react/tooltip/provider/TooltipProviderContext.mjs
8212  var React38 = __toESM(require_react(), 1);
8213  var TooltipProviderContext = /* @__PURE__ */ React38.createContext(void 0);
8214  if (true) TooltipProviderContext.displayName = "TooltipProviderContext";
8215  function useTooltipProviderContext() {
8216    return React38.useContext(TooltipProviderContext);
8217  }
8218  
8219  // node_modules/@base-ui/react/tooltip/utils/constants.mjs
8220  var OPEN_DELAY = 600;
8221  
8222  // node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs
8223  var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger";
8224  function getTargetElement(event) {
8225    if ("composedPath" in event) {
8226      const path = event.composedPath();
8227      for (let i = 0; i < path.length; i += 1) {
8228        const element = path[i];
8229        if (isElement(element)) {
8230          return element;
8231        }
8232      }
8233    }
8234    const target = event.target;
8235    if (isElement(target)) {
8236      return target;
8237    }
8238    return null;
8239  }
8240  function closestEnabledTooltipTrigger(element) {
8241    let current = element;
8242    while (current) {
8243      const trigger = current.closest(`[$TOOLTIP_TRIGGER_IDENTIFIER}]`);
8244      if (trigger) {
8245        return trigger;
8246      }
8247      const root = current.getRootNode();
8248      current = "host" in root && isElement(root.host) ? root.host : null;
8249    }
8250    return null;
8251  }
8252  var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) {
8253    const {
8254      render,
8255      className,
8256      style,
8257      handle,
8258      payload,
8259      disabled: disabledProp,
8260      delay,
8261      closeOnClick = true,
8262      closeDelay,
8263      id: idProp,
8264      ...elementProps
8265    } = componentProps;
8266    const rootContext = useTooltipRootContext(true);
8267    const handleStore = usePopupHandleStore(handle);
8268    const store = handleStore ?? rootContext;
8269    if (!store) {
8270      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));
8271    }
8272    const thisTriggerId = useBaseUiId(idProp);
8273    const isTriggerActive = store.useState("isTriggerActive", thisTriggerId);
8274    const isOpenedByThisTrigger = store.useState("isOpenedByTrigger", thisTriggerId);
8275    const floatingRootContext = store.useState("floatingRootContext");
8276    const triggerElementRef = React39.useRef(null);
8277    const closeDelayWithDefault = closeDelay ?? 0;
8278    const {
8279      registerTrigger,
8280      isMountedByThisTrigger
8281    } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, {
8282      payload,
8283      closeOnClick,
8284      closeDelay: closeDelayWithDefault
8285    });
8286    const providerDelay = useTooltipProviderContext();
8287    const {
8288      activeIdRef,
8289      delayRef,
8290      isInstantPhase,
8291      hasProvider
8292    } = useDelayGroup(floatingRootContext, {
8293      open: isOpenedByThisTrigger
8294    });
8295    const hoverInteraction = useHoverInteractionSharedState(floatingRootContext);
8296    store.useSyncedValue("isInstantPhase", isInstantPhase);
8297    const rootDisabled = store.useState("disabled");
8298    const disabled2 = disabledProp ?? rootDisabled;
8299    const disabledRef = useValueAsRef(disabled2);
8300    const trackCursorAxis = store.useState("trackCursorAxis");
8301    const disableHoverablePopup = store.useState("disableHoverablePopup");
8302    const isNestedTriggerHoveredRef = React39.useRef(false);
8303    const nestedTriggerOpenTimeout = useTimeout();
8304    const pointerTypeRef = React39.useRef(void 0);
8305    function getOpenDelay() {
8306      if (hasProvider && activeIdRef.current != null) {
8307        return 0;
8308      }
8309      return delay ?? providerDelay ?? OPEN_DELAY;
8310    }
8311    function isEnabledNestedTriggerTarget(target) {
8312      const triggerEl = triggerElementRef.current;
8313      if (!triggerEl || !target) {
8314        return false;
8315      }
8316      const nearestTrigger = closestEnabledTooltipTrigger(target);
8317      return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger);
8318    }
8319    function detectNestedTriggerHover(target) {
8320      const nestedTriggerHovered = isEnabledNestedTriggerTarget(target);
8321      isNestedTriggerHoveredRef.current = nestedTriggerHovered;
8322      if (nestedTriggerHovered) {
8323        hoverInteraction.openChangeTimeout.clear();
8324        hoverInteraction.restTimeout.clear();
8325        hoverInteraction.restTimeoutPending = false;
8326        nestedTriggerOpenTimeout.clear();
8327      }
8328      return nestedTriggerHovered;
8329    }
8330    const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
8331      enabled: !disabled2,
8332      mouseOnly: true,
8333      move: false,
8334      handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null,
8335      restMs: getOpenDelay,
8336      delay() {
8337        if (closeDelay == null && hasProvider) {
8338          return {
8339            close: getDelay(delayRef.current, "close")
8340          };
8341        }
8342        return {
8343          close: closeDelayWithDefault
8344        };
8345      },
8346      triggerElementRef,
8347      isActiveTrigger: isTriggerActive,
8348      isClosing: () => store.select("transitionStatus") === "ending",
8349      shouldOpen() {
8350        return !isNestedTriggerHoveredRef.current;
8351      }
8352    });
8353    const focusProps = useFocus(floatingRootContext, {
8354      enabled: !disabled2
8355    }).reference;
8356    const handleNestedTriggerHover = (event) => {
8357      const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current;
8358      const target = getTargetElement(event);
8359      const nestedTriggerHovered = detectNestedTriggerHover(target);
8360      const triggerEl = triggerElementRef.current;
8361      const targetInsideTrigger = triggerEl && target && contains(triggerEl, target);
8362      if (nestedTriggerHovered && store.select("open") && store.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) {
8363        store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event));
8364        return;
8365      }
8366      if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences.
8367      isMouseLikePointerType(pointerTypeRef.current)) {
8368        const open2 = () => {
8369          if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store.select("open")) {
8370            store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl));
8371          }
8372        };
8373        const openDelay = getOpenDelay();
8374        if (openDelay === 0) {
8375          nestedTriggerOpenTimeout.clear();
8376          open2();
8377        } else {
8378          nestedTriggerOpenTimeout.start(openDelay, open2);
8379        }
8380      }
8381    };
8382    const rootTriggerProps = store.useState("triggerProps", isMountedByThisTrigger);
8383    const shouldApplyRootTriggerProps = isMountedByThisTrigger || trackCursorAxis !== "none";
8384    const state = {
8385      open: isOpenedByThisTrigger
8386    };
8387    const element = useRenderElement("button", componentProps, {
8388      state,
8389      ref: [forwardedRef, registerTrigger, triggerElementRef],
8390      props: [hoverProps, focusProps, shouldApplyRootTriggerProps ? rootTriggerProps : void 0, {
8391        onMouseOver(event) {
8392          handleNestedTriggerHover(event.nativeEvent);
8393        },
8394        onFocus(event) {
8395          if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) {
8396            event.preventBaseUIHandler();
8397          }
8398        },
8399        onMouseLeave() {
8400          isNestedTriggerHoveredRef.current = false;
8401          nestedTriggerOpenTimeout.clear();
8402          pointerTypeRef.current = void 0;
8403        },
8404        onPointerEnter(event) {
8405          pointerTypeRef.current = event.pointerType;
8406        },
8407        onPointerDown(event) {
8408          pointerTypeRef.current = event.pointerType;
8409          store.set("closeOnClick", closeOnClick);
8410          if (closeOnClick && !store.select("open")) {
8411            store.cancelPendingOpen(event.nativeEvent);
8412          }
8413        },
8414        onClick(event) {
8415          if (closeOnClick && !store.select("open")) {
8416            store.cancelPendingOpen(event.nativeEvent);
8417          }
8418        },
8419        id: thisTriggerId,
8420        [triggerDisabled]: disabled2 ? "" : void 0,
8421        [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : ""
8422      }, elementProps],
8423      stateAttributesMapping: triggerOpenStateMapping
8424    });
8425    return element;
8426  });
8427  if (true) TooltipTrigger.displayName = "TooltipTrigger";
8428  
8429  // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8430  var React41 = __toESM(require_react(), 1);
8431  
8432  // node_modules/@base-ui/react/tooltip/portal/TooltipPortalContext.mjs
8433  var React40 = __toESM(require_react(), 1);
8434  var TooltipPortalContext = /* @__PURE__ */ React40.createContext(void 0);
8435  if (true) TooltipPortalContext.displayName = "TooltipPortalContext";
8436  function useTooltipPortalContext() {
8437    const value = React40.useContext(TooltipPortalContext);
8438    if (value === void 0) {
8439      throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70));
8440    }
8441    return value;
8442  }
8443  
8444  // node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs
8445  var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
8446  var TooltipPortal = /* @__PURE__ */ React41.forwardRef(function TooltipPortal2(props, forwardedRef) {
8447    const {
8448      keepMounted = false,
8449      ...portalProps
8450    } = props;
8451    const store = useTooltipRootContext();
8452    const mounted = store.useState("mounted");
8453    const shouldRender = mounted || keepMounted;
8454    if (!shouldRender) {
8455      return null;
8456    }
8457    return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TooltipPortalContext.Provider, {
8458      value: keepMounted,
8459      children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FloatingPortalLite, {
8460        ref: forwardedRef,
8461        ...portalProps
8462      })
8463    });
8464  });
8465  if (true) TooltipPortal.displayName = "TooltipPortal";
8466  
8467  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8468  var React43 = __toESM(require_react(), 1);
8469  
8470  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositionerContext.mjs
8471  var React42 = __toESM(require_react(), 1);
8472  var TooltipPositionerContext = /* @__PURE__ */ React42.createContext(void 0);
8473  if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext";
8474  function useTooltipPositionerContext() {
8475    const context = React42.useContext(TooltipPositionerContext);
8476    if (context === void 0) {
8477      throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71));
8478    }
8479    return context;
8480  }
8481  
8482  // node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs
8483  var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
8484  var TooltipPositioner = /* @__PURE__ */ React43.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) {
8485    const {
8486      render,
8487      className,
8488      anchor,
8489      positionMethod = "absolute",
8490      side = "top",
8491      align = "center",
8492      sideOffset = 0,
8493      alignOffset = 0,
8494      collisionBoundary = "clipping-ancestors",
8495      collisionPadding = 5,
8496      arrowPadding = 5,
8497      sticky = false,
8498      disableAnchorTracking = false,
8499      collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
8500      style,
8501      ...elementProps
8502    } = componentProps;
8503    const store = useTooltipRootContext();
8504    const keepMounted = useTooltipPortalContext();
8505    const open2 = store.useState("open");
8506    const mounted = store.useState("mounted");
8507    const trackCursorAxis = store.useState("trackCursorAxis");
8508    const disableHoverablePopup = store.useState("disableHoverablePopup");
8509    const floatingRootContext = store.useState("floatingRootContext");
8510    const instantType = store.useState("instantType");
8511    const transitionStatus = store.useState("transitionStatus");
8512    const adaptiveOrigin2 = store.useState("adaptiveOrigin");
8513    const positioning = useAnchorPositioning({
8514      anchor,
8515      positionMethod,
8516      floatingRootContext,
8517      mounted,
8518      side,
8519      sideOffset,
8520      align,
8521      alignOffset,
8522      collisionBoundary,
8523      collisionPadding,
8524      sticky,
8525      arrowPadding,
8526      disableAnchorTracking,
8527      keepMounted,
8528      collisionAvoidance,
8529      adaptiveOrigin: adaptiveOrigin2
8530    });
8531    const state = React43.useMemo(() => ({
8532      open: open2,
8533      side: positioning.side,
8534      align: positioning.align,
8535      anchorHidden: positioning.anchorHidden,
8536      instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType
8537    }), [open2, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]);
8538    const element = usePositioner(componentProps, state, {
8539      styles: positioning.positionerStyles,
8540      transitionStatus,
8541      props: elementProps,
8542      refs: [forwardedRef, store.useStateSetter("positionerElement")],
8543      hidden: !mounted,
8544      inert: !open2 || trackCursorAxis === "both" || disableHoverablePopup
8545    });
8546    return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TooltipPositionerContext.Provider, {
8547      value: positioning,
8548      children: element
8549    });
8550  });
8551  if (true) TooltipPositioner.displayName = "TooltipPositioner";
8552  
8553  // node_modules/@base-ui/react/tooltip/popup/TooltipPopup.mjs
8554  var React44 = __toESM(require_react(), 1);
8555  var TooltipPopup = /* @__PURE__ */ React44.forwardRef(function TooltipPopup2(componentProps, forwardedRef) {
8556    const {
8557      render,
8558      className,
8559      style,
8560      ...elementProps
8561    } = componentProps;
8562    const store = useTooltipRootContext();
8563    const {
8564      side,
8565      align
8566    } = useTooltipPositionerContext();
8567    const open2 = store.useState("open");
8568    const instantType = store.useState("instantType");
8569    const transitionStatus = store.useState("transitionStatus");
8570    const popupProps = store.useState("popupProps");
8571    const floatingContext = store.useState("floatingRootContext");
8572    const disabled2 = store.useState("disabled");
8573    const closeDelay = store.useState("closeDelay");
8574    useOpenChangeComplete({
8575      open: open2,
8576      ref: store.context.popupRef,
8577      onComplete() {
8578        if (open2) {
8579          store.context.onOpenChangeComplete?.(true);
8580        }
8581      }
8582    });
8583    useHoverFloatingInteraction(floatingContext, {
8584      enabled: !disabled2,
8585      closeDelay
8586    });
8587    const setPopupElement = store.useStateSetter("popupElement");
8588    const state = {
8589      open: open2,
8590      side,
8591      align,
8592      instant: instantType,
8593      transitionStatus
8594    };
8595    const element = useRenderElement("div", componentProps, {
8596      state,
8597      ref: [forwardedRef, store.context.popupRef, setPopupElement],
8598      props: [FOCUSABLE_POPUP_PROPS, popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps],
8599      stateAttributesMapping: popupTransitionStateMapping
8600    });
8601    return element;
8602  });
8603  if (true) TooltipPopup.displayName = "TooltipPopup";
8604  
8605  // node_modules/@base-ui/react/tooltip/arrow/TooltipArrow.mjs
8606  var React45 = __toESM(require_react(), 1);
8607  var TooltipArrow = /* @__PURE__ */ React45.forwardRef(function TooltipArrow2(componentProps, forwardedRef) {
8608    const {
8609      render,
8610      className,
8611      style,
8612      ...elementProps
8613    } = componentProps;
8614    const store = useTooltipRootContext();
8615    const {
8616      arrowRef,
8617      side,
8618      align,
8619      arrowUncentered,
8620      arrowStyles
8621    } = useTooltipPositionerContext();
8622    const open2 = store.useState("open");
8623    const instantType = store.useState("instantType");
8624    const state = {
8625      open: open2,
8626      side,
8627      align,
8628      uncentered: arrowUncentered,
8629      instant: instantType
8630    };
8631    const element = useRenderElement("div", componentProps, {
8632      state,
8633      ref: [forwardedRef, arrowRef],
8634      props: [{
8635        style: arrowStyles,
8636        "aria-hidden": true
8637      }, elementProps],
8638      stateAttributesMapping: popupStateMapping
8639    });
8640    return element;
8641  });
8642  if (true) TooltipArrow.displayName = "TooltipArrow";
8643  
8644  // node_modules/@base-ui/react/tooltip/provider/TooltipProvider.mjs
8645  var React46 = __toESM(require_react(), 1);
8646  var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
8647  var TooltipProvider = function TooltipProvider2(props) {
8648    const {
8649      delay,
8650      closeDelay,
8651      timeout = 400
8652    } = props;
8653    const delayValue = React46.useMemo(() => ({
8654      open: delay,
8655      close: closeDelay
8656    }), [delay, closeDelay]);
8657    return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipProviderContext.Provider, {
8658      value: delay,
8659      children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FloatingDelayGroup, {
8660        delay: delayValue,
8661        timeoutMs: timeout,
8662        children: props.children
8663      })
8664    });
8665  };
8666  if (true) TooltipProvider.displayName = "TooltipProvider";
8667  
8668  // node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs
8669  var React47 = __toESM(require_react(), 1);
8670  var TooltipViewport = /* @__PURE__ */ React47.forwardRef(function TooltipViewport2(componentProps, forwardedRef) {
8671    const {
8672      render,
8673      className,
8674      style,
8675      children,
8676      ...elementProps
8677    } = componentProps;
8678    const store = useTooltipRootContext();
8679    const positioner = useTooltipPositionerContext();
8680    const instantType = store.useState("instantType");
8681    const {
8682      children: childrenToRender,
8683      state: viewportState
8684    } = usePopupViewport({
8685      store,
8686      side: positioner.side,
8687      children
8688    });
8689    const state = {
8690      activationDirection: viewportState.activationDirection,
8691      transitioning: viewportState.transitioning,
8692      instant: instantType
8693    };
8694    return useRenderElement("div", componentProps, {
8695      state,
8696      ref: forwardedRef,
8697      props: [elementProps, {
8698        children: childrenToRender
8699      }],
8700      stateAttributesMapping: popupViewportStateMapping
8701    });
8702  });
8703  if (true) TooltipViewport.displayName = "TooltipViewport";
8704  
8705  // node_modules/@base-ui/react/tooltip/store/TooltipHandle.mjs
8706  var TooltipHandle = class extends BasePopupHandle {
8707    constructor() {
8708      super(createNullTooltipStore(), "Tooltip");
8709    }
8710    /**
8711     * Opens the tooltip and associates it with the trigger with the given id.
8712     *
8713     * This method should only be called in an event handler or an effect (not during rendering).
8714     *
8715     * @param triggerId ID of the trigger to associate with the tooltip. The trigger must be a matching
8716     * `Tooltip.Trigger` with this handle passed as a prop.
8717     */
8718    open(triggerId) {
8719      this.openByTrigger(triggerId);
8720    }
8721    /**
8722     * Closes the tooltip.
8723     *
8724     * This method should only be called in an event handler or an effect (not during rendering).
8725     */
8726    close() {
8727      this.closePopup();
8728    }
8729    /**
8730     * Whether the tooltip is currently open. Returns `false` while no root is attached to the handle.
8731     */
8732    get isOpen() {
8733      return this.attachedStore?.select("open") ?? false;
8734    }
8735  };
8736  function createTooltipHandle() {
8737    return new TooltipHandle();
8738  }
8739  
8740  // node_modules/@base-ui/react/use-render/useRender.mjs
8741  function useRender(params) {
8742    return useRenderElement(params.defaultTagName ?? "div", params, params);
8743  }
8744  
8745  // packages/ui/build-module/text/text.mjs
8746  var import_element10 = __toESM(require_element(), 1);
8747  var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
8748  function getRuntime() {
8749    const globalScope = globalThis;
8750    if (globalScope.__wpStyleRuntime) {
8751      return globalScope.__wpStyleRuntime;
8752    }
8753    globalScope.__wpStyleRuntime = {
8754      documents: /* @__PURE__ */ new Map(),
8755      styles: /* @__PURE__ */ new Map(),
8756      injectedStyles: /* @__PURE__ */ new WeakMap()
8757    };
8758    if (typeof document !== "undefined") {
8759      registerDocument(document);
8760    }
8761    return globalScope.__wpStyleRuntime;
8762  }
8763  function documentContainsStyleHash(targetDocument, hash) {
8764    if (!targetDocument.head) {
8765      return false;
8766    }
8767    for (const style of targetDocument.head.querySelectorAll(
8768      `style[$STYLE_HASH_ATTRIBUTE}]`
8769    )) {
8770      if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) {
8771        return true;
8772      }
8773    }
8774    return false;
8775  }
8776  function injectStyle(targetDocument, hash, css) {
8777    if (!targetDocument.head) {
8778      return;
8779    }
8780    const runtime = getRuntime();
8781    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8782    if (!injectedStyles) {
8783      injectedStyles = /* @__PURE__ */ new Set();
8784      runtime.injectedStyles.set(targetDocument, injectedStyles);
8785    }
8786    if (injectedStyles.has(hash)) {
8787      return;
8788    }
8789    if (documentContainsStyleHash(targetDocument, hash)) {
8790      injectedStyles.add(hash);
8791      return;
8792    }
8793    const style = targetDocument.createElement("style");
8794    style.setAttribute(STYLE_HASH_ATTRIBUTE, hash);
8795    style.appendChild(targetDocument.createTextNode(css));
8796    targetDocument.head.appendChild(style);
8797    injectedStyles.add(hash);
8798  }
8799  function registerDocument(targetDocument) {
8800    const runtime = getRuntime();
8801    runtime.documents.set(
8802      targetDocument,
8803      (runtime.documents.get(targetDocument) ?? 0) + 1
8804    );
8805    for (const [hash, css] of runtime.styles) {
8806      injectStyle(targetDocument, hash, css);
8807    }
8808    return () => {
8809      const count = runtime.documents.get(targetDocument);
8810      if (count === void 0) {
8811        return;
8812      }
8813      if (count <= 1) {
8814        runtime.documents.delete(targetDocument);
8815        return;
8816      }
8817      runtime.documents.set(targetDocument, count - 1);
8818    };
8819  }
8820  function registerStyle(hash, css) {
8821    const runtime = getRuntime();
8822    runtime.styles.set(hash, css);
8823    for (const targetDocument of runtime.documents.keys()) {
8824      injectStyle(targetDocument, hash, css);
8825    }
8826  }
8827  if (typeof process === "undefined" || true) {
8828    registerStyle("3167e7d116", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{text-wrap:pretty;margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
8829  }
8830  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" };
8831  if (typeof process === "undefined" || true) {
8832    registerStyle("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
8833  }
8834  var global_css_defense_default = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
8835  var Text = (0, import_element10.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
8836    const element = useRender({
8837      render,
8838      defaultTagName: "span",
8839      ref,
8840      props: mergeProps(props, {
8841        className: clsx_default(
8842          style_default.text,
8843          global_css_defense_default.heading,
8844          global_css_defense_default.p,
8845          style_default[variant],
8846          className
8847        )
8848      })
8849    });
8850    return element;
8851  });
8852  
8853  // packages/ui/build-module/tooltip/index.mjs
8854  var tooltip_exports = {};
8855  __export(tooltip_exports, {
8856    Popup: () => Popup,
8857    Portal: () => Portal,
8858    Positioner: () => Positioner,
8859    Provider: () => Provider,
8860    Root: () => Root,
8861    Trigger: () => Trigger
8862  });
8863  
8864  // packages/ui/build-module/tooltip/popup.mjs
8865  var import_element14 = __toESM(require_element(), 1);
8866  
8867  // packages/ui/build-module/tooltip/portal.mjs
8868  var import_element11 = __toESM(require_element(), 1);
8869  
8870  // packages/ui/build-module/utils/wp-compat-overlay-slot.mjs
8871  var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
8872  function getRuntime2() {
8873    const globalScope = globalThis;
8874    if (globalScope.__wpStyleRuntime) {
8875      return globalScope.__wpStyleRuntime;
8876    }
8877    globalScope.__wpStyleRuntime = {
8878      documents: /* @__PURE__ */ new Map(),
8879      styles: /* @__PURE__ */ new Map(),
8880      injectedStyles: /* @__PURE__ */ new WeakMap()
8881    };
8882    if (typeof document !== "undefined") {
8883      registerDocument2(document);
8884    }
8885    return globalScope.__wpStyleRuntime;
8886  }
8887  function documentContainsStyleHash2(targetDocument, hash) {
8888    if (!targetDocument.head) {
8889      return false;
8890    }
8891    for (const style of targetDocument.head.querySelectorAll(
8892      `style[$STYLE_HASH_ATTRIBUTE2}]`
8893    )) {
8894      if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) {
8895        return true;
8896      }
8897    }
8898    return false;
8899  }
8900  function injectStyle2(targetDocument, hash, css) {
8901    if (!targetDocument.head) {
8902      return;
8903    }
8904    const runtime = getRuntime2();
8905    let injectedStyles = runtime.injectedStyles.get(targetDocument);
8906    if (!injectedStyles) {
8907      injectedStyles = /* @__PURE__ */ new Set();
8908      runtime.injectedStyles.set(targetDocument, injectedStyles);
8909    }
8910    if (injectedStyles.has(hash)) {
8911      return;
8912    }
8913    if (documentContainsStyleHash2(targetDocument, hash)) {
8914      injectedStyles.add(hash);
8915      return;
8916    }
8917    const style = targetDocument.createElement("style");
8918    style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash);
8919    style.appendChild(targetDocument.createTextNode(css));
8920    targetDocument.head.appendChild(style);
8921    injectedStyles.add(hash);
8922  }
8923  function registerDocument2(targetDocument) {
8924    const runtime = getRuntime2();
8925    runtime.documents.set(
8926      targetDocument,
8927      (runtime.documents.get(targetDocument) ?? 0) + 1
8928    );
8929    for (const [hash, css] of runtime.styles) {
8930      injectStyle2(targetDocument, hash, css);
8931    }
8932    return () => {
8933      const count = runtime.documents.get(targetDocument);
8934      if (count === void 0) {
8935        return;
8936      }
8937      if (count <= 1) {
8938        runtime.documents.delete(targetDocument);
8939        return;
8940      }
8941      runtime.documents.set(targetDocument, count - 1);
8942    };
8943  }
8944  function registerStyle2(hash, css) {
8945    const runtime = getRuntime2();
8946    runtime.styles.set(hash, css);
8947    for (const targetDocument of runtime.documents.keys()) {
8948      injectStyle2(targetDocument, hash, css);
8949    }
8950  }
8951  if (typeof process === "undefined" || true) {
8952    registerStyle2("be37f31c1e", "._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");
8953  }
8954  var wp_compat_overlay_slot_default = { "slot": "_11fc52b637ff8a7e__slot" };
8955  var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot";
8956  function resolveOwnerDocument() {
8957    return typeof document === "undefined" ? null : document;
8958  }
8959  function isInWordPressEnvironment() {
8960    let topWp;
8961    try {
8962      topWp = window.top?.wp;
8963    } catch {
8964    }
8965    const wp = topWp ?? window.wp;
8966    return typeof wp?.components === "object" && wp.components !== null;
8967  }
8968  var cachedSlot = null;
8969  function ensureSlotIsAccessible(element) {
8970    element.setAttribute("aria-hidden", "false");
8971    return element;
8972  }
8973  function createSlot(ownerDocument2) {
8974    const element = ownerDocument2.createElement("div");
8975    element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, "");
8976    if (wp_compat_overlay_slot_default.slot) {
8977      element.classList.add(wp_compat_overlay_slot_default.slot);
8978    }
8979    ownerDocument2.body.appendChild(element);
8980    return element;
8981  }
8982  function getWpCompatOverlaySlot() {
8983    if (typeof window === "undefined") {
8984      return void 0;
8985    }
8986    if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) {
8987      return void 0;
8988    }
8989    const ownerDocument2 = resolveOwnerDocument();
8990    if (!ownerDocument2 || !ownerDocument2.body) {
8991      return void 0;
8992    }
8993    if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) {
8994      return ensureSlotIsAccessible(cachedSlot);
8995    }
8996    const existing = ownerDocument2.querySelector(
8997      `[$WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]`
8998    );
8999    if (existing instanceof HTMLDivElement) {
9000      cachedSlot = ensureSlotIsAccessible(existing);
9001      return cachedSlot;
9002    }
9003    if (cachedSlot?.isConnected) {
9004      cachedSlot.remove();
9005    }
9006    cachedSlot = ensureSlotIsAccessible(createSlot(ownerDocument2));
9007    return cachedSlot;
9008  }
9009  
9010  // packages/ui/build-module/tooltip/portal.mjs
9011  var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
9012  var Portal = (0, import_element11.forwardRef)(
9013    function TooltipPortal3({ container, ...restProps }, ref) {
9014      return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
9015        index_parts_exports.Portal,
9016        {
9017          container: container ?? getWpCompatOverlaySlot(),
9018          ...restProps,
9019          ref
9020        }
9021      );
9022    }
9023  );
9024  
9025  // packages/ui/build-module/tooltip/positioner.mjs
9026  var import_element12 = __toESM(require_element(), 1);
9027  var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
9028  var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
9029  function getRuntime3() {
9030    const globalScope = globalThis;
9031    if (globalScope.__wpStyleRuntime) {
9032      return globalScope.__wpStyleRuntime;
9033    }
9034    globalScope.__wpStyleRuntime = {
9035      documents: /* @__PURE__ */ new Map(),
9036      styles: /* @__PURE__ */ new Map(),
9037      injectedStyles: /* @__PURE__ */ new WeakMap()
9038    };
9039    if (typeof document !== "undefined") {
9040      registerDocument3(document);
9041    }
9042    return globalScope.__wpStyleRuntime;
9043  }
9044  function documentContainsStyleHash3(targetDocument, hash) {
9045    if (!targetDocument.head) {
9046      return false;
9047    }
9048    for (const style of targetDocument.head.querySelectorAll(
9049      `style[$STYLE_HASH_ATTRIBUTE3}]`
9050    )) {
9051      if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) {
9052        return true;
9053      }
9054    }
9055    return false;
9056  }
9057  function injectStyle3(targetDocument, hash, css) {
9058    if (!targetDocument.head) {
9059      return;
9060    }
9061    const runtime = getRuntime3();
9062    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9063    if (!injectedStyles) {
9064      injectedStyles = /* @__PURE__ */ new Set();
9065      runtime.injectedStyles.set(targetDocument, injectedStyles);
9066    }
9067    if (injectedStyles.has(hash)) {
9068      return;
9069    }
9070    if (documentContainsStyleHash3(targetDocument, hash)) {
9071      injectedStyles.add(hash);
9072      return;
9073    }
9074    const style = targetDocument.createElement("style");
9075    style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash);
9076    style.appendChild(targetDocument.createTextNode(css));
9077    targetDocument.head.appendChild(style);
9078    injectedStyles.add(hash);
9079  }
9080  function registerDocument3(targetDocument) {
9081    const runtime = getRuntime3();
9082    runtime.documents.set(
9083      targetDocument,
9084      (runtime.documents.get(targetDocument) ?? 0) + 1
9085    );
9086    for (const [hash, css] of runtime.styles) {
9087      injectStyle3(targetDocument, hash, css);
9088    }
9089    return () => {
9090      const count = runtime.documents.get(targetDocument);
9091      if (count === void 0) {
9092        return;
9093      }
9094      if (count <= 1) {
9095        runtime.documents.delete(targetDocument);
9096        return;
9097      }
9098      runtime.documents.set(targetDocument, count - 1);
9099    };
9100  }
9101  function registerStyle3(hash, css) {
9102    const runtime = getRuntime3();
9103    runtime.styles.set(hash, css);
9104    for (const targetDocument of runtime.documents.keys()) {
9105      injectStyle3(targetDocument, hash, css);
9106    }
9107  }
9108  if (typeof process === "undefined" || true) {
9109    registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9110  }
9111  var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9112  if (typeof process === "undefined" || true) {
9113    registerStyle3("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');
9114  }
9115  var style_default2 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9116  var Positioner = (0, import_element12.forwardRef)(
9117    function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) {
9118      return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
9119        index_parts_exports.Positioner,
9120        {
9121          ref,
9122          align,
9123          side,
9124          sideOffset,
9125          ...props,
9126          className: clsx_default(
9127            resets_default["box-sizing"],
9128            style_default2.positioner,
9129            className
9130          )
9131        }
9132      );
9133    }
9134  );
9135  
9136  // packages/ui/build-module/utils/render-slot-with-children.mjs
9137  var import_element13 = __toESM(require_element(), 1);
9138  function renderSlotWithChildren(slot, defaultSlot, children) {
9139    return (0, import_element13.cloneElement)(slot ?? defaultSlot, { children });
9140  }
9141  
9142  // packages/ui/build-module/utils/theme-provider.mjs
9143  var theme = __toESM(require_theme(), 1);
9144  
9145  // packages/ui/build-module/lock-unlock.mjs
9146  var import_private_apis = __toESM(require_private_apis(), 1);
9147  var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
9148    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
9149    "@wordpress/ui"
9150  );
9151  
9152  // packages/ui/build-module/utils/theme-provider.mjs
9153  function getThemeProvider() {
9154    const themePackage = theme;
9155    if (themePackage.ThemeProvider) {
9156      return themePackage.ThemeProvider;
9157    }
9158    if (!themePackage.privateApis) {
9159      throw new Error(
9160        "@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`."
9161      );
9162    }
9163    return unlock(
9164      themePackage.privateApis
9165    ).ThemeProvider;
9166  }
9167  var ThemeProvider = getThemeProvider();
9168  
9169  // packages/ui/build-module/tooltip/popup.mjs
9170  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
9171  var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
9172  function getRuntime4() {
9173    const globalScope = globalThis;
9174    if (globalScope.__wpStyleRuntime) {
9175      return globalScope.__wpStyleRuntime;
9176    }
9177    globalScope.__wpStyleRuntime = {
9178      documents: /* @__PURE__ */ new Map(),
9179      styles: /* @__PURE__ */ new Map(),
9180      injectedStyles: /* @__PURE__ */ new WeakMap()
9181    };
9182    if (typeof document !== "undefined") {
9183      registerDocument4(document);
9184    }
9185    return globalScope.__wpStyleRuntime;
9186  }
9187  function documentContainsStyleHash4(targetDocument, hash) {
9188    if (!targetDocument.head) {
9189      return false;
9190    }
9191    for (const style of targetDocument.head.querySelectorAll(
9192      `style[$STYLE_HASH_ATTRIBUTE4}]`
9193    )) {
9194      if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
9195        return true;
9196      }
9197    }
9198    return false;
9199  }
9200  function injectStyle4(targetDocument, hash, css) {
9201    if (!targetDocument.head) {
9202      return;
9203    }
9204    const runtime = getRuntime4();
9205    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9206    if (!injectedStyles) {
9207      injectedStyles = /* @__PURE__ */ new Set();
9208      runtime.injectedStyles.set(targetDocument, injectedStyles);
9209    }
9210    if (injectedStyles.has(hash)) {
9211      return;
9212    }
9213    if (documentContainsStyleHash4(targetDocument, hash)) {
9214      injectedStyles.add(hash);
9215      return;
9216    }
9217    const style = targetDocument.createElement("style");
9218    style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
9219    style.appendChild(targetDocument.createTextNode(css));
9220    targetDocument.head.appendChild(style);
9221    injectedStyles.add(hash);
9222  }
9223  function registerDocument4(targetDocument) {
9224    const runtime = getRuntime4();
9225    runtime.documents.set(
9226      targetDocument,
9227      (runtime.documents.get(targetDocument) ?? 0) + 1
9228    );
9229    for (const [hash, css] of runtime.styles) {
9230      injectStyle4(targetDocument, hash, css);
9231    }
9232    return () => {
9233      const count = runtime.documents.get(targetDocument);
9234      if (count === void 0) {
9235        return;
9236      }
9237      if (count <= 1) {
9238        runtime.documents.delete(targetDocument);
9239        return;
9240      }
9241      runtime.documents.set(targetDocument, count - 1);
9242    };
9243  }
9244  function registerStyle4(hash, css) {
9245    const runtime = getRuntime4();
9246    runtime.styles.set(hash, css);
9247    for (const targetDocument of runtime.documents.keys()) {
9248      injectStyle4(targetDocument, hash, css);
9249    }
9250  }
9251  if (typeof process === "undefined" || true) {
9252    registerStyle4("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');
9253  }
9254  var style_default3 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" };
9255  var POPUP_COLOR = { background: "#1e1e1e" };
9256  var Popup = (0, import_element14.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) {
9257    const popupContent = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
9258      index_parts_exports.Popup,
9259      {
9260        ref,
9261        className: clsx_default(style_default3.popup, className),
9262        ...props,
9263        children
9264      }
9265    ) });
9266    const positionedPopup = renderSlotWithChildren(
9267      positioner,
9268      /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Positioner, {}),
9269      popupContent
9270    );
9271    return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Portal, {}), positionedPopup);
9272  });
9273  
9274  // packages/ui/build-module/tooltip/trigger.mjs
9275  var import_element15 = __toESM(require_element(), 1);
9276  var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
9277  var Trigger = (0, import_element15.forwardRef)(
9278    function TooltipTrigger3(props, ref) {
9279      return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(index_parts_exports.Trigger, { ref, ...props });
9280    }
9281  );
9282  
9283  // packages/ui/build-module/utils/direction-provider.mjs
9284  var import_i18n = __toESM(require_i18n(), 1);
9285  var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
9286  function DirectionProvider3({ children }) {
9287    return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DirectionProvider, { direction: (0, import_i18n.isRTL)() ? "rtl" : "ltr", children });
9288  }
9289  
9290  // packages/ui/build-module/tooltip/root.mjs
9291  var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
9292  function Root(props) {
9293    return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(index_parts_exports.Root, { ...props }) });
9294  }
9295  
9296  // packages/ui/build-module/tooltip/provider.mjs
9297  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
9298  function Provider({ ...props }) {
9299    return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(index_parts_exports.Provider, { ...props });
9300  }
9301  
9302  // packages/ui/build-module/link/link.mjs
9303  var import_element16 = __toESM(require_element(), 1);
9304  var import_i18n2 = __toESM(require_i18n(), 1);
9305  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
9306  var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
9307  function getRuntime5() {
9308    const globalScope = globalThis;
9309    if (globalScope.__wpStyleRuntime) {
9310      return globalScope.__wpStyleRuntime;
9311    }
9312    globalScope.__wpStyleRuntime = {
9313      documents: /* @__PURE__ */ new Map(),
9314      styles: /* @__PURE__ */ new Map(),
9315      injectedStyles: /* @__PURE__ */ new WeakMap()
9316    };
9317    if (typeof document !== "undefined") {
9318      registerDocument5(document);
9319    }
9320    return globalScope.__wpStyleRuntime;
9321  }
9322  function documentContainsStyleHash5(targetDocument, hash) {
9323    if (!targetDocument.head) {
9324      return false;
9325    }
9326    for (const style of targetDocument.head.querySelectorAll(
9327      `style[$STYLE_HASH_ATTRIBUTE5}]`
9328    )) {
9329      if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
9330        return true;
9331      }
9332    }
9333    return false;
9334  }
9335  function injectStyle5(targetDocument, hash, css) {
9336    if (!targetDocument.head) {
9337      return;
9338    }
9339    const runtime = getRuntime5();
9340    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9341    if (!injectedStyles) {
9342      injectedStyles = /* @__PURE__ */ new Set();
9343      runtime.injectedStyles.set(targetDocument, injectedStyles);
9344    }
9345    if (injectedStyles.has(hash)) {
9346      return;
9347    }
9348    if (documentContainsStyleHash5(targetDocument, hash)) {
9349      injectedStyles.add(hash);
9350      return;
9351    }
9352    const style = targetDocument.createElement("style");
9353    style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
9354    style.appendChild(targetDocument.createTextNode(css));
9355    targetDocument.head.appendChild(style);
9356    injectedStyles.add(hash);
9357  }
9358  function registerDocument5(targetDocument) {
9359    const runtime = getRuntime5();
9360    runtime.documents.set(
9361      targetDocument,
9362      (runtime.documents.get(targetDocument) ?? 0) + 1
9363    );
9364    for (const [hash, css] of runtime.styles) {
9365      injectStyle5(targetDocument, hash, css);
9366    }
9367    return () => {
9368      const count = runtime.documents.get(targetDocument);
9369      if (count === void 0) {
9370        return;
9371      }
9372      if (count <= 1) {
9373        runtime.documents.delete(targetDocument);
9374        return;
9375      }
9376      runtime.documents.set(targetDocument, count - 1);
9377    };
9378  }
9379  function registerStyle5(hash, css) {
9380    const runtime = getRuntime5();
9381    runtime.styles.set(hash, css);
9382    for (const targetDocument of runtime.documents.keys()) {
9383      injectStyle5(targetDocument, hash, css);
9384    }
9385  }
9386  if (typeof process === "undefined" || true) {
9387    registerStyle5("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9388  }
9389  var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9390  if (typeof process === "undefined" || true) {
9391    registerStyle5("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
9392  }
9393  var focus_module_default = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
9394  if (typeof process === "undefined" || true) {
9395    registerStyle5("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"}}}');
9396  }
9397  var style_default4 = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
9398  if (typeof process === "undefined" || true) {
9399    registerStyle5("e8e31009f5", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
9400  }
9401  var global_css_defense_default2 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
9402  var Link = (0, import_element16.forwardRef)(function Link2({
9403    children,
9404    variant = "default",
9405    tone = "brand",
9406    openInNewTab = false,
9407    target,
9408    render,
9409    className,
9410    ...props
9411  }, ref) {
9412    const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? "");
9413    const element = useRender({
9414      render,
9415      defaultTagName: "a",
9416      ref,
9417      props: mergeProps(props, {
9418        className: clsx_default(
9419          global_css_defense_default2.a,
9420          resets_default2["box-sizing"],
9421          focus_module_default["outset-ring--focus-except-active"],
9422          variant !== "unstyled" && style_default4.link,
9423          variant !== "unstyled" && style_default4[`is-$tone}`],
9424          variant === "unstyled" && style_default4["is-unstyled"],
9425          className
9426        ),
9427        target: target ?? (openInNewTab ? "_blank" : void 0),
9428        children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
9429          children,
9430          shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9431            "span",
9432            {
9433              className: style_default4["link-icon"],
9434              role: "img",
9435              "aria-label": (
9436                /* translators: accessibility text appended to link text */
9437                (0, import_i18n2.__)("(opens in a new tab)")
9438              )
9439            }
9440          )
9441        ] })
9442      })
9443    });
9444    return element;
9445  });
9446  
9447  // packages/icons/build-module/icon/index.mjs
9448  var import_element17 = __toESM(require_element(), 1);
9449  var icon_default = (0, import_element17.forwardRef)(
9450    ({ icon, size: size4 = 24, style, ...props }, ref) => {
9451      const intrinsicStyle = icon.props.style;
9452      const mergedStyle = intrinsicStyle || style ? { ...intrinsicStyle, ...style } : void 0;
9453      return (0, import_element17.cloneElement)(icon, {
9454        width: size4,
9455        height: size4,
9456        ...props,
9457        // Merge styles so the icon's intrinsic style (e.g. `fill: none` on
9458        // stroke-based icons) is preserved unless the consumer overrides
9459        // the same property explicitly.
9460        ...mergedStyle ? { style: mergedStyle } : {},
9461        ref
9462      });
9463    }
9464  );
9465  
9466  // packages/icons/build-module/library/chevron-left.mjs
9467  var import_primitives = __toESM(require_primitives(), 1);
9468  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
9469  var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_primitives.Path, { d: "M14 6.5L9 12L14 17.5", vectorEffect: "non-scaling-stroke" }) });
9470  
9471  // packages/icons/build-module/library/chevron-right.mjs
9472  var import_primitives2 = __toESM(require_primitives(), 1);
9473  var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
9474  var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives2.Path, { d: "M10 6.5L15 12L10 17.5", vectorEffect: "non-scaling-stroke" }) });
9475  
9476  // packages/icons/build-module/library/more-vertical.mjs
9477  var import_primitives3 = __toESM(require_primitives(), 1);
9478  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
9479  var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
9480    /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.Path, { d: "M11.75 18.25L12.25 18.25L12.25 17.75L11.75 17.75L11.75 18.25Z", fill: "currentColor", stroke: "none" }),
9481    /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.Path, { d: "M11.75 12.25L12.25 12.25L12.25 11.75L11.75 11.75L11.75 12.25Z", fill: "currentColor", stroke: "none" }),
9482    /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.Path, { d: "M11.75 6.25L12.25 6.25L12.25 5.75L11.75 5.75L11.75 6.25Z", fill: "currentColor", stroke: "none" }),
9483    /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.Path, { d: "M11.75 18.25L12.25 18.25L12.25 17.75L11.75 17.75L11.75 18.25Z", vectorEffect: "non-scaling-stroke" }),
9484    /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.Path, { d: "M11.75 12.25L12.25 12.25L12.25 11.75L11.75 11.75L11.75 12.25Z", vectorEffect: "non-scaling-stroke" }),
9485    /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_primitives3.Path, { d: "M11.75 6.25L12.25 6.25L12.25 5.75L11.75 5.75L11.75 6.25Z", vectorEffect: "non-scaling-stroke" })
9486  ] });
9487  
9488  // packages/icons/build-module/library/next.mjs
9489  var import_primitives4 = __toESM(require_primitives(), 1);
9490  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
9491  var next_default = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_primitives4.Path, { d: "M7 17.5L12 12L7 6.5M13 17.5L18 12L13 6.5", vectorEffect: "non-scaling-stroke" }) });
9492  
9493  // packages/icons/build-module/library/previous.mjs
9494  var import_primitives5 = __toESM(require_primitives(), 1);
9495  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
9496  var previous_default = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_primitives5.Path, { d: "M17 6.5L12 12L17 17.5M11 6.5L6 12L11 17.5", vectorEffect: "non-scaling-stroke" }) });
9497  
9498  // packages/ui/build-module/visually-hidden/visually-hidden.mjs
9499  var import_element18 = __toESM(require_element(), 1);
9500  var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
9501  function getRuntime6() {
9502    const globalScope = globalThis;
9503    if (globalScope.__wpStyleRuntime) {
9504      return globalScope.__wpStyleRuntime;
9505    }
9506    globalScope.__wpStyleRuntime = {
9507      documents: /* @__PURE__ */ new Map(),
9508      styles: /* @__PURE__ */ new Map(),
9509      injectedStyles: /* @__PURE__ */ new WeakMap()
9510    };
9511    if (typeof document !== "undefined") {
9512      registerDocument6(document);
9513    }
9514    return globalScope.__wpStyleRuntime;
9515  }
9516  function documentContainsStyleHash6(targetDocument, hash) {
9517    if (!targetDocument.head) {
9518      return false;
9519    }
9520    for (const style of targetDocument.head.querySelectorAll(
9521      `style[$STYLE_HASH_ATTRIBUTE6}]`
9522    )) {
9523      if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
9524        return true;
9525      }
9526    }
9527    return false;
9528  }
9529  function injectStyle6(targetDocument, hash, css) {
9530    if (!targetDocument.head) {
9531      return;
9532    }
9533    const runtime = getRuntime6();
9534    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9535    if (!injectedStyles) {
9536      injectedStyles = /* @__PURE__ */ new Set();
9537      runtime.injectedStyles.set(targetDocument, injectedStyles);
9538    }
9539    if (injectedStyles.has(hash)) {
9540      return;
9541    }
9542    if (documentContainsStyleHash6(targetDocument, hash)) {
9543      injectedStyles.add(hash);
9544      return;
9545    }
9546    const style = targetDocument.createElement("style");
9547    style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
9548    style.appendChild(targetDocument.createTextNode(css));
9549    targetDocument.head.appendChild(style);
9550    injectedStyles.add(hash);
9551  }
9552  function registerDocument6(targetDocument) {
9553    const runtime = getRuntime6();
9554    runtime.documents.set(
9555      targetDocument,
9556      (runtime.documents.get(targetDocument) ?? 0) + 1
9557    );
9558    for (const [hash, css] of runtime.styles) {
9559      injectStyle6(targetDocument, hash, css);
9560    }
9561    return () => {
9562      const count = runtime.documents.get(targetDocument);
9563      if (count === void 0) {
9564        return;
9565      }
9566      if (count <= 1) {
9567        runtime.documents.delete(targetDocument);
9568        return;
9569      }
9570      runtime.documents.set(targetDocument, count - 1);
9571    };
9572  }
9573  function registerStyle6(hash, css) {
9574    const runtime = getRuntime6();
9575    runtime.styles.set(hash, css);
9576    for (const targetDocument of runtime.documents.keys()) {
9577      injectStyle6(targetDocument, hash, css);
9578    }
9579  }
9580  if (typeof process === "undefined" || true) {
9581    registerStyle6("f4df7461e9", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal;padding:0;position:absolute;width:1px;word-break:normal}}}");
9582  }
9583  var style_default5 = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
9584  var VisuallyHidden = (0, import_element18.forwardRef)(
9585    function VisuallyHidden2({ render, ...restProps }, ref) {
9586      const element = useRender({
9587        render,
9588        ref,
9589        props: mergeProps(
9590          { className: style_default5["visually-hidden"] },
9591          restProps,
9592          {
9593            // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it.
9594            "data-visually-hidden": ""
9595          }
9596        )
9597      });
9598      return element;
9599    }
9600  );
9601  
9602  // packages/ui/build-module/stack/stack.mjs
9603  var import_element19 = __toESM(require_element(), 1);
9604  var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
9605  function getRuntime7() {
9606    const globalScope = globalThis;
9607    if (globalScope.__wpStyleRuntime) {
9608      return globalScope.__wpStyleRuntime;
9609    }
9610    globalScope.__wpStyleRuntime = {
9611      documents: /* @__PURE__ */ new Map(),
9612      styles: /* @__PURE__ */ new Map(),
9613      injectedStyles: /* @__PURE__ */ new WeakMap()
9614    };
9615    if (typeof document !== "undefined") {
9616      registerDocument7(document);
9617    }
9618    return globalScope.__wpStyleRuntime;
9619  }
9620  function documentContainsStyleHash7(targetDocument, hash) {
9621    if (!targetDocument.head) {
9622      return false;
9623    }
9624    for (const style of targetDocument.head.querySelectorAll(
9625      `style[$STYLE_HASH_ATTRIBUTE7}]`
9626    )) {
9627      if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
9628        return true;
9629      }
9630    }
9631    return false;
9632  }
9633  function injectStyle7(targetDocument, hash, css) {
9634    if (!targetDocument.head) {
9635      return;
9636    }
9637    const runtime = getRuntime7();
9638    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9639    if (!injectedStyles) {
9640      injectedStyles = /* @__PURE__ */ new Set();
9641      runtime.injectedStyles.set(targetDocument, injectedStyles);
9642    }
9643    if (injectedStyles.has(hash)) {
9644      return;
9645    }
9646    if (documentContainsStyleHash7(targetDocument, hash)) {
9647      injectedStyles.add(hash);
9648      return;
9649    }
9650    const style = targetDocument.createElement("style");
9651    style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
9652    style.appendChild(targetDocument.createTextNode(css));
9653    targetDocument.head.appendChild(style);
9654    injectedStyles.add(hash);
9655  }
9656  function registerDocument7(targetDocument) {
9657    const runtime = getRuntime7();
9658    runtime.documents.set(
9659      targetDocument,
9660      (runtime.documents.get(targetDocument) ?? 0) + 1
9661    );
9662    for (const [hash, css] of runtime.styles) {
9663      injectStyle7(targetDocument, hash, css);
9664    }
9665    return () => {
9666      const count = runtime.documents.get(targetDocument);
9667      if (count === void 0) {
9668        return;
9669      }
9670      if (count <= 1) {
9671        runtime.documents.delete(targetDocument);
9672        return;
9673      }
9674      runtime.documents.set(targetDocument, count - 1);
9675    };
9676  }
9677  function registerStyle7(hash, css) {
9678    const runtime = getRuntime7();
9679    runtime.styles.set(hash, css);
9680    for (const targetDocument of runtime.documents.keys()) {
9681      injectStyle7(targetDocument, hash, css);
9682    }
9683  }
9684  if (typeof process === "undefined" || true) {
9685    registerStyle7("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
9686  }
9687  var style_default6 = { "stack": "_19ce0419607e1896__stack" };
9688  var gapTokens = {
9689    xs: "var(--wpds-dimension-gap-xs, 4px)",
9690    sm: "var(--wpds-dimension-gap-sm, 8px)",
9691    md: "var(--wpds-dimension-gap-md, 12px)",
9692    lg: "var(--wpds-dimension-gap-lg, 16px)",
9693    xl: "var(--wpds-dimension-gap-xl, 24px)",
9694    "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
9695    "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
9696  };
9697  var Stack = (0, import_element19.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
9698    const style = {
9699      gap: gap && gapTokens[gap],
9700      alignItems: align,
9701      justifyContent: justify,
9702      flexDirection: direction,
9703      flexWrap: wrap
9704    };
9705    const element = useRender({
9706      render,
9707      ref,
9708      props: mergeProps(props, { style, className: style_default6.stack })
9709    });
9710    return element;
9711  });
9712  
9713  // packages/ui/build-module/skeleton/skeleton.mjs
9714  var import_element20 = __toESM(require_element(), 1);
9715  var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
9716  function getRuntime8() {
9717    const globalScope = globalThis;
9718    if (globalScope.__wpStyleRuntime) {
9719      return globalScope.__wpStyleRuntime;
9720    }
9721    globalScope.__wpStyleRuntime = {
9722      documents: /* @__PURE__ */ new Map(),
9723      styles: /* @__PURE__ */ new Map(),
9724      injectedStyles: /* @__PURE__ */ new WeakMap()
9725    };
9726    if (typeof document !== "undefined") {
9727      registerDocument8(document);
9728    }
9729    return globalScope.__wpStyleRuntime;
9730  }
9731  function documentContainsStyleHash8(targetDocument, hash) {
9732    if (!targetDocument.head) {
9733      return false;
9734    }
9735    for (const style of targetDocument.head.querySelectorAll(
9736      `style[$STYLE_HASH_ATTRIBUTE8}]`
9737    )) {
9738      if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
9739        return true;
9740      }
9741    }
9742    return false;
9743  }
9744  function injectStyle8(targetDocument, hash, css) {
9745    if (!targetDocument.head) {
9746      return;
9747    }
9748    const runtime = getRuntime8();
9749    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9750    if (!injectedStyles) {
9751      injectedStyles = /* @__PURE__ */ new Set();
9752      runtime.injectedStyles.set(targetDocument, injectedStyles);
9753    }
9754    if (injectedStyles.has(hash)) {
9755      return;
9756    }
9757    if (documentContainsStyleHash8(targetDocument, hash)) {
9758      injectedStyles.add(hash);
9759      return;
9760    }
9761    const style = targetDocument.createElement("style");
9762    style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
9763    style.appendChild(targetDocument.createTextNode(css));
9764    targetDocument.head.appendChild(style);
9765    injectedStyles.add(hash);
9766  }
9767  function registerDocument8(targetDocument) {
9768    const runtime = getRuntime8();
9769    runtime.documents.set(
9770      targetDocument,
9771      (runtime.documents.get(targetDocument) ?? 0) + 1
9772    );
9773    for (const [hash, css] of runtime.styles) {
9774      injectStyle8(targetDocument, hash, css);
9775    }
9776    return () => {
9777      const count = runtime.documents.get(targetDocument);
9778      if (count === void 0) {
9779        return;
9780      }
9781      if (count <= 1) {
9782        runtime.documents.delete(targetDocument);
9783        return;
9784      }
9785      runtime.documents.set(targetDocument, count - 1);
9786    };
9787  }
9788  function registerStyle8(hash, css) {
9789    const runtime = getRuntime8();
9790    runtime.styles.set(hash, css);
9791    for (const targetDocument of runtime.documents.keys()) {
9792      injectStyle8(targetDocument, hash, css);
9793    }
9794  }
9795  if (typeof process === "undefined" || true) {
9796    registerStyle8("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
9797  }
9798  var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
9799  if (typeof process === "undefined" || true) {
9800    registerStyle8("ed2c39ec90", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.b20cc1690085c2f0__skeleton{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);display:block;@media (forced-colors:active){border:var(--wpds-border-width-xs,1px) solid CanvasText}}._9b143194fdb45f93__pulse{@media not (prefers-reduced-motion){animation:e2b9fe0690281bc8__skeleton-pulse 1.5s ease-in-out infinite}}@keyframes e2b9fe0690281bc8__skeleton-pulse{0%,to{opacity:1}50%{opacity:.4}}}}");
9801  }
9802  var style_default7 = { "skeleton": "b20cc1690085c2f0__skeleton", "pulse": "_9b143194fdb45f93__pulse", "skeleton-pulse": "e2b9fe0690281bc8__skeleton-pulse" };
9803  var Skeleton = (0, import_element20.forwardRef)(
9804    function Skeleton2({ render, ...props }, ref) {
9805      return useRender({
9806        render,
9807        ref,
9808        props: mergeProps(
9809          {
9810            className: clsx_default(
9811              style_default7.skeleton,
9812              style_default7.pulse,
9813              resets_default3["box-sizing"]
9814            ),
9815            // Decorative by default; consumers mark the loading
9816            // region with aria-busy / role="status".
9817            "aria-hidden": true
9818          },
9819          props
9820        )
9821      });
9822    }
9823  );
9824  
9825  // packages/admin-ui/build-module/navigable-region/index.mjs
9826  var import_element21 = __toESM(require_element(), 1);
9827  var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
9828  var NavigableRegion = (0, import_element21.forwardRef)(
9829    ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
9830      return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
9831        Tag,
9832        {
9833          ref,
9834          className: clsx_default("admin-ui-navigable-region", className),
9835          "aria-label": ariaLabel,
9836          role: "region",
9837          tabIndex: "-1",
9838          ...props,
9839          children
9840        }
9841      );
9842    }
9843  );
9844  NavigableRegion.displayName = "NavigableRegion";
9845  var navigable_region_default = NavigableRegion;
9846  
9847  // packages/admin-ui/build-module/navigation/index.mjs
9848  var import_i18n3 = __toESM(require_i18n(), 1);
9849  var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
9850  var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
9851  function getRuntime9() {
9852    const globalScope = globalThis;
9853    if (globalScope.__wpStyleRuntime) {
9854      return globalScope.__wpStyleRuntime;
9855    }
9856    globalScope.__wpStyleRuntime = {
9857      documents: /* @__PURE__ */ new Map(),
9858      styles: /* @__PURE__ */ new Map(),
9859      injectedStyles: /* @__PURE__ */ new WeakMap()
9860    };
9861    if (typeof document !== "undefined") {
9862      registerDocument9(document);
9863    }
9864    return globalScope.__wpStyleRuntime;
9865  }
9866  function documentContainsStyleHash9(targetDocument, hash) {
9867    if (!targetDocument.head) {
9868      return false;
9869    }
9870    for (const style of targetDocument.head.querySelectorAll(
9871      `style[$STYLE_HASH_ATTRIBUTE9}]`
9872    )) {
9873      if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
9874        return true;
9875      }
9876    }
9877    return false;
9878  }
9879  function injectStyle9(targetDocument, hash, css) {
9880    if (!targetDocument.head) {
9881      return;
9882    }
9883    const runtime = getRuntime9();
9884    let injectedStyles = runtime.injectedStyles.get(targetDocument);
9885    if (!injectedStyles) {
9886      injectedStyles = /* @__PURE__ */ new Set();
9887      runtime.injectedStyles.set(targetDocument, injectedStyles);
9888    }
9889    if (injectedStyles.has(hash)) {
9890      return;
9891    }
9892    if (documentContainsStyleHash9(targetDocument, hash)) {
9893      injectedStyles.add(hash);
9894      return;
9895    }
9896    const style = targetDocument.createElement("style");
9897    style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
9898    style.appendChild(targetDocument.createTextNode(css));
9899    targetDocument.head.appendChild(style);
9900    injectedStyles.add(hash);
9901  }
9902  function registerDocument9(targetDocument) {
9903    const runtime = getRuntime9();
9904    runtime.documents.set(
9905      targetDocument,
9906      (runtime.documents.get(targetDocument) ?? 0) + 1
9907    );
9908    for (const [hash, css] of runtime.styles) {
9909      injectStyle9(targetDocument, hash, css);
9910    }
9911    return () => {
9912      const count = runtime.documents.get(targetDocument);
9913      if (count === void 0) {
9914        return;
9915      }
9916      if (count <= 1) {
9917        runtime.documents.delete(targetDocument);
9918        return;
9919      }
9920      runtime.documents.set(targetDocument, count - 1);
9921    };
9922  }
9923  function registerStyle9(hash, css) {
9924    const runtime = getRuntime9();
9925    runtime.styles.set(hash, css);
9926    for (const targetDocument of runtime.documents.keys()) {
9927      injectStyle9(targetDocument, hash, css);
9928    }
9929  }
9930  if (typeof process === "undefined" || true) {
9931    registerStyle9("72ef022400", ".bfb5a2dd8cceebd3__list{--focus-ring-size:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*2);list-style:none;margin:calc(var(--focus-ring-size)*-1);overflow-x:auto;padding:var(--focus-ring-size);scroll-padding:var(--focus-ring-size)}.a4759b4cb2c8bd92__li{flex-shrink:0}._07da506d3f2d9afe__item{align-items:center;color:var(--wpds-color-foreground-interactive-neutral-weak,#707070);display:flex;font-weight:var(--wpds-typography-font-weight-default,400);min-block-size:44px;min-inline-size:44px;text-decoration:none}._07da506d3f2d9afe__item:hover,._07da506d3f2d9afe__item[aria-current=page]{color:var(--wpds-color-foreground-interactive-neutral-weak-active,#1e1e1e)}._07da506d3f2d9afe__item[aria-current=page]{font-weight:var(--wpds-typography-font-weight-emphasis,600)}");
9932  }
9933  var style_default8 = { "list": "bfb5a2dd8cceebd3__list", "li": "a4759b4cb2c8bd92__li", "item": "_07da506d3f2d9afe__item" };
9934  var Navigation = ({
9935    items,
9936    currentHref,
9937    ariaLabel = (0, import_i18n3.__)("Sections"),
9938    linkComponent,
9939    className
9940  }) => {
9941    if (!items.length) {
9942      return null;
9943    }
9944    const LinkComponent = linkComponent ?? "a";
9945    if (true) {
9946      const invalidItem = items.find(
9947        (item) => typeof item.href !== "string"
9948      );
9949      if (invalidItem) {
9950        throw new Error(
9951          `Navigation: item "$invalidItem.label}" is missing an \`href\` prop.`
9952        );
9953      }
9954      const duplicate = items.find(
9955        (item, index2) => items.findIndex((other) => other.href === item.href) !== index2
9956      );
9957      if (duplicate) {
9958        throw new Error(
9959          `Navigation: duplicate \`href\` "$duplicate.href}". Each item must have a unique \`href\` so a single item receives \`aria-current="page"\`.`
9960        );
9961      }
9962    }
9963    return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("nav", { "aria-label": ariaLabel, className, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9964      Stack,
9965      {
9966        render: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("ul", { role: "list" }),
9967        direction: "row",
9968        align: "center",
9969        gap: "md",
9970        className: style_default8.list,
9971        children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("li", { className: style_default8.li, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9972          Text,
9973          {
9974            variant: "body-md",
9975            className: style_default8.item,
9976            render: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9977              Link,
9978              {
9979                variant: "unstyled",
9980                "aria-current": item.href === currentHref ? "page" : void 0,
9981                render: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(LinkComponent, { href: item.href })
9982              }
9983            ),
9984            children: item.label
9985          }
9986        ) }, item.href))
9987      }
9988    ) });
9989  };
9990  var navigation_default = Navigation;
9991  
9992  // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
9993  var import_components = __toESM(require_components(), 1);
9994  var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");
9995  
9996  // packages/admin-ui/build-module/page/header.mjs
9997  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
9998  var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
9999  function getRuntime10() {
10000    const globalScope = globalThis;
10001    if (globalScope.__wpStyleRuntime) {
10002      return globalScope.__wpStyleRuntime;
10003    }
10004    globalScope.__wpStyleRuntime = {
10005      documents: /* @__PURE__ */ new Map(),
10006      styles: /* @__PURE__ */ new Map(),
10007      injectedStyles: /* @__PURE__ */ new WeakMap()
10008    };
10009    if (typeof document !== "undefined") {
10010      registerDocument10(document);
10011    }
10012    return globalScope.__wpStyleRuntime;
10013  }
10014  function documentContainsStyleHash10(targetDocument, hash) {
10015    if (!targetDocument.head) {
10016      return false;
10017    }
10018    for (const style of targetDocument.head.querySelectorAll(
10019      `style[$STYLE_HASH_ATTRIBUTE10}]`
10020    )) {
10021      if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
10022        return true;
10023      }
10024    }
10025    return false;
10026  }
10027  function injectStyle10(targetDocument, hash, css) {
10028    if (!targetDocument.head) {
10029      return;
10030    }
10031    const runtime = getRuntime10();
10032    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10033    if (!injectedStyles) {
10034      injectedStyles = /* @__PURE__ */ new Set();
10035      runtime.injectedStyles.set(targetDocument, injectedStyles);
10036    }
10037    if (injectedStyles.has(hash)) {
10038      return;
10039    }
10040    if (documentContainsStyleHash10(targetDocument, hash)) {
10041      injectedStyles.add(hash);
10042      return;
10043    }
10044    const style = targetDocument.createElement("style");
10045    style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
10046    style.appendChild(targetDocument.createTextNode(css));
10047    targetDocument.head.appendChild(style);
10048    injectedStyles.add(hash);
10049  }
10050  function registerDocument10(targetDocument) {
10051    const runtime = getRuntime10();
10052    runtime.documents.set(
10053      targetDocument,
10054      (runtime.documents.get(targetDocument) ?? 0) + 1
10055    );
10056    for (const [hash, css] of runtime.styles) {
10057      injectStyle10(targetDocument, hash, css);
10058    }
10059    return () => {
10060      const count = runtime.documents.get(targetDocument);
10061      if (count === void 0) {
10062        return;
10063      }
10064      if (count <= 1) {
10065        runtime.documents.delete(targetDocument);
10066        return;
10067      }
10068      runtime.documents.set(targetDocument, count - 1);
10069    };
10070  }
10071  function registerStyle10(hash, css) {
10072    const runtime = getRuntime10();
10073    runtime.styles.set(hash, css);
10074    for (const targetDocument of runtime.documents.keys()) {
10075      injectStyle10(targetDocument, hash, css);
10076    }
10077  }
10078  if (typeof process === "undefined" || true) {
10079    registerStyle10("1f3750277d", "._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}._8bcd33103b451f30__header-lockup{min-width:0}._8113be94e7caf73c__header-title{min-width:0;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)}._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation,._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation ._60fea2f6bf5319cd__header-subtitle{padding-block-end:0}._673c99dcbfb58211__header-navigation{margin-block-start:var(--wpds-dimension-gap-md,12px)}.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)}}");
10080  }
10081  var style_default9 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-lockup": "_8bcd33103b451f30__header-lockup", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "has-navigation": "_4b0f17e503d11619__has-navigation", "header-navigation": "_673c99dcbfb58211__header-navigation", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
10082  function Header({
10083    headingLevel = 1,
10084    breadcrumbs,
10085    badges,
10086    visual,
10087    title,
10088    subTitle,
10089    actions,
10090    navigation,
10091    components,
10092    showSidebarToggle = true
10093  }) {
10094    const HeadingTag = `h$headingLevel}`;
10095    const hasNavigation = !!navigation?.items?.length;
10096    return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
10097      Stack,
10098      {
10099        direction: "column",
10100        className: clsx_default(
10101          style_default9.header,
10102          hasNavigation && style_default9["has-navigation"]
10103        ),
10104        children: [
10105          /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
10106            Stack,
10107            {
10108              className: style_default9["header-content"],
10109              direction: "row",
10110              gap: "sm",
10111              justify: "space-between",
10112              children: [
10113                /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
10114                  Stack,
10115                  {
10116                    direction: "row",
10117                    gap: "sm",
10118                    align: "center",
10119                    justify: "start",
10120                    className: style_default9["header-lockup"],
10121                    children: [
10122                      showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10123                        SidebarToggleSlot,
10124                        {
10125                          bubblesVirtually: true,
10126                          className: style_default9["sidebar-toggle-slot"]
10127                        }
10128                      ),
10129                      visual && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10130                        "div",
10131                        {
10132                          className: style_default9["header-visual"],
10133                          "aria-hidden": "true",
10134                          children: visual
10135                        }
10136                      ),
10137                      title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10138                        Text,
10139                        {
10140                          className: style_default9["header-title"],
10141                          render: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(HeadingTag, {}),
10142                          variant: "heading-lg",
10143                          children: title
10144                        }
10145                      ),
10146                      breadcrumbs,
10147                      badges
10148                    ]
10149                  }
10150                ),
10151                actions && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10152                  Stack,
10153                  {
10154                    align: "center",
10155                    className: style_default9["header-actions"],
10156                    direction: "row",
10157                    gap: "sm",
10158                    children: actions
10159                  }
10160                )
10161              ]
10162            }
10163          ),
10164          subTitle && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10165            Text,
10166            {
10167              render: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", {}),
10168              variant: "body-md",
10169              className: style_default9["header-subtitle"],
10170              children: subTitle
10171            }
10172          ),
10173          hasNavigation && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10174            navigation_default,
10175            {
10176              ...navigation,
10177              linkComponent: components?.link,
10178              className: style_default9["header-navigation"]
10179            }
10180          )
10181        ]
10182      }
10183    );
10184  }
10185  
10186  // packages/admin-ui/build-module/page/index.mjs
10187  var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
10188  var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
10189  function getRuntime11() {
10190    const globalScope = globalThis;
10191    if (globalScope.__wpStyleRuntime) {
10192      return globalScope.__wpStyleRuntime;
10193    }
10194    globalScope.__wpStyleRuntime = {
10195      documents: /* @__PURE__ */ new Map(),
10196      styles: /* @__PURE__ */ new Map(),
10197      injectedStyles: /* @__PURE__ */ new WeakMap()
10198    };
10199    if (typeof document !== "undefined") {
10200      registerDocument11(document);
10201    }
10202    return globalScope.__wpStyleRuntime;
10203  }
10204  function documentContainsStyleHash11(targetDocument, hash) {
10205    if (!targetDocument.head) {
10206      return false;
10207    }
10208    for (const style of targetDocument.head.querySelectorAll(
10209      `style[$STYLE_HASH_ATTRIBUTE11}]`
10210    )) {
10211      if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
10212        return true;
10213      }
10214    }
10215    return false;
10216  }
10217  function injectStyle11(targetDocument, hash, css) {
10218    if (!targetDocument.head) {
10219      return;
10220    }
10221    const runtime = getRuntime11();
10222    let injectedStyles = runtime.injectedStyles.get(targetDocument);
10223    if (!injectedStyles) {
10224      injectedStyles = /* @__PURE__ */ new Set();
10225      runtime.injectedStyles.set(targetDocument, injectedStyles);
10226    }
10227    if (injectedStyles.has(hash)) {
10228      return;
10229    }
10230    if (documentContainsStyleHash11(targetDocument, hash)) {
10231      injectedStyles.add(hash);
10232      return;
10233    }
10234    const style = targetDocument.createElement("style");
10235    style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
10236    style.appendChild(targetDocument.createTextNode(css));
10237    targetDocument.head.appendChild(style);
10238    injectedStyles.add(hash);
10239  }
10240  function registerDocument11(targetDocument) {
10241    const runtime = getRuntime11();
10242    runtime.documents.set(
10243      targetDocument,
10244      (runtime.documents.get(targetDocument) ?? 0) + 1
10245    );
10246    for (const [hash, css] of runtime.styles) {
10247      injectStyle11(targetDocument, hash, css);
10248    }
10249    return () => {
10250      const count = runtime.documents.get(targetDocument);
10251      if (count === void 0) {
10252        return;
10253      }
10254      if (count <= 1) {
10255        runtime.documents.delete(targetDocument);
10256        return;
10257      }
10258      runtime.documents.set(targetDocument, count - 1);
10259    };
10260  }
10261  function registerStyle11(hash, css) {
10262    const runtime = getRuntime11();
10263    runtime.styles.set(hash, css);
10264    for (const targetDocument of runtime.documents.keys()) {
10265      injectStyle11(targetDocument, hash, css);
10266    }
10267  }
10268  if (typeof process === "undefined" || true) {
10269    registerStyle11("1f3750277d", "._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}._8bcd33103b451f30__header-lockup{min-width:0}._8113be94e7caf73c__header-title{min-width:0;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)}._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation,._0625b55e82a0d93d__header._4b0f17e503d11619__has-navigation ._60fea2f6bf5319cd__header-subtitle{padding-block-end:0}._673c99dcbfb58211__header-navigation{margin-block-start:var(--wpds-dimension-gap-md,12px)}.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)}}");
10270  }
10271  var style_default10 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-lockup": "_8bcd33103b451f30__header-lockup", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "has-navigation": "_4b0f17e503d11619__has-navigation", "header-navigation": "_673c99dcbfb58211__header-navigation", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
10272  function Page({
10273    headingLevel,
10274    breadcrumbs,
10275    badges,
10276    visual,
10277    title,
10278    subTitle,
10279    children,
10280    className,
10281    actions,
10282    navigation,
10283    components,
10284    ariaLabel,
10285    hasPadding = false,
10286    showSidebarToggle = true
10287  }) {
10288    const classes = clsx_default(style_default10.page, className);
10289    const effectiveAriaLabel = ariaLabel ?? (typeof title === "string" ? title : "");
10290    return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
10291      (title || breadcrumbs || badges || actions || visual || !!navigation?.items?.length) && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10292        Header,
10293        {
10294          headingLevel,
10295          breadcrumbs,
10296          badges,
10297          visual,
10298          title,
10299          subTitle,
10300          actions,
10301          navigation,
10302          components,
10303          showSidebarToggle
10304        }
10305      ),
10306      hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10307        "div",
10308        {
10309          className: clsx_default(
10310            style_default10.content,
10311            style_default10["has-padding"]
10312          ),
10313          children
10314        }
10315      ) : children
10316    ] });
10317  }
10318  Page.SidebarToggleFill = SidebarToggleFill;
10319  var page_default = Page;
10320  
10321  // routes/font-list/stage.tsx
10322  var import_i18n53 = __toESM(require_i18n());
10323  var import_components56 = __toESM(require_components());
10324  var import_editor = __toESM(require_editor());
10325  var import_core_data12 = __toESM(require_core_data());
10326  var import_data13 = __toESM(require_data());
10327  var import_element56 = __toESM(require_element());
10328  
10329  // packages/global-styles-ui/build-module/global-styles-ui.mjs
10330  var import_components55 = __toESM(require_components(), 1);
10331  var import_blocks5 = __toESM(require_blocks(), 1);
10332  var import_data12 = __toESM(require_data(), 1);
10333  var import_block_editor14 = __toESM(require_block_editor(), 1);
10334  var import_element55 = __toESM(require_element(), 1);
10335  var import_compose7 = __toESM(require_compose(), 1);
10336  
10337  // packages/global-styles-engine/build-module/utils/object.mjs
10338  function setImmutably(object, path, value) {
10339    path = Array.isArray(path) ? [...path] : [path];
10340    object = Array.isArray(object) ? [...object] : { ...object };
10341    const leaf = path.pop();
10342    let prev = object;
10343    for (const key of path) {
10344      const lvl = prev[key];
10345      prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl };
10346    }
10347    prev[leaf] = value;
10348    return object;
10349  }
10350  var getValueFromObjectPath = (object, path, defaultValue) => {
10351    const arrayPath = Array.isArray(path) ? path : path.split(".");
10352    let value = object;
10353    arrayPath.forEach((fieldName) => {
10354      value = value?.[fieldName];
10355    });
10356    return value ?? defaultValue;
10357  };
10358  
10359  // packages/global-styles-engine/build-module/settings/get-setting.mjs
10360  var VALID_SETTINGS = [
10361    "appearanceTools",
10362    "useRootPaddingAwareAlignments",
10363    "background.backgroundImage",
10364    "background.backgroundRepeat",
10365    "background.backgroundSize",
10366    "background.backgroundPosition",
10367    "background.gradient",
10368    "border.color",
10369    "border.radius",
10370    "border.radiusSizes",
10371    "border.style",
10372    "border.width",
10373    "shadow.presets",
10374    "shadow.defaultPresets",
10375    "color.background",
10376    "color.button",
10377    "color.caption",
10378    "color.custom",
10379    "color.customDuotone",
10380    "color.customGradient",
10381    "color.defaultDuotone",
10382    "color.defaultGradients",
10383    "color.defaultPalette",
10384    "color.duotone",
10385    "color.gradients",
10386    "color.heading",
10387    "color.link",
10388    "color.palette",
10389    "color.text",
10390    "custom",
10391    "dimensions.aspectRatio",
10392    "dimensions.height",
10393    "dimensions.minHeight",
10394    "dimensions.minWidth",
10395    "dimensions.width",
10396    "dimensions.dimensionSizes",
10397    "layout.contentSize",
10398    "layout.definitions",
10399    "layout.wideSize",
10400    "lightbox.enabled",
10401    "lightbox.allowEditing",
10402    "position.fixed",
10403    "position.sticky",
10404    "spacing.customSpacingSize",
10405    "spacing.defaultSpacingSizes",
10406    "spacing.spacingSizes",
10407    "spacing.spacingScale",
10408    "spacing.blockGap",
10409    "spacing.margin",
10410    "spacing.padding",
10411    "spacing.units",
10412    "typography.fluid",
10413    "typography.customFontSize",
10414    "typography.defaultFontSizes",
10415    "typography.dropCap",
10416    "typography.fontFamilies",
10417    "typography.fontSizes",
10418    "typography.fontStyle",
10419    "typography.fontWeight",
10420    "typography.letterSpacing",
10421    "typography.lineHeight",
10422    "typography.textAlign",
10423    "typography.textColumns",
10424    "typography.textDecoration",
10425    "typography.textIndent",
10426    "typography.textShadow",
10427    "typography.defaultTextShadowPresets",
10428    "typography.textShadowPresets",
10429    "typography.textTransform",
10430    "typography.writingMode",
10431    "viewport.mobile",
10432    "viewport.tablet"
10433  ];
10434  function getSetting(globalStyles, path, blockName) {
10435    const appendedBlockPath = blockName ? ".blocks." + blockName : "";
10436    const appendedPropertyPath = path ? "." + path : "";
10437    const contextualPath = `settings$appendedBlockPath}$appendedPropertyPath}`;
10438    const globalPath = `settings$appendedPropertyPath}`;
10439    if (path) {
10440      return getValueFromObjectPath(globalStyles, contextualPath) ?? getValueFromObjectPath(globalStyles, globalPath);
10441    }
10442    let result = {};
10443    VALID_SETTINGS.forEach((setting) => {
10444      const value = getValueFromObjectPath(
10445        globalStyles,
10446        `settings$appendedBlockPath}.$setting}`
10447      ) ?? getValueFromObjectPath(globalStyles, `settings.$setting}`);
10448      if (value !== void 0) {
10449        result = setImmutably(result, setting.split("."), value);
10450      }
10451    });
10452    return result;
10453  }
10454  
10455  // packages/global-styles-engine/build-module/settings/set-setting.mjs
10456  function setSetting(globalStyles, path, newValue, blockName) {
10457    const appendedBlockPath = blockName ? ".blocks." + blockName : "";
10458    const appendedPropertyPath = path ? "." + path : "";
10459    const finalPath = `settings$appendedBlockPath}$appendedPropertyPath}`;
10460    return setImmutably(
10461      globalStyles,
10462      finalPath.split("."),
10463      newValue
10464    );
10465  }
10466  
10467  // packages/global-styles-engine/build-module/utils/common.mjs
10468  var import_style_engine = __toESM(require_style_engine(), 1);
10469  
10470  // packages/global-styles-engine/build-module/utils/fluid.mjs
10471  var DEFAULT_MAXIMUM_VIEWPORT_WIDTH = "1600px";
10472  var DEFAULT_MINIMUM_VIEWPORT_WIDTH = "320px";
10473  var DEFAULT_SCALE_FACTOR = 1;
10474  var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25;
10475  var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75;
10476  var DEFAULT_MINIMUM_FONT_SIZE_LIMIT = "14px";
10477  function getComputedFluidTypographyValue({
10478    minimumFontSize,
10479    maximumFontSize,
10480    fontSize,
10481    minimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH,
10482    maximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH,
10483    scaleFactor = DEFAULT_SCALE_FACTOR,
10484    minimumFontSizeLimit
10485  }) {
10486    minimumFontSizeLimit = !!getTypographyValueAndUnit(minimumFontSizeLimit) ? minimumFontSizeLimit : DEFAULT_MINIMUM_FONT_SIZE_LIMIT;
10487    if (fontSize) {
10488      const fontSizeParsed = getTypographyValueAndUnit(fontSize);
10489      if (!fontSizeParsed?.unit || !fontSizeParsed?.value) {
10490        return null;
10491      }
10492      const minimumFontSizeLimitParsed = getTypographyValueAndUnit(
10493        minimumFontSizeLimit,
10494        {
10495          coerceTo: fontSizeParsed.unit
10496        }
10497      );
10498      if (!!minimumFontSizeLimitParsed?.value && !minimumFontSize && !maximumFontSize) {
10499        if (fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value) {
10500          return null;
10501        }
10502      }
10503      if (!maximumFontSize) {
10504        maximumFontSize = `$fontSizeParsed.value}$fontSizeParsed.unit}`;
10505      }
10506      if (!minimumFontSize) {
10507        const fontSizeValueInPx = fontSizeParsed.unit === "px" ? fontSizeParsed.value : fontSizeParsed.value * 16;
10508        const minimumFontSizeFactor = Math.min(
10509          Math.max(
10510            1 - 0.075 * Math.log2(fontSizeValueInPx),
10511            DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN
10512          ),
10513          DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX
10514        );
10515        const calculatedMinimumFontSize = roundToPrecision(
10516          fontSizeParsed.value * minimumFontSizeFactor,
10517          3
10518        );
10519        if (!!minimumFontSizeLimitParsed?.value && calculatedMinimumFontSize < minimumFontSizeLimitParsed?.value) {
10520          minimumFontSize = `$minimumFontSizeLimitParsed.value}$minimumFontSizeLimitParsed.unit}`;
10521        } else {
10522          minimumFontSize = `$calculatedMinimumFontSize}$fontSizeParsed.unit}`;
10523        }
10524      }
10525    }
10526    const minimumFontSizeParsed = getTypographyValueAndUnit(minimumFontSize);
10527    const fontSizeUnit = minimumFontSizeParsed?.unit || "rem";
10528    const maximumFontSizeParsed = getTypographyValueAndUnit(maximumFontSize, {
10529      coerceTo: fontSizeUnit
10530    });
10531    if (!minimumFontSizeParsed || !maximumFontSizeParsed) {
10532      return null;
10533    }
10534    const minimumFontSizeRem = getTypographyValueAndUnit(minimumFontSize, {
10535      coerceTo: "rem"
10536    });
10537    const maximumViewportWidthParsed = getTypographyValueAndUnit(
10538      maximumViewportWidth,
10539      { coerceTo: fontSizeUnit }
10540    );
10541    const minimumViewportWidthParsed = getTypographyValueAndUnit(
10542      minimumViewportWidth,
10543      { coerceTo: fontSizeUnit }
10544    );
10545    if (!maximumViewportWidthParsed || !minimumViewportWidthParsed || !minimumFontSizeRem) {
10546      return null;
10547    }
10548    const linearDenominator = maximumViewportWidthParsed.value - minimumViewportWidthParsed.value;
10549    if (!linearDenominator) {
10550      return null;
10551    }
10552    const minViewportWidthOffsetValue = roundToPrecision(
10553      minimumViewportWidthParsed.value / 100,
10554      3
10555    );
10556    const viewportWidthOffset = roundToPrecision(minViewportWidthOffsetValue, 3) + fontSizeUnit;
10557    const linearFactor = 100 * ((maximumFontSizeParsed.value - minimumFontSizeParsed.value) / linearDenominator);
10558    const linearFactorScaled = roundToPrecision(
10559      (linearFactor || 1) * scaleFactor,
10560      3
10561    );
10562    const fluidTargetFontSize = `$minimumFontSizeRem.value}$minimumFontSizeRem.unit} + ((1vw - $viewportWidthOffset}) * $linearFactorScaled})`;
10563    return `clamp($minimumFontSize}, $fluidTargetFontSize}, $maximumFontSize})`;
10564  }
10565  function getTypographyValueAndUnit(rawValue, options = {}) {
10566    if (typeof rawValue !== "string" && typeof rawValue !== "number") {
10567      return null;
10568    }
10569    if (isFinite(rawValue)) {
10570      rawValue = `$rawValue}px`;
10571    }
10572    const { coerceTo, rootSizeValue, acceptableUnits } = {
10573      coerceTo: "",
10574      // Default browser font size. Later we could inject some JS to compute this `getComputedStyle( document.querySelector( "html" ) ).fontSize`.
10575      rootSizeValue: 16,
10576      acceptableUnits: ["rem", "px", "em"],
10577      ...options
10578    };
10579    const acceptableUnitsGroup = acceptableUnits?.join("|");
10580    const regexUnits = new RegExp(
10581      `^(\\d*\\.?\\d+)($acceptableUnitsGroup}){1,1}$`
10582    );
10583    const matches = rawValue.toString().match(regexUnits);
10584    if (!matches || matches.length < 3) {
10585      return null;
10586    }
10587    let [, value, unit] = matches;
10588    let returnValue = parseFloat(value);
10589    if ("px" === coerceTo && ("em" === unit || "rem" === unit)) {
10590      returnValue = returnValue * rootSizeValue;
10591      unit = coerceTo;
10592    }
10593    if ("px" === unit && ("em" === coerceTo || "rem" === coerceTo)) {
10594      returnValue = returnValue / rootSizeValue;
10595      unit = coerceTo;
10596    }
10597    if (("em" === coerceTo || "rem" === coerceTo) && ("em" === unit || "rem" === unit)) {
10598      unit = coerceTo;
10599    }
10600    if (!unit) {
10601      return null;
10602    }
10603    return {
10604      value: roundToPrecision(returnValue, 3),
10605      unit
10606    };
10607  }
10608  function roundToPrecision(value, digits = 3) {
10609    const base = Math.pow(10, digits);
10610    return Math.round(value * base) / base;
10611  }
10612  
10613  // packages/global-styles-engine/build-module/utils/typography.mjs
10614  function isFluidTypographyEnabled(typographySettings) {
10615    const fluidSettings = typographySettings?.fluid;
10616    return true === fluidSettings || fluidSettings && typeof fluidSettings === "object" && Object.keys(fluidSettings).length > 0;
10617  }
10618  function getFluidTypographyOptionsFromSettings(settings) {
10619    const typographySettings = settings?.typography ?? {};
10620    const layoutSettings = settings?.layout;
10621    const defaultMaxViewportWidth = getTypographyValueAndUnit(
10622      layoutSettings?.wideSize
10623    ) ? layoutSettings?.wideSize : null;
10624    return isFluidTypographyEnabled(typographySettings) && defaultMaxViewportWidth ? {
10625      fluid: {
10626        maxViewportWidth: defaultMaxViewportWidth,
10627        ...typeof typographySettings.fluid === "object" ? typographySettings.fluid : {}
10628      }
10629    } : {
10630      fluid: typographySettings?.fluid
10631    };
10632  }
10633  function getTypographyFontSizeValue(preset, settings) {
10634    const { size: defaultSize } = preset;
10635    if (!defaultSize || "0" === defaultSize || false === preset?.fluid) {
10636      return defaultSize;
10637    }
10638    if (!isFluidTypographyEnabled(settings?.typography) && !isFluidTypographyEnabled(preset)) {
10639      return defaultSize;
10640    }
10641    const fluidTypographySettings = getFluidTypographyOptionsFromSettings(settings)?.fluid ?? {};
10642    const fluidFontSizeValue = getComputedFluidTypographyValue({
10643      minimumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.min,
10644      maximumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.max,
10645      fontSize: defaultSize,
10646      minimumFontSizeLimit: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minFontSize : void 0,
10647      maximumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.maxViewportWidth : void 0,
10648      minimumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minViewportWidth : void 0
10649    });
10650    if (!!fluidFontSizeValue) {
10651      return fluidFontSizeValue;
10652    }
10653    return defaultSize;
10654  }
10655  
10656  // packages/global-styles-engine/build-module/utils/common.mjs
10657  var PRESET_METADATA = [
10658    {
10659      path: ["color", "palette"],
10660      valueKey: "color",
10661      cssVarInfix: "color",
10662      classes: [
10663        { classSuffix: "color", propertyName: "color" },
10664        {
10665          classSuffix: "background-color",
10666          propertyName: "background-color"
10667        },
10668        {
10669          classSuffix: "border-color",
10670          propertyName: "border-color"
10671        }
10672      ]
10673    },
10674    {
10675      path: ["color", "gradients"],
10676      valueKey: "gradient",
10677      cssVarInfix: "gradient",
10678      classes: [
10679        {
10680          classSuffix: "gradient-background",
10681          propertyName: "background"
10682        }
10683      ]
10684    },
10685    {
10686      path: ["color", "duotone"],
10687      valueKey: "colors",
10688      cssVarInfix: "duotone",
10689      valueFunc: ({ slug }) => `url( '#wp-duotone-$slug}' )`,
10690      classes: []
10691    },
10692    {
10693      path: ["shadow", "presets"],
10694      valueKey: "shadow",
10695      cssVarInfix: "shadow",
10696      classes: []
10697    },
10698    {
10699      path: ["typography", "fontSizes"],
10700      valueFunc: (preset, settings) => getTypographyFontSizeValue(preset, settings),
10701      valueKey: "size",
10702      cssVarInfix: "font-size",
10703      classes: [{ classSuffix: "font-size", propertyName: "font-size" }]
10704    },
10705    {
10706      path: ["typography", "fontFamilies"],
10707      valueKey: "fontFamily",
10708      cssVarInfix: "font-family",
10709      classes: [
10710        { classSuffix: "font-family", propertyName: "font-family" }
10711      ]
10712    },
10713    {
10714      path: ["typography", "textShadowPresets"],
10715      valueKey: "textShadow",
10716      cssVarInfix: "text-shadow",
10717      classes: [
10718        { classSuffix: "text-shadow", propertyName: "text-shadow" }
10719      ]
10720    },
10721    {
10722      path: ["spacing", "spacingSizes"],
10723      valueKey: "size",
10724      cssVarInfix: "spacing",
10725      valueFunc: ({ size: size4 }) => size4,
10726      classes: []
10727    },
10728    {
10729      path: ["border", "radiusSizes"],
10730      valueKey: "size",
10731      cssVarInfix: "border-radius",
10732      classes: []
10733    },
10734    {
10735      path: ["dimensions", "dimensionSizes"],
10736      valueKey: "size",
10737      cssVarInfix: "dimension",
10738      classes: []
10739    }
10740  ];
10741  function getResolvedRefValue(ruleValue, tree) {
10742    if (!ruleValue || !tree) {
10743      return ruleValue;
10744    }
10745    if (typeof ruleValue === "object" && "ref" in ruleValue && ruleValue?.ref) {
10746      const resolvedRuleValue = (0, import_style_engine.getCSSValueFromRawStyle)(
10747        getValueFromObjectPath(tree, ruleValue.ref)
10748      );
10749      if (typeof resolvedRuleValue === "object" && resolvedRuleValue !== null && "ref" in resolvedRuleValue && resolvedRuleValue?.ref) {
10750        return void 0;
10751      }
10752      if (resolvedRuleValue === void 0) {
10753        return ruleValue;
10754      }
10755      return resolvedRuleValue;
10756    }
10757    return ruleValue;
10758  }
10759  function getResolvedThemeFilePath(file, themeFileURIs) {
10760    if (!file || !themeFileURIs || !Array.isArray(themeFileURIs)) {
10761      return file;
10762    }
10763    const uri = themeFileURIs.find(
10764      (themeFileUri) => themeFileUri?.name === file
10765    );
10766    if (!uri?.href) {
10767      return file;
10768    }
10769    return uri?.href;
10770  }
10771  function getResolvedValue(ruleValue, tree) {
10772    if (!ruleValue || !tree) {
10773      return ruleValue;
10774    }
10775    const resolvedValue = getResolvedRefValue(ruleValue, tree);
10776    if (typeof resolvedValue === "object" && resolvedValue !== null && "url" in resolvedValue && resolvedValue?.url) {
10777      return {
10778        ...resolvedValue,
10779        url: getResolvedThemeFilePath(
10780          resolvedValue.url,
10781          tree?._links?.["wp:theme-file"]
10782        )
10783      };
10784    }
10785    return resolvedValue;
10786  }
10787  function findInPresetsBy(settings, blockName, presetPath = [], presetProperty = "slug", presetValueValue) {
10788    const orderedPresetsByOrigin = [
10789      blockName ? getValueFromObjectPath(settings, [
10790        "blocks",
10791        blockName,
10792        ...presetPath
10793      ]) : void 0,
10794      getValueFromObjectPath(settings, presetPath)
10795    ].filter(Boolean);
10796    for (const presetByOrigin of orderedPresetsByOrigin) {
10797      if (presetByOrigin) {
10798        const origins = ["custom", "theme", "default"];
10799        for (const origin of origins) {
10800          const presets = presetByOrigin[origin];
10801          if (presets) {
10802            const presetObject = presets.find(
10803              (preset) => preset[presetProperty] === presetValueValue
10804            );
10805            if (presetObject) {
10806              if (presetProperty === "slug") {
10807                return presetObject;
10808              }
10809              const highestPresetObjectWithSameSlug = findInPresetsBy(
10810                settings,
10811                blockName,
10812                presetPath,
10813                "slug",
10814                presetObject.slug
10815              );
10816              if (highestPresetObjectWithSameSlug[presetProperty] === presetObject[presetProperty]) {
10817                return presetObject;
10818              }
10819              return void 0;
10820            }
10821          }
10822        }
10823      }
10824    }
10825  }
10826  function getValueFromPresetVariable(features, blockName, variable, [presetType, slug] = []) {
10827    const metadata = PRESET_METADATA.find(
10828      (data) => data.cssVarInfix === presetType
10829    );
10830    if (!metadata || !features.settings) {
10831      return variable;
10832    }
10833    const presetObject = findInPresetsBy(
10834      features.settings,
10835      blockName,
10836      metadata.path,
10837      "slug",
10838      slug
10839    );
10840    if (presetObject) {
10841      const { valueKey } = metadata;
10842      const result = presetObject[valueKey];
10843      return getValueFromVariable(features, blockName, result);
10844    }
10845    return variable;
10846  }
10847  function getValueFromCustomVariable(features, blockName, variable, path = []) {
10848    const result = (blockName ? getValueFromObjectPath(features?.settings ?? {}, [
10849      "blocks",
10850      blockName,
10851      "custom",
10852      ...path
10853    ]) : void 0) ?? getValueFromObjectPath(features?.settings ?? {}, [
10854      "custom",
10855      ...path
10856    ]);
10857    if (!result) {
10858      return variable;
10859    }
10860    return getValueFromVariable(features, blockName, result);
10861  }
10862  function getValueFromVariable(features, blockName, variable) {
10863    if (!variable || typeof variable !== "string") {
10864      if (typeof variable === "object" && variable !== null && "ref" in variable && typeof variable.ref === "string") {
10865        const resolvedVariable = getValueFromObjectPath(
10866          features,
10867          variable.ref
10868        );
10869        if (!resolvedVariable || typeof resolvedVariable === "object" && "ref" in resolvedVariable) {
10870          return resolvedVariable;
10871        }
10872        variable = resolvedVariable;
10873      } else {
10874        return variable;
10875      }
10876    }
10877    const USER_VALUE_PREFIX = "var:";
10878    const THEME_VALUE_PREFIX = "var(--wp--";
10879    const THEME_VALUE_SUFFIX = ")";
10880    let parsedVar;
10881    if (variable.startsWith(USER_VALUE_PREFIX)) {
10882      parsedVar = variable.slice(USER_VALUE_PREFIX.length).split("|");
10883    } else if (variable.startsWith(THEME_VALUE_PREFIX) && variable.endsWith(THEME_VALUE_SUFFIX)) {
10884      parsedVar = variable.slice(THEME_VALUE_PREFIX.length, -THEME_VALUE_SUFFIX.length).split("--");
10885    } else {
10886      return variable;
10887    }
10888    const [type, ...path] = parsedVar;
10889    if (type === "preset") {
10890      return getValueFromPresetVariable(
10891        features,
10892        blockName,
10893        variable,
10894        path
10895      );
10896    }
10897    if (type === "custom") {
10898      return getValueFromCustomVariable(
10899        features,
10900        blockName,
10901        variable,
10902        path
10903      );
10904    }
10905    return variable;
10906  }
10907  
10908  // packages/global-styles-engine/build-module/style-state-back-compat.mjs
10909  var LEGACY_STYLE_STATE_ALIASES = {
10910    "@mobile": "mobile",
10911    "@tablet": "tablet",
10912    "-current": "@current"
10913  };
10914  function isObjectRecord(value) {
10915    return !!value && typeof value === "object" && !Array.isArray(value);
10916  }
10917  function normalizeStyleStateNode(node) {
10918    if (!isObjectRecord(node)) {
10919      return node;
10920    }
10921    let normalized = node;
10922    Object.entries(LEGACY_STYLE_STATE_ALIASES).forEach(
10923      ([state, legacyState]) => {
10924        if (Object.hasOwn(node, legacyState)) {
10925          if (normalized === node) {
10926            normalized = { ...node };
10927          }
10928          if (!Object.hasOwn(node, state)) {
10929            normalized[state] = node[legacyState];
10930          }
10931          delete normalized[legacyState];
10932        }
10933      }
10934    );
10935    Object.entries(normalized).forEach(([key, value]) => {
10936      if (!isObjectRecord(value)) {
10937        return;
10938      }
10939      const normalizedValue = normalizeStyleStateNode(value);
10940      if (normalizedValue !== value) {
10941        if (normalized === node) {
10942          normalized = { ...node };
10943        }
10944        normalized[key] = normalizedValue;
10945      }
10946    });
10947    return normalized;
10948  }
10949  function normalizeStyleStateAliases(globalStyles) {
10950    if (true) {
10951      return globalStyles;
10952    }
10953    if (!globalStyles?.styles) {
10954      return globalStyles;
10955    }
10956    const styles = normalizeStyleStateNode(globalStyles.styles);
10957    return styles === globalStyles.styles ? globalStyles : { ...globalStyles, styles };
10958  }
10959  function getLegacyStyleStatePath(path) {
10960    if (true) {
10961      return void 0;
10962    }
10963    const pathParts = path.split(".");
10964    const legacyPathParts = pathParts.map(
10965      (part) => LEGACY_STYLE_STATE_ALIASES[part] ?? part
10966    );
10967    return legacyPathParts.some(
10968      (part, index2) => part !== pathParts[index2]
10969    ) ? legacyPathParts.join(".") : void 0;
10970  }
10971  
10972  // packages/global-styles-engine/build-module/settings/get-style.mjs
10973  function getStyle(globalStyles, path, blockName, shouldDecodeEncode = true) {
10974    const appendedPath = path ? "." + path : "";
10975    const finalPath = !blockName ? `styles$appendedPath}` : `styles.blocks.$blockName}$appendedPath}`;
10976    if (!globalStyles) {
10977      return void 0;
10978    }
10979    let rawResult = getValueFromObjectPath(globalStyles, finalPath);
10980    const legacyPath = getLegacyStyleStatePath(finalPath);
10981    if (rawResult === void 0 && legacyPath) {
10982      let hasCanonicalPath = true;
10983      let currentValue = globalStyles;
10984      for (const pathPart of finalPath.split(".")) {
10985        if (!currentValue || typeof currentValue !== "object" || !Object.hasOwn(currentValue, pathPart)) {
10986          hasCanonicalPath = false;
10987          break;
10988        }
10989        currentValue = currentValue[pathPart];
10990      }
10991      if (!hasCanonicalPath) {
10992        rawResult = getValueFromObjectPath(globalStyles, legacyPath);
10993      }
10994    }
10995    const result = shouldDecodeEncode ? getValueFromVariable(globalStyles, blockName, rawResult) : rawResult;
10996    return result;
10997  }
10998  
10999  // packages/global-styles-engine/build-module/settings/set-style.mjs
11000  function setStyle(globalStyles, path, newValue, blockName) {
11001    const appendedPath = path ? "." + path : "";
11002    const finalPath = !blockName ? `styles$appendedPath}` : `styles.blocks.$blockName}$appendedPath}`;
11003    return setImmutably(
11004      normalizeStyleStateAliases(globalStyles),
11005      finalPath.split("."),
11006      newValue
11007    );
11008  }
11009  
11010  // packages/global-styles-engine/build-module/core/equal.mjs
11011  var import_es6 = __toESM(require_es6(), 1);
11012  function areGlobalStylesEqual(original, variation) {
11013    if (typeof original !== "object" || typeof variation !== "object") {
11014      return original === variation;
11015    }
11016    return (0, import_es6.default)(original?.styles, variation?.styles) && (0, import_es6.default)(original?.settings, variation?.settings);
11017  }
11018  
11019  // packages/global-styles-engine/build-module/core/merge.mjs
11020  var import_deepmerge = __toESM(require_cjs(), 1);
11021  
11022  // node_modules/is-plain-object/dist/is-plain-object.mjs
11023  function isObject(o) {
11024    return Object.prototype.toString.call(o) === "[object Object]";
11025  }
11026  function isPlainObject(o) {
11027    var ctor, prot;
11028    if (isObject(o) === false) return false;
11029    ctor = o.constructor;
11030    if (ctor === void 0) return true;
11031    prot = ctor.prototype;
11032    if (isObject(prot) === false) return false;
11033    if (prot.hasOwnProperty("isPrototypeOf") === false) {
11034      return false;
11035    }
11036    return true;
11037  }
11038  
11039  // packages/global-styles-engine/build-module/core/merge.mjs
11040  function mergeGlobalStyles(base, user) {
11041    return (0, import_deepmerge.default)(
11042      normalizeStyleStateAliases(base),
11043      normalizeStyleStateAliases(user),
11044      {
11045        /*
11046         * We only pass as arrays the presets,
11047         * in which case we want the new array of values
11048         * to override the old array (no merging).
11049         */
11050        isMergeableObject: isPlainObject,
11051        /*
11052         * Exceptions to the above rule.
11053         * Background images should be replaced, not merged,
11054         * as they themselves are specific object definitions for the style.
11055         */
11056        customMerge: (key) => {
11057          if (key === "backgroundImage") {
11058            return (baseConfig, userConfig) => userConfig ?? baseConfig;
11059          }
11060          return void 0;
11061        }
11062      }
11063    );
11064  }
11065  
11066  // node_modules/colord/index.mjs
11067  for (r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t = function(r3) {
11068    return "string" == typeof r3 ? r3.length > 0 : "number" == typeof r3;
11069  }, n = function(r3, t2, n2) {
11070    return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = Math.pow(10, t2)), Math.round(n2 * r3) / n2 + 0;
11071  }, u = function(r3, t2, n2) {
11072    return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = 1), r3 > n2 ? n2 : r3 > t2 ? r3 : t2;
11073  }, e = function(r3) {
11074    return (r3 = isFinite(r3) ? r3 % 360 : 0) < 0 ? r3 + 360 : r3;
11075  }, o = function(r3, t2) {
11076    return void 0 === t2 && (t2 = 0), n(r3, t2) % 360;
11077  }, a = function(r3) {
11078    return { r: u(r3.r, 0, 255), g: u(r3.g, 0, 255), b: u(r3.b, 0, 255), a: u(r3.a) };
11079  }, i = function(r3) {
11080    return { r: n(r3.r), g: n(r3.g), b: n(r3.b), a: n(r3.a, 3) };
11081  }, s = /^#([0-9a-f]{3,8})$/i, d = function(r3, t2) {
11082    var n2 = r3.charCodeAt(t2);
11083    return (15 & n2) + 9 * (n2 >> 6);
11084  }, h = function(r3, t2) {
11085    return d(r3, t2) << 4 | d(r3, t2 + 1);
11086  }, b = [], f = 0; f < 256; f++) b.push((f < 16 ? "0" : "") + f.toString(16));
11087  var r2;
11088  var t;
11089  var n;
11090  var u;
11091  var e;
11092  var o;
11093  var a;
11094  var i;
11095  var s;
11096  var d;
11097  var h;
11098  var b;
11099  var f;
11100  var g = function(r2) {
11101    return b[u(r2, 0, 255)];
11102  };
11103  var c = function(r2) {
11104    var t = r2.r, n = r2.g, u = r2.b, e = r2.a, o = Math.max(t, n, u), a = o - Math.min(t, n, u), i = a ? o === t ? (n - u) / a : o === n ? 2 + (u - t) / a : 4 + (t - n) / a : 0;
11105    return { h: 60 * (i < 0 ? i + 6 : i), s: o ? a / o * 100 : 0, v: o / 255 * 100, a: e };
11106  };
11107  var v = function(r2) {
11108    var t = r2.h, n = r2.s, u = r2.v, e = r2.a;
11109    t = t / 360 * 6, n /= 100, u /= 100;
11110    var o = Math.floor(t), a = u * (1 - n), i = u * (1 - (t - o) * n), s = u * (1 - (1 - t + o) * n), d = o % 6;
11111    return { r: 255 * [u, i, a, a, s, u][d], g: 255 * [s, u, u, i, a, a][d], b: 255 * [a, a, s, u, u, i][d], a: e };
11112  };
11113  var l = function(r2) {
11114    return { h: e(r2.h), s: u(r2.s, 0, 100), l: u(r2.l, 0, 100), a: u(r2.a) };
11115  };
11116  var p2 = function(r2) {
11117    return { h: o(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
11118  };
11119  var m = function(r2) {
11120    return v((n = (t = r2).s, { h: t.h, s: (n *= ((u = t.l) < 50 ? u : 100 - u) / 100) > 0 ? 2 * n / (u + n) * 100 : 0, v: u + n, a: t.a }));
11121    var t, n, u;
11122  };
11123  var y = function(r2) {
11124    return { h: (t = c(r2)).h, s: (e = (200 - (n = t.s)) * (u = t.v) / 100) > 0 && e < 200 ? n * u / 100 / (e <= 100 ? e : 200 - e) * 100 : 0, l: e / 2, a: t.a };
11125    var t, n, u, e;
11126  };
11127  var N = /^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*,\s*([+-]?(?:\d*\.\d+|\d+))%\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
11128  var x = /^hsla?\(\s*([+-]?(?:\d*\.\d+|\d+))(deg|rad|grad|turn)?\s+([+-]?(?:\d*\.\d+|\d+))%\s+([+-]?(?:\d*\.\d+|\d+))%\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
11129  var M = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
11130  var H = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i;
11131  var $ = { string: [[function(r2) {
11132    if (!s.test(r2)) return null;
11133    var t = r2.length;
11134    return t <= 5 ? { r: 17 * d(r2, 1), g: 17 * d(r2, 2), b: 17 * d(r2, 3), a: 5 === t ? n(17 * d(r2, 4) / 255, 2) : 1 } : 7 === t || 9 === t ? { r: h(r2, 1), g: h(r2, 3), b: h(r2, 5), a: 9 === t ? n(h(r2, 7) / 255, 2) : 1 } : null;
11135  }, "hex"], [function(r2) {
11136    var t = M.exec(r2) || H.exec(r2);
11137    return t ? t[2] !== t[4] || t[4] !== t[6] ? null : a({ r: Number(t[1]) / (t[2] ? 100 / 255 : 1), g: Number(t[3]) / (t[4] ? 100 / 255 : 1), b: Number(t[5]) / (t[6] ? 100 / 255 : 1), a: void 0 === t[7] ? 1 : Number(t[7]) / (t[8] ? 100 : 1) }) : null;
11138  }, "rgb"], [function(t) {
11139    var n = N.exec(t) || x.exec(t);
11140    if (!n) return null;
11141    var u, e, o = l({ h: (u = n[1], e = n[2], void 0 === e && (e = "deg"), Number(u) * (r2[e] || 1)), s: Number(n[3]), l: Number(n[4]), a: void 0 === n[5] ? 1 : Number(n[5]) / (n[6] ? 100 : 1) });
11142    return m(o);
11143  }, "hsl"]], object: [[function(r2) {
11144    var n = r2.r, u = r2.g, e = r2.b, o = r2.a, i = void 0 === o ? 1 : o;
11145    return t(n) && t(u) && t(e) ? a({ r: Number(n), g: Number(u), b: Number(e), a: Number(i) }) : null;
11146  }, "rgb"], [function(r2) {
11147    var n = r2.h, u = r2.s, e = r2.l, o = r2.a, a = void 0 === o ? 1 : o;
11148    if (!t(n) || !t(u) || !t(e)) return null;
11149    var i = l({ h: Number(n), s: Number(u), l: Number(e), a: Number(a) });
11150    return m(i);
11151  }, "hsl"], [function(r2) {
11152    var n = r2.h, o = r2.s, a = r2.v, i = r2.a, s = void 0 === i ? 1 : i;
11153    if (!t(n) || !t(o) || !t(a)) return null;
11154    var d = (function(r3) {
11155      return { h: e(r3.h), s: u(r3.s, 0, 100), v: u(r3.v, 0, 100), a: u(r3.a) };
11156    })({ h: Number(n), s: Number(o), v: Number(a), a: Number(s) });
11157    return v(d);
11158  }, "hsv"]] };
11159  var j = function(r2, t) {
11160    for (var n = 0; n < t.length; n++) {
11161      var u = t[n][0](r2);
11162      if (u) return [u, t[n][1]];
11163    }
11164    return [null, void 0];
11165  };
11166  var w = function(r2) {
11167    return "string" == typeof r2 ? j(r2.trim(), $.string) : "object" == typeof r2 && null !== r2 ? j(r2, $.object) : [null, void 0];
11168  };
11169  var k = function(r2, t) {
11170    var n = y(r2);
11171    return { h: n.h, s: u(n.s + 100 * t, 0, 100), l: n.l, a: n.a };
11172  };
11173  var E = function(r2) {
11174    return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
11175  };
11176  var R = function(r2, t) {
11177    var n = y(r2);
11178    return { h: n.h, s: n.s, l: u(n.l + 100 * t, 0, 100), a: n.a };
11179  };
11180  var q = (function() {
11181    function r2(r3) {
11182      this.parsed = w(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
11183    }
11184    return r2.prototype.isValid = function() {
11185      return null !== this.parsed;
11186    }, r2.prototype.brightness = function() {
11187      return n(E(this.rgba), 2);
11188    }, r2.prototype.isDark = function() {
11189      return E(this.rgba) < 0.5;
11190    }, r2.prototype.isLight = function() {
11191      return E(this.rgba) >= 0.5;
11192    }, r2.prototype.toHex = function() {
11193      return r3 = i(this.rgba), t = r3.r, u = r3.g, e = r3.b, a = (o = r3.a) < 1 ? g(n(255 * o)) : "", "#" + g(t) + g(u) + g(e) + a;
11194      var r3, t, u, e, o, a;
11195    }, r2.prototype.toRgb = function() {
11196      return i(this.rgba);
11197    }, r2.prototype.toRgbString = function() {
11198      return r3 = i(this.rgba), t = r3.r, n = r3.g, u = r3.b, (e = r3.a) < 1 ? "rgba(" + t + ", " + n + ", " + u + ", " + e + ")" : "rgb(" + t + ", " + n + ", " + u + ")";
11199      var r3, t, n, u, e;
11200    }, r2.prototype.toHsl = function() {
11201      return p2(y(this.rgba));
11202    }, r2.prototype.toHslString = function() {
11203      return r3 = p2(y(this.rgba)), t = r3.h, n = r3.s, u = r3.l, (e = r3.a) < 1 ? "hsla(" + t + ", " + n + "%, " + u + "%, " + e + ")" : "hsl(" + t + ", " + n + "%, " + u + "%)";
11204      var r3, t, n, u, e;
11205    }, r2.prototype.toHsv = function() {
11206      return r3 = c(this.rgba), { h: o(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
11207      var r3;
11208    }, r2.prototype.invert = function() {
11209      return A({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
11210      var r3;
11211    }, r2.prototype.saturate = function(r3) {
11212      return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, r3));
11213    }, r2.prototype.desaturate = function(r3) {
11214      return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, -r3));
11215    }, r2.prototype.grayscale = function() {
11216      return A(k(this.rgba, -1));
11217    }, r2.prototype.lighten = function(r3) {
11218      return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, r3));
11219    }, r2.prototype.darken = function(r3) {
11220      return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, -r3));
11221    }, r2.prototype.rotate = function(r3) {
11222      return void 0 === r3 && (r3 = 15), this.hue(y(this.rgba).h + r3);
11223    }, r2.prototype.alpha = function(r3) {
11224      return "number" == typeof r3 ? A({ r: (t = this.rgba).r, g: t.g, b: t.b, a: r3 }) : n(this.rgba.a, 3);
11225      var t;
11226    }, r2.prototype.hue = function(r3) {
11227      var t = y(this.rgba);
11228      return "number" == typeof r3 ? A({ h: r3, s: t.s, l: t.l, a: t.a }) : o(t.h);
11229    }, r2.prototype.isEqual = function(r3) {
11230      return this.toHex() === A(r3).toHex();
11231    }, r2;
11232  })();
11233  var A = function(r2) {
11234    return r2 instanceof q ? r2 : new q(r2);
11235  };
11236  
11237  // packages/global-styles-engine/build-module/utils/duotone.mjs
11238  function getValuesFromColors(colors = []) {
11239    const values = {
11240      r: [],
11241      g: [],
11242      b: [],
11243      a: []
11244    };
11245    colors.forEach((color) => {
11246      const rgbColor = A(color).toRgb();
11247      values.r.push(rgbColor.r / 255);
11248      values.g.push(rgbColor.g / 255);
11249      values.b.push(rgbColor.b / 255);
11250      values.a.push(rgbColor.a);
11251    });
11252    return values;
11253  }
11254  function getDuotoneUnsetStylesheet(selector) {
11255    return `$selector}{filter:none}`;
11256  }
11257  function getDuotoneStylesheet(selector, id) {
11258    return `$selector}{filter:url(#$id})}`;
11259  }
11260  function getDuotoneFilter(id, colors) {
11261    const values = getValuesFromColors(colors);
11262    return `
11263  <svg
11264      xmlns:xlink="http://www.w3.org/1999/xlink"
11265      viewBox="0 0 0 0"
11266      width="0"
11267      height="0"
11268      focusable="false"
11269      role="none"
11270      aria-hidden="true"
11271      style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"
11272  >
11273      <defs>
11274          <filter id="$id}">
11275              <!--
11276                  Use sRGB instead of linearRGB so transparency looks correct.
11277                  Use perceptual brightness to convert to grayscale.
11278              -->
11279              <feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>
11280              <!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->
11281              <feComponentTransfer color-interpolation-filters="sRGB">
11282                  <feFuncR type="table" tableValues="$values.r.join(" ")}"></feFuncR>
11283                  <feFuncG type="table" tableValues="$values.g.join(" ")}"></feFuncG>
11284                  <feFuncB type="table" tableValues="$values.b.join(" ")}"></feFuncB>
11285                  <feFuncA type="table" tableValues="$values.a.join(" ")}"></feFuncA>
11286              </feComponentTransfer>
11287              <!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->
11288              <feComposite in2="SourceGraphic" operator="in"></feComposite>
11289          </filter>
11290      </defs>
11291  </svg>`;
11292  }
11293  
11294  // packages/global-styles-engine/build-module/utils/viewport.mjs
11295  var DEFAULT_VIEWPORT_BREAKPOINTS = {
11296    mobile: "480px",
11297    tablet: "782px"
11298  };
11299  var VIEWPORT_SIZE_REGEXP = /^(\d+|\d*\.\d+)(px|em|rem)$/;
11300  var DEFAULT_FONT_SIZE = 16;
11301  function isViewportSettings(configOrSettings) {
11302    return "mobile" in configOrSettings || "tablet" in configOrSettings;
11303  }
11304  function getViewportSettings(configOrSettings) {
11305    if (!configOrSettings || typeof configOrSettings !== "object") {
11306      return {};
11307    }
11308    if (isViewportSettings(configOrSettings)) {
11309      return configOrSettings;
11310    }
11311    return configOrSettings.settings?.viewport ?? {};
11312  }
11313  function isValidViewportSize(value) {
11314    return typeof value === "string" && VIEWPORT_SIZE_REGEXP.test(value.trim());
11315  }
11316  function getViewportBreakpointValueInPixels(value) {
11317    if (typeof value === "number") {
11318      return value;
11319    }
11320    if (typeof value !== "string") {
11321      return void 0;
11322    }
11323    const match2 = value.trim().match(VIEWPORT_SIZE_REGEXP);
11324    if (!match2) {
11325      return void 0;
11326    }
11327    const numericValue = Number.parseFloat(match2[1]);
11328    const unit = match2[2];
11329    return unit === "px" ? numericValue : numericValue * DEFAULT_FONT_SIZE;
11330  }
11331  function getViewportBreakpoints(configOrSettings) {
11332    const viewportSettings = getViewportSettings(configOrSettings);
11333    const breakpoints = {};
11334    const breakpointValuesInPixels = {};
11335    Object.keys(DEFAULT_VIEWPORT_BREAKPOINTS).forEach((breakpoint) => {
11336      const key = breakpoint;
11337      const value = viewportSettings[key];
11338      const px = getViewportBreakpointValueInPixels(value);
11339      if (px !== void 0 && isValidViewportSize(value)) {
11340        breakpoints[key] = value.trim();
11341        breakpointValuesInPixels[key] = px;
11342      }
11343    });
11344    const breakpointNames = Object.keys(breakpoints);
11345    if (!breakpointNames.length) {
11346      return { ...DEFAULT_VIEWPORT_BREAKPOINTS };
11347    }
11348    if (1 === breakpointNames.length) {
11349      return breakpoints;
11350    }
11351    const mobile = breakpoints.mobile;
11352    const tablet = breakpoints.tablet;
11353    if (breakpointValuesInPixels.mobile >= breakpointValuesInPixels.tablet) {
11354      return { mobile };
11355    }
11356    return { mobile, tablet };
11357  }
11358  function getResponsiveMediaQueries(configOrSettings) {
11359    const breakpoints = getViewportBreakpoints(configOrSettings);
11360    const mediaQueries = {};
11361    if (breakpoints.mobile) {
11362      mediaQueries["@mobile"] = `@media (width <= $breakpoints.mobile})`;
11363    }
11364    if (breakpoints.tablet) {
11365      mediaQueries["@tablet"] = breakpoints.mobile ? `@media ($breakpoints.mobile} < width <= $breakpoints.tablet})` : `@media (width <= $breakpoints.tablet})`;
11366    }
11367    return mediaQueries;
11368  }
11369  
11370  // packages/global-styles-engine/build-module/variation.mjs
11371  function getVariationStyle(globalStyles, name2, variation, { resolveRefs = true } = {}) {
11372    if (!globalStyles?.styles?.blocks?.[name2]?.variations?.[variation]) {
11373      return void 0;
11374    }
11375    const replaceRefs = (variationStyles) => {
11376      Object.keys(variationStyles).forEach((key) => {
11377        const value = variationStyles[key];
11378        if (typeof value === "object" && value !== null) {
11379          if (value.ref !== void 0) {
11380            if (typeof value.ref !== "string" || value.ref.trim() === "") {
11381              delete variationStyles[key];
11382            } else {
11383              const refValue = getValueFromObjectPath(
11384                globalStyles,
11385                value.ref
11386              );
11387              if (refValue !== void 0 && refValue !== null) {
11388                variationStyles[key] = refValue;
11389              } else {
11390                delete variationStyles[key];
11391              }
11392            }
11393          } else {
11394            replaceRefs(value);
11395            if (Object.keys(value).length === 0) {
11396              delete variationStyles[key];
11397            }
11398          }
11399        }
11400      });
11401    };
11402    const styles = JSON.parse(
11403      JSON.stringify(
11404        globalStyles.styles.blocks[name2].variations[variation]
11405      )
11406    );
11407    if (resolveRefs) {
11408      replaceRefs(styles);
11409    }
11410    return styles;
11411  }
11412  
11413  // packages/global-styles-engine/build-module/resolve-style.mjs
11414  var DEFAULT_STATE_VALUE = "default";
11415  function isDefaultBlockStyleState(selectedState) {
11416    const viewport = selectedState?.viewport;
11417    const pseudoState = selectedState?.pseudoState;
11418    return (!viewport || viewport === DEFAULT_STATE_VALUE) && (!pseudoState || pseudoState === DEFAULT_STATE_VALUE);
11419  }
11420  function getStyleStatePath(selectedState) {
11421    if (isDefaultBlockStyleState(selectedState)) {
11422      return [];
11423    }
11424    return [selectedState.viewport, selectedState.pseudoState].filter(
11425      (state) => !!state && state !== DEFAULT_STATE_VALUE
11426    );
11427  }
11428  function getStyleForState(style, selectedState) {
11429    const path = getStyleStatePath(selectedState);
11430    if (!path.length) {
11431      return style;
11432    }
11433    return getValueFromObjectPath(style, path);
11434  }
11435  var TREE_STRUCTURAL_KEYS = /* @__PURE__ */ new Set(["blocks", "variations", "css"]);
11436  var EMPTY_INHERITANCE = Object.freeze({
11437    value: {},
11438    sources: {}
11439  });
11440  var SOURCE_DESCRIPTORS = {
11441    root: { layer: "root" },
11442    element: { layer: "element" },
11443    block: { layer: "block" },
11444    blockVariation: { layer: "blockVariation" }
11445  };
11446  function createSourceDescriptor(type) {
11447    const descriptor = SOURCE_DESCRIPTORS[type];
11448    if (!descriptor) {
11449      return null;
11450    }
11451    return { ...descriptor };
11452  }
11453  function createContribution(styles, source) {
11454    if (!styles || !source) {
11455      return null;
11456    }
11457    return { styles, source };
11458  }
11459  function getPathKey(path) {
11460    return path.join(".");
11461  }
11462  function getSourceForPath(source) {
11463    return { ...source };
11464  }
11465  function isExplicitEmpty(value) {
11466    if (value === "" || value === null) {
11467      return true;
11468    }
11469    if (typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0) {
11470      return true;
11471    }
11472    return false;
11473  }
11474  function isRefObject(value) {
11475    return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.ref === "string";
11476  }
11477  function pickLayerRootContribution(layer) {
11478    if (!layer || typeof layer !== "object" || Array.isArray(layer)) {
11479      return null;
11480    }
11481    const contribution = {};
11482    for (const key of Object.keys(layer)) {
11483      if (TREE_STRUCTURAL_KEYS.has(key)) {
11484        continue;
11485      }
11486      if (key === "elements") {
11487        if (layer.elements && typeof layer.elements === "object") {
11488          contribution.elements = layer.elements;
11489        }
11490        continue;
11491      }
11492      if (isExplicitEmpty(layer[key])) {
11493        continue;
11494      }
11495      contribution[key] = layer[key];
11496    }
11497    return Object.keys(contribution).length === 0 ? null : contribution;
11498  }
11499  var ATOMIC_OBJECT_KEYS = /* @__PURE__ */ new Set(["backgroundImage"]);
11500  function deepMergeDroppingEmpties(target, source, globalStyles, sourceMetadata, sources, path = []) {
11501    if (!source || typeof source !== "object" || Array.isArray(source)) {
11502      return target;
11503    }
11504    for (const key of Object.keys(source)) {
11505      let sourceValue = source[key];
11506      if (isExplicitEmpty(sourceValue)) {
11507        continue;
11508      }
11509      if (isRefObject(sourceValue)) {
11510        if (sourceValue.ref.trim() === "") {
11511          continue;
11512        }
11513        const resolved = getValueFromObjectPath(
11514          globalStyles,
11515          sourceValue.ref
11516        );
11517        if (resolved === void 0 || resolved === null || isRefObject(resolved)) {
11518          continue;
11519        }
11520        sourceValue = resolved;
11521      }
11522      const nextPath = [...path, key];
11523      if (!ATOMIC_OBJECT_KEYS.has(key) && sourceValue !== null && typeof sourceValue === "object" && !Array.isArray(sourceValue) && !isRefObject(sourceValue)) {
11524        const existing = target[key] && typeof target[key] === "object" && !Array.isArray(target[key]) ? target[key] : {};
11525        target[key] = deepMergeDroppingEmpties(
11526          { ...existing },
11527          sourceValue,
11528          globalStyles,
11529          sourceMetadata,
11530          sources,
11531          nextPath
11532        );
11533      } else {
11534        target[key] = ATOMIC_OBJECT_KEYS.has(key) && sourceValue !== null && typeof sourceValue === "object" && !Array.isArray(sourceValue) ? { ...sourceValue } : sourceValue;
11535        if (sourceMetadata && sources) {
11536          sources[getPathKey(nextPath)] = getSourceForPath(sourceMetadata);
11537        }
11538      }
11539    }
11540    return target;
11541  }
11542  function getStateSlice(layerObject, selectedState) {
11543    if (!layerObject) {
11544      return null;
11545    }
11546    const slice = getStyleForState(layerObject, selectedState);
11547    return slice && typeof slice === "object" && !Array.isArray(slice) ? slice : null;
11548  }
11549  var NON_CASCADING_ROOT_PREFIXES = [
11550    "color.background",
11551    "color.gradient",
11552    "background",
11553    "spacing",
11554    "dimensions",
11555    "border",
11556    "shadow",
11557    "filter"
11558  ];
11559  function isNonCascadingRootPath(pathKey) {
11560    if (pathKey.startsWith("elements.")) {
11561      return false;
11562    }
11563    return NON_CASCADING_ROOT_PREFIXES.some(
11564      (prefix) => pathKey === prefix || pathKey.startsWith(`$prefix}.`)
11565    );
11566  }
11567  function deleteAtPath(target, pathSegments) {
11568    if (!target || typeof target !== "object") {
11569      return;
11570    }
11571    const [head2, ...rest] = pathSegments;
11572    if (rest.length === 0) {
11573      delete target[head2];
11574      return;
11575    }
11576    const child = target[head2];
11577    if (child && typeof child === "object") {
11578      deleteAtPath(child, rest);
11579      if (Object.keys(child).length === 0) {
11580        delete target[head2];
11581      }
11582    }
11583  }
11584  function dropNonCascadingRootLeaves(value, sources) {
11585    for (const pathKey of Object.keys(sources)) {
11586      if (sources[pathKey].layer === "root" && isNonCascadingRootPath(pathKey)) {
11587        deleteAtPath(value, pathKey.split("."));
11588        delete sources[pathKey];
11589      }
11590    }
11591  }
11592  function resolveThemeFileBackgroundImage(value, globalStyles, links) {
11593    const image = value?.background?.backgroundImage;
11594    if (!image) {
11595      return;
11596    }
11597    const resolved = getResolvedValue(image, {
11598      ...globalStyles,
11599      _links: links ?? void 0
11600    });
11601    if (resolved !== void 0) {
11602      value.background.backgroundImage = resolved;
11603    }
11604  }
11605  function computeResolvedStyle(globalStyles, {
11606    blockName,
11607    variationName = null,
11608    elements: elements2 = null,
11609    viewport = null,
11610    pseudoState = null
11611  } = {}) {
11612    if (!globalStyles || !globalStyles.styles) {
11613      return EMPTY_INHERITANCE;
11614    }
11615    if (!blockName) {
11616      return EMPTY_INHERITANCE;
11617    }
11618    const styles = globalStyles.styles;
11619    const selectedState = { viewport, pseudoState };
11620    const root = styles;
11621    const block = styles.blocks?.[blockName] ?? null;
11622    const elementLayers = (elements2 ?? []).map((elementName) => styles.elements?.[elementName] ?? null).filter((layer) => !!layer);
11623    const variation = variationName ? getVariationStyle(globalStyles, blockName, variationName) ?? null : null;
11624    const contributions = [
11625      createContribution(
11626        pickLayerRootContribution(root),
11627        createSourceDescriptor("root")
11628      ),
11629      ...elementLayers.map(
11630        (layer) => createContribution(
11631          pickLayerRootContribution(layer),
11632          createSourceDescriptor("element")
11633        )
11634      ),
11635      block ? createContribution(
11636        pickLayerRootContribution(block),
11637        createSourceDescriptor("block")
11638      ) : null,
11639      variation ? createContribution(
11640        pickLayerRootContribution(variation),
11641        createSourceDescriptor("blockVariation")
11642      ) : null
11643    ];
11644    if (!isDefaultBlockStyleState(selectedState)) {
11645      contributions.push(
11646        createContribution(
11647          pickLayerRootContribution(
11648            getStateSlice(root, selectedState)
11649          ),
11650          createSourceDescriptor("root")
11651        ),
11652        ...elementLayers.map(
11653          (layer) => createContribution(
11654            pickLayerRootContribution(
11655              getStateSlice(layer, selectedState)
11656            ),
11657            createSourceDescriptor("element")
11658          )
11659        ),
11660        block ? createContribution(
11661          pickLayerRootContribution(
11662            getStateSlice(block, selectedState)
11663          ),
11664          createSourceDescriptor("block")
11665        ) : null,
11666        variation ? createContribution(
11667          pickLayerRootContribution(
11668            getStateSlice(variation, selectedState)
11669          ),
11670          createSourceDescriptor("blockVariation")
11671        ) : null
11672      );
11673    }
11674    const filteredContributions = contributions.filter(
11675      Boolean
11676    );
11677    if (filteredContributions.length === 0) {
11678      return EMPTY_INHERITANCE;
11679    }
11680    const sources = {};
11681    const value = filteredContributions.reduce(
11682      (mergedValue, contribution) => deepMergeDroppingEmpties(
11683        mergedValue,
11684        contribution.styles,
11685        globalStyles,
11686        contribution.source,
11687        sources
11688      ),
11689      {}
11690    );
11691    dropNonCascadingRootLeaves(value, sources);
11692    resolveThemeFileBackgroundImage(
11693      value,
11694      globalStyles,
11695      globalStyles._links ?? null
11696    );
11697    return { value, sources };
11698  }
11699  var NO_LINKS = {};
11700  var memo = /* @__PURE__ */ new WeakMap();
11701  function resolveStyle2(globalStyles, context = {}) {
11702    const styleData = globalStyles?.styles;
11703    if (!styleData || typeof styleData !== "object") {
11704      return computeResolvedStyle(globalStyles, context);
11705    }
11706    let byLinks = memo.get(styleData);
11707    if (!byLinks) {
11708      byLinks = /* @__PURE__ */ new WeakMap();
11709      memo.set(styleData, byLinks);
11710    }
11711    const linksKey = globalStyles?._links ?? NO_LINKS;
11712    let inner = byLinks.get(linksKey);
11713    if (!inner) {
11714      inner = /* @__PURE__ */ new Map();
11715      byLinks.set(linksKey, inner);
11716    }
11717    const sliceKey = `$context.elements?.join(",") ?? ""}:$context.viewport ?? ""}:$context.pseudoState ?? ""}`;
11718    const key = (context.blockName || "") + "" + (context.variationName || "") + "" + sliceKey;
11719    if (inner.has(key)) {
11720      return inner.get(key);
11721    }
11722    const result = computeResolvedStyle(globalStyles, context);
11723    inner.set(key, result);
11724    return result;
11725  }
11726  
11727  // packages/global-styles-engine/build-module/lock-unlock.mjs
11728  var import_private_apis2 = __toESM(require_private_apis(), 1);
11729  var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
11730    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
11731    "@wordpress/global-styles-engine"
11732  );
11733  
11734  // packages/global-styles-engine/build-module/private-apis.mjs
11735  var privateApis = {};
11736  lock2(privateApis, {
11737    getResponsiveMediaQueries,
11738    getViewportBreakpoints,
11739    getViewportBreakpointValueInPixels,
11740    getDuotoneFilter,
11741    getDuotoneStylesheet,
11742    getDuotoneUnsetStylesheet,
11743    resolveStyle: resolveStyle2,
11744    getVariationStyle
11745  });
11746  
11747  // packages/global-styles-ui/build-module/provider.mjs
11748  var import_element23 = __toESM(require_element(), 1);
11749  
11750  // packages/global-styles-ui/build-module/context.mjs
11751  var import_element22 = __toESM(require_element(), 1);
11752  var GlobalStylesContext = (0, import_element22.createContext)({
11753    user: { styles: {}, settings: {} },
11754    base: { styles: {}, settings: {} },
11755    merged: { styles: {}, settings: {} },
11756    onChange: () => {
11757    },
11758    fontLibraryEnabled: false
11759  });
11760  
11761  // packages/global-styles-ui/build-module/provider.mjs
11762  var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
11763  function GlobalStylesProvider({
11764    children,
11765    value,
11766    baseValue,
11767    onChange,
11768    fontLibraryEnabled
11769  }) {
11770    const merged = (0, import_element23.useMemo)(() => {
11771      return mergeGlobalStyles(baseValue, value);
11772    }, [baseValue, value]);
11773    const contextValue = (0, import_element23.useMemo)(
11774      () => ({
11775        user: value,
11776        base: baseValue,
11777        merged,
11778        onChange,
11779        fontLibraryEnabled
11780      }),
11781      [value, baseValue, merged, onChange, fontLibraryEnabled]
11782    );
11783    return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(GlobalStylesContext.Provider, { value: contextValue, children });
11784  }
11785  
11786  // packages/global-styles-ui/build-module/screen-root.mjs
11787  var import_components8 = __toESM(require_components(), 1);
11788  var import_i18n8 = __toESM(require_i18n(), 1);
11789  var import_data2 = __toESM(require_data(), 1);
11790  var import_core_data2 = __toESM(require_core_data(), 1);
11791  
11792  // packages/global-styles-ui/build-module/icon-with-current-color.mjs
11793  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
11794  function IconWithCurrentColor({
11795    className,
11796    ...props
11797  }) {
11798    return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11799      icon_default,
11800      {
11801        className: clsx_default(
11802          className,
11803          "global-styles-ui-icon-with-current-color"
11804        ),
11805        ...props
11806      }
11807    );
11808  }
11809  
11810  // packages/global-styles-ui/build-module/navigation-button.mjs
11811  var import_components2 = __toESM(require_components(), 1);
11812  var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
11813  function GenericNavigationButton({
11814    icon,
11815    children,
11816    ...props
11817  }) {
11818    return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_components2.__experimentalItem, { ...props, children: [
11819      icon && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_components2.__experimentalHStack, { justify: "flex-start", children: [
11820        /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(IconWithCurrentColor, { icon, size: 24 }),
11821        /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components2.FlexItem, { children })
11822      ] }),
11823      !icon && children
11824    ] });
11825  }
11826  function NavigationButtonAsItem(props) {
11827    return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components2.Navigator.Button, { as: GenericNavigationButton, ...props });
11828  }
11829  
11830  // packages/global-styles-ui/build-module/root-menu.mjs
11831  var import_components3 = __toESM(require_components(), 1);
11832  var import_i18n6 = __toESM(require_i18n(), 1);
11833  var import_block_editor = __toESM(require_block_editor(), 1);
11834  
11835  // packages/global-styles-ui/build-module/hooks.mjs
11836  var import_element24 = __toESM(require_element(), 1);
11837  var import_data = __toESM(require_data(), 1);
11838  var import_core_data = __toESM(require_core_data(), 1);
11839  var import_i18n5 = __toESM(require_i18n(), 1);
11840  
11841  // packages/global-styles-ui/build-module/utils.mjs
11842  var import_i18n4 = __toESM(require_i18n(), 1);
11843  
11844  // packages/global-styles-ui/build-module/lock-unlock.mjs
11845  var import_private_apis4 = __toESM(require_private_apis(), 1);
11846  var { lock: lock3, unlock: unlock3 } = (0, import_private_apis4.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
11847    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
11848    "@wordpress/global-styles-ui"
11849  );
11850  
11851  // packages/global-styles-ui/build-module/utils.mjs
11852  var { getViewportBreakpoints: getViewportBreakpoints2 } = unlock3(privateApis);
11853  var VALID_ELEMENT_STATES = {
11854    link: [
11855      { value: ":link", label: (0, import_i18n4.__)("Link") },
11856      { value: ":any-link", label: (0, import_i18n4.__)("Any Link") },
11857      { value: ":visited", label: (0, import_i18n4.__)("Visited") },
11858      { value: ":hover", label: (0, import_i18n4.__)("Hover") },
11859      { value: ":focus", label: (0, import_i18n4.__)("Focus") },
11860      { value: ":focus-visible", label: (0, import_i18n4.__)("Focus-visible") },
11861      { value: ":active", label: (0, import_i18n4.__)("Active") }
11862    ],
11863    button: [
11864      { value: ":link", label: (0, import_i18n4.__)("Link") },
11865      { value: ":any-link", label: (0, import_i18n4.__)("Any Link") },
11866      { value: ":visited", label: (0, import_i18n4.__)("Visited") },
11867      { value: ":hover", label: (0, import_i18n4.__)("Hover") },
11868      { value: ":focus", label: (0, import_i18n4.__)("Focus") },
11869      { value: ":focus-visible", label: (0, import_i18n4.__)("Focus-visible") },
11870      { value: ":active", label: (0, import_i18n4.__)("Active") }
11871    ]
11872  };
11873  var VALID_BLOCK_STATES = {
11874    "core/button": [
11875      { value: ":hover", label: (0, import_i18n4.__)("Hover") },
11876      { value: ":focus", label: (0, import_i18n4.__)("Focus") },
11877      { value: ":focus-visible", label: (0, import_i18n4.__)("Focus-visible") },
11878      { value: ":active", label: (0, import_i18n4.__)("Active") }
11879    ]
11880  };
11881  var RESPONSIVE_STATES = [
11882    { value: "@tablet", label: (0, import_i18n4.__)("Tablet") },
11883    { value: "@mobile", label: (0, import_i18n4.__)("Mobile") }
11884  ];
11885  function removePropertiesFromObject(object, properties) {
11886    if (!properties?.length) {
11887      return object;
11888    }
11889    if (typeof object !== "object" || !object || !Object.keys(object).length) {
11890      return object;
11891    }
11892    for (const key in object) {
11893      if (properties.includes(key)) {
11894        delete object[key];
11895      } else if (typeof object[key] === "object") {
11896        removePropertiesFromObject(object[key], properties);
11897      }
11898    }
11899    return object;
11900  }
11901  var filterObjectByProperties = (object, properties) => {
11902    if (!object || !properties?.length) {
11903      return {};
11904    }
11905    const newObject = {};
11906    Object.keys(object).forEach((key) => {
11907      if (properties.includes(key)) {
11908        newObject[key] = object[key];
11909      } else if (typeof object[key] === "object") {
11910        const newFilter = filterObjectByProperties(
11911          object[key],
11912          properties
11913        );
11914        if (Object.keys(newFilter).length) {
11915          newObject[key] = newFilter;
11916        }
11917      }
11918    });
11919    return newObject;
11920  };
11921  function isVariationWithProperties(variation, properties) {
11922    const variationWithProperties = filterObjectByProperties(
11923      structuredClone(variation),
11924      properties
11925    );
11926    return areGlobalStylesEqual(variationWithProperties, variation);
11927  }
11928  function getFontFamilyFromSetting(fontFamilies, setting) {
11929    if (!Array.isArray(fontFamilies) || !setting) {
11930      return null;
11931    }
11932    const fontFamilyVariable = setting.replace("var(", "").replace(")", "");
11933    const fontFamilySlug = fontFamilyVariable?.split("--").slice(-1)[0];
11934    return fontFamilies.find(
11935      (fontFamily) => fontFamily.slug === fontFamilySlug
11936    );
11937  }
11938  function getFontFamilies(themeJson) {
11939    const themeFontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme;
11940    const customFontFamilies = themeJson?.settings?.typography?.fontFamilies?.custom;
11941    let fontFamilies = [];
11942    if (themeFontFamilies && customFontFamilies) {
11943      fontFamilies = [...themeFontFamilies, ...customFontFamilies];
11944    } else if (themeFontFamilies) {
11945      fontFamilies = themeFontFamilies;
11946    } else if (customFontFamilies) {
11947      fontFamilies = customFontFamilies;
11948    }
11949    const bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;
11950    const bodyFontFamily = getFontFamilyFromSetting(
11951      fontFamilies,
11952      bodyFontFamilySetting
11953    );
11954    const headingFontFamilySetting = themeJson?.styles?.elements?.heading?.typography?.fontFamily;
11955    let headingFontFamily;
11956    if (!headingFontFamilySetting) {
11957      headingFontFamily = bodyFontFamily;
11958    } else {
11959      headingFontFamily = getFontFamilyFromSetting(
11960        fontFamilies,
11961        themeJson?.styles?.elements?.heading?.typography?.fontFamily
11962      );
11963    }
11964    return [bodyFontFamily, headingFontFamily];
11965  }
11966  
11967  // packages/global-styles-ui/build-module/hooks.mjs
11968  function useStyle(path, blockName, readFrom = "merged", shouldDecodeEncode = true, state) {
11969    const { user, base, merged, onChange } = (0, import_element24.useContext)(GlobalStylesContext);
11970    const statePathParts = state?.split(".").filter(Boolean) ?? [];
11971    const pseudoSelectorState = statePathParts.find(
11972      (value) => value.startsWith(":")
11973    );
11974    const statePathWithoutPseudo = statePathParts.filter((value) => !value.startsWith(":")).join(".");
11975    const stylePath = [path, statePathWithoutPseudo].filter(Boolean).join(".");
11976    let sourceValue = merged;
11977    if (readFrom === "base") {
11978      sourceValue = base;
11979    } else if (readFrom === "user") {
11980      sourceValue = user;
11981    }
11982    const styleValue = (0, import_element24.useMemo)(() => {
11983      const rawValue = getStyle(
11984        sourceValue,
11985        stylePath,
11986        blockName,
11987        shouldDecodeEncode
11988      );
11989      if (pseudoSelectorState) {
11990        return rawValue?.[pseudoSelectorState] ?? {};
11991      }
11992      return rawValue;
11993    }, [
11994      sourceValue,
11995      stylePath,
11996      blockName,
11997      shouldDecodeEncode,
11998      pseudoSelectorState
11999    ]);
12000    const setStyleValue = (0, import_element24.useCallback)(
12001      (newValue) => {
12002        let valueToSet = newValue;
12003        if (pseudoSelectorState) {
12004          const fullCurrentValue = getStyle(
12005            user,
12006            stylePath,
12007            blockName,
12008            false
12009          );
12010          valueToSet = {
12011            ...fullCurrentValue,
12012            [pseudoSelectorState]: newValue
12013          };
12014        }
12015        const newGlobalStyles = setStyle(
12016          user,
12017          stylePath,
12018          valueToSet,
12019          blockName
12020        );
12021        onChange(newGlobalStyles);
12022      },
12023      [user, onChange, stylePath, blockName, pseudoSelectorState]
12024    );
12025    return [styleValue, setStyleValue];
12026  }
12027  function useSetting(path, blockName, readFrom = "merged") {
12028    const { user, base, merged, onChange } = (0, import_element24.useContext)(GlobalStylesContext);
12029    let sourceValue = merged;
12030    if (readFrom === "base") {
12031      sourceValue = base;
12032    } else if (readFrom === "user") {
12033      sourceValue = user;
12034    }
12035    const settingValue = (0, import_element24.useMemo)(
12036      () => getSetting(sourceValue, path, blockName),
12037      [sourceValue, path, blockName]
12038    );
12039    const setSettingValue = (0, import_element24.useCallback)(
12040      (newValue) => {
12041        const newGlobalStyles = setSetting(
12042          user,
12043          path,
12044          newValue,
12045          blockName
12046        );
12047        onChange(newGlobalStyles);
12048      },
12049      [user, onChange, path, blockName]
12050    );
12051    return [settingValue, setSettingValue];
12052  }
12053  var EMPTY_ARRAY2 = [];
12054  function hasThemeVariation({
12055    title,
12056    settings,
12057    styles
12058  }) {
12059    return title === (0, import_i18n5.__)("Default") || Object.keys(settings || {}).length > 0 || Object.keys(styles || {}).length > 0;
12060  }
12061  function useCurrentMergeThemeStyleVariationsWithUserConfig(properties = []) {
12062    const { variationsFromTheme } = (0, import_data.useSelect)((select) => {
12063      const _variationsFromTheme = select(
12064        import_core_data.store
12065      ).__experimentalGetCurrentThemeGlobalStylesVariations?.();
12066      return {
12067        variationsFromTheme: _variationsFromTheme || EMPTY_ARRAY2
12068      };
12069    }, []);
12070    const { user: userVariation } = (0, import_element24.useContext)(GlobalStylesContext);
12071    return (0, import_element24.useMemo)(() => {
12072      const clonedUserVariation = structuredClone(userVariation);
12073      const userVariationWithoutProperties = removePropertiesFromObject(
12074        clonedUserVariation,
12075        properties
12076      );
12077      userVariationWithoutProperties.title = (0, import_i18n5.__)("Default");
12078      const variationsWithPropertiesAndBase = variationsFromTheme.filter((variation) => {
12079        return isVariationWithProperties(variation, properties);
12080      }).map((variation) => {
12081        return mergeGlobalStyles(
12082          userVariationWithoutProperties,
12083          variation
12084        );
12085      });
12086      const variationsByProperties = [
12087        userVariationWithoutProperties,
12088        ...variationsWithPropertiesAndBase
12089      ];
12090      return variationsByProperties?.length ? variationsByProperties.filter(hasThemeVariation) : [];
12091    }, [properties, userVariation, variationsFromTheme]);
12092  }
12093  
12094  // packages/global-styles-ui/build-module/root-menu.mjs
12095  var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
12096  var {
12097    useHasDimensionsPanel,
12098    useHasTypographyPanel,
12099    useHasColorPanel,
12100    useSettingsForBlockElement,
12101    useHasBackgroundPanel
12102  } = unlock3(import_block_editor.privateApis);
12103  
12104  // packages/global-styles-ui/build-module/preview-styles.mjs
12105  var import_components7 = __toESM(require_components(), 1);
12106  
12107  // packages/global-styles-ui/build-module/preview-hooks.mjs
12108  function useStylesPreviewColors() {
12109    const [textColor = "black"] = useStyle("color.text");
12110    const [backgroundColor = "white"] = useStyle("color.background");
12111    const [headingColor = textColor] = useStyle(
12112      "elements.h1.color.text"
12113    );
12114    const [linkColor = headingColor] = useStyle(
12115      "elements.link.color.text"
12116    );
12117    const [buttonBackgroundColor = linkColor] = useStyle(
12118      "elements.button.color.background"
12119    );
12120    const [coreColors] = useSetting("color.palette.core") || [];
12121    const [themeColors] = useSetting("color.palette.theme") || [];
12122    const [customColors] = useSetting("color.palette.custom") || [];
12123    const paletteColors = (themeColors ?? []).concat(customColors ?? []).concat(coreColors ?? []);
12124    const textColorObject = paletteColors.filter(
12125      ({ color }) => color === textColor
12126    );
12127    const buttonBackgroundColorObject = paletteColors.filter(
12128      ({ color }) => color === buttonBackgroundColor
12129    );
12130    const highlightedColors = textColorObject.concat(buttonBackgroundColorObject).concat(paletteColors).filter(
12131      // we exclude these background color because it is already visible in the preview.
12132      ({ color }) => color !== backgroundColor
12133    ).slice(0, 2);
12134    return {
12135      paletteColors,
12136      highlightedColors
12137    };
12138  }
12139  
12140  // packages/global-styles-ui/build-module/typography-example.mjs
12141  var import_element25 = __toESM(require_element(), 1);
12142  var import_components4 = __toESM(require_components(), 1);
12143  var import_i18n7 = __toESM(require_i18n(), 1);
12144  
12145  // packages/global-styles-ui/build-module/font-library/utils/preview-styles.mjs
12146  function findNearest(input, numbers) {
12147    if (numbers.length === 0) {
12148      return null;
12149    }
12150    numbers.sort((a, b) => Math.abs(input - a) - Math.abs(input - b));
12151    return numbers[0];
12152  }
12153  var FONT_WEIGHT_KEYWORDS = {
12154    normal: 400,
12155    bold: 700
12156  };
12157  function isValidWeight(weight) {
12158    return weight !== void 0 && Number.isFinite(weight) && weight >= 1 && weight <= 1e3;
12159  }
12160  function resolveFontWeight(fontWeight) {
12161    const weights = String(fontWeight ?? "").trim().toLowerCase().split(/\s+/).filter(Boolean).map((value) => FONT_WEIGHT_KEYWORDS[value] ?? Number(value));
12162    const [start, end] = weights;
12163    if (!isValidWeight(start)) {
12164      return "400";
12165    }
12166    if (weights.length !== 2 || !isValidWeight(end)) {
12167      return String(start);
12168    }
12169    return String(Math.min(Math.max(400, start), end));
12170  }
12171  function formatFontFamily(input) {
12172    const regex = /^(?!generic\([ a-zA-Z\-]+\)$)(?!var\(\s*--[\w-]+\s*\)$)(?!^[a-zA-Z\-]+$).+/;
12173    const output = input.trim();
12174    const formatItem = (item) => {
12175      item = item.trim();
12176      if (item.match(regex)) {
12177        item = item.replace(/^["']|["']$/g, "");
12178        return `"$item}"`;
12179      }
12180      return item;
12181    };
12182    if (output.includes(",")) {
12183      return output.split(",").map(formatItem).filter((item) => item !== "").join(", ");
12184    }
12185    return formatItem(output);
12186  }
12187  function formatFontFaceName(input) {
12188    if (!input) {
12189      return "";
12190    }
12191    let output = input.trim();
12192    if (output.includes(",")) {
12193      output = (output.split(",").find((item) => item.trim() !== "") ?? "").trim();
12194    }
12195    output = output.replace(/^["']|["']$/g, "");
12196    if (window.navigator.userAgent.toLowerCase().includes("firefox")) {
12197      output = `"$output}"`;
12198    }
12199    return output;
12200  }
12201  function getFamilyPreviewStyle(family) {
12202    const style = {
12203      fontFamily: formatFontFamily(family.fontFamily)
12204    };
12205    if (!("fontFace" in family) || !Array.isArray(family.fontFace)) {
12206      style.fontWeight = "400";
12207      style.fontStyle = "normal";
12208      return style;
12209    }
12210    if (family.fontFace) {
12211      const normalFaces = family.fontFace.filter(
12212        (face) => face?.fontStyle && face.fontStyle.toLowerCase() === "normal"
12213      );
12214      if (normalFaces.length > 0) {
12215        style.fontStyle = "normal";
12216        const normalWeights = normalFaces.map(
12217          (face) => Number(resolveFontWeight(face.fontWeight))
12218        );
12219        style.fontWeight = String(
12220          findNearest(400, normalWeights) ?? 400
12221        );
12222      } else {
12223        style.fontStyle = family.fontFace.length && family.fontFace[0].fontStyle || "normal";
12224        style.fontWeight = family.fontFace.length && resolveFontWeight(family.fontFace[0].fontWeight) || "400";
12225      }
12226    }
12227    return style;
12228  }
12229  function getFacePreviewStyle(face) {
12230    return {
12231      fontFamily: formatFontFamily(face.fontFamily),
12232      fontStyle: face.fontStyle || "normal",
12233      fontWeight: resolveFontWeight(face.fontWeight)
12234    };
12235  }
12236  
12237  // packages/global-styles-ui/build-module/typography-example.mjs
12238  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
12239  function PreviewTypography({
12240    fontSize,
12241    variation
12242  }) {
12243    const { base } = (0, import_element25.useContext)(GlobalStylesContext);
12244    let config = base;
12245    if (variation) {
12246      config = { ...base, ...variation };
12247    }
12248    const [textColor] = useStyle("color.text");
12249    const [bodyFontFamilies, headingFontFamilies] = getFontFamilies(config);
12250    const bodyPreviewStyle = bodyFontFamilies ? getFamilyPreviewStyle(bodyFontFamilies) : {};
12251    const headingPreviewStyle = headingFontFamilies ? getFamilyPreviewStyle(headingFontFamilies) : {};
12252    if (textColor) {
12253      bodyPreviewStyle.color = textColor;
12254      headingPreviewStyle.color = textColor;
12255    }
12256    if (fontSize) {
12257      bodyPreviewStyle.fontSize = fontSize;
12258      headingPreviewStyle.fontSize = fontSize;
12259    }
12260    return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
12261      import_components4.__unstableMotion.div,
12262      {
12263        animate: {
12264          scale: 1,
12265          opacity: 1
12266        },
12267        initial: {
12268          scale: 0.1,
12269          opacity: 0
12270        },
12271        transition: {
12272          delay: 0.3,
12273          type: "tween"
12274        },
12275        style: {
12276          textAlign: "center",
12277          lineHeight: 1
12278        },
12279        children: [
12280          /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { style: headingPreviewStyle, children: (0, import_i18n7._x)("A", "Uppercase letter A") }),
12281          /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { style: bodyPreviewStyle, children: (0, import_i18n7._x)("a", "Lowercase letter A") })
12282        ]
12283      }
12284    );
12285  }
12286  
12287  // packages/global-styles-ui/build-module/highlighted-colors.mjs
12288  var import_components5 = __toESM(require_components(), 1);
12289  var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
12290  function HighlightedColors({
12291    normalizedColorSwatchSize,
12292    ratio
12293  }) {
12294    const { highlightedColors } = useStylesPreviewColors();
12295    const scaledSwatchSize = normalizedColorSwatchSize * ratio;
12296    return highlightedColors.map(({ slug, color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
12297      import_components5.__unstableMotion.div,
12298      {
12299        style: {
12300          height: scaledSwatchSize,
12301          width: scaledSwatchSize,
12302          background: color,
12303          borderRadius: scaledSwatchSize / 2
12304        },
12305        animate: {
12306          scale: 1,
12307          opacity: 1
12308        },
12309        initial: {
12310          scale: 0.1,
12311          opacity: 0
12312        },
12313        transition: {
12314          delay: index2 === 1 ? 0.2 : 0.1
12315        }
12316      },
12317      `$slug}-$index2}`
12318    ));
12319  }
12320  
12321  // packages/global-styles-ui/build-module/preview-wrapper.mjs
12322  var import_components6 = __toESM(require_components(), 1);
12323  var import_compose = __toESM(require_compose(), 1);
12324  var import_element26 = __toESM(require_element(), 1);
12325  var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
12326  var normalizedWidth = 248;
12327  var normalizedHeight = 152;
12328  var THROTTLE_OPTIONS = {
12329    leading: true,
12330    trailing: true
12331  };
12332  function PreviewWrapper({
12333    children,
12334    label,
12335    isFocused,
12336    withHoverView
12337  }) {
12338    const [backgroundColor = "white"] = useStyle("color.background");
12339    const [gradientValue] = useStyle("color.gradient");
12340    const disableMotion = (0, import_compose.useReducedMotion)();
12341    const [isHovered, setIsHovered] = (0, import_element26.useState)(false);
12342    const [containerResizeListener, { width }] = (0, import_compose.useResizeObserver)();
12343    const [throttledWidth, setThrottledWidthState] = (0, import_element26.useState)(width);
12344    const [ratioState, setRatioState] = (0, import_element26.useState)();
12345    const setThrottledWidth = (0, import_compose.useThrottle)(
12346      setThrottledWidthState,
12347      250,
12348      THROTTLE_OPTIONS
12349    );
12350    (0, import_element26.useLayoutEffect)(() => {
12351      if (width) {
12352        setThrottledWidth(width);
12353      }
12354    }, [width, setThrottledWidth]);
12355    (0, import_element26.useLayoutEffect)(() => {
12356      const newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;
12357      const ratioDiff = newRatio - (ratioState || 0);
12358      const isRatioDiffBigEnough = Math.abs(ratioDiff) > 0.1;
12359      if (isRatioDiffBigEnough || !ratioState) {
12360        setRatioState(newRatio);
12361      }
12362    }, [throttledWidth, ratioState]);
12363    const fallbackRatio = width ? width / normalizedWidth : 1;
12364    const ratio = ratioState ? ratioState : fallbackRatio;
12365    const isReady = !!width;
12366    return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
12367      /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { style: { position: "relative" }, children: containerResizeListener }),
12368      !isReady && // Match the preview aspect ratio so layout doesn't jump once width is measured.
12369      /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12370        Skeleton,
12371        {
12372          className: "global-styles-ui-preview__wrapper",
12373          style: {
12374            aspectRatio: normalizedWidth / normalizedHeight
12375          }
12376        }
12377      ),
12378      isReady && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12379        "div",
12380        {
12381          className: clsx_default("global-styles-ui-preview__wrapper", {
12382            "is-hoverable": withHoverView
12383          }),
12384          style: {
12385            height: normalizedHeight * ratio
12386          },
12387          onMouseEnter: () => setIsHovered(true),
12388          onMouseLeave: () => setIsHovered(false),
12389          tabIndex: -1,
12390          children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12391            import_components6.__unstableMotion.div,
12392            {
12393              style: {
12394                height: normalizedHeight * ratio,
12395                width: "100%",
12396                background: gradientValue ?? backgroundColor
12397              },
12398              initial: "start",
12399              animate: (isHovered || isFocused) && !disableMotion && label ? "hover" : "start",
12400              children: [].concat(children).map(
12401                (child, key) => child({ ratio, key })
12402              )
12403            }
12404          )
12405        }
12406      )
12407    ] });
12408  }
12409  var preview_wrapper_default = PreviewWrapper;
12410  
12411  // packages/global-styles-ui/build-module/preview-styles.mjs
12412  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
12413  var firstFrameVariants = {
12414    start: {
12415      scale: 1,
12416      opacity: 1
12417    },
12418    hover: {
12419      scale: 0,
12420      opacity: 0
12421    }
12422  };
12423  var midFrameVariants = {
12424    hover: {
12425      opacity: 1
12426    },
12427    start: {
12428      opacity: 0.5
12429    }
12430  };
12431  var secondFrameVariants = {
12432    hover: {
12433      scale: 1,
12434      opacity: 1
12435    },
12436    start: {
12437      scale: 0,
12438      opacity: 0
12439    }
12440  };
12441  function PreviewStyles({
12442    label,
12443    isFocused,
12444    withHoverView,
12445    variation
12446  }) {
12447    const [fontWeight] = useStyle("typography.fontWeight");
12448    const [fontFamily = "serif"] = useStyle(
12449      "typography.fontFamily"
12450    );
12451    const [headingFontFamily = fontFamily] = useStyle(
12452      "elements.h1.typography.fontFamily"
12453    );
12454    const [headingFontWeight = fontWeight] = useStyle(
12455      "elements.h1.typography.fontWeight"
12456    );
12457    const [textColor = "black"] = useStyle("color.text");
12458    const [headingColor = textColor] = useStyle(
12459      "elements.h1.color.text"
12460    );
12461    const { paletteColors } = useStylesPreviewColors();
12462    return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
12463      preview_wrapper_default,
12464      {
12465        label,
12466        isFocused,
12467        withHoverView,
12468        children: [
12469          ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12470            import_components7.__unstableMotion.div,
12471            {
12472              variants: firstFrameVariants,
12473              style: {
12474                height: "100%",
12475                overflow: "hidden"
12476              },
12477              children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
12478                import_components7.__experimentalHStack,
12479                {
12480                  spacing: 10 * ratio,
12481                  justify: "center",
12482                  style: {
12483                    height: "100%",
12484                    overflow: "hidden"
12485                  },
12486                  children: [
12487                    /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12488                      PreviewTypography,
12489                      {
12490                        fontSize: 65 * ratio,
12491                        variation
12492                      }
12493                    ),
12494                    /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components7.__experimentalVStack, { spacing: 4 * ratio, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12495                      HighlightedColors,
12496                      {
12497                        normalizedColorSwatchSize: 32,
12498                        ratio
12499                      }
12500                    ) })
12501                  ]
12502                }
12503              )
12504            },
12505            key
12506          ),
12507          ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12508            import_components7.__unstableMotion.div,
12509            {
12510              variants: withHoverView ? midFrameVariants : void 0,
12511              style: {
12512                height: "100%",
12513                width: "100%",
12514                position: "absolute",
12515                top: 0,
12516                overflow: "hidden",
12517                filter: "blur(60px)",
12518                opacity: 0.1
12519              },
12520              children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12521                import_components7.__experimentalHStack,
12522                {
12523                  spacing: 0,
12524                  justify: "flex-start",
12525                  style: {
12526                    height: "100%",
12527                    overflow: "hidden"
12528                  },
12529                  children: paletteColors.slice(0, 4).map(({ color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12530                    "div",
12531                    {
12532                      style: {
12533                        height: "100%",
12534                        background: color,
12535                        flexGrow: 1
12536                      }
12537                    },
12538                    index2
12539                  ))
12540                }
12541              )
12542            },
12543            key
12544          ),
12545          ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12546            import_components7.__unstableMotion.div,
12547            {
12548              variants: secondFrameVariants,
12549              style: {
12550                height: "100%",
12551                width: "100%",
12552                overflow: "hidden",
12553                position: "absolute",
12554                top: 0
12555              },
12556              children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12557                import_components7.__experimentalVStack,
12558                {
12559                  spacing: 3 * ratio,
12560                  justify: "center",
12561                  style: {
12562                    height: "100%",
12563                    overflow: "hidden",
12564                    padding: 10 * ratio,
12565                    boxSizing: "border-box"
12566                  },
12567                  children: label && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12568                    "div",
12569                    {
12570                      style: {
12571                        fontSize: 40 * ratio,
12572                        fontFamily: headingFontFamily,
12573                        color: headingColor,
12574                        fontWeight: headingFontWeight,
12575                        lineHeight: "1em",
12576                        textAlign: "center"
12577                      },
12578                      children: label
12579                    }
12580                  )
12581                }
12582              )
12583            },
12584            key
12585          )
12586        ]
12587      }
12588    );
12589  }
12590  var preview_styles_default = PreviewStyles;
12591  
12592  // packages/global-styles-ui/build-module/screen-root.mjs
12593  var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
12594  
12595  // packages/global-styles-ui/build-module/screen-block-list.mjs
12596  var import_blocks2 = __toESM(require_blocks(), 1);
12597  var import_i18n10 = __toESM(require_i18n(), 1);
12598  var import_components11 = __toESM(require_components(), 1);
12599  var import_data4 = __toESM(require_data(), 1);
12600  var import_element27 = __toESM(require_element(), 1);
12601  var import_block_editor3 = __toESM(require_block_editor(), 1);
12602  var import_compose2 = __toESM(require_compose(), 1);
12603  import { speak } from "@wordpress/a11y";
12604  
12605  // packages/global-styles-ui/build-module/variations/variations-panel.mjs
12606  var import_blocks = __toESM(require_blocks(), 1);
12607  var import_data3 = __toESM(require_data(), 1);
12608  var import_components9 = __toESM(require_components(), 1);
12609  var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
12610  function getFilteredBlockStyles(blockStyles, variations) {
12611    return blockStyles?.filter(
12612      (style) => style.source === "block" || variations.includes(style.name)
12613    ) || [];
12614  }
12615  function useBlockVariations(name2) {
12616    const blockStyles = (0, import_data3.useSelect)(
12617      (select) => {
12618        const { getBlockStyles } = select(import_blocks.store);
12619        return getBlockStyles(name2);
12620      },
12621      [name2]
12622    );
12623    const [variations] = useStyle("variations", name2);
12624    const variationNames = Object.keys(variations ?? {});
12625    return getFilteredBlockStyles(blockStyles, variationNames);
12626  }
12627  
12628  // packages/global-styles-ui/build-module/screen-header.mjs
12629  var import_components10 = __toESM(require_components(), 1);
12630  var import_i18n9 = __toESM(require_i18n(), 1);
12631  var import_block_editor2 = __toESM(require_block_editor(), 1);
12632  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
12633  var { StateControl, StateControlBadges } = unlock3(import_block_editor2.privateApis);
12634  
12635  // packages/global-styles-ui/build-module/screen-block-list.mjs
12636  var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
12637  var {
12638    useHasDimensionsPanel: useHasDimensionsPanel2,
12639    useHasTypographyPanel: useHasTypographyPanel2,
12640    useHasBorderPanel,
12641    useSettingsForBlockElement: useSettingsForBlockElement2,
12642    useHasColorPanel: useHasColorPanel2,
12643    useHasBackgroundPanel: useHasBackgroundPanel2,
12644    searchItems
12645  } = unlock3(import_block_editor3.privateApis);
12646  function hasAnyValue(value) {
12647    if (value === void 0 || value === null) {
12648      return false;
12649    }
12650    if (Array.isArray(value)) {
12651      return value.length > 0;
12652    }
12653    if (typeof value === "object") {
12654      return Object.values(value).some(hasAnyValue);
12655    }
12656    return true;
12657  }
12658  function hasUserStylesForBlock(user, blockName) {
12659    return hasAnyValue(user?.styles?.blocks?.[blockName]) || hasAnyValue(user?.settings?.blocks?.[blockName]);
12660  }
12661  function useSortedBlockTypes() {
12662    const blockItems = (0, import_data4.useSelect)(
12663      (select) => select(import_blocks2.store).getBlockTypes(),
12664      []
12665    );
12666    const groupByType = (blocks, block) => {
12667      const { core, noncore } = blocks;
12668      const type = block.name.startsWith("core/") ? core : noncore;
12669      type.push(block);
12670      return blocks;
12671    };
12672    const { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(
12673      groupByType,
12674      { core: [], noncore: [] }
12675    );
12676    return [...coreItems, ...nonCoreItems];
12677  }
12678  function useBlockHasGlobalStyles(blockName) {
12679    const [rawSettings] = useSetting("", blockName);
12680    const settings = useSettingsForBlockElement2(rawSettings, blockName);
12681    const hasTypographyPanel = useHasTypographyPanel2(settings);
12682    const hasColorPanel = useHasColorPanel2(settings);
12683    const hasBackgroundPanel = useHasBackgroundPanel2(settings);
12684    const hasBorderPanel = useHasBorderPanel(settings);
12685    const hasDimensionsPanel = useHasDimensionsPanel2(settings);
12686    const hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;
12687    const hasVariationsPanel = !!useBlockVariations(blockName)?.length;
12688    const hasGlobalStyles = hasTypographyPanel || hasColorPanel || hasBackgroundPanel || hasLayoutPanel || hasVariationsPanel;
12689    return hasGlobalStyles;
12690  }
12691  function BlockMenuItem({ block, isCustomized }) {
12692    const hasBlockMenuItem = useBlockHasGlobalStyles(block.name);
12693    if (!hasBlockMenuItem) {
12694      return null;
12695    }
12696    return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12697      NavigationButtonAsItem,
12698      {
12699        path: "/blocks/" + encodeURIComponent(block.name),
12700        children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_components11.__experimentalHStack, { justify: "flex-start", spacing: 2, children: [
12701          /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12702            import_block_editor3.BlockIcon,
12703            {
12704              className: "global-styles-ui-block-types-item__icon",
12705              icon: block.icon
12706            }
12707          ),
12708          /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components11.FlexItem, { children: block.title }),
12709          isCustomized && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
12710            /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(VisuallyHidden, { children: (0, import_i18n10.__)("Has custom styles") }),
12711            /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12712              "span",
12713              {
12714                "aria-hidden": "true",
12715                className: "global-styles-ui-block-types-item__indicator"
12716              }
12717            )
12718          ] })
12719        ] })
12720      }
12721    );
12722  }
12723  function EmptyBlockList({
12724    filterValue,
12725    styleFilter
12726  }) {
12727    const label = "customized" === styleFilter && !filterValue ? (0, import_i18n10.__)("You haven't customized any blocks yet.") : (0, import_i18n10.__)("No blocks found.");
12728    return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12729      import_components11.__experimentalText,
12730      {
12731        align: "center",
12732        as: "p",
12733        className: "global-styles-ui-block-types-item-list__no-results",
12734        children: label
12735      }
12736    );
12737  }
12738  function BlockList({ filterValue, styleFilter }) {
12739    const sortedBlockTypes = useSortedBlockTypes();
12740    const debouncedSpeak = (0, import_compose2.useDebounce)(speak, 500);
12741    const { user } = (0, import_element27.useContext)(GlobalStylesContext);
12742    const customizedBlockNames = (0, import_element27.useMemo)(() => {
12743      const names = /* @__PURE__ */ new Set();
12744      const blockNames = [
12745        ...Object.keys(user?.styles?.blocks ?? {}),
12746        ...Object.keys(user?.settings?.blocks ?? {})
12747      ];
12748      blockNames.forEach((blockName) => {
12749        if (hasUserStylesForBlock(user, blockName)) {
12750          names.add(blockName);
12751        }
12752      });
12753      return names;
12754    }, [user]);
12755    const searchedBlockTypes = searchItems(
12756      sortedBlockTypes,
12757      filterValue
12758    );
12759    const filteredBlockTypes = styleFilter === "customized" ? searchedBlockTypes.filter(
12760      (blockType) => customizedBlockNames.has(blockType.name)
12761    ) : searchedBlockTypes;
12762    const blockTypesListRef = (0, import_element27.useRef)(null);
12763    const hasResults = filteredBlockTypes.length > 0;
12764    (0, import_element27.useEffect)(() => {
12765      if (!filterValue && styleFilter === "all") {
12766        return;
12767      }
12768      const count = hasResults ? blockTypesListRef.current?.childElementCount || 0 : 0;
12769      const resultsFoundMessage = (0, import_i18n10.sprintf)(
12770        /* translators: %d: number of results. */
12771        (0, import_i18n10._n)("%d result found.", "%d results found.", count),
12772        count
12773      );
12774      debouncedSpeak(resultsFoundMessage, "polite");
12775    }, [filterValue, styleFilter, hasResults, debouncedSpeak]);
12776    return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12777      "div",
12778      {
12779        ref: blockTypesListRef,
12780        className: "global-styles-ui-block-types-item-list",
12781        role: "list",
12782        children: filteredBlockTypes.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12783          EmptyBlockList,
12784          {
12785            filterValue,
12786            styleFilter
12787          }
12788        ) : filteredBlockTypes.map((block) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12789          BlockMenuItem,
12790          {
12791            block,
12792            isCustomized: customizedBlockNames.has(block.name)
12793          },
12794          "menu-itemblock-" + block.name
12795        ))
12796      }
12797    );
12798  }
12799  var MemoizedBlockList = (0, import_element27.memo)(BlockList);
12800  
12801  // packages/global-styles-ui/build-module/screen-block.mjs
12802  var import_blocks4 = __toESM(require_blocks(), 1);
12803  var import_block_editor5 = __toESM(require_block_editor(), 1);
12804  var import_element29 = __toESM(require_element(), 1);
12805  var import_data5 = __toESM(require_data(), 1);
12806  var import_core_data3 = __toESM(require_core_data(), 1);
12807  var import_components14 = __toESM(require_components(), 1);
12808  var import_i18n11 = __toESM(require_i18n(), 1);
12809  
12810  // packages/global-styles-ui/build-module/block-preview-panel.mjs
12811  var import_block_editor4 = __toESM(require_block_editor(), 1);
12812  var import_blocks3 = __toESM(require_blocks(), 1);
12813  var import_components12 = __toESM(require_components(), 1);
12814  var import_element28 = __toESM(require_element(), 1);
12815  var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
12816  var { getViewportBreakpoints: getViewportBreakpoints3, getViewportBreakpointValueInPixels: getViewportBreakpointValueInPixels2 } = unlock3(
12817    privateApis
12818  );
12819  
12820  // packages/global-styles-ui/build-module/subtitle.mjs
12821  var import_components13 = __toESM(require_components(), 1);
12822  var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
12823  function Subtitle({ children, level = 2 }) {
12824    return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components13.__experimentalHeading, { className: "global-styles-ui-subtitle", level, children });
12825  }
12826  
12827  // packages/global-styles-ui/build-module/screen-block.mjs
12828  var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
12829  var {
12830    useHasDimensionsPanel: useHasDimensionsPanel3,
12831    useHasTypographyPanel: useHasTypographyPanel3,
12832    useHasBorderPanel: useHasBorderPanel2,
12833    useSettingsForBlockElement: useSettingsForBlockElement3,
12834    useHasColorPanel: useHasColorPanel3,
12835    useHasFiltersPanel,
12836    useHasImageSettingsPanel,
12837    useHasBackgroundPanel: useHasBackgroundPanel3,
12838    BackgroundPanel: StylesBackgroundPanel,
12839    BorderPanel: StylesBorderPanel,
12840    ColorPanel: StylesColorPanel,
12841    TypographyPanel: StylesTypographyPanel,
12842    DimensionsPanel: StylesDimensionsPanel,
12843    FiltersPanel: StylesFiltersPanel,
12844    ImageSettingsPanel,
12845    AdvancedPanel: StylesAdvancedPanel
12846  } = unlock3(import_block_editor5.privateApis);
12847  
12848  // packages/global-styles-ui/build-module/screen-typography.mjs
12849  var import_i18n26 = __toESM(require_i18n(), 1);
12850  var import_element41 = __toESM(require_element(), 1);
12851  
12852  // packages/global-styles-ui/build-module/screen-body.mjs
12853  var import_components15 = __toESM(require_components(), 1);
12854  var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
12855  
12856  // packages/global-styles-ui/build-module/typography-elements.mjs
12857  var import_i18n12 = __toESM(require_i18n(), 1);
12858  var import_components16 = __toESM(require_components(), 1);
12859  var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
12860  
12861  // packages/global-styles-ui/build-module/variations/variations-typography.mjs
12862  var import_components18 = __toESM(require_components(), 1);
12863  
12864  // packages/global-styles-ui/build-module/preview-typography.mjs
12865  var import_components17 = __toESM(require_components(), 1);
12866  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
12867  var StylesPreviewTypography = ({
12868    variation,
12869    isFocused,
12870    withHoverView
12871  }) => {
12872    return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12873      preview_wrapper_default,
12874      {
12875        label: variation.title,
12876        isFocused,
12877        withHoverView,
12878        children: ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12879          import_components17.__experimentalHStack,
12880          {
12881            spacing: 10 * ratio,
12882            justify: "center",
12883            style: {
12884              height: "100%",
12885              overflow: "hidden"
12886            },
12887            children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12888              PreviewTypography,
12889              {
12890                variation,
12891                fontSize: 85 * ratio
12892              }
12893            )
12894          },
12895          key
12896        )
12897      }
12898    );
12899  };
12900  var preview_typography_default = StylesPreviewTypography;
12901  
12902  // packages/global-styles-ui/build-module/variations/variation.mjs
12903  var import_element30 = __toESM(require_element(), 1);
12904  var import_keycodes = __toESM(require_keycodes(), 1);
12905  var import_i18n13 = __toESM(require_i18n(), 1);
12906  var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
12907  function Variation({
12908    variation,
12909    children,
12910    isPill = false,
12911    properties,
12912    showTooltip = false
12913  }) {
12914    const [isFocused, setIsFocused] = (0, import_element30.useState)(false);
12915    const {
12916      base,
12917      user,
12918      onChange: setUserConfig
12919    } = (0, import_element30.useContext)(GlobalStylesContext);
12920    const context = (0, import_element30.useMemo)(() => {
12921      let merged = mergeGlobalStyles(base, variation);
12922      if (properties) {
12923        merged = filterObjectByProperties(merged, properties);
12924      }
12925      return {
12926        user: variation,
12927        base,
12928        merged,
12929        onChange: () => {
12930        }
12931      };
12932    }, [variation, base, properties]);
12933    const selectVariation = () => setUserConfig(variation);
12934    const selectOnEnter = (event) => {
12935      if (event.keyCode === import_keycodes.ENTER) {
12936        event.preventDefault();
12937        selectVariation();
12938      }
12939    };
12940    const isActive = (0, import_element30.useMemo)(
12941      () => areGlobalStylesEqual(user, variation),
12942      [user, variation]
12943    );
12944    let label = variation?.title;
12945    if (variation?.description) {
12946      label = (0, import_i18n13.sprintf)(
12947        /* translators: 1: variation title. 2: variation description. */
12948        (0, import_i18n13._x)("%1$s (%2$s)", "variation label"),
12949        variation?.title,
12950        variation?.description
12951      );
12952    }
12953    const content = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
12954      "div",
12955      {
12956        className: clsx_default("global-styles-ui-variations_item", {
12957          "is-active": isActive
12958        }),
12959        role: "button",
12960        onClick: selectVariation,
12961        onKeyDown: selectOnEnter,
12962        tabIndex: 0,
12963        "aria-label": label,
12964        "aria-current": isActive,
12965        onFocus: () => setIsFocused(true),
12966        onBlur: () => setIsFocused(false),
12967        children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
12968          "div",
12969          {
12970            className: clsx_default("global-styles-ui-variations_item-preview", {
12971              "is-pill": isPill
12972            }),
12973            children: children(isFocused)
12974          }
12975        )
12976      }
12977    );
12978    return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(GlobalStylesContext.Provider, { value: context, children: showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(tooltip_exports.Root, { children: [
12979      /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(tooltip_exports.Trigger, { render: content }),
12980      /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(tooltip_exports.Popup, { children: variation?.title })
12981    ] }) : content });
12982  }
12983  
12984  // packages/global-styles-ui/build-module/variations/variations-typography.mjs
12985  var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
12986  var propertiesToFilter = ["typography"];
12987  function TypographyVariations({
12988    title,
12989    gap = 2
12990  }) {
12991    const typographyVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter);
12992    if (typographyVariations?.length <= 1) {
12993      return null;
12994    }
12995    return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_components18.__experimentalVStack, { spacing: 3, children: [
12996      title && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Subtitle, { level: 3, children: title }),
12997      /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12998        import_components18.__experimentalGrid,
12999        {
13000          columns: 3,
13001          gap,
13002          className: "global-styles-ui-style-variations-container",
13003          children: typographyVariations.map(
13004            (variation, index2) => {
13005              return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13006                Variation,
13007                {
13008                  variation,
13009                  properties: propertiesToFilter,
13010                  showTooltip: true,
13011                  children: () => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13012                    preview_typography_default,
13013                    {
13014                      variation
13015                    }
13016                  )
13017                },
13018                index2
13019              );
13020            }
13021          )
13022        }
13023      )
13024    ] });
13025  }
13026  
13027  // packages/global-styles-ui/build-module/font-families.mjs
13028  var import_i18n23 = __toESM(require_i18n(), 1);
13029  var import_components28 = __toESM(require_components(), 1);
13030  var import_element40 = __toESM(require_element(), 1);
13031  
13032  // packages/global-styles-ui/build-module/font-library/context.mjs
13033  var import_element31 = __toESM(require_element(), 1);
13034  var import_data6 = __toESM(require_data(), 1);
13035  var import_core_data5 = __toESM(require_core_data(), 1);
13036  var import_i18n15 = __toESM(require_i18n(), 1);
13037  
13038  // packages/global-styles-ui/build-module/font-library/api.mjs
13039  var import_api_fetch = __toESM(require_api_fetch(), 1);
13040  var import_core_data4 = __toESM(require_core_data(), 1);
13041  var FONT_FAMILIES_URL = "/wp/v2/font-families";
13042  function invalidateFontFamilyCache(registry) {
13043    const { receiveEntityRecords } = registry.dispatch(import_core_data4.store);
13044    receiveEntityRecords(
13045      "postType",
13046      "wp_font_family",
13047      [],
13048      void 0,
13049      true
13050      // invalidateCache
13051    );
13052  }
13053  async function fetchInstallFontFamily(data, registry) {
13054    const config = {
13055      path: FONT_FAMILIES_URL,
13056      method: "POST",
13057      body: data
13058    };
13059    const response = await (0, import_api_fetch.default)(config);
13060    invalidateFontFamilyCache(registry);
13061    return {
13062      id: response.id,
13063      ...response.font_family_settings,
13064      fontFace: []
13065    };
13066  }
13067  async function fetchInstallFontFace(fontFamilyId, data, registry) {
13068    const config = {
13069      path: `$FONT_FAMILIES_URL}/$fontFamilyId}/font-faces`,
13070      method: "POST",
13071      body: data
13072    };
13073    const response = await (0, import_api_fetch.default)(config);
13074    invalidateFontFamilyCache(registry);
13075    return {
13076      id: response.id,
13077      ...response.font_face_settings
13078    };
13079  }
13080  
13081  // node_modules/tslib/tslib.es6.mjs
13082  var __assign = function() {
13083    __assign = Object.assign || function __assign2(t) {
13084      for (var s, i = 1, n = arguments.length; i < n; i++) {
13085        s = arguments[i];
13086        for (var p3 in s) if (Object.prototype.hasOwnProperty.call(s, p3)) t[p3] = s[p3];
13087      }
13088      return t;
13089    };
13090    return __assign.apply(this, arguments);
13091  };
13092  
13093  // node_modules/lower-case/dist.es2015/index.js
13094  function lowerCase(str) {
13095    return str.toLowerCase();
13096  }
13097  
13098  // node_modules/no-case/dist.es2015/index.js
13099  var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
13100  var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
13101  function noCase(input, options) {
13102    if (options === void 0) {
13103      options = {};
13104    }
13105    var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
13106    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
13107    var start = 0;
13108    var end = result.length;
13109    while (result.charAt(start) === "\0")
13110      start++;
13111    while (result.charAt(end - 1) === "\0")
13112      end--;
13113    return result.slice(start, end).split("\0").map(transform).join(delimiter);
13114  }
13115  function replace(input, re, value) {
13116    if (re instanceof RegExp)
13117      return input.replace(re, value);
13118    return re.reduce(function(input2, re2) {
13119      return input2.replace(re2, value);
13120    }, input);
13121  }
13122  
13123  // node_modules/dot-case/dist.es2015/index.js
13124  function dotCase(input, options) {
13125    if (options === void 0) {
13126      options = {};
13127    }
13128    return noCase(input, __assign({ delimiter: "." }, options));
13129  }
13130  
13131  // node_modules/param-case/dist.es2015/index.js
13132  function paramCase(input, options) {
13133    if (options === void 0) {
13134      options = {};
13135    }
13136    return dotCase(input, __assign({ delimiter: "-" }, options));
13137  }
13138  
13139  // packages/kebab-case/build-module/index.mjs
13140  function kebabCase(str) {
13141    let input = str?.toString?.() ?? "";
13142    input = input.replace(/['\u2019]/, "");
13143    return paramCase(input, {
13144      splitRegexp: [
13145        /(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,
13146        // fooBar => foo-bar, 3Bar => 3-bar
13147        /(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,
13148        // 3bar => 3-bar
13149        /([A-Za-z])([0-9])/g,
13150        // Foo3 => foo-3, foo3 => foo-3
13151        /([A-Z])([A-Z][a-z])/g
13152        // FOOBar => foo-bar
13153      ]
13154    });
13155  }
13156  
13157  // packages/global-styles-ui/build-module/font-library/utils/constants.mjs
13158  var import_i18n14 = __toESM(require_i18n(), 1);
13159  var ALLOWED_FILE_EXTENSIONS = ["otf", "ttf", "woff", "woff2"];
13160  var FONT_WEIGHTS = {
13161    100: (0, import_i18n14._x)("Thin", "font weight"),
13162    200: (0, import_i18n14._x)("Extra-light", "font weight"),
13163    300: (0, import_i18n14._x)("Light", "font weight"),
13164    400: (0, import_i18n14._x)("Normal", "font weight"),
13165    500: (0, import_i18n14._x)("Medium", "font weight"),
13166    600: (0, import_i18n14._x)("Semi-bold", "font weight"),
13167    700: (0, import_i18n14._x)("Bold", "font weight"),
13168    800: (0, import_i18n14._x)("Extra-bold", "font weight"),
13169    900: (0, import_i18n14._x)("Black", "font weight")
13170  };
13171  var FONT_STYLES = {
13172    normal: (0, import_i18n14._x)("Normal", "font style"),
13173    italic: (0, import_i18n14._x)("Italic", "font style")
13174  };
13175  
13176  // packages/global-styles-ui/build-module/font-library/utils/index.mjs
13177  var { File } = window;
13178  function setUIValuesNeeded(font2, extraValues = {}) {
13179    if (!font2.name && (font2.fontFamily || font2.slug)) {
13180      font2.name = font2.fontFamily || font2.slug;
13181    }
13182    return {
13183      ...font2,
13184      ...extraValues
13185    };
13186  }
13187  function isUrlEncoded(url) {
13188    if (typeof url !== "string") {
13189      return false;
13190    }
13191    return url !== decodeURIComponent(url);
13192  }
13193  function getFontFaceVariantName(face) {
13194    const weightName = FONT_WEIGHTS[face.fontWeight ?? ""] || face.fontWeight;
13195    const styleName = face.fontStyle === "normal" ? "" : FONT_STYLES[face.fontStyle ?? ""] || face.fontStyle;
13196    return `$weightName} $styleName}`;
13197  }
13198  function mergeFontFaces(existing = [], incoming = []) {
13199    const map = /* @__PURE__ */ new Map();
13200    for (const face of existing) {
13201      map.set(`$face.fontWeight}$face.fontStyle}`, face);
13202    }
13203    for (const face of incoming) {
13204      map.set(`$face.fontWeight}$face.fontStyle}`, face);
13205    }
13206    return Array.from(map.values());
13207  }
13208  function mergeFontFamilies(existing = [], incoming = []) {
13209    const map = /* @__PURE__ */ new Map();
13210    for (const font2 of existing) {
13211      map.set(font2.slug, { ...font2 });
13212    }
13213    for (const font2 of incoming) {
13214      if (map.has(font2.slug)) {
13215        const { fontFace: incomingFontFaces, ...restIncoming } = font2;
13216        const existingFont = map.get(font2.slug);
13217        const mergedFontFaces = mergeFontFaces(
13218          existingFont.fontFace,
13219          incomingFontFaces
13220        );
13221        map.set(font2.slug, {
13222          ...restIncoming,
13223          fontFace: mergedFontFaces
13224        });
13225      } else {
13226        map.set(font2.slug, { ...font2 });
13227      }
13228    }
13229    return Array.from(map.values());
13230  }
13231  async function loadFontFaceInBrowser(fontFace, source, addTo = "all") {
13232    let dataSource;
13233    if (typeof source === "string") {
13234      dataSource = `url($source})`;
13235    } else if (source instanceof File) {
13236      dataSource = await source.arrayBuffer();
13237    } else {
13238      return;
13239    }
13240    const newFont = new window.FontFace(
13241      formatFontFaceName(fontFace.fontFamily),
13242      dataSource,
13243      {
13244        style: fontFace.fontStyle,
13245        weight: String(fontFace.fontWeight)
13246      }
13247    );
13248    const loadedFace = await newFont.load();
13249    if (addTo === "document" || addTo === "all") {
13250      document.fonts.add(loadedFace);
13251    }
13252    if (addTo === "iframe" || addTo === "all") {
13253      const iframe = document.querySelector(
13254        'iframe[name="editor-canvas"]'
13255      );
13256      if (iframe?.contentDocument) {
13257        iframe.contentDocument.fonts.add(loadedFace);
13258      }
13259    }
13260  }
13261  function unloadFontFaceInBrowser(fontFace, removeFrom = "all") {
13262    const unloadFontFace = (fonts) => {
13263      fonts.forEach((f) => {
13264        if (f.family === formatFontFaceName(fontFace?.fontFamily) && f.weight === fontFace?.fontWeight && f.style === fontFace?.fontStyle) {
13265          fonts.delete(f);
13266        }
13267      });
13268    };
13269    if (removeFrom === "document" || removeFrom === "all") {
13270      unloadFontFace(document.fonts);
13271    }
13272    if (removeFrom === "iframe" || removeFrom === "all") {
13273      const iframe = document.querySelector(
13274        'iframe[name="editor-canvas"]'
13275      );
13276      if (iframe?.contentDocument) {
13277        unloadFontFace(iframe.contentDocument.fonts);
13278      }
13279    }
13280  }
13281  function getDisplaySrcFromFontFace(input) {
13282    if (!input) {
13283      return;
13284    }
13285    let src;
13286    if (Array.isArray(input)) {
13287      src = input[0];
13288    } else {
13289      src = input;
13290    }
13291    if (src.startsWith("file:.")) {
13292      return;
13293    }
13294    if (!isUrlEncoded(src)) {
13295      src = encodeURI(src);
13296    }
13297    return src;
13298  }
13299  function makeFontFamilyFormData(fontFamily) {
13300    const formData = new FormData();
13301    const { fontFace, category, ...familyWithValidParameters } = fontFamily;
13302    const fontFamilySettings = {
13303      ...familyWithValidParameters,
13304      slug: kebabCase(fontFamily.slug)
13305    };
13306    formData.append(
13307      "font_family_settings",
13308      JSON.stringify(fontFamilySettings)
13309    );
13310    return formData;
13311  }
13312  function makeFontFacesFormData(font2) {
13313    const fontFacesFormData = (font2?.fontFace ?? []).map(
13314      (item, faceIndex) => {
13315        const face = { ...item };
13316        const formData = new FormData();
13317        if (face.file) {
13318          const files = Array.isArray(face.file) ? face.file : [face.file];
13319          const src = [];
13320          files.forEach((file, key) => {
13321            const fileId = `file-$faceIndex}-$key}`;
13322            formData.append(fileId, file, file.name);
13323            src.push(fileId);
13324          });
13325          face.src = src.length === 1 ? src[0] : src;
13326          delete face.file;
13327          formData.append("font_face_settings", JSON.stringify(face));
13328        } else {
13329          formData.append("font_face_settings", JSON.stringify(face));
13330        }
13331        return formData;
13332      }
13333    );
13334    return fontFacesFormData;
13335  }
13336  async function batchInstallFontFaces(fontFamilyId, fontFacesData, registry) {
13337    const responses = [];
13338    for (const faceData of fontFacesData) {
13339      try {
13340        const response = await fetchInstallFontFace(
13341          fontFamilyId,
13342          faceData,
13343          registry
13344        );
13345        responses.push({ status: "fulfilled", value: response });
13346      } catch (error) {
13347        responses.push({ status: "rejected", reason: error });
13348      }
13349    }
13350    const results = {
13351      errors: [],
13352      successes: []
13353    };
13354    responses.forEach((result, index2) => {
13355      if (result.status === "fulfilled" && result.value) {
13356        const response = result.value;
13357        results.successes.push(response);
13358      } else if (result.reason) {
13359        results.errors.push({
13360          data: fontFacesData[index2],
13361          message: result.reason.message
13362        });
13363      }
13364    });
13365    return results;
13366  }
13367  async function downloadFontFaceAssets(src) {
13368    src = Array.isArray(src) ? src : [src];
13369    const files = await Promise.all(
13370      src.map(async (url) => {
13371        return fetch(new Request(url)).then((response) => {
13372          if (!response.ok) {
13373            throw new Error(
13374              `Error downloading font face asset from $url}. Server responded with status: $response.status}`
13375            );
13376          }
13377          return response.blob();
13378        }).then((blob) => {
13379          const filename = url.split("/").pop();
13380          const file = new File([blob], filename, {
13381            type: blob.type
13382          });
13383          return file;
13384        });
13385      })
13386    );
13387    return files.length === 1 ? files[0] : files;
13388  }
13389  function checkFontFaceInstalled(fontFace, collection) {
13390    return -1 !== collection.findIndex((collectionFontFace) => {
13391      return collectionFontFace.fontWeight === fontFace.fontWeight && collectionFontFace.fontStyle === fontFace.fontStyle;
13392    });
13393  }
13394  
13395  // packages/global-styles-ui/build-module/font-library/utils/set-immutably.mjs
13396  function setImmutably2(object, path, value) {
13397    path = Array.isArray(path) ? [...path] : [path];
13398    object = Array.isArray(object) ? [...object] : { ...object };
13399    const leaf = path.pop();
13400    let prev = object;
13401    for (const key of path) {
13402      const lvl = prev[key];
13403      prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl };
13404    }
13405    prev[leaf] = value;
13406    return object;
13407  }
13408  
13409  // packages/global-styles-ui/build-module/font-library/utils/toggleFont.mjs
13410  function toggleFont(font2, face, initialfonts = []) {
13411    const isFontActivated = (f) => f.slug === font2.slug;
13412    const getActivatedFont = (fonts) => fonts.find(isFontActivated);
13413    const toggleEntireFontFamily = (activatedFont2) => {
13414      if (!activatedFont2) {
13415        return [...initialfonts, font2];
13416      }
13417      return initialfonts.filter(
13418        (f) => !isFontActivated(f)
13419      );
13420    };
13421    const toggleFontVariant = (activatedFont2) => {
13422      const isFaceActivated = (f) => f.fontWeight === face.fontWeight && f.fontStyle === face.fontStyle;
13423      if (!activatedFont2) {
13424        return [...initialfonts, { ...font2, fontFace: [face] }];
13425      }
13426      let newFontFaces = activatedFont2.fontFace || [];
13427      if (newFontFaces.find(isFaceActivated)) {
13428        newFontFaces = newFontFaces.filter(
13429          (f) => !isFaceActivated(f)
13430        );
13431      } else {
13432        newFontFaces = [...newFontFaces, face];
13433      }
13434      if (newFontFaces.length === 0) {
13435        return initialfonts.filter(
13436          (f) => !isFontActivated(f)
13437        );
13438      }
13439      return initialfonts.map(
13440        (f) => isFontActivated(f) ? { ...f, fontFace: newFontFaces } : f
13441      );
13442    };
13443    const activatedFont = getActivatedFont(initialfonts);
13444    if (!face) {
13445      return toggleEntireFontFamily(activatedFont);
13446    }
13447    return toggleFontVariant(activatedFont);
13448  }
13449  
13450  // packages/global-styles-ui/build-module/font-library/context.mjs
13451  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
13452  var FontLibraryContext = (0, import_element31.createContext)(
13453    {}
13454  );
13455  FontLibraryContext.displayName = "FontLibraryContext";
13456  function FontLibraryProvider({ children }) {
13457    const registry = (0, import_data6.useRegistry)();
13458    const { saveEntityRecord, deleteEntityRecord } = (0, import_data6.useDispatch)(import_core_data5.store);
13459    const { globalStylesId } = (0, import_data6.useSelect)((select) => {
13460      const { __experimentalGetCurrentGlobalStylesId } = select(import_core_data5.store);
13461      return { globalStylesId: __experimentalGetCurrentGlobalStylesId() };
13462    }, []);
13463    const globalStyles = (0, import_core_data5.useEntityRecord)(
13464      "root",
13465      "globalStyles",
13466      globalStylesId ?? 0,
13467      { enabled: globalStylesId !== void 0 }
13468    );
13469    const [isInstalling, setIsInstalling] = (0, import_element31.useState)(false);
13470    const { records: libraryPosts = [], isResolving: isResolvingLibrary } = (0, import_core_data5.useEntityRecords)(
13471      "postType",
13472      "wp_font_family",
13473      {
13474        _embed: true
13475      }
13476    );
13477    const libraryFonts = (libraryPosts || []).map((fontFamilyPost) => {
13478      return {
13479        id: fontFamilyPost.id,
13480        ...fontFamilyPost.font_family_settings || {},
13481        fontFace: fontFamilyPost?._embedded?.font_faces?.map(
13482          (face) => face.font_face_settings
13483        ) || []
13484      };
13485    }) || [];
13486    const [fontFamilies, setFontFamilies] = useSetting("typography.fontFamilies");
13487    const saveFontFamilies = async (fonts) => {
13488      if (!globalStyles.record) {
13489        return;
13490      }
13491      const updatedGlobalStyles = globalStyles.record;
13492      const finalGlobalStyles = setImmutably2(
13493        updatedGlobalStyles ?? {},
13494        ["settings", "typography", "fontFamilies"],
13495        fonts
13496      );
13497      await saveEntityRecord("root", "globalStyles", finalGlobalStyles);
13498    };
13499    const [modalTabOpen, setModalTabOpen] = (0, import_element31.useState)("");
13500    const [libraryFontSelected, setLibraryFontSelected] = (0, import_element31.useState)(void 0);
13501    const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map((f) => setUIValuesNeeded(f, { source: "theme" })).sort((a, b) => a.name.localeCompare(b.name)) : [];
13502    const customFonts = fontFamilies?.custom ? fontFamilies.custom.map((f) => setUIValuesNeeded(f, { source: "custom" })).sort((a, b) => a.name.localeCompare(b.name)) : [];
13503    const baseCustomFonts = libraryFonts ? libraryFonts.map((f) => setUIValuesNeeded(f, { source: "custom" })).sort((a, b) => a.name.localeCompare(b.name)) : [];
13504    (0, import_element31.useEffect)(() => {
13505      if (!modalTabOpen) {
13506        setLibraryFontSelected(void 0);
13507      }
13508    }, [modalTabOpen]);
13509    const handleSetLibraryFontSelected = (font2) => {
13510      if (!font2) {
13511        setLibraryFontSelected(void 0);
13512        return;
13513      }
13514      const fonts = font2.source === "theme" ? themeFonts : baseCustomFonts;
13515      const fontSelected = fonts.find((f) => f.slug === font2.slug);
13516      setLibraryFontSelected({
13517        ...fontSelected || font2,
13518        source: font2.source
13519      });
13520    };
13521    const [loadedFontUrls] = (0, import_element31.useState)(/* @__PURE__ */ new Set());
13522    const getAvailableFontsOutline = (availableFontFamilies) => {
13523      const outline = availableFontFamilies.reduce(
13524        (acc, font2) => {
13525          const availableFontFaces = font2?.fontFace && font2.fontFace?.length > 0 ? font2?.fontFace.map(
13526            (face) => `$face.fontStyle ?? ""}$face.fontWeight ?? ""}`
13527          ) : ["normal400"];
13528          acc[font2.slug] = availableFontFaces;
13529          return acc;
13530        },
13531        {}
13532      );
13533      return outline;
13534    };
13535    const getActivatedFontsOutline = (source) => {
13536      switch (source) {
13537        case "theme":
13538          return getAvailableFontsOutline(themeFonts);
13539        case "custom":
13540        default:
13541          return getAvailableFontsOutline(customFonts);
13542      }
13543    };
13544    const isFontActivated = (slug, style, weight, source) => {
13545      if (!style && !weight) {
13546        return !!getActivatedFontsOutline(source)[slug];
13547      }
13548      return !!getActivatedFontsOutline(source)[slug]?.includes(
13549        (style ?? "") + (weight ?? "")
13550      );
13551    };
13552    const getFontFacesActivated = (slug, source) => {
13553      return getActivatedFontsOutline(source)[slug] || [];
13554    };
13555    async function installFonts(fontFamiliesToInstall) {
13556      setIsInstalling(true);
13557      try {
13558        const fontFamiliesToActivate = [];
13559        let installationErrors = [];
13560        for (const fontFamilyToInstall of fontFamiliesToInstall) {
13561          let isANewFontFamily = false;
13562          const fontFamilyRecords = await (0, import_data6.resolveSelect)(
13563            import_core_data5.store
13564          ).getEntityRecords(
13565            "postType",
13566            "wp_font_family",
13567            {
13568              slug: fontFamilyToInstall.slug,
13569              per_page: 1,
13570              _embed: true
13571            }
13572          );
13573          const fontFamilyPost = fontFamilyRecords && fontFamilyRecords.length > 0 ? fontFamilyRecords[0] : null;
13574          let installedFontFamily = fontFamilyPost ? {
13575            id: fontFamilyPost.id,
13576            ...fontFamilyPost.font_family_settings,
13577            fontFace: (fontFamilyPost?._embedded?.font_faces ?? []).map(
13578              (face) => face.font_face_settings
13579            ) || []
13580          } : null;
13581          if (!installedFontFamily) {
13582            isANewFontFamily = true;
13583            installedFontFamily = await fetchInstallFontFamily(
13584              makeFontFamilyFormData(fontFamilyToInstall),
13585              registry
13586            );
13587          }
13588          const alreadyInstalledFontFaces = installedFontFamily.fontFace && fontFamilyToInstall.fontFace ? installedFontFamily.fontFace.filter(
13589            (fontFaceToInstall) => fontFaceToInstall && fontFamilyToInstall.fontFace && checkFontFaceInstalled(
13590              fontFaceToInstall,
13591              fontFamilyToInstall.fontFace
13592            )
13593          ) : [];
13594          if (installedFontFamily.fontFace && fontFamilyToInstall.fontFace) {
13595            fontFamilyToInstall.fontFace = fontFamilyToInstall.fontFace.filter(
13596              (fontFaceToInstall) => !checkFontFaceInstalled(
13597                fontFaceToInstall,
13598                installedFontFamily.fontFace
13599              )
13600            );
13601          }
13602          let successfullyInstalledFontFaces = [];
13603          let unsuccessfullyInstalledFontFaces = [];
13604          if (fontFamilyToInstall?.fontFace?.length ?? 0 > 0) {
13605            const response = await batchInstallFontFaces(
13606              // @ts-expect-error - Type mismatch: WpFontFamily.id can be number | string, but batchInstallFontFaces expects only string.
13607              installedFontFamily.id,
13608              makeFontFacesFormData(
13609                fontFamilyToInstall
13610              ),
13611              registry
13612            );
13613            successfullyInstalledFontFaces = response?.successes;
13614            unsuccessfullyInstalledFontFaces = response?.errors;
13615          }
13616          if (successfullyInstalledFontFaces?.length > 0 || alreadyInstalledFontFaces?.length > 0) {
13617            installedFontFamily.fontFace = [
13618              ...successfullyInstalledFontFaces
13619            ];
13620            fontFamiliesToActivate.push(installedFontFamily);
13621          }
13622          if (installedFontFamily && !fontFamilyToInstall?.fontFace?.length) {
13623            fontFamiliesToActivate.push(installedFontFamily);
13624          }
13625          if (isANewFontFamily && (fontFamilyToInstall?.fontFace?.length ?? 0) > 0 && successfullyInstalledFontFaces?.length === 0) {
13626            await deleteEntityRecord(
13627              "postType",
13628              "wp_font_family",
13629              installedFontFamily.id,
13630              { force: true }
13631            );
13632          }
13633          installationErrors = installationErrors.concat(
13634            unsuccessfullyInstalledFontFaces
13635          );
13636        }
13637        const installationErrorMessages = installationErrors.reduce(
13638          (unique, item) => unique.includes(item.message) ? unique : [...unique, item.message],
13639          []
13640        );
13641        if (fontFamiliesToActivate.length > 0) {
13642          const activeFonts = activateCustomFontFamilies(
13643            // @ts-expect-error - Type mismatch: items may have id as number | string, but FontFamily.id should be string | undefined.
13644            fontFamiliesToActivate
13645          );
13646          await saveFontFamilies(activeFonts);
13647        }
13648        if (installationErrorMessages.length > 0) {
13649          const installError = new Error((0, import_i18n15.__)("There was an error installing fonts."));
13650          installError.installationErrors = installationErrorMessages;
13651          throw installError;
13652        }
13653      } finally {
13654        setIsInstalling(false);
13655      }
13656    }
13657    async function uninstallFontFamily(fontFamilyToUninstall) {
13658      if (!fontFamilyToUninstall?.id) {
13659        throw new Error((0, import_i18n15.__)("Font family to uninstall is not defined."));
13660      }
13661      try {
13662        await deleteEntityRecord(
13663          "postType",
13664          "wp_font_family",
13665          fontFamilyToUninstall.id,
13666          { force: true }
13667        );
13668        const activeFonts = deactivateFontFamily(fontFamilyToUninstall);
13669        await saveFontFamilies(activeFonts);
13670        return { deleted: true };
13671      } catch (error) {
13672        console.error(
13673          `There was an error uninstalling the font family:`,
13674          error
13675        );
13676        throw error;
13677      }
13678    }
13679    const deactivateFontFamily = (font2) => {
13680      const initialCustomFonts = fontFamilies?.[font2.source ?? ""] ?? [];
13681      const newCustomFonts = initialCustomFonts.filter(
13682        (f) => f.slug !== font2.slug
13683      );
13684      const activeFonts = {
13685        ...fontFamilies,
13686        [font2.source ?? ""]: newCustomFonts
13687      };
13688      setFontFamilies(activeFonts);
13689      if (font2.fontFace) {
13690        font2.fontFace.forEach((face) => {
13691          unloadFontFaceInBrowser(face, "all");
13692        });
13693      }
13694      return activeFonts;
13695    };
13696    const activateCustomFontFamilies = (fontsToAdd) => {
13697      const fontsToActivate = cleanFontsForSave(fontsToAdd);
13698      const activeFonts = {
13699        ...fontFamilies,
13700        // Merge the existing custom fonts with the new fonts.
13701        custom: mergeFontFamilies(fontFamilies?.custom, fontsToActivate)
13702      };
13703      setFontFamilies(activeFonts);
13704      loadFontsInBrowser(fontsToActivate);
13705      return activeFonts;
13706    };
13707    const cleanFontsForSave = (fonts) => {
13708      return fonts.map(({ id: _familyDbId, fontFace, ...font2 }) => ({
13709        ...font2,
13710        ...fontFace && fontFace.length > 0 ? {
13711          fontFace: fontFace.map(
13712            ({ id: _faceDbId, ...face }) => face
13713          )
13714        } : {}
13715      }));
13716    };
13717    const loadFontsInBrowser = (fonts) => {
13718      fonts.forEach((font2) => {
13719        if (font2.fontFace) {
13720          font2.fontFace.forEach((face) => {
13721            const displaySrc = getDisplaySrcFromFontFace(
13722              face?.src ?? ""
13723            );
13724            if (displaySrc) {
13725              loadFontFaceInBrowser(face, displaySrc, "all");
13726            }
13727          });
13728        }
13729      });
13730    };
13731    const toggleActivateFont = (font2, face) => {
13732      const initialFonts = fontFamilies?.[font2.source ?? ""] ?? [];
13733      const newFonts = toggleFont(font2, face, initialFonts);
13734      setFontFamilies({
13735        ...fontFamilies,
13736        [font2.source ?? ""]: newFonts
13737      });
13738      const isFaceActivated = isFontActivated(
13739        font2.slug,
13740        face?.fontStyle ?? "",
13741        face?.fontWeight ?? "",
13742        font2.source ?? "custom"
13743      );
13744      if (face && isFaceActivated) {
13745        unloadFontFaceInBrowser(face, "all");
13746      } else {
13747        const displaySrc = getDisplaySrcFromFontFace(face?.src ?? "");
13748        if (face && displaySrc) {
13749          loadFontFaceInBrowser(face, displaySrc, "all");
13750        }
13751      }
13752    };
13753    const loadFontFaceAsset = async (fontFace) => {
13754      if (!fontFace.src) {
13755        return;
13756      }
13757      const src = getDisplaySrcFromFontFace(fontFace.src);
13758      if (!src || loadedFontUrls.has(src)) {
13759        return;
13760      }
13761      loadFontFaceInBrowser(fontFace, src, "document");
13762      loadedFontUrls.add(src);
13763    };
13764    return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
13765      FontLibraryContext.Provider,
13766      {
13767        value: {
13768          libraryFontSelected,
13769          handleSetLibraryFontSelected,
13770          fontFamilies: fontFamilies ?? {},
13771          baseCustomFonts,
13772          isFontActivated,
13773          getFontFacesActivated,
13774          loadFontFaceAsset,
13775          installFonts,
13776          uninstallFontFamily,
13777          toggleActivateFont,
13778          getAvailableFontsOutline,
13779          modalTabOpen,
13780          setModalTabOpen,
13781          saveFontFamilies,
13782          isResolvingLibrary,
13783          isInstalling
13784        },
13785        children
13786      }
13787    );
13788  }
13789  var context_default = FontLibraryProvider;
13790  
13791  // packages/global-styles-ui/build-module/font-library/modal.mjs
13792  var import_i18n21 = __toESM(require_i18n(), 1);
13793  var import_components26 = __toESM(require_components(), 1);
13794  var import_core_data8 = __toESM(require_core_data(), 1);
13795  var import_data8 = __toESM(require_data(), 1);
13796  
13797  // packages/global-styles-ui/build-module/font-library/installed-fonts.mjs
13798  var import_components21 = __toESM(require_components(), 1);
13799  var import_core_data6 = __toESM(require_core_data(), 1);
13800  var import_data7 = __toESM(require_data(), 1);
13801  var import_element35 = __toESM(require_element(), 1);
13802  var import_i18n17 = __toESM(require_i18n(), 1);
13803  
13804  // packages/global-styles-ui/build-module/font-library/font-card.mjs
13805  var import_i18n16 = __toESM(require_i18n(), 1);
13806  var import_element33 = __toESM(require_element(), 1);
13807  var import_components19 = __toESM(require_components(), 1);
13808  
13809  // packages/global-styles-ui/build-module/font-library/font-demo.mjs
13810  var import_element32 = __toESM(require_element(), 1);
13811  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
13812  var loadedPreviews = /* @__PURE__ */ new Set();
13813  function getPreviewUrl(fontFace) {
13814    if (fontFace.preview) {
13815      return fontFace.preview;
13816    }
13817    if (fontFace.src) {
13818      return Array.isArray(fontFace.src) ? fontFace.src[0] : fontFace.src;
13819    }
13820    return void 0;
13821  }
13822  function getDisplayFontFace(font2) {
13823    if ("fontStyle" in font2 && font2.fontStyle || "fontWeight" in font2 && font2.fontWeight) {
13824      return font2;
13825    }
13826    if ("fontFace" in font2 && font2.fontFace && font2.fontFace.length) {
13827      return font2.fontFace.find(
13828        (face) => face.fontStyle === "normal" && face.fontWeight === "400"
13829      ) || font2.fontFace[0];
13830    }
13831    return {
13832      fontStyle: "normal",
13833      fontWeight: "400",
13834      fontFamily: font2.fontFamily
13835    };
13836  }
13837  function FontDemo({ font: font2, text }) {
13838    const ref = (0, import_element32.useRef)(null);
13839    const fontFace = getDisplayFontFace(font2);
13840    const style = getFamilyPreviewStyle(font2);
13841    text = text || ("name" in font2 ? font2.name : "");
13842    const customPreviewUrl = font2.preview;
13843    const previewUrl = customPreviewUrl ?? getPreviewUrl(fontFace);
13844    const isPreviewImage = Boolean(
13845      previewUrl && /\.(png|jpg|jpeg|gif|svg)$/i.test(previewUrl)
13846    );
13847    const [isIntersecting, setIsIntersecting] = (0, import_element32.useState)(false);
13848    const [isFontLoaded, setIsFontLoaded] = (0, import_element32.useState)(false);
13849    const [resolvedUrl, setResolvedUrl] = (0, import_element32.useState)();
13850    const { loadFontFaceAsset } = (0, import_element32.useContext)(FontLibraryContext);
13851    const isAssetLoaded = isPreviewImage ? !!previewUrl && (loadedPreviews.has(previewUrl) || resolvedUrl === previewUrl) : isFontLoaded;
13852    const estimatedImageWidth = Math.min(
13853      Math.max(text.length * 12, 48),
13854      300
13855    );
13856    const faceStyles = getFacePreviewStyle(fontFace);
13857    const textDemoStyle = {
13858      fontSize: "18px",
13859      lineHeight: 1,
13860      opacity: isAssetLoaded ? "1" : "0",
13861      ...style,
13862      ...faceStyles
13863    };
13864    (0, import_element32.useEffect)(() => {
13865      if (isPreviewImage) {
13866        return;
13867      }
13868      const observer = new window.IntersectionObserver(([entry]) => {
13869        setIsIntersecting(entry.isIntersecting);
13870      }, {});
13871      if (ref.current) {
13872        observer.observe(ref.current);
13873      }
13874      return () => observer.disconnect();
13875    }, [isPreviewImage]);
13876    (0, import_element32.useEffect)(() => {
13877      const loadAsset = async () => {
13878        if (isIntersecting && !isPreviewImage) {
13879          if (fontFace.src) {
13880            await loadFontFaceAsset(fontFace);
13881          }
13882          setIsFontLoaded(true);
13883        }
13884      };
13885      loadAsset();
13886    }, [fontFace, isIntersecting, loadFontFaceAsset, isPreviewImage]);
13887    return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ref, className: "font-library__font-demo", children: isPreviewImage ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
13888      !isAssetLoaded && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13889        Skeleton,
13890        {
13891          className: "font-library__font-variant-demo-skeleton",
13892          style: { width: estimatedImageWidth }
13893        }
13894      ),
13895      /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13896        "img",
13897        {
13898          src: previewUrl,
13899          loading: "lazy",
13900          alt: text,
13901          onLoad: () => {
13902            if (previewUrl) {
13903              loadedPreviews.add(previewUrl);
13904            }
13905            setResolvedUrl(previewUrl);
13906          },
13907          onError: () => setResolvedUrl(previewUrl),
13908          className: clsx_default(
13909            "font-library__font-variant_demo-image",
13910            { "is-loading": !isAssetLoaded }
13911          )
13912        }
13913      )
13914    ] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13915      "span",
13916      {
13917        style: textDemoStyle,
13918        className: "font-library__font-variant_demo-text",
13919        children: text
13920      }
13921    ) });
13922  }
13923  var font_demo_default = FontDemo;
13924  
13925  // packages/global-styles-ui/build-module/font-library/font-card.mjs
13926  var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
13927  function FontCard({
13928    font: font2,
13929    onClick,
13930    variantsText,
13931    navigatorPath,
13932    shouldFocus
13933  }) {
13934    const variantsCount = font2.fontFace?.length || 1;
13935    const style = {
13936      cursor: !!onClick ? "pointer" : "default"
13937    };
13938    const navigator2 = (0, import_components19.useNavigator)();
13939    const ref = (0, import_element33.useRef)(null);
13940    (0, import_element33.useEffect)(() => {
13941      if (shouldFocus) {
13942        ref.current?.focus();
13943      }
13944    }, [shouldFocus]);
13945    return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13946      import_components19.Button,
13947      {
13948        ref,
13949        __next40pxDefaultSize: true,
13950        onClick: () => {
13951          onClick();
13952          if (navigatorPath) {
13953            navigator2.goTo(navigatorPath);
13954          }
13955        },
13956        style,
13957        className: "font-library__font-card",
13958        children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_components19.Flex, { justify: "space-between", wrap: false, children: [
13959          /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(font_demo_default, { font: font2 }),
13960          /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_components19.Flex, { justify: "flex-end", children: [
13961            /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components19.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components19.__experimentalText, { className: "font-library__font-card__count", children: variantsText || (0, import_i18n16.sprintf)(
13962              /* translators: %d: Number of font variants. */
13963              (0, import_i18n16._n)(
13964                "%d variant",
13965                "%d variants",
13966                variantsCount
13967              ),
13968              variantsCount
13969            ) }) }),
13970            /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components19.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(icon_default, { icon: (0, import_i18n16.isRTL)() ? chevron_left_default : chevron_right_default }) })
13971          ] })
13972        ] })
13973      }
13974    );
13975  }
13976  var font_card_default = FontCard;
13977  
13978  // packages/global-styles-ui/build-module/font-library/library-font-variant.mjs
13979  var import_element34 = __toESM(require_element(), 1);
13980  var import_components20 = __toESM(require_components(), 1);
13981  var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
13982  function LibraryFontVariant({
13983    face,
13984    font: font2
13985  }) {
13986    const { isFontActivated, toggleActivateFont } = (0, import_element34.useContext)(FontLibraryContext);
13987    const isInstalled = (font2?.fontFace?.length ?? 0) > 0 ? isFontActivated(
13988      font2.slug,
13989      face.fontStyle,
13990      face.fontWeight,
13991      font2.source
13992    ) : isFontActivated(font2.slug, void 0, void 0, font2.source);
13993    const handleToggleActivation = () => {
13994      if ((font2?.fontFace?.length ?? 0) > 0) {
13995        toggleActivateFont(font2, face);
13996        return;
13997      }
13998      toggleActivateFont(font2);
13999    };
14000    const displayName = font2.name + " " + getFontFaceVariantName(face);
14001    const checkboxId = (0, import_element34.useId)();
14002    return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "font-library__font-card", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_components20.Flex, { justify: "flex-start", align: "center", gap: "1rem", children: [
14003      /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
14004        import_components20.CheckboxControl,
14005        {
14006          checked: isInstalled,
14007          onChange: handleToggleActivation,
14008          id: checkboxId
14009        }
14010      ),
14011      /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("label", { htmlFor: checkboxId, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
14012        font_demo_default,
14013        {
14014          font: face,
14015          text: displayName,
14016          onClick: handleToggleActivation
14017        }
14018      ) })
14019    ] }) });
14020  }
14021  var library_font_variant_default = LibraryFontVariant;
14022  
14023  // packages/global-styles-ui/build-module/font-library/utils/sort-font-faces.mjs
14024  function getNumericFontWeight(value) {
14025    switch (value) {
14026      case "normal":
14027        return 400;
14028      case "bold":
14029        return 700;
14030      case "bolder":
14031        return 500;
14032      case "lighter":
14033        return 300;
14034      default:
14035        return parseInt(value, 10);
14036    }
14037  }
14038  function sortFontFaces(faces) {
14039    return faces.sort((a, b) => {
14040      if (a.fontStyle === "normal" && b.fontStyle !== "normal") {
14041        return -1;
14042      }
14043      if (b.fontStyle === "normal" && a.fontStyle !== "normal") {
14044        return 1;
14045      }
14046      if (a.fontStyle === b.fontStyle) {
14047        return getNumericFontWeight(a.fontWeight?.toString() ?? "normal") - getNumericFontWeight(b.fontWeight?.toString() ?? "normal");
14048      }
14049      if (!a.fontStyle || !b.fontStyle) {
14050        return !a.fontStyle ? 1 : -1;
14051      }
14052      return a.fontStyle.localeCompare(b.fontStyle);
14053    });
14054  }
14055  
14056  // packages/global-styles-ui/build-module/font-library/installed-fonts.mjs
14057  var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
14058  function getFontFamiliesKey(fontFamilies) {
14059    if (!fontFamilies) {
14060      return "";
14061    }
14062    const normalized = {};
14063    for (const source of Object.keys(fontFamilies).sort()) {
14064      normalized[source] = (fontFamilies[source] ?? []).map((family) => ({
14065        slug: family.slug,
14066        fontFace: (family.fontFace ?? []).map(
14067          (face) => `$face.fontStyle}-$face.fontWeight}`
14068        ).sort()
14069      })).sort((a, b) => a.slug.localeCompare(b.slug));
14070    }
14071    return JSON.stringify(normalized);
14072  }
14073  function InstalledFonts() {
14074    const {
14075      baseCustomFonts,
14076      libraryFontSelected,
14077      handleSetLibraryFontSelected,
14078      uninstallFontFamily,
14079      isResolvingLibrary,
14080      isInstalling,
14081      saveFontFamilies,
14082      getFontFacesActivated
14083    } = (0, import_element35.useContext)(FontLibraryContext);
14084    const [fontFamilies, setFontFamilies] = useSetting("typography.fontFamilies");
14085    const [lastSelectedFontSlug, setLastSelectedFontSlug] = (0, import_element35.useState)(void 0);
14086    const [isConfirmDeleteOpen, setIsConfirmDeleteOpen] = (0, import_element35.useState)(false);
14087    const [notice, setNotice] = (0, import_element35.useState)(null);
14088    const [baseFontFamilies] = useSetting("typography.fontFamilies", void 0, "base");
14089    const globalStylesId = (0, import_data7.useSelect)((select) => {
14090      const { __experimentalGetCurrentGlobalStylesId } = select(import_core_data6.store);
14091      return __experimentalGetCurrentGlobalStylesId();
14092    }, []);
14093    const globalStyles = (0, import_core_data6.useEntityRecord)(
14094      "root",
14095      "globalStyles",
14096      globalStylesId ?? 0,
14097      { enabled: globalStylesId !== void 0 }
14098    );
14099    const editedFontFamilies = globalStyles?.edits?.settings?.typography?.fontFamilies;
14100    const savedFontFamilies = globalStyles?.record?.settings?.typography?.fontFamilies;
14101    const fontFamiliesHasChanges = (0, import_element35.useMemo)(() => {
14102      if (editedFontFamilies === void 0) {
14103        return false;
14104      }
14105      return getFontFamiliesKey(editedFontFamilies) !== getFontFamiliesKey(savedFontFamilies);
14106    }, [editedFontFamilies, savedFontFamilies]);
14107    const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map((f) => setUIValuesNeeded(f, { source: "theme" })).sort((a, b) => a.name.localeCompare(b.name)) : [];
14108    const themeFontsSlugs = new Set(themeFonts.map((f) => f.slug));
14109    const baseThemeFonts = baseFontFamilies?.theme ? themeFonts.concat(
14110      baseFontFamilies.theme.filter((f) => !themeFontsSlugs.has(f.slug)).map((f) => setUIValuesNeeded(f, { source: "theme" })).sort((a, b) => a.name.localeCompare(b.name))
14111    ) : [];
14112    const customFontFamilyId = libraryFontSelected?.source === "custom" && libraryFontSelected?.id;
14113    const canUserDelete = (0, import_data7.useSelect)(
14114      (select) => {
14115        const { canUser } = select(import_core_data6.store);
14116        return customFontFamilyId && canUser("delete", {
14117          kind: "postType",
14118          name: "wp_font_family",
14119          id: customFontFamilyId
14120        });
14121      },
14122      [customFontFamilyId]
14123    );
14124    const shouldDisplayDeleteButton = !!libraryFontSelected && libraryFontSelected?.source !== "theme" && canUserDelete;
14125    const handleUninstallClick = () => {
14126      setIsConfirmDeleteOpen(true);
14127    };
14128    const handleUpdate = async () => {
14129      setNotice(null);
14130      try {
14131        await saveFontFamilies(fontFamilies);
14132        setNotice({
14133          type: "success",
14134          message: (0, import_i18n17.__)("Font family updated successfully.")
14135        });
14136      } catch (error) {
14137        setNotice({
14138          type: "error",
14139          message: (0, import_i18n17.sprintf)(
14140            /* translators: %s: error message */
14141            (0, import_i18n17.__)("There was an error updating the font family. %s"),
14142            error.message
14143          )
14144        });
14145      }
14146    };
14147    const getFontFacesToDisplay = (font2) => {
14148      if (!font2) {
14149        return [];
14150      }
14151      if (!font2.fontFace || !font2.fontFace.length) {
14152        return [
14153          {
14154            fontFamily: font2.fontFamily,
14155            fontStyle: "normal",
14156            fontWeight: "400"
14157          }
14158        ];
14159      }
14160      return sortFontFaces(font2.fontFace);
14161    };
14162    const getFontCardVariantsText = (font2) => {
14163      const variantsInstalled = font2?.fontFace && (font2?.fontFace?.length ?? 0) > 0 ? font2.fontFace.length : 1;
14164      const variantsActive = getFontFacesActivated(
14165        font2.slug,
14166        font2.source
14167      ).length;
14168      return (0, import_i18n17.sprintf)(
14169        /* translators: 1: Active font variants, 2: Total font variants. */
14170        (0, import_i18n17.__)("%1$d of %2$d active"),
14171        variantsActive,
14172        variantsInstalled
14173      );
14174    };
14175    (0, import_element35.useEffect)(() => {
14176      handleSetLibraryFontSelected(libraryFontSelected);
14177    }, []);
14178    const activeFontsCount = libraryFontSelected ? getFontFacesActivated(
14179      libraryFontSelected.slug,
14180      libraryFontSelected.source
14181    ).length : 0;
14182    const selectedFontsCount = libraryFontSelected?.fontFace?.length ?? (libraryFontSelected?.fontFamily ? 1 : 0);
14183    const isIndeterminate = activeFontsCount > 0 && activeFontsCount !== selectedFontsCount;
14184    const isSelectAllChecked = activeFontsCount === selectedFontsCount;
14185    const toggleSelectAll = () => {
14186      if (!libraryFontSelected || !libraryFontSelected?.source) {
14187        return;
14188      }
14189      const initialFonts = fontFamilies?.[libraryFontSelected.source]?.filter(
14190        (f) => f.slug !== libraryFontSelected.slug
14191      ) ?? [];
14192      const newFonts = isSelectAllChecked ? initialFonts : [...initialFonts, libraryFontSelected];
14193      setFontFamilies({
14194        ...fontFamilies,
14195        [libraryFontSelected.source]: newFonts
14196      });
14197      if (libraryFontSelected.fontFace) {
14198        libraryFontSelected.fontFace.forEach((face) => {
14199          if (isSelectAllChecked) {
14200            unloadFontFaceInBrowser(face, "all");
14201          } else {
14202            const displaySrc = getDisplaySrcFromFontFace(
14203              face?.src ?? ""
14204            );
14205            if (displaySrc) {
14206              loadFontFaceInBrowser(face, displaySrc, "all");
14207            }
14208          }
14209        });
14210      }
14211    };
14212    const hasFonts = baseThemeFonts.length > 0 || baseCustomFonts.length > 0;
14213    return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "font-library__tabpanel-layout", children: [
14214      isResolvingLibrary && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "font-library__loading", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.ProgressBar, {}) }),
14215      !isResolvingLibrary && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
14216        /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
14217          import_components21.Navigator,
14218          {
14219            initialPath: libraryFontSelected ? "/fontFamily" : "/",
14220            children: [
14221              /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.Navigator.Screen, { path: "/", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.__experimentalVStack, { spacing: "8", children: [
14222                notice && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14223                  import_components21.Notice,
14224                  {
14225                    status: notice.type,
14226                    onRemove: () => setNotice(null),
14227                    children: notice.message
14228                  }
14229                ),
14230                !hasFonts && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalText, { as: "p", children: (0, import_i18n17.__)("No fonts installed.") }),
14231                baseThemeFonts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.__experimentalVStack, { children: [
14232                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h2", {
14233                    className: "font-library__fonts-title",
14234                    /* translators: Heading for a list of fonts provided by the theme. */
14235                    children: (0, import_i18n17._x)("Theme", "font source")
14236                  }),
14237                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14238                    "ul",
14239                    {
14240                      role: "list",
14241                      className: "font-library__fonts-list",
14242                      children: baseThemeFonts.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14243                        "li",
14244                        {
14245                          className: "font-library__fonts-list-item",
14246                          children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14247                            font_card_default,
14248                            {
14249                              font: font2,
14250                              navigatorPath: "/fontFamily",
14251                              variantsText: getFontCardVariantsText(
14252                                font2
14253                              ),
14254                              shouldFocus: font2.slug === lastSelectedFontSlug,
14255                              onClick: () => {
14256                                setNotice(null);
14257                                handleSetLibraryFontSelected(
14258                                  font2
14259                                );
14260                              }
14261                            }
14262                          )
14263                        },
14264                        font2.slug
14265                      ))
14266                    }
14267                  )
14268                ] }),
14269                baseCustomFonts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.__experimentalVStack, { children: [
14270                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h2", {
14271                    className: "font-library__fonts-title",
14272                    /* translators: Heading for a list of fonts installed by the user. */
14273                    children: (0, import_i18n17._x)("Custom", "font source")
14274                  }),
14275                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14276                    "ul",
14277                    {
14278                      role: "list",
14279                      className: "font-library__fonts-list",
14280                      children: baseCustomFonts.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14281                        "li",
14282                        {
14283                          className: "font-library__fonts-list-item",
14284                          children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14285                            font_card_default,
14286                            {
14287                              font: font2,
14288                              navigatorPath: "/fontFamily",
14289                              variantsText: getFontCardVariantsText(
14290                                font2
14291                              ),
14292                              shouldFocus: font2.slug === lastSelectedFontSlug,
14293                              onClick: () => {
14294                                setNotice(null);
14295                                handleSetLibraryFontSelected(
14296                                  font2
14297                                );
14298                              }
14299                            }
14300                          )
14301                        },
14302                        font2.slug
14303                      ))
14304                    }
14305                  )
14306                ] })
14307              ] }) }),
14308              /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.Navigator.Screen, { path: "/fontFamily", children: [
14309                libraryFontSelected && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14310                  ConfirmDeleteDialog,
14311                  {
14312                    font: libraryFontSelected,
14313                    isOpen: isConfirmDeleteOpen,
14314                    setIsOpen: setIsConfirmDeleteOpen,
14315                    setNotice,
14316                    uninstallFontFamily,
14317                    handleSetLibraryFontSelected
14318                  }
14319                ),
14320                /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.Flex, { justify: "flex-start", children: [
14321                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14322                    import_components21.Navigator.BackButton,
14323                    {
14324                      icon: (0, import_i18n17.isRTL)() ? chevron_right_default : chevron_left_default,
14325                      size: "small",
14326                      onClick: () => {
14327                        setLastSelectedFontSlug(
14328                          libraryFontSelected?.slug
14329                        );
14330                        handleSetLibraryFontSelected(
14331                          void 0
14332                        );
14333                        setNotice(null);
14334                      },
14335                      label: (0, import_i18n17.__)("Back")
14336                    }
14337                  ),
14338                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14339                    import_components21.__experimentalHeading,
14340                    {
14341                      level: 2,
14342                      size: 13,
14343                      className: "global-styles-ui-header",
14344                      children: libraryFontSelected?.name
14345                    }
14346                  )
14347                ] }),
14348                notice && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
14349                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalSpacer, { margin: 1 }),
14350                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14351                    import_components21.Notice,
14352                    {
14353                      status: notice.type,
14354                      onRemove: () => setNotice(null),
14355                      children: notice.message
14356                    }
14357                  ),
14358                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalSpacer, { margin: 1 })
14359                ] }),
14360                /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalSpacer, { margin: 4 }),
14361                /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalText, { children: (0, import_i18n17.__)(
14362                  "Choose font variants. Keep in mind that too many variants could make your site slower."
14363                ) }),
14364                /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalSpacer, { margin: 4 }),
14365                /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.__experimentalVStack, { spacing: 0, children: [
14366                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14367                    import_components21.CheckboxControl,
14368                    {
14369                      className: "font-library__select-all",
14370                      label: (0, import_i18n17.__)("Select all"),
14371                      checked: isSelectAllChecked,
14372                      onChange: toggleSelectAll,
14373                      indeterminate: isIndeterminate
14374                    }
14375                  ),
14376                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.__experimentalSpacer, { margin: 8 }),
14377                  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14378                    "ul",
14379                    {
14380                      role: "list",
14381                      className: "font-library__fonts-list",
14382                      children: libraryFontSelected && getFontFacesToDisplay(
14383                        libraryFontSelected
14384                      ).map((face, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14385                        "li",
14386                        {
14387                          className: "font-library__fonts-list-item",
14388                          children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14389                            library_font_variant_default,
14390                            {
14391                              font: libraryFontSelected,
14392                              face
14393                            },
14394                            `face$i}`
14395                          )
14396                        },
14397                        `face$i}`
14398                      ))
14399                    }
14400                  )
14401                ] })
14402              ] })
14403            ]
14404          }
14405        ),
14406        /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_components21.__experimentalHStack, { justify: "flex-end", className: "font-library__footer", children: [
14407          isInstalling && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components21.ProgressBar, {}),
14408          shouldDisplayDeleteButton && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14409            import_components21.Button,
14410            {
14411              __next40pxDefaultSize: true,
14412              isDestructive: true,
14413              variant: "tertiary",
14414              onClick: handleUninstallClick,
14415              children: (0, import_i18n17.__)("Delete")
14416            }
14417          ),
14418          /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14419            import_components21.Button,
14420            {
14421              __next40pxDefaultSize: true,
14422              variant: "primary",
14423              onClick: handleUpdate,
14424              disabled: !fontFamiliesHasChanges,
14425              accessibleWhenDisabled: true,
14426              children: (0, import_i18n17.__)("Update")
14427            }
14428          )
14429        ] })
14430      ] })
14431    ] });
14432  }
14433  function ConfirmDeleteDialog({
14434    font: font2,
14435    isOpen,
14436    setIsOpen,
14437    setNotice,
14438    uninstallFontFamily,
14439    handleSetLibraryFontSelected
14440  }) {
14441    const navigator2 = (0, import_components21.useNavigator)();
14442    const handleConfirmUninstall = async () => {
14443      setNotice(null);
14444      setIsOpen(false);
14445      try {
14446        await uninstallFontFamily(font2);
14447        navigator2.goBack();
14448        handleSetLibraryFontSelected(void 0);
14449        setNotice({
14450          type: "success",
14451          message: (0, import_i18n17.__)("Font family uninstalled successfully.")
14452        });
14453      } catch (error) {
14454        setNotice({
14455          type: "error",
14456          message: (0, import_i18n17.__)("There was an error uninstalling the font family.") + error.message
14457        });
14458      }
14459    };
14460    const handleCancelUninstall = () => {
14461      setIsOpen(false);
14462    };
14463    return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
14464      import_components21.__experimentalConfirmDialog,
14465      {
14466        isOpen,
14467        cancelButtonText: (0, import_i18n17.__)("Cancel"),
14468        confirmButtonText: (0, import_i18n17.__)("Delete"),
14469        onCancel: handleCancelUninstall,
14470        onConfirm: handleConfirmUninstall,
14471        size: "medium",
14472        children: font2 && (0, import_i18n17.sprintf)(
14473          /* translators: %s: Name of the font. */
14474          (0, import_i18n17.__)(
14475            'Are you sure you want to delete "%s" font and all its variants and assets?'
14476          ),
14477          font2.name
14478        )
14479      }
14480    );
14481  }
14482  var installed_fonts_default = InstalledFonts;
14483  
14484  // packages/global-styles-ui/build-module/font-library/font-collection.mjs
14485  var import_element37 = __toESM(require_element(), 1);
14486  var import_components24 = __toESM(require_components(), 1);
14487  var import_compose3 = __toESM(require_compose(), 1);
14488  var import_i18n19 = __toESM(require_i18n(), 1);
14489  var import_core_data7 = __toESM(require_core_data(), 1);
14490  
14491  // packages/global-styles-ui/build-module/font-library/utils/filter-fonts.mjs
14492  function filterFonts(fonts, filters) {
14493    const { category, search } = filters;
14494    let filteredFonts = fonts || [];
14495    if (category && category !== "all") {
14496      filteredFonts = filteredFonts.filter(
14497        (font2) => font2.categories && font2.categories.indexOf(category) !== -1
14498      );
14499    }
14500    if (search) {
14501      filteredFonts = filteredFonts.filter(
14502        (font2) => font2.font_family_settings && font2.font_family_settings.name.toLowerCase().includes(search.toLowerCase())
14503      );
14504    }
14505    return filteredFonts;
14506  }
14507  
14508  // packages/global-styles-ui/build-module/font-library/utils/fonts-outline.mjs
14509  function getFontsOutline(fonts) {
14510    return fonts.reduce(
14511      (acc, font2) => ({
14512        ...acc,
14513        [font2.slug]: (font2?.fontFace || []).reduce(
14514          (faces, face) => ({
14515            ...faces,
14516            [`$face.fontStyle}-$face.fontWeight}`]: true
14517          }),
14518          {}
14519        )
14520      }),
14521      {}
14522    );
14523  }
14524  function isFontFontFaceInOutline(slug, face, outline) {
14525    if (!face) {
14526      return !!outline[slug];
14527    }
14528    return !!outline[slug]?.[`$face.fontStyle}-$face.fontWeight}`];
14529  }
14530  
14531  // packages/global-styles-ui/build-module/font-library/google-fonts-confirm-dialog.mjs
14532  var import_i18n18 = __toESM(require_i18n(), 1);
14533  var import_components22 = __toESM(require_components(), 1);
14534  var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
14535  function GoogleFontsConfirmDialog() {
14536    const handleConfirm = () => {
14537      window.localStorage.setItem(
14538        "wp-font-library-google-fonts-permission",
14539        "true"
14540      );
14541      window.dispatchEvent(new Event("storage"));
14542    };
14543    return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "font-library__google-fonts-confirm", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.Card, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_components22.CardBody, { children: [
14544      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.__experimentalHeading, { level: 2, children: (0, import_i18n18.__)("Connect to Google Fonts") }),
14545      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.__experimentalSpacer, { margin: 6 }),
14546      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.__experimentalText, { as: "p", children: (0, import_i18n18.__)(
14547        "To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts."
14548      ) }),
14549      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.__experimentalSpacer, { margin: 3 }),
14550      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.__experimentalText, { as: "p", children: (0, import_i18n18.__)(
14551        "You can alternatively upload files directly on the Upload tab."
14552      ) }),
14553      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components22.__experimentalSpacer, { margin: 6 }),
14554      /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
14555        import_components22.Button,
14556        {
14557          __next40pxDefaultSize: true,
14558          variant: "primary",
14559          onClick: handleConfirm,
14560          children: (0, import_i18n18.__)("Allow access to Google Fonts")
14561        }
14562      )
14563    ] }) }) });
14564  }
14565  var google_fonts_confirm_dialog_default = GoogleFontsConfirmDialog;
14566  
14567  // packages/global-styles-ui/build-module/font-library/collection-font-variant.mjs
14568  var import_element36 = __toESM(require_element(), 1);
14569  var import_components23 = __toESM(require_components(), 1);
14570  var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
14571  function CollectionFontVariant({
14572    face,
14573    font: font2,
14574    handleToggleVariant,
14575    selected
14576  }) {
14577    const handleToggleActivation = () => {
14578      if (font2?.fontFace) {
14579        handleToggleVariant(font2, face);
14580        return;
14581      }
14582      handleToggleVariant(font2);
14583    };
14584    const displayName = font2.name + " " + getFontFaceVariantName(face);
14585    const checkboxId = (0, import_element36.useId)();
14586    return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "font-library__font-card", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_components23.Flex, { justify: "flex-start", align: "center", gap: "1rem", children: [
14587      /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
14588        import_components23.CheckboxControl,
14589        {
14590          checked: selected,
14591          onChange: handleToggleActivation,
14592          id: checkboxId
14593        }
14594      ),
14595      /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("label", { htmlFor: checkboxId, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
14596        font_demo_default,
14597        {
14598          font: face,
14599          text: displayName,
14600          onClick: handleToggleActivation
14601        }
14602      ) })
14603    ] }) });
14604  }
14605  var collection_font_variant_default = CollectionFontVariant;
14606  
14607  // packages/global-styles-ui/build-module/font-library/font-collection.mjs
14608  var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
14609  var DEFAULT_CATEGORY = {
14610    slug: "all",
14611    name: (0, import_i18n19._x)("All", "font categories")
14612  };
14613  var LOCAL_STORAGE_ITEM = "wp-font-library-google-fonts-permission";
14614  var MIN_WINDOW_HEIGHT = 500;
14615  function FontCollection({ slug }) {
14616    const requiresPermission = slug === "google-fonts";
14617    const getGoogleFontsPermissionFromStorage = () => {
14618      return window.localStorage.getItem(LOCAL_STORAGE_ITEM) === "true";
14619    };
14620    const [selectedFont, setSelectedFont] = (0, import_element37.useState)(
14621      null
14622    );
14623    const [lastSelectedFontSlug, setLastSelectedFontSlug] = (0, import_element37.useState)(void 0);
14624    const [notice, setNotice] = (0, import_element37.useState)(null);
14625    const [fontsToInstall, setFontsToInstall] = (0, import_element37.useState)(
14626      []
14627    );
14628    const [page, setPage] = (0, import_element37.useState)(1);
14629    const [filters, setFilters] = (0, import_element37.useState)({});
14630    const [renderConfirmDialog, setRenderConfirmDialog] = (0, import_element37.useState)(
14631      requiresPermission && !getGoogleFontsPermissionFromStorage()
14632    );
14633    const { installFonts, isInstalling } = (0, import_element37.useContext)(FontLibraryContext);
14634    const { record: selectedCollection, isResolving: isLoading } = (0, import_core_data7.useEntityRecord)("root", "fontCollection", slug);
14635    (0, import_element37.useEffect)(() => {
14636      const handleStorage = () => {
14637        setRenderConfirmDialog(
14638          requiresPermission && !getGoogleFontsPermissionFromStorage()
14639        );
14640      };
14641      handleStorage();
14642      window.addEventListener("storage", handleStorage);
14643      return () => window.removeEventListener("storage", handleStorage);
14644    }, [slug, requiresPermission]);
14645    const revokeAccess = () => {
14646      window.localStorage.setItem(LOCAL_STORAGE_ITEM, "false");
14647      window.dispatchEvent(new Event("storage"));
14648    };
14649    (0, import_element37.useEffect)(() => {
14650      setSelectedFont(null);
14651    }, [slug]);
14652    (0, import_element37.useEffect)(() => {
14653      setFontsToInstall([]);
14654    }, [selectedFont]);
14655    const collectionFonts = (0, import_element37.useMemo)(
14656      () => selectedCollection?.font_families ?? [],
14657      [selectedCollection]
14658    );
14659    const collectionCategories = selectedCollection?.categories ?? [];
14660    const categories = [DEFAULT_CATEGORY, ...collectionCategories];
14661    const fonts = (0, import_element37.useMemo)(
14662      () => filterFonts(collectionFonts, filters),
14663      [collectionFonts, filters]
14664    );
14665    const windowHeight = Math.max(window.innerHeight, MIN_WINDOW_HEIGHT);
14666    const pageSize = Math.floor((windowHeight - 417) / 61);
14667    const totalPages = Math.ceil(fonts.length / pageSize);
14668    const itemsStart = (page - 1) * pageSize;
14669    const itemsLimit = page * pageSize;
14670    const items = fonts.slice(itemsStart, itemsLimit);
14671    const handleCategoryFilter = (category) => {
14672      setFilters({ ...filters, category });
14673      setPage(1);
14674    };
14675    const handleUpdateSearchInput = (value) => {
14676      setFilters({ ...filters, search: value });
14677      setPage(1);
14678    };
14679    const debouncedUpdateSearchInput = (0, import_compose3.debounce)(
14680      // @ts-expect-error `debounce` expects a `(...args: unknown[]) => unknown` callback.
14681      handleUpdateSearchInput,
14682      300
14683    );
14684    const handleToggleVariant = (font2, face) => {
14685      const newFontsToInstall = toggleFont(font2, face, fontsToInstall);
14686      setFontsToInstall(newFontsToInstall);
14687    };
14688    const fontToInstallOutline = getFontsOutline(fontsToInstall);
14689    const resetFontsToInstall = () => {
14690      setFontsToInstall([]);
14691    };
14692    const selectFontCount = fontsToInstall.length > 0 ? fontsToInstall[0]?.fontFace?.length ?? 0 : 0;
14693    const isIndeterminate = selectFontCount > 0 && selectFontCount !== selectedFont?.fontFace?.length;
14694    const isSelectAllChecked = selectFontCount === selectedFont?.fontFace?.length;
14695    const toggleSelectAll = () => {
14696      const newFonts = [];
14697      if (!isSelectAllChecked && selectedFont) {
14698        newFonts.push(selectedFont);
14699      }
14700      setFontsToInstall(newFonts);
14701    };
14702    const handleInstall = async () => {
14703      setNotice(null);
14704      const fontFamily = fontsToInstall[0];
14705      try {
14706        if (fontFamily?.fontFace) {
14707          await Promise.all(
14708            fontFamily.fontFace.map(async (fontFace) => {
14709              if (fontFace.src) {
14710                fontFace.file = await downloadFontFaceAssets(
14711                  fontFace.src
14712                );
14713              }
14714            })
14715          );
14716        }
14717      } catch {
14718        setNotice({
14719          type: "error",
14720          message: (0, import_i18n19.__)(
14721            "Error installing the fonts, could not be downloaded."
14722          )
14723        });
14724        return;
14725      }
14726      try {
14727        await installFonts([fontFamily]);
14728        setNotice({
14729          type: "success",
14730          message: (0, import_i18n19.__)("Fonts were installed successfully.")
14731        });
14732      } catch (error) {
14733        setNotice({
14734          type: "error",
14735          message: error.message
14736        });
14737      }
14738      resetFontsToInstall();
14739    };
14740    const getSortedFontFaces = (fontFamily) => {
14741      if (!fontFamily) {
14742        return [];
14743      }
14744      if (!fontFamily.fontFace || !fontFamily.fontFace.length) {
14745        return [
14746          {
14747            fontFamily: fontFamily.fontFamily,
14748            fontStyle: "normal",
14749            fontWeight: "400"
14750          }
14751        ];
14752      }
14753      return sortFontFaces(fontFamily.fontFace);
14754    };
14755    if (renderConfirmDialog) {
14756      return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(google_fonts_confirm_dialog_default, {});
14757    }
14758    const showActions = slug === "google-fonts" && !renderConfirmDialog && !selectedFont;
14759    return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "font-library__tabpanel-layout", children: [
14760      isLoading && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "font-library__loading", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.ProgressBar, {}) }),
14761      !isLoading && selectedCollection && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
14762        /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
14763          import_components24.Navigator,
14764          {
14765            initialPath: "/",
14766            className: "font-library__tabpanel-layout",
14767            children: [
14768              /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.Navigator.Screen, { path: "/", children: [
14769                /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.__experimentalHStack, { justify: "space-between", children: [
14770                  /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.__experimentalVStack, { children: [
14771                    /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalHeading, { level: 2, size: 13, children: selectedCollection.name }),
14772                    /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalText, { children: selectedCollection.description })
14773                  ] }),
14774                  showActions && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14775                    import_components24.DropdownMenu,
14776                    {
14777                      icon: more_vertical_default,
14778                      label: (0, import_i18n19.__)("Actions"),
14779                      popoverProps: {
14780                        position: "bottom left"
14781                      },
14782                      controls: [
14783                        {
14784                          title: (0, import_i18n19.__)(
14785                            "Revoke access to Google Fonts"
14786                          ),
14787                          onClick: revokeAccess
14788                        }
14789                      ]
14790                    }
14791                  )
14792                ] }),
14793                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 4 }),
14794                /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.__experimentalHStack, { spacing: 4, justify: "space-between", children: [
14795                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14796                    import_components24.SearchControl,
14797                    {
14798                      className: "font-library__search",
14799                      value: filters.search,
14800                      placeholder: (0, import_i18n19.__)("Font name\u2026"),
14801                      label: (0, import_i18n19.__)("Search"),
14802                      onChange: debouncedUpdateSearchInput,
14803                      hideLabelFromVision: false
14804                    }
14805                  ),
14806                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14807                    import_components24.SelectControl,
14808                    {
14809                      label: (0, import_i18n19.__)("Category"),
14810                      value: filters.category,
14811                      onChange: handleCategoryFilter,
14812                      children: categories && categories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14813                        "option",
14814                        {
14815                          value: category.slug,
14816                          children: category.name
14817                        },
14818                        category.slug
14819                      ))
14820                    }
14821                  )
14822                ] }),
14823                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 4 }),
14824                !!selectedCollection?.font_families?.length && !fonts.length && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalText, { children: (0, import_i18n19.__)(
14825                  "No fonts found. Try with a different search term."
14826                ) }),
14827                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "font-library__fonts-grid__main", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14828                  "ul",
14829                  {
14830                    role: "list",
14831                    className: "font-library__fonts-list",
14832                    children: items.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14833                      "li",
14834                      {
14835                        className: "font-library__fonts-list-item",
14836                        children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14837                          font_card_default,
14838                          {
14839                            font: font2.font_family_settings,
14840                            navigatorPath: "/fontFamily",
14841                            shouldFocus: font2.font_family_settings.slug === lastSelectedFontSlug,
14842                            onClick: () => {
14843                              setSelectedFont(
14844                                font2.font_family_settings
14845                              );
14846                            }
14847                          }
14848                        )
14849                      },
14850                      font2.font_family_settings.slug
14851                    ))
14852                  }
14853                ) })
14854              ] }),
14855              /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.Navigator.Screen, { path: "/fontFamily", children: [
14856                /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.Flex, { justify: "flex-start", children: [
14857                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14858                    import_components24.Navigator.BackButton,
14859                    {
14860                      icon: (0, import_i18n19.isRTL)() ? chevron_right_default : chevron_left_default,
14861                      size: "small",
14862                      onClick: () => {
14863                        setLastSelectedFontSlug(
14864                          selectedFont?.slug
14865                        );
14866                        setSelectedFont(null);
14867                        setNotice(null);
14868                      },
14869                      label: (0, import_i18n19.__)("Back")
14870                    }
14871                  ),
14872                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14873                    import_components24.__experimentalHeading,
14874                    {
14875                      level: 2,
14876                      size: 13,
14877                      className: "global-styles-ui-header",
14878                      children: selectedFont?.name
14879                    }
14880                  )
14881                ] }),
14882                notice && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
14883                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 1 }),
14884                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14885                    import_components24.Notice,
14886                    {
14887                      status: notice.type,
14888                      onRemove: () => setNotice(null),
14889                      children: notice.message
14890                    }
14891                  ),
14892                  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 1 })
14893                ] }),
14894                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 4 }),
14895                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalText, { children: (0, import_i18n19.__)("Select font variants to install.") }),
14896                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 4 }),
14897                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14898                  import_components24.CheckboxControl,
14899                  {
14900                    className: "font-library__select-all",
14901                    label: (0, import_i18n19.__)("Select all"),
14902                    checked: isSelectAllChecked,
14903                    onChange: toggleSelectAll,
14904                    indeterminate: isIndeterminate
14905                  }
14906                ),
14907                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalVStack, { spacing: 0, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14908                  "ul",
14909                  {
14910                    role: "list",
14911                    className: "font-library__fonts-list",
14912                    children: selectedFont && getSortedFontFaces(selectedFont).map(
14913                      (face, i) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14914                        "li",
14915                        {
14916                          className: "font-library__fonts-list-item",
14917                          children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14918                            collection_font_variant_default,
14919                            {
14920                              font: selectedFont,
14921                              face,
14922                              handleToggleVariant,
14923                              selected: isFontFontFaceInOutline(
14924                                selectedFont.slug,
14925                                selectedFont.fontFace ? face : null,
14926                                // If the font has no fontFace, we want to check if the font is in the outline
14927                                fontToInstallOutline
14928                              )
14929                            }
14930                          )
14931                        },
14932                        `face$i}`
14933                      )
14934                    )
14935                  }
14936                ) }),
14937                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components24.__experimentalSpacer, { margin: 16 })
14938              ] })
14939            ]
14940          }
14941        ),
14942        selectedFont && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14943          import_components24.Flex,
14944          {
14945            justify: "flex-end",
14946            className: "font-library__footer",
14947            children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14948              import_components24.Button,
14949              {
14950                __next40pxDefaultSize: true,
14951                variant: "primary",
14952                onClick: handleInstall,
14953                isBusy: isInstalling,
14954                disabled: fontsToInstall.length === 0 || isInstalling,
14955                accessibleWhenDisabled: true,
14956                children: (0, import_i18n19.__)("Install")
14957              }
14958            )
14959          }
14960        ),
14961        !selectedFont && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
14962          import_components24.__experimentalHStack,
14963          {
14964            expanded: false,
14965            className: "font-library__footer",
14966            justify: "end",
14967            spacing: 6,
14968            children: [
14969              /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14970                import_components24.__experimentalHStack,
14971                {
14972                  justify: "flex-start",
14973                  expanded: false,
14974                  spacing: 1,
14975                  className: "font-library__page-selection",
14976                  children: (0, import_element37.createInterpolateElement)(
14977                    (0, import_i18n19.sprintf)(
14978                      // translators: 1: Current page number, 2: Total number of pages.
14979                      (0, import_i18n19._x)(
14980                        "<div>Page</div>%1$s<div>of %2$d</div>",
14981                        "paging"
14982                      ),
14983                      "<CurrentPage />",
14984                      totalPages
14985                    ),
14986                    {
14987                      div: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { "aria-hidden": true }),
14988                      // @ts-expect-error — Tag injected via sprintf argument, not visible in format string.
14989                      CurrentPage: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
14990                        import_components24.SelectControl,
14991                        {
14992                          "aria-label": (0, import_i18n19.__)(
14993                            "Current page"
14994                          ),
14995                          value: page.toString(),
14996                          options: [
14997                            ...Array(totalPages)
14998                          ].map((e, i) => {
14999                            return {
15000                              label: (i + 1).toString(),
15001                              value: (i + 1).toString()
15002                            };
15003                          }),
15004                          onChange: (newPage) => setPage(
15005                            parseInt(newPage)
15006                          ),
15007                          size: "small",
15008                          variant: "minimal"
15009                        }
15010                      )
15011                    }
15012                  )
15013                }
15014              ),
15015              /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_components24.__experimentalHStack, { expanded: false, spacing: 1, children: [
15016                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
15017                  import_components24.Button,
15018                  {
15019                    onClick: () => setPage(page - 1),
15020                    disabled: page === 1,
15021                    accessibleWhenDisabled: true,
15022                    label: (0, import_i18n19.__)("Previous page"),
15023                    icon: (0, import_i18n19.isRTL)() ? next_default : previous_default,
15024                    showTooltip: true,
15025                    size: "compact",
15026                    tooltipPosition: "top"
15027                  }
15028                ),
15029                /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
15030                  import_components24.Button,
15031                  {
15032                    onClick: () => setPage(page + 1),
15033                    disabled: page === totalPages,
15034                    accessibleWhenDisabled: true,
15035                    label: (0, import_i18n19.__)("Next page"),
15036                    icon: (0, import_i18n19.isRTL)() ? previous_default : next_default,
15037                    showTooltip: true,
15038                    size: "compact",
15039                    tooltipPosition: "top"
15040                  }
15041                )
15042              ] })
15043            ]
15044          }
15045        )
15046      ] })
15047    ] });
15048  }
15049  var font_collection_default = FontCollection;
15050  
15051  // packages/global-styles-ui/build-module/font-library/upload-fonts.mjs
15052  var import_i18n20 = __toESM(require_i18n(), 1);
15053  var import_components25 = __toESM(require_components(), 1);
15054  var import_element38 = __toESM(require_element(), 1);
15055  
15056  // packages/global-styles-ui/build-module/font-library/lib/unbrotli.mjs
15057  var __require2 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, {
15058    get: (a, b) => (typeof __require !== "undefined" ? __require : a)[b]
15059  }) : x2)(function(x2) {
15060    if (typeof __require !== "undefined") return __require.apply(this, arguments);
15061    throw Error('Dynamic require of "' + x2 + '" is not supported');
15062  });
15063  var unbrotli_default = (function() {
15064    var define, module, exports;
15065    return (/* @__PURE__ */ (function() {
15066      function r2(e, n, t) {
15067        function o(i2, f) {
15068          if (!n[i2]) {
15069            if (!e[i2]) {
15070              var c2 = "function" == typeof __require2 && __require2;
15071              if (!f && c2) return c2(i2, true);
15072              if (u) return u(i2, true);
15073              var a = new Error("Cannot find module '" + i2 + "'");
15074              throw a.code = "MODULE_NOT_FOUND", a;
15075            }
15076            var p3 = n[i2] = { exports: {} };
15077            e[i2][0].call(
15078              p3.exports,
15079              function(r22) {
15080                var n2 = e[i2][1][r22];
15081                return o(n2 || r22);
15082              },
15083              p3,
15084              p3.exports,
15085              r2,
15086              e,
15087              n,
15088              t
15089            );
15090          }
15091          return n[i2].exports;
15092        }
15093        for (var u = "function" == typeof __require2 && __require2, i = 0; i < t.length; i++)
15094          o(t[i]);
15095        return o;
15096      }
15097      return r2;
15098    })())(
15099      {
15100        1: [
15101          function(require2, module2, exports2) {
15102            var BROTLI_READ_SIZE = 4096;
15103            var BROTLI_IBUF_SIZE = 2 * BROTLI_READ_SIZE + 32;
15104            var BROTLI_IBUF_MASK = 2 * BROTLI_READ_SIZE - 1;
15105            var kBitMask = new Uint32Array([
15106              0,
15107              1,
15108              3,
15109              7,
15110              15,
15111              31,
15112              63,
15113              127,
15114              255,
15115              511,
15116              1023,
15117              2047,
15118              4095,
15119              8191,
15120              16383,
15121              32767,
15122              65535,
15123              131071,
15124              262143,
15125              524287,
15126              1048575,
15127              2097151,
15128              4194303,
15129              8388607,
15130              16777215
15131            ]);
15132            function BrotliBitReader(input) {
15133              this.buf_ = new Uint8Array(BROTLI_IBUF_SIZE);
15134              this.input_ = input;
15135              this.reset();
15136            }
15137            BrotliBitReader.READ_SIZE = BROTLI_READ_SIZE;
15138            BrotliBitReader.IBUF_MASK = BROTLI_IBUF_MASK;
15139            BrotliBitReader.prototype.reset = function() {
15140              this.buf_ptr_ = 0;
15141              this.val_ = 0;
15142              this.pos_ = 0;
15143              this.bit_pos_ = 0;
15144              this.bit_end_pos_ = 0;
15145              this.eos_ = 0;
15146              this.readMoreInput();
15147              for (var i = 0; i < 4; i++) {
15148                this.val_ |= this.buf_[this.pos_] << 8 * i;
15149                ++this.pos_;
15150              }
15151              return this.bit_end_pos_ > 0;
15152            };
15153            BrotliBitReader.prototype.readMoreInput = function() {
15154              if (this.bit_end_pos_ > 256) {
15155                return;
15156              } else if (this.eos_) {
15157                if (this.bit_pos_ > this.bit_end_pos_)
15158                  throw new Error(
15159                    "Unexpected end of input " + this.bit_pos_ + " " + this.bit_end_pos_
15160                  );
15161              } else {
15162                var dst = this.buf_ptr_;
15163                var bytes_read = this.input_.read(
15164                  this.buf_,
15165                  dst,
15166                  BROTLI_READ_SIZE
15167                );
15168                if (bytes_read < 0) {
15169                  throw new Error("Unexpected end of input");
15170                }
15171                if (bytes_read < BROTLI_READ_SIZE) {
15172                  this.eos_ = 1;
15173                  for (var p3 = 0; p3 < 32; p3++)
15174                    this.buf_[dst + bytes_read + p3] = 0;
15175                }
15176                if (dst === 0) {
15177                  for (var p3 = 0; p3 < 32; p3++)
15178                    this.buf_[(BROTLI_READ_SIZE << 1) + p3] = this.buf_[p3];
15179                  this.buf_ptr_ = BROTLI_READ_SIZE;
15180                } else {
15181                  this.buf_ptr_ = 0;
15182                }
15183                this.bit_end_pos_ += bytes_read << 3;
15184              }
15185            };
15186            BrotliBitReader.prototype.fillBitWindow = function() {
15187              while (this.bit_pos_ >= 8) {
15188                this.val_ >>>= 8;
15189                this.val_ |= this.buf_[this.pos_ & BROTLI_IBUF_MASK] << 24;
15190                ++this.pos_;
15191                this.bit_pos_ = this.bit_pos_ - 8 >>> 0;
15192                this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0;
15193              }
15194            };
15195            BrotliBitReader.prototype.readBits = function(n_bits) {
15196              if (32 - this.bit_pos_ < n_bits) {
15197                this.fillBitWindow();
15198              }
15199              var val = this.val_ >>> this.bit_pos_ & kBitMask[n_bits];
15200              this.bit_pos_ += n_bits;
15201              return val;
15202            };
15203            module2.exports = BrotliBitReader;
15204          },
15205          {}
15206        ],
15207        2: [
15208          function(require2, module2, exports2) {
15209            var CONTEXT_LSB6 = 0;
15210            var CONTEXT_MSB6 = 1;
15211            var CONTEXT_UTF8 = 2;
15212            var CONTEXT_SIGNED = 3;
15213            exports2.lookup = new Uint8Array([
15214              /* CONTEXT_UTF8, last byte. */
15215              /* ASCII range. */
15216              0,
15217              0,
15218              0,
15219              0,
15220              0,
15221              0,
15222              0,
15223              0,
15224              0,
15225              4,
15226              4,
15227              0,
15228              0,
15229              4,
15230              0,
15231              0,
15232              0,
15233              0,
15234              0,
15235              0,
15236              0,
15237              0,
15238              0,
15239              0,
15240              0,
15241              0,
15242              0,
15243              0,
15244              0,
15245              0,
15246              0,
15247              0,
15248              8,
15249              12,
15250              16,
15251              12,
15252              12,
15253              20,
15254              12,
15255              16,
15256              24,
15257              28,
15258              12,
15259              12,
15260              32,
15261              12,
15262              36,
15263              12,
15264              44,
15265              44,
15266              44,
15267              44,
15268              44,
15269              44,
15270              44,
15271              44,
15272              44,
15273              44,
15274              32,
15275              32,
15276              24,
15277              40,
15278              28,
15279              12,
15280              12,
15281              48,
15282              52,
15283              52,
15284              52,
15285              48,
15286              52,
15287              52,
15288              52,
15289              48,
15290              52,
15291              52,
15292              52,
15293              52,
15294              52,
15295              48,
15296              52,
15297              52,
15298              52,
15299              52,
15300              52,
15301              48,
15302              52,
15303              52,
15304              52,
15305              52,
15306              52,
15307              24,
15308              12,
15309              28,
15310              12,
15311              12,
15312              12,
15313              56,
15314              60,
15315              60,
15316              60,
15317              56,
15318              60,
15319              60,
15320              60,
15321              56,
15322              60,
15323              60,
15324              60,
15325              60,
15326              60,
15327              56,
15328              60,
15329              60,
15330              60,
15331              60,
15332              60,
15333              56,
15334              60,
15335              60,
15336              60,
15337              60,
15338              60,
15339              24,
15340              12,
15341              28,
15342              12,
15343              0,
15344              /* UTF8 continuation byte range. */
15345              0,
15346              1,
15347              0,
15348              1,
15349              0,
15350              1,
15351              0,
15352              1,
15353              0,
15354              1,
15355              0,
15356              1,
15357              0,
15358              1,
15359              0,
15360              1,
15361              0,
15362              1,
15363              0,
15364              1,
15365              0,
15366              1,
15367              0,
15368              1,
15369              0,
15370              1,
15371              0,
15372              1,
15373              0,
15374              1,
15375              0,
15376              1,
15377              0,
15378              1,
15379              0,
15380              1,
15381              0,
15382              1,
15383              0,
15384              1,
15385              0,
15386              1,
15387              0,
15388              1,
15389              0,
15390              1,
15391              0,
15392              1,
15393              0,
15394              1,
15395              0,
15396              1,
15397              0,
15398              1,
15399              0,
15400              1,
15401              0,
15402              1,
15403              0,
15404              1,
15405              0,
15406              1,
15407              0,
15408              1,
15409              2,
15410              3,
15411              2,
15412              3,
15413              2,
15414              3,
15415              2,
15416              3,
15417              2,
15418              3,
15419              2,
15420              3,
15421              2,
15422              3,
15423              2,
15424              3,
15425              2,
15426              3,
15427              2,
15428              3,
15429              2,
15430              3,
15431              2,
15432              3,
15433              2,
15434              3,
15435              2,
15436              3,
15437              2,
15438              3,
15439              2,
15440              3,
15441              2,
15442              3,
15443              2,
15444              3,
15445              2,
15446              3,
15447              2,
15448              3,
15449              2,
15450              3,
15451              2,
15452              3,
15453              2,
15454              3,
15455              2,
15456              3,
15457              2,
15458              3,
15459              2,
15460              3,
15461              2,
15462              3,
15463              2,
15464              3,
15465              2,
15466              3,
15467              2,
15468              3,
15469              2,
15470              3,
15471              2,
15472              3,
15473              /* ASCII range. */
15474              0,
15475              0,
15476              0,
15477              0,
15478              0,
15479              0,
15480              0,
15481              0,
15482              0,
15483              0,
15484              0,
15485              0,
15486              0,
15487              0,
15488              0,
15489              0,
15490              0,
15491              0,
15492              0,
15493              0,
15494              0,
15495              0,
15496              0,
15497              0,
15498              0,
15499              0,
15500              0,
15501              0,
15502              0,
15503              0,
15504              0,
15505              0,
15506              0,
15507              1,
15508              1,
15509              1,
15510              1,
15511              1,
15512              1,
15513              1,
15514              1,
15515              1,
15516              1,
15517              1,
15518              1,
15519              1,
15520              1,
15521              1,
15522              2,
15523              2,
15524              2,
15525              2,
15526              2,
15527              2,
15528              2,
15529              2,
15530              2,
15531              2,
15532              1,
15533              1,
15534              1,
15535              1,
15536              1,
15537              1,
15538              1,
15539              2,
15540              2,
15541              2,
15542              2,
15543              2,
15544              2,
15545              2,
15546              2,
15547              2,
15548              2,
15549              2,
15550              2,
15551              2,
15552              2,
15553              2,
15554              2,
15555              2,
15556              2,
15557              2,
15558              2,
15559              2,
15560              2,
15561              2,
15562              2,
15563              2,
15564              2,
15565              1,
15566              1,
15567              1,
15568              1,
15569              1,
15570              1,
15571              3,
15572              3,
15573              3,
15574              3,
15575              3,
15576              3,
15577              3,
15578              3,
15579              3,
15580              3,
15581              3,
15582              3,
15583              3,
15584              3,
15585              3,
15586              3,
15587              3,
15588              3,
15589              3,
15590              3,
15591              3,
15592              3,
15593              3,
15594              3,
15595              3,
15596              3,
15597              1,
15598              1,
15599              1,
15600              1,
15601              0,
15602              /* UTF8 continuation byte range. */
15603              0,
15604              0,
15605              0,
15606              0,
15607              0,
15608              0,
15609              0,
15610              0,
15611              0,
15612              0,
15613              0,
15614              0,
15615              0,
15616              0,
15617              0,
15618              0,
15619              0,
15620              0,
15621              0,
15622              0,
15623              0,
15624              0,
15625              0,
15626              0,
15627              0,
15628              0,
15629              0,
15630              0,
15631              0,
15632              0,
15633              0,
15634              0,
15635              0,
15636              0,
15637              0,
15638              0,
15639              0,
15640              0,
15641              0,
15642              0,
15643              0,
15644              0,
15645              0,
15646              0,
15647              0,
15648              0,
15649              0,
15650              0,
15651              0,
15652              0,
15653              0,
15654              0,
15655              0,
15656              0,
15657              0,
15658              0,
15659              0,
15660              0,
15661              0,
15662              0,
15663              0,
15664              0,
15665              0,
15666              0,
15667              0,
15668              0,
15669              0,
15670              0,
15671              0,
15672              0,
15673              0,
15674              0,
15675              0,
15676              0,
15677              0,
15678              0,
15679              0,
15680              0,
15681              0,
15682              0,
15683              0,
15684              0,
15685              0,
15686              0,
15687              0,
15688              0,
15689              0,
15690              0,
15691              0,
15692              0,
15693              0,
15694              0,
15695              0,
15696              0,
15697              0,
15698              0,
15699              2,
15700              2,
15701              2,
15702              2,
15703              2,
15704              2,
15705              2,
15706              2,
15707              2,
15708              2,
15709              2,
15710              2,
15711              2,
15712              2,
15713              2,
15714              2,
15715              2,
15716              2,
15717              2,
15718              2,
15719              2,
15720              2,
15721              2,
15722              2,
15723              2,
15724              2,
15725              2,
15726              2,
15727              2,
15728              2,
15729              2,
15730              2,
15731              0,
15732              1,
15733              1,
15734              1,
15735              1,
15736              1,
15737              1,
15738              1,
15739              1,
15740              1,
15741              1,
15742              1,
15743              1,
15744              1,
15745              1,
15746              1,
15747              2,
15748              2,
15749              2,
15750              2,
15751              2,
15752              2,
15753              2,
15754              2,
15755              2,
15756              2,
15757              2,
15758              2,
15759              2,
15760              2,
15761              2,
15762              2,
15763              2,
15764              2,
15765              2,
15766              2,
15767              2,
15768              2,
15769              2,
15770              2,
15771              2,
15772              2,
15773              2,
15774              2,
15775              2,
15776              2,
15777              2,
15778              2,
15779              2,
15780              2,
15781              2,
15782              2,
15783              2,
15784              2,
15785              2,
15786              2,
15787              2,
15788              2,
15789              2,
15790              2,
15791              2,
15792              2,
15793              2,
15794              2,
15795              3,
15796              3,
15797              3,
15798              3,
15799              3,
15800              3,
15801              3,
15802              3,
15803              3,
15804              3,
15805              3,
15806              3,
15807              3,
15808              3,
15809              3,
15810              3,
15811              3,
15812              3,
15813              3,
15814              3,
15815              3,
15816              3,
15817              3,
15818              3,
15819              3,
15820              3,
15821              3,
15822              3,
15823              3,
15824              3,
15825              3,
15826              3,
15827              3,
15828              3,
15829              3,
15830              3,
15831              3,
15832              3,
15833              3,
15834              3,
15835              3,
15836              3,
15837              3,
15838              3,
15839              3,
15840              3,
15841              3,
15842              3,
15843              3,
15844              3,
15845              3,
15846              3,
15847              3,
15848              3,
15849              3,
15850              3,
15851              3,
15852              3,
15853              3,
15854              3,
15855              3,
15856              3,
15857              3,
15858              3,
15859              4,
15860              4,
15861              4,
15862              4,
15863              4,
15864              4,
15865              4,
15866              4,
15867              4,
15868              4,
15869              4,
15870              4,
15871              4,
15872              4,
15873              4,
15874              4,
15875              4,
15876              4,
15877              4,
15878              4,
15879              4,
15880              4,
15881              4,
15882              4,
15883              4,
15884              4,
15885              4,
15886              4,
15887              4,
15888              4,
15889              4,
15890              4,
15891              4,
15892              4,
15893              4,
15894              4,
15895              4,
15896              4,
15897              4,
15898              4,
15899              4,
15900              4,
15901              4,
15902              4,
15903              4,
15904              4,
15905              4,
15906              4,
15907              4,
15908              4,
15909              4,
15910              4,
15911              4,
15912              4,
15913              4,
15914              4,
15915              4,
15916              4,
15917              4,
15918              4,
15919              4,
15920              4,
15921              4,
15922              4,
15923              5,
15924              5,
15925              5,
15926              5,
15927              5,
15928              5,
15929              5,
15930              5,
15931              5,
15932              5,
15933              5,
15934              5,
15935              5,
15936              5,
15937              5,
15938              5,
15939              5,
15940              5,
15941              5,
15942              5,
15943              5,
15944              5,
15945              5,
15946              5,
15947              5,
15948              5,
15949              5,
15950              5,
15951              5,
15952              5,
15953              5,
15954              5,
15955              5,
15956              5,
15957              5,
15958              5,
15959              5,
15960              5,
15961              5,
15962              5,
15963              5,
15964              5,
15965              5,
15966              5,
15967              5,
15968              5,
15969              5,
15970              5,
15971              6,
15972              6,
15973              6,
15974              6,
15975              6,
15976              6,
15977              6,
15978              6,
15979              6,
15980              6,
15981              6,
15982              6,
15983              6,
15984              6,
15985              6,
15986              7,
15987              /* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */
15988              0,
15989              8,
15990              8,
15991              8,
15992              8,
15993              8,
15994              8,
15995              8,
15996              8,
15997              8,
15998              8,
15999              8,
16000              8,
16001              8,
16002              8,
16003              8,
16004              16,
16005              16,
16006              16,
16007              16,
16008              16,
16009              16,
16010              16,
16011              16,
16012              16,
16013              16,
16014              16,
16015              16,
16016              16,
16017              16,
16018              16,
16019              16,
16020              16,
16021              16,
16022              16,
16023              16,
16024              16,
16025              16,
16026              16,
16027              16,
16028              16,
16029              16,
16030              16,
16031              16,
16032              16,
16033              16,
16034              16,
16035              16,
16036              16,
16037              16,
16038              16,
16039              16,
16040              16,
16041              16,
16042              16,
16043              16,
16044              16,
16045              16,
16046              16,
16047              16,
16048              16,
16049              16,
16050              16,
16051              16,
16052              24,
16053              24,
16054              24,
16055              24,
16056              24,
16057              24,
16058              24,
16059              24,
16060              24,
16061              24,
16062              24,
16063              24,
16064              24,
16065              24,
16066              24,
16067              24,
16068              24,
16069              24,
16070              24,
16071              24,
16072              24,
16073              24,
16074              24,
16075              24,
16076              24,
16077              24,
16078              24,
16079              24,
16080              24,
16081              24,
16082              24,
16083              24,
16084              24,
16085              24,
16086              24,
16087              24,
16088              24,
16089              24,
16090              24,
16091              24,
16092              24,
16093              24,
16094              24,
16095              24,
16096              24,
16097              24,
16098              24,
16099              24,
16100              24,
16101              24,
16102              24,
16103              24,
16104              24,
16105              24,
16106              24,
16107              24,
16108              24,
16109              24,
16110              24,
16111              24,
16112              24,
16113              24,
16114              24,
16115              24,
16116              32,
16117              32,
16118              32,
16119              32,
16120              32,
16121              32,
16122              32,
16123              32,
16124              32,
16125              32,
16126              32,
16127              32,
16128              32,
16129              32,
16130              32,
16131              32,
16132              32,
16133              32,
16134              32,
16135              32,
16136              32,
16137              32,
16138              32,
16139              32,
16140              32,
16141              32,
16142              32,
16143              32,
16144              32,
16145              32,
16146              32,
16147              32,
16148              32,
16149              32,
16150              32,
16151              32,
16152              32,
16153              32,
16154              32,
16155              32,
16156              32,
16157              32,
16158              32,
16159              32,
16160              32,
16161              32,
16162              32,
16163              32,
16164              32,
16165              32,
16166              32,
16167              32,
16168              32,
16169              32,
16170              32,
16171              32,
16172              32,
16173              32,
16174              32,
16175              32,
16176              32,
16177              32,
16178              32,
16179              32,
16180              40,
16181              40,
16182              40,
16183              40,
16184              40,
16185              40,
16186              40,
16187              40,
16188              40,
16189              40,
16190              40,
16191              40,
16192              40,
16193              40,
16194              40,
16195              40,
16196              40,
16197              40,
16198              40,
16199              40,
16200              40,
16201              40,
16202              40,
16203              40,
16204              40,
16205              40,
16206              40,
16207              40,
16208              40,
16209              40,
16210              40,
16211              40,
16212              40,
16213              40,
16214              40,
16215              40,
16216              40,
16217              40,
16218              40,
16219              40,
16220              40,
16221              40,
16222              40,
16223              40,
16224              40,
16225              40,
16226              40,
16227              40,
16228              48,
16229              48,
16230              48,
16231              48,
16232              48,
16233              48,
16234              48,
16235              48,
16236              48,
16237              48,
16238              48,
16239              48,
16240              48,
16241              48,
16242              48,
16243              56,
16244              /* CONTEXT_LSB6, last byte. */
16245              0,
16246              1,
16247              2,
16248              3,
16249              4,
16250              5,
16251              6,
16252              7,
16253              8,
16254              9,
16255              10,
16256              11,
16257              12,
16258              13,
16259              14,
16260              15,
16261              16,
16262              17,
16263              18,
16264              19,
16265              20,
16266              21,
16267              22,
16268              23,
16269              24,
16270              25,
16271              26,
16272              27,
16273              28,
16274              29,
16275              30,
16276              31,
16277              32,
16278              33,
16279              34,
16280              35,
16281              36,
16282              37,
16283              38,
16284              39,
16285              40,
16286              41,
16287              42,
16288              43,
16289              44,
16290              45,
16291              46,
16292              47,
16293              48,
16294              49,
16295              50,
16296              51,
16297              52,
16298              53,
16299              54,
16300              55,
16301              56,
16302              57,
16303              58,
16304              59,
16305              60,
16306              61,
16307              62,
16308              63,
16309              0,
16310              1,
16311              2,
16312              3,
16313              4,
16314              5,
16315              6,
16316              7,
16317              8,
16318              9,
16319              10,
16320              11,
16321              12,
16322              13,
16323              14,
16324              15,
16325              16,
16326              17,
16327              18,
16328              19,
16329              20,
16330              21,
16331              22,
16332              23,
16333              24,
16334              25,
16335              26,
16336              27,
16337              28,
16338              29,
16339              30,
16340              31,
16341              32,
16342              33,
16343              34,
16344              35,
16345              36,
16346              37,
16347              38,
16348              39,
16349              40,
16350              41,
16351              42,
16352              43,
16353              44,
16354              45,
16355              46,
16356              47,
16357              48,
16358              49,
16359              50,
16360              51,
16361              52,
16362              53,
16363              54,
16364              55,
16365              56,
16366              57,
16367              58,
16368              59,
16369              60,
16370              61,
16371              62,
16372              63,
16373              0,
16374              1,
16375              2,
16376              3,
16377              4,
16378              5,
16379              6,
16380              7,
16381              8,
16382              9,
16383              10,
16384              11,
16385              12,
16386              13,
16387              14,
16388              15,
16389              16,
16390              17,
16391              18,
16392              19,
16393              20,
16394              21,
16395              22,
16396              23,
16397              24,
16398              25,
16399              26,
16400              27,
16401              28,
16402              29,
16403              30,
16404              31,
16405              32,
16406              33,
16407              34,
16408              35,
16409              36,
16410              37,
16411              38,
16412              39,
16413              40,
16414              41,
16415              42,
16416              43,
16417              44,
16418              45,
16419              46,
16420              47,
16421              48,
16422              49,
16423              50,
16424              51,
16425              52,
16426              53,
16427              54,
16428              55,
16429              56,
16430              57,
16431              58,
16432              59,
16433              60,
16434              61,
16435              62,
16436              63,
16437              0,
16438              1,
16439              2,
16440              3,
16441              4,
16442              5,
16443              6,
16444              7,
16445              8,
16446              9,
16447              10,
16448              11,
16449              12,
16450              13,
16451              14,
16452              15,
16453              16,
16454              17,
16455              18,
16456              19,
16457              20,
16458              21,
16459              22,
16460              23,
16461              24,
16462              25,
16463              26,
16464              27,
16465              28,
16466              29,
16467              30,
16468              31,
16469              32,
16470              33,
16471              34,
16472              35,
16473              36,
16474              37,
16475              38,
16476              39,
16477              40,
16478              41,
16479              42,
16480              43,
16481              44,
16482              45,
16483              46,
16484              47,
16485              48,
16486              49,
16487              50,
16488              51,
16489              52,
16490              53,
16491              54,
16492              55,
16493              56,
16494              57,
16495              58,
16496              59,
16497              60,
16498              61,
16499              62,
16500              63,
16501              /* CONTEXT_MSB6, last byte. */
16502              0,
16503              0,
16504              0,
16505              0,
16506              1,
16507              1,
16508              1,
16509              1,
16510              2,
16511              2,
16512              2,
16513              2,
16514              3,
16515              3,
16516              3,
16517              3,
16518              4,
16519              4,
16520              4,
16521              4,
16522              5,
16523              5,
16524              5,
16525              5,
16526              6,
16527              6,
16528              6,
16529              6,
16530              7,
16531              7,
16532              7,
16533              7,
16534              8,
16535              8,
16536              8,
16537              8,
16538              9,
16539              9,
16540              9,
16541              9,
16542              10,
16543              10,
16544              10,
16545              10,
16546              11,
16547              11,
16548              11,
16549              11,
16550              12,
16551              12,
16552              12,
16553              12,
16554              13,
16555              13,
16556              13,
16557              13,
16558              14,
16559              14,
16560              14,
16561              14,
16562              15,
16563              15,
16564              15,
16565              15,
16566              16,
16567              16,
16568              16,
16569              16,
16570              17,
16571              17,
16572              17,
16573              17,
16574              18,
16575              18,
16576              18,
16577              18,
16578              19,
16579              19,
16580              19,
16581              19,
16582              20,
16583              20,
16584              20,
16585              20,
16586              21,
16587              21,
16588              21,
16589              21,
16590              22,
16591              22,
16592              22,
16593              22,
16594              23,
16595              23,
16596              23,
16597              23,
16598              24,
16599              24,
16600              24,
16601              24,
16602              25,
16603              25,
16604              25,
16605              25,
16606              26,
16607              26,
16608              26,
16609              26,
16610              27,
16611              27,
16612              27,
16613              27,
16614              28,
16615              28,
16616              28,
16617              28,
16618              29,
16619              29,
16620              29,
16621              29,
16622              30,
16623              30,
16624              30,
16625              30,
16626              31,
16627              31,
16628              31,
16629              31,
16630              32,
16631              32,
16632              32,
16633              32,
16634              33,
16635              33,
16636              33,
16637              33,
16638              34,
16639              34,
16640              34,
16641              34,
16642              35,
16643              35,
16644              35,
16645              35,
16646              36,
16647              36,
16648              36,
16649              36,
16650              37,
16651              37,
16652              37,
16653              37,
16654              38,
16655              38,
16656              38,
16657              38,
16658              39,
16659              39,
16660              39,
16661              39,
16662              40,
16663              40,
16664              40,
16665              40,
16666              41,
16667              41,
16668              41,
16669              41,
16670              42,
16671              42,
16672              42,
16673              42,
16674              43,
16675              43,
16676              43,
16677              43,
16678              44,
16679              44,
16680              44,
16681              44,
16682              45,
16683              45,
16684              45,
16685              45,
16686              46,
16687              46,
16688              46,
16689              46,
16690              47,
16691              47,
16692              47,
16693              47,
16694              48,
16695              48,
16696              48,
16697              48,
16698              49,
16699              49,
16700              49,
16701              49,
16702              50,
16703              50,
16704              50,
16705              50,
16706              51,
16707              51,
16708              51,
16709              51,
16710              52,
16711              52,
16712              52,
16713              52,
16714              53,
16715              53,
16716              53,
16717              53,
16718              54,
16719              54,
16720              54,
16721              54,
16722              55,
16723              55,
16724              55,
16725              55,
16726              56,
16727              56,
16728              56,
16729              56,
16730              57,
16731              57,
16732              57,
16733              57,
16734              58,
16735              58,
16736              58,
16737              58,
16738              59,
16739              59,
16740              59,
16741              59,
16742              60,
16743              60,
16744              60,
16745              60,
16746              61,
16747              61,
16748              61,
16749              61,
16750              62,
16751              62,
16752              62,
16753              62,
16754              63,
16755              63,
16756              63,
16757              63,
16758              /* CONTEXT_{M,L}SB6, second last byte, */
16759              0,
16760              0,
16761              0,
16762              0,
16763              0,
16764              0,
16765              0,
16766              0,
16767              0,
16768              0,
16769              0,
16770              0,
16771              0,
16772              0,
16773              0,
16774              0,
16775              0,
16776              0,
16777              0,
16778              0,
16779              0,
16780              0,
16781              0,
16782              0,
16783              0,
16784              0,
16785              0,
16786              0,
16787              0,
16788              0,
16789              0,
16790              0,
16791              0,
16792              0,
16793              0,
16794              0,
16795              0,
16796              0,
16797              0,
16798              0,
16799              0,
16800              0,
16801              0,
16802              0,
16803              0,
16804              0,
16805              0,
16806              0,
16807              0,
16808              0,
16809              0,
16810              0,
16811              0,
16812              0,
16813              0,
16814              0,
16815              0,
16816              0,
16817              0,
16818              0,
16819              0,
16820              0,
16821              0,
16822              0,
16823              0,
16824              0,
16825              0,
16826              0,
16827              0,
16828              0,
16829              0,
16830              0,
16831              0,
16832              0,
16833              0,
16834              0,
16835              0,
16836              0,
16837              0,
16838              0,
16839              0,
16840              0,
16841              0,
16842              0,
16843              0,
16844              0,
16845              0,
16846              0,
16847              0,
16848              0,
16849              0,
16850              0,
16851              0,
16852              0,
16853              0,
16854              0,
16855              0,
16856              0,
16857              0,
16858              0,
16859              0,
16860              0,
16861              0,
16862              0,
16863              0,
16864              0,
16865              0,
16866              0,
16867              0,
16868              0,
16869              0,
16870              0,
16871              0,
16872              0,
16873              0,
16874              0,
16875              0,
16876              0,
16877              0,
16878              0,
16879              0,
16880              0,
16881              0,
16882              0,
16883              0,
16884              0,
16885              0,
16886              0,
16887              0,
16888              0,
16889              0,
16890              0,
16891              0,
16892              0,
16893              0,
16894              0,
16895              0,
16896              0,
16897              0,
16898              0,
16899              0,
16900              0,
16901              0,
16902              0,
16903              0,
16904              0,
16905              0,
16906              0,
16907              0,
16908              0,
16909              0,
16910              0,
16911              0,
16912              0,
16913              0,
16914              0,
16915              0,
16916              0,
16917              0,
16918              0,
16919              0,
16920              0,
16921              0,
16922              0,
16923              0,
16924              0,
16925              0,
16926              0,
16927              0,
16928              0,
16929              0,
16930              0,
16931              0,
16932              0,
16933              0,
16934              0,
16935              0,
16936              0,
16937              0,
16938              0,
16939              0,
16940              0,
16941              0,
16942              0,
16943              0,
16944              0,
16945              0,
16946              0,
16947              0,
16948              0,
16949              0,
16950              0,
16951              0,
16952              0,
16953              0,
16954              0,
16955              0,
16956              0,
16957              0,
16958              0,
16959              0,
16960              0,
16961              0,
16962              0,
16963              0,
16964              0,
16965              0,
16966              0,
16967              0,
16968              0,
16969              0,
16970              0,
16971              0,
16972              0,
16973              0,
16974              0,
16975              0,
16976              0,
16977              0,
16978              0,
16979              0,
16980              0,
16981              0,
16982              0,
16983              0,
16984              0,
16985              0,
16986              0,
16987              0,
16988              0,
16989              0,
16990              0,
16991              0,
16992              0,
16993              0,
16994              0,
16995              0,
16996              0,
16997              0,
16998              0,
16999              0,
17000              0,
17001              0,
17002              0,
17003              0,
17004              0,
17005              0,
17006              0,
17007              0,
17008              0,
17009              0,
17010              0,
17011              0,
17012              0,
17013              0,
17014              0
17015            ]);
17016            exports2.lookupOffsets = new Uint16Array([
17017              /* CONTEXT_LSB6 */
17018              1024,
17019              1536,
17020              1280,
17021              1536,
17022              0,
17023              256,
17024              768,
17025              512
17026            ]);
17027          },
17028          {}
17029        ],
17030        3: [
17031          function(require2, module2, exports2) {
17032            var BrotliInput = require2("./streams").BrotliInput;
17033            var BrotliOutput = require2("./streams").BrotliOutput;
17034            var BrotliBitReader = require2("./bit_reader");
17035            var BrotliDictionary = require2("./dictionary");
17036            var HuffmanCode = require2("./huffman").HuffmanCode;
17037            var BrotliBuildHuffmanTable = require2("./huffman").BrotliBuildHuffmanTable;
17038            var Context = require2("./context");
17039            var Prefix = require2("./prefix");
17040            var Transform = require2("./transform");
17041            var kDefaultCodeLength = 8;
17042            var kCodeLengthRepeatCode = 16;
17043            var kNumLiteralCodes = 256;
17044            var kNumInsertAndCopyCodes = 704;
17045            var kNumBlockLengthCodes = 26;
17046            var kLiteralContextBits = 6;
17047            var kDistanceContextBits = 2;
17048            var HUFFMAN_TABLE_BITS = 8;
17049            var HUFFMAN_TABLE_MASK = 255;
17050            var HUFFMAN_MAX_TABLE_SIZE = 1080;
17051            var CODE_LENGTH_CODES = 18;
17052            var kCodeLengthCodeOrder = new Uint8Array([
17053              1,
17054              2,
17055              3,
17056              4,
17057              0,
17058              5,
17059              17,
17060              6,
17061              16,
17062              7,
17063              8,
17064              9,
17065              10,
17066              11,
17067              12,
17068              13,
17069              14,
17070              15
17071            ]);
17072            var NUM_DISTANCE_SHORT_CODES = 16;
17073            var kDistanceShortCodeIndexOffset = new Uint8Array([
17074              3,
17075              2,
17076              1,
17077              0,
17078              3,
17079              3,
17080              3,
17081              3,
17082              3,
17083              3,
17084              2,
17085              2,
17086              2,
17087              2,
17088              2,
17089              2
17090            ]);
17091            var kDistanceShortCodeValueOffset = new Int8Array([
17092              0,
17093              0,
17094              0,
17095              0,
17096              -1,
17097              1,
17098              -2,
17099              2,
17100              -3,
17101              3,
17102              -1,
17103              1,
17104              -2,
17105              2,
17106              -3,
17107              3
17108            ]);
17109            var kMaxHuffmanTableSize = new Uint16Array([
17110              256,
17111              402,
17112              436,
17113              468,
17114              500,
17115              534,
17116              566,
17117              598,
17118              630,
17119              662,
17120              694,
17121              726,
17122              758,
17123              790,
17124              822,
17125              854,
17126              886,
17127              920,
17128              952,
17129              984,
17130              1016,
17131              1048,
17132              1080
17133            ]);
17134            function DecodeWindowBits(br) {
17135              var n;
17136              if (br.readBits(1) === 0) {
17137                return 16;
17138              }
17139              n = br.readBits(3);
17140              if (n > 0) {
17141                return 17 + n;
17142              }
17143              n = br.readBits(3);
17144              if (n > 0) {
17145                return 8 + n;
17146              }
17147              return 17;
17148            }
17149            function DecodeVarLenUint8(br) {
17150              if (br.readBits(1)) {
17151                var nbits = br.readBits(3);
17152                if (nbits === 0) {
17153                  return 1;
17154                } else {
17155                  return br.readBits(nbits) + (1 << nbits);
17156                }
17157              }
17158              return 0;
17159            }
17160            function MetaBlockLength() {
17161              this.meta_block_length = 0;
17162              this.input_end = 0;
17163              this.is_uncompressed = 0;
17164              this.is_metadata = false;
17165            }
17166            function DecodeMetaBlockLength(br) {
17167              var out = new MetaBlockLength();
17168              var size_nibbles;
17169              var size_bytes;
17170              var i;
17171              out.input_end = br.readBits(1);
17172              if (out.input_end && br.readBits(1)) {
17173                return out;
17174              }
17175              size_nibbles = br.readBits(2) + 4;
17176              if (size_nibbles === 7) {
17177                out.is_metadata = true;
17178                if (br.readBits(1) !== 0)
17179                  throw new Error("Invalid reserved bit");
17180                size_bytes = br.readBits(2);
17181                if (size_bytes === 0) return out;
17182                for (i = 0; i < size_bytes; i++) {
17183                  var next_byte = br.readBits(8);
17184                  if (i + 1 === size_bytes && size_bytes > 1 && next_byte === 0)
17185                    throw new Error("Invalid size byte");
17186                  out.meta_block_length |= next_byte << i * 8;
17187                }
17188              } else {
17189                for (i = 0; i < size_nibbles; ++i) {
17190                  var next_nibble = br.readBits(4);
17191                  if (i + 1 === size_nibbles && size_nibbles > 4 && next_nibble === 0)
17192                    throw new Error("Invalid size nibble");
17193                  out.meta_block_length |= next_nibble << i * 4;
17194                }
17195              }
17196              ++out.meta_block_length;
17197              if (!out.input_end && !out.is_metadata) {
17198                out.is_uncompressed = br.readBits(1);
17199              }
17200              return out;
17201            }
17202            function ReadSymbol(table, index2, br) {
17203              var start_index = index2;
17204              var nbits;
17205              br.fillBitWindow();
17206              index2 += br.val_ >>> br.bit_pos_ & HUFFMAN_TABLE_MASK;
17207              nbits = table[index2].bits - HUFFMAN_TABLE_BITS;
17208              if (nbits > 0) {
17209                br.bit_pos_ += HUFFMAN_TABLE_BITS;
17210                index2 += table[index2].value;
17211                index2 += br.val_ >>> br.bit_pos_ & (1 << nbits) - 1;
17212              }
17213              br.bit_pos_ += table[index2].bits;
17214              return table[index2].value;
17215            }
17216            function ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, br) {
17217              var symbol = 0;
17218              var prev_code_len = kDefaultCodeLength;
17219              var repeat = 0;
17220              var repeat_code_len = 0;
17221              var space = 32768;
17222              var table = [];
17223              for (var i = 0; i < 32; i++)
17224                table.push(new HuffmanCode(0, 0));
17225              BrotliBuildHuffmanTable(
17226                table,
17227                0,
17228                5,
17229                code_length_code_lengths,
17230                CODE_LENGTH_CODES
17231              );
17232              while (symbol < num_symbols && space > 0) {
17233                var p3 = 0;
17234                var code_len;
17235                br.readMoreInput();
17236                br.fillBitWindow();
17237                p3 += br.val_ >>> br.bit_pos_ & 31;
17238                br.bit_pos_ += table[p3].bits;
17239                code_len = table[p3].value & 255;
17240                if (code_len < kCodeLengthRepeatCode) {
17241                  repeat = 0;
17242                  code_lengths[symbol++] = code_len;
17243                  if (code_len !== 0) {
17244                    prev_code_len = code_len;
17245                    space -= 32768 >> code_len;
17246                  }
17247                } else {
17248                  var extra_bits = code_len - 14;
17249                  var old_repeat;
17250                  var repeat_delta;
17251                  var new_len = 0;
17252                  if (code_len === kCodeLengthRepeatCode) {
17253                    new_len = prev_code_len;
17254                  }
17255                  if (repeat_code_len !== new_len) {
17256                    repeat = 0;
17257                    repeat_code_len = new_len;
17258                  }
17259                  old_repeat = repeat;
17260                  if (repeat > 0) {
17261                    repeat -= 2;
17262                    repeat <<= extra_bits;
17263                  }
17264                  repeat += br.readBits(extra_bits) + 3;
17265                  repeat_delta = repeat - old_repeat;
17266                  if (symbol + repeat_delta > num_symbols) {
17267                    throw new Error(
17268                      "[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols"
17269                    );
17270                  }
17271                  for (var x2 = 0; x2 < repeat_delta; x2++)
17272                    code_lengths[symbol + x2] = repeat_code_len;
17273                  symbol += repeat_delta;
17274                  if (repeat_code_len !== 0) {
17275                    space -= repeat_delta << 15 - repeat_code_len;
17276                  }
17277                }
17278              }
17279              if (space !== 0) {
17280                throw new Error(
17281                  "[ReadHuffmanCodeLengths] space = " + space
17282                );
17283              }
17284              for (; symbol < num_symbols; symbol++)
17285                code_lengths[symbol] = 0;
17286            }
17287            function ReadHuffmanCode(alphabet_size, tables, table, br) {
17288              var table_size = 0;
17289              var simple_code_or_skip;
17290              var code_lengths = new Uint8Array(alphabet_size);
17291              br.readMoreInput();
17292              simple_code_or_skip = br.readBits(2);
17293              if (simple_code_or_skip === 1) {
17294                var i;
17295                var max_bits_counter = alphabet_size - 1;
17296                var max_bits = 0;
17297                var symbols = new Int32Array(4);
17298                var num_symbols = br.readBits(2) + 1;
17299                while (max_bits_counter) {
17300                  max_bits_counter >>= 1;
17301                  ++max_bits;
17302                }
17303                for (i = 0; i < num_symbols; ++i) {
17304                  symbols[i] = br.readBits(max_bits) % alphabet_size;
17305                  code_lengths[symbols[i]] = 2;
17306                }
17307                code_lengths[symbols[0]] = 1;
17308                switch (num_symbols) {
17309                  case 1:
17310                    break;
17311                  case 3:
17312                    if (symbols[0] === symbols[1] || symbols[0] === symbols[2] || symbols[1] === symbols[2]) {
17313                      throw new Error(
17314                        "[ReadHuffmanCode] invalid symbols"
17315                      );
17316                    }
17317                    break;
17318                  case 2:
17319                    if (symbols[0] === symbols[1]) {
17320                      throw new Error(
17321                        "[ReadHuffmanCode] invalid symbols"
17322                      );
17323                    }
17324                    code_lengths[symbols[1]] = 1;
17325                    break;
17326                  case 4:
17327                    if (symbols[0] === symbols[1] || symbols[0] === symbols[2] || symbols[0] === symbols[3] || symbols[1] === symbols[2] || symbols[1] === symbols[3] || symbols[2] === symbols[3]) {
17328                      throw new Error(
17329                        "[ReadHuffmanCode] invalid symbols"
17330                      );
17331                    }
17332                    if (br.readBits(1)) {
17333                      code_lengths[symbols[2]] = 3;
17334                      code_lengths[symbols[3]] = 3;
17335                    } else {
17336                      code_lengths[symbols[0]] = 2;
17337                    }
17338                    break;
17339                }
17340              } else {
17341                var i;
17342                var code_length_code_lengths = new Uint8Array(
17343                  CODE_LENGTH_CODES
17344                );
17345                var space = 32;
17346                var num_codes = 0;
17347                var huff = [
17348                  new HuffmanCode(2, 0),
17349                  new HuffmanCode(2, 4),
17350                  new HuffmanCode(2, 3),
17351                  new HuffmanCode(3, 2),
17352                  new HuffmanCode(2, 0),
17353                  new HuffmanCode(2, 4),
17354                  new HuffmanCode(2, 3),
17355                  new HuffmanCode(4, 1),
17356                  new HuffmanCode(2, 0),
17357                  new HuffmanCode(2, 4),
17358                  new HuffmanCode(2, 3),
17359                  new HuffmanCode(3, 2),
17360                  new HuffmanCode(2, 0),
17361                  new HuffmanCode(2, 4),
17362                  new HuffmanCode(2, 3),
17363                  new HuffmanCode(4, 5)
17364                ];
17365                for (i = simple_code_or_skip; i < CODE_LENGTH_CODES && space > 0; ++i) {
17366                  var code_len_idx = kCodeLengthCodeOrder[i];
17367                  var p3 = 0;
17368                  var v2;
17369                  br.fillBitWindow();
17370                  p3 += br.val_ >>> br.bit_pos_ & 15;
17371                  br.bit_pos_ += huff[p3].bits;
17372                  v2 = huff[p3].value;
17373                  code_length_code_lengths[code_len_idx] = v2;
17374                  if (v2 !== 0) {
17375                    space -= 32 >> v2;
17376                    ++num_codes;
17377                  }
17378                }
17379                if (!(num_codes === 1 || space === 0))
17380                  throw new Error(
17381                    "[ReadHuffmanCode] invalid num_codes or space"
17382                  );
17383                ReadHuffmanCodeLengths(
17384                  code_length_code_lengths,
17385                  alphabet_size,
17386                  code_lengths,
17387                  br
17388                );
17389              }
17390              table_size = BrotliBuildHuffmanTable(
17391                tables,
17392                table,
17393                HUFFMAN_TABLE_BITS,
17394                code_lengths,
17395                alphabet_size
17396              );
17397              if (table_size === 0) {
17398                throw new Error(
17399                  "[ReadHuffmanCode] BuildHuffmanTable failed: "
17400                );
17401              }
17402              return table_size;
17403            }
17404            function ReadBlockLength(table, index2, br) {
17405              var code;
17406              var nbits;
17407              code = ReadSymbol(table, index2, br);
17408              nbits = Prefix.kBlockLengthPrefixCode[code].nbits;
17409              return Prefix.kBlockLengthPrefixCode[code].offset + br.readBits(nbits);
17410            }
17411            function TranslateShortCodes(code, ringbuffer, index2) {
17412              var val;
17413              if (code < NUM_DISTANCE_SHORT_CODES) {
17414                index2 += kDistanceShortCodeIndexOffset[code];
17415                index2 &= 3;
17416                val = ringbuffer[index2] + kDistanceShortCodeValueOffset[code];
17417              } else {
17418                val = code - NUM_DISTANCE_SHORT_CODES + 1;
17419              }
17420              return val;
17421            }
17422            function MoveToFront(v2, index2) {
17423              var value = v2[index2];
17424              var i = index2;
17425              for (; i; --i) v2[i] = v2[i - 1];
17426              v2[0] = value;
17427            }
17428            function InverseMoveToFrontTransform(v2, v_len) {
17429              var mtf = new Uint8Array(256);
17430              var i;
17431              for (i = 0; i < 256; ++i) {
17432                mtf[i] = i;
17433              }
17434              for (i = 0; i < v_len; ++i) {
17435                var index2 = v2[i];
17436                v2[i] = mtf[index2];
17437                if (index2) MoveToFront(mtf, index2);
17438              }
17439            }
17440            function HuffmanTreeGroup(alphabet_size, num_htrees) {
17441              this.alphabet_size = alphabet_size;
17442              this.num_htrees = num_htrees;
17443              this.codes = new Array(
17444                num_htrees + num_htrees * kMaxHuffmanTableSize[alphabet_size + 31 >>> 5]
17445              );
17446              this.htrees = new Uint32Array(num_htrees);
17447            }
17448            HuffmanTreeGroup.prototype.decode = function(br) {
17449              var i;
17450              var table_size;
17451              var next = 0;
17452              for (i = 0; i < this.num_htrees; ++i) {
17453                this.htrees[i] = next;
17454                table_size = ReadHuffmanCode(
17455                  this.alphabet_size,
17456                  this.codes,
17457                  next,
17458                  br
17459                );
17460                next += table_size;
17461              }
17462            };
17463            function DecodeContextMap(context_map_size, br) {
17464              var out = { num_htrees: null, context_map: null };
17465              var use_rle_for_zeros;
17466              var max_run_length_prefix = 0;
17467              var table;
17468              var i;
17469              br.readMoreInput();
17470              var num_htrees = out.num_htrees = DecodeVarLenUint8(br) + 1;
17471              var context_map = out.context_map = new Uint8Array(
17472                context_map_size
17473              );
17474              if (num_htrees <= 1) {
17475                return out;
17476              }
17477              use_rle_for_zeros = br.readBits(1);
17478              if (use_rle_for_zeros) {
17479                max_run_length_prefix = br.readBits(4) + 1;
17480              }
17481              table = [];
17482              for (i = 0; i < HUFFMAN_MAX_TABLE_SIZE; i++) {
17483                table[i] = new HuffmanCode(0, 0);
17484              }
17485              ReadHuffmanCode(
17486                num_htrees + max_run_length_prefix,
17487                table,
17488                0,
17489                br
17490              );
17491              for (i = 0; i < context_map_size; ) {
17492                var code;
17493                br.readMoreInput();
17494                code = ReadSymbol(table, 0, br);
17495                if (code === 0) {
17496                  context_map[i] = 0;
17497                  ++i;
17498                } else if (code <= max_run_length_prefix) {
17499                  var reps = 1 + (1 << code) + br.readBits(code);
17500                  while (--reps) {
17501                    if (i >= context_map_size) {
17502                      throw new Error(
17503                        "[DecodeContextMap] i >= context_map_size"
17504                      );
17505                    }
17506                    context_map[i] = 0;
17507                    ++i;
17508                  }
17509                } else {
17510                  context_map[i] = code - max_run_length_prefix;
17511                  ++i;
17512                }
17513              }
17514              if (br.readBits(1)) {
17515                InverseMoveToFrontTransform(
17516                  context_map,
17517                  context_map_size
17518                );
17519              }
17520              return out;
17521            }
17522            function DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) {
17523              var ringbuffer = tree_type * 2;
17524              var index2 = tree_type;
17525              var type_code = ReadSymbol(
17526                trees,
17527                tree_type * HUFFMAN_MAX_TABLE_SIZE,
17528                br
17529              );
17530              var block_type;
17531              if (type_code === 0) {
17532                block_type = ringbuffers[ringbuffer + (indexes[index2] & 1)];
17533              } else if (type_code === 1) {
17534                block_type = ringbuffers[ringbuffer + (indexes[index2] - 1 & 1)] + 1;
17535              } else {
17536                block_type = type_code - 2;
17537              }
17538              if (block_type >= max_block_type) {
17539                block_type -= max_block_type;
17540              }
17541              block_types[tree_type] = block_type;
17542              ringbuffers[ringbuffer + (indexes[index2] & 1)] = block_type;
17543              ++indexes[index2];
17544            }
17545            function CopyUncompressedBlockToOutput(output, len, pos, ringbuffer, ringbuffer_mask, br) {
17546              var rb_size = ringbuffer_mask + 1;
17547              var rb_pos = pos & ringbuffer_mask;
17548              var br_pos = br.pos_ & BrotliBitReader.IBUF_MASK;
17549              var nbytes;
17550              if (len < 8 || br.bit_pos_ + (len << 3) < br.bit_end_pos_) {
17551                while (len-- > 0) {
17552                  br.readMoreInput();
17553                  ringbuffer[rb_pos++] = br.readBits(8);
17554                  if (rb_pos === rb_size) {
17555                    output.write(ringbuffer, rb_size);
17556                    rb_pos = 0;
17557                  }
17558                }
17559                return;
17560              }
17561              if (br.bit_end_pos_ < 32) {
17562                throw new Error(
17563                  "[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32"
17564                );
17565              }
17566              while (br.bit_pos_ < 32) {
17567                ringbuffer[rb_pos] = br.val_ >>> br.bit_pos_;
17568                br.bit_pos_ += 8;
17569                ++rb_pos;
17570                --len;
17571              }
17572              nbytes = br.bit_end_pos_ - br.bit_pos_ >> 3;
17573              if (br_pos + nbytes > BrotliBitReader.IBUF_MASK) {
17574                var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos;
17575                for (var x2 = 0; x2 < tail; x2++)
17576                  ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2];
17577                nbytes -= tail;
17578                rb_pos += tail;
17579                len -= tail;
17580                br_pos = 0;
17581              }
17582              for (var x2 = 0; x2 < nbytes; x2++)
17583                ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2];
17584              rb_pos += nbytes;
17585              len -= nbytes;
17586              if (rb_pos >= rb_size) {
17587                output.write(ringbuffer, rb_size);
17588                rb_pos -= rb_size;
17589                for (var x2 = 0; x2 < rb_pos; x2++)
17590                  ringbuffer[x2] = ringbuffer[rb_size + x2];
17591              }
17592              while (rb_pos + len >= rb_size) {
17593                nbytes = rb_size - rb_pos;
17594                if (br.input_.read(ringbuffer, rb_pos, nbytes) < nbytes) {
17595                  throw new Error(
17596                    "[CopyUncompressedBlockToOutput] not enough bytes"
17597                  );
17598                }
17599                output.write(ringbuffer, rb_size);
17600                len -= nbytes;
17601                rb_pos = 0;
17602              }
17603              if (br.input_.read(ringbuffer, rb_pos, len) < len) {
17604                throw new Error(
17605                  "[CopyUncompressedBlockToOutput] not enough bytes"
17606                );
17607              }
17608              br.reset();
17609            }
17610            function JumpToByteBoundary(br) {
17611              var new_bit_pos = br.bit_pos_ + 7 & ~7;
17612              var pad_bits = br.readBits(new_bit_pos - br.bit_pos_);
17613              return pad_bits == 0;
17614            }
17615            function BrotliDecompressedSize(buffer) {
17616              var input = new BrotliInput(buffer);
17617              var br = new BrotliBitReader(input);
17618              DecodeWindowBits(br);
17619              var out = DecodeMetaBlockLength(br);
17620              return out.meta_block_length;
17621            }
17622            exports2.BrotliDecompressedSize = BrotliDecompressedSize;
17623            function BrotliDecompressBuffer(buffer, output_size) {
17624              var input = new BrotliInput(buffer);
17625              if (output_size == null) {
17626                output_size = BrotliDecompressedSize(buffer);
17627              }
17628              var output_buffer = new Uint8Array(output_size);
17629              var output = new BrotliOutput(output_buffer);
17630              BrotliDecompress(input, output);
17631              if (output.pos < output.buffer.length) {
17632                output.buffer = output.buffer.subarray(
17633                  0,
17634                  output.pos
17635                );
17636              }
17637              return output.buffer;
17638            }
17639            exports2.BrotliDecompressBuffer = BrotliDecompressBuffer;
17640            function BrotliDecompress(input, output) {
17641              var i;
17642              var pos = 0;
17643              var input_end = 0;
17644              var window_bits = 0;
17645              var max_backward_distance;
17646              var max_distance = 0;
17647              var ringbuffer_size;
17648              var ringbuffer_mask;
17649              var ringbuffer;
17650              var ringbuffer_end;
17651              var dist_rb = [16, 15, 11, 4];
17652              var dist_rb_idx = 0;
17653              var prev_byte1 = 0;
17654              var prev_byte2 = 0;
17655              var hgroup = [
17656                new HuffmanTreeGroup(0, 0),
17657                new HuffmanTreeGroup(0, 0),
17658                new HuffmanTreeGroup(0, 0)
17659              ];
17660              var block_type_trees;
17661              var block_len_trees;
17662              var br;
17663              var kRingBufferWriteAheadSlack = 128 + BrotliBitReader.READ_SIZE;
17664              br = new BrotliBitReader(input);
17665              window_bits = DecodeWindowBits(br);
17666              max_backward_distance = (1 << window_bits) - 16;
17667              ringbuffer_size = 1 << window_bits;
17668              ringbuffer_mask = ringbuffer_size - 1;
17669              ringbuffer = new Uint8Array(
17670                ringbuffer_size + kRingBufferWriteAheadSlack + BrotliDictionary.maxDictionaryWordLength
17671              );
17672              ringbuffer_end = ringbuffer_size;
17673              block_type_trees = [];
17674              block_len_trees = [];
17675              for (var x2 = 0; x2 < 3 * HUFFMAN_MAX_TABLE_SIZE; x2++) {
17676                block_type_trees[x2] = new HuffmanCode(0, 0);
17677                block_len_trees[x2] = new HuffmanCode(0, 0);
17678              }
17679              while (!input_end) {
17680                var meta_block_remaining_len = 0;
17681                var is_uncompressed;
17682                var block_length = [1 << 28, 1 << 28, 1 << 28];
17683                var block_type = [0];
17684                var num_block_types = [1, 1, 1];
17685                var block_type_rb = [0, 1, 0, 1, 0, 1];
17686                var block_type_rb_index = [0];
17687                var distance_postfix_bits;
17688                var num_direct_distance_codes;
17689                var distance_postfix_mask;
17690                var num_distance_codes;
17691                var context_map = null;
17692                var context_modes = null;
17693                var num_literal_htrees;
17694                var dist_context_map = null;
17695                var num_dist_htrees;
17696                var context_offset = 0;
17697                var context_map_slice = null;
17698                var literal_htree_index = 0;
17699                var dist_context_offset = 0;
17700                var dist_context_map_slice = null;
17701                var dist_htree_index = 0;
17702                var context_lookup_offset1 = 0;
17703                var context_lookup_offset2 = 0;
17704                var context_mode;
17705                var htree_command;
17706                for (i = 0; i < 3; ++i) {
17707                  hgroup[i].codes = null;
17708                  hgroup[i].htrees = null;
17709                }
17710                br.readMoreInput();
17711                var _out = DecodeMetaBlockLength(br);
17712                meta_block_remaining_len = _out.meta_block_length;
17713                if (pos + meta_block_remaining_len > output.buffer.length) {
17714                  var tmp = new Uint8Array(
17715                    pos + meta_block_remaining_len
17716                  );
17717                  tmp.set(output.buffer);
17718                  output.buffer = tmp;
17719                }
17720                input_end = _out.input_end;
17721                is_uncompressed = _out.is_uncompressed;
17722                if (_out.is_metadata) {
17723                  JumpToByteBoundary(br);
17724                  for (; meta_block_remaining_len > 0; --meta_block_remaining_len) {
17725                    br.readMoreInput();
17726                    br.readBits(8);
17727                  }
17728                  continue;
17729                }
17730                if (meta_block_remaining_len === 0) {
17731                  continue;
17732                }
17733                if (is_uncompressed) {
17734                  br.bit_pos_ = br.bit_pos_ + 7 & ~7;
17735                  CopyUncompressedBlockToOutput(
17736                    output,
17737                    meta_block_remaining_len,
17738                    pos,
17739                    ringbuffer,
17740                    ringbuffer_mask,
17741                    br
17742                  );
17743                  pos += meta_block_remaining_len;
17744                  continue;
17745                }
17746                for (i = 0; i < 3; ++i) {
17747                  num_block_types[i] = DecodeVarLenUint8(br) + 1;
17748                  if (num_block_types[i] >= 2) {
17749                    ReadHuffmanCode(
17750                      num_block_types[i] + 2,
17751                      block_type_trees,
17752                      i * HUFFMAN_MAX_TABLE_SIZE,
17753                      br
17754                    );
17755                    ReadHuffmanCode(
17756                      kNumBlockLengthCodes,
17757                      block_len_trees,
17758                      i * HUFFMAN_MAX_TABLE_SIZE,
17759                      br
17760                    );
17761                    block_length[i] = ReadBlockLength(
17762                      block_len_trees,
17763                      i * HUFFMAN_MAX_TABLE_SIZE,
17764                      br
17765                    );
17766                    block_type_rb_index[i] = 1;
17767                  }
17768                }
17769                br.readMoreInput();
17770                distance_postfix_bits = br.readBits(2);
17771                num_direct_distance_codes = NUM_DISTANCE_SHORT_CODES + (br.readBits(4) << distance_postfix_bits);
17772                distance_postfix_mask = (1 << distance_postfix_bits) - 1;
17773                num_distance_codes = num_direct_distance_codes + (48 << distance_postfix_bits);
17774                context_modes = new Uint8Array(
17775                  num_block_types[0]
17776                );
17777                for (i = 0; i < num_block_types[0]; ++i) {
17778                  br.readMoreInput();
17779                  context_modes[i] = br.readBits(2) << 1;
17780                }
17781                var _o1 = DecodeContextMap(
17782                  num_block_types[0] << kLiteralContextBits,
17783                  br
17784                );
17785                num_literal_htrees = _o1.num_htrees;
17786                context_map = _o1.context_map;
17787                var _o2 = DecodeContextMap(
17788                  num_block_types[2] << kDistanceContextBits,
17789                  br
17790                );
17791                num_dist_htrees = _o2.num_htrees;
17792                dist_context_map = _o2.context_map;
17793                hgroup[0] = new HuffmanTreeGroup(
17794                  kNumLiteralCodes,
17795                  num_literal_htrees
17796                );
17797                hgroup[1] = new HuffmanTreeGroup(
17798                  kNumInsertAndCopyCodes,
17799                  num_block_types[1]
17800                );
17801                hgroup[2] = new HuffmanTreeGroup(
17802                  num_distance_codes,
17803                  num_dist_htrees
17804                );
17805                for (i = 0; i < 3; ++i) {
17806                  hgroup[i].decode(br);
17807                }
17808                context_map_slice = 0;
17809                dist_context_map_slice = 0;
17810                context_mode = context_modes[block_type[0]];
17811                context_lookup_offset1 = Context.lookupOffsets[context_mode];
17812                context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];
17813                htree_command = hgroup[1].htrees[0];
17814                while (meta_block_remaining_len > 0) {
17815                  var cmd_code;
17816                  var range_idx;
17817                  var insert_code;
17818                  var copy_code;
17819                  var insert_length;
17820                  var copy_length;
17821                  var distance_code;
17822                  var distance;
17823                  var context;
17824                  var j2;
17825                  var copy_dst;
17826                  br.readMoreInput();
17827                  if (block_length[1] === 0) {
17828                    DecodeBlockType(
17829                      num_block_types[1],
17830                      block_type_trees,
17831                      1,
17832                      block_type,
17833                      block_type_rb,
17834                      block_type_rb_index,
17835                      br
17836                    );
17837                    block_length[1] = ReadBlockLength(
17838                      block_len_trees,
17839                      HUFFMAN_MAX_TABLE_SIZE,
17840                      br
17841                    );
17842                    htree_command = hgroup[1].htrees[block_type[1]];
17843                  }
17844                  --block_length[1];
17845                  cmd_code = ReadSymbol(
17846                    hgroup[1].codes,
17847                    htree_command,
17848                    br
17849                  );
17850                  range_idx = cmd_code >> 6;
17851                  if (range_idx >= 2) {
17852                    range_idx -= 2;
17853                    distance_code = -1;
17854                  } else {
17855                    distance_code = 0;
17856                  }
17857                  insert_code = Prefix.kInsertRangeLut[range_idx] + (cmd_code >> 3 & 7);
17858                  copy_code = Prefix.kCopyRangeLut[range_idx] + (cmd_code & 7);
17859                  insert_length = Prefix.kInsertLengthPrefixCode[insert_code].offset + br.readBits(
17860                    Prefix.kInsertLengthPrefixCode[insert_code].nbits
17861                  );
17862                  copy_length = Prefix.kCopyLengthPrefixCode[copy_code].offset + br.readBits(
17863                    Prefix.kCopyLengthPrefixCode[copy_code].nbits
17864                  );
17865                  prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask];
17866                  prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask];
17867                  for (j2 = 0; j2 < insert_length; ++j2) {
17868                    br.readMoreInput();
17869                    if (block_length[0] === 0) {
17870                      DecodeBlockType(
17871                        num_block_types[0],
17872                        block_type_trees,
17873                        0,
17874                        block_type,
17875                        block_type_rb,
17876                        block_type_rb_index,
17877                        br
17878                      );
17879                      block_length[0] = ReadBlockLength(
17880                        block_len_trees,
17881                        0,
17882                        br
17883                      );
17884                      context_offset = block_type[0] << kLiteralContextBits;
17885                      context_map_slice = context_offset;
17886                      context_mode = context_modes[block_type[0]];
17887                      context_lookup_offset1 = Context.lookupOffsets[context_mode];
17888                      context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];
17889                    }
17890                    context = Context.lookup[context_lookup_offset1 + prev_byte1] | Context.lookup[context_lookup_offset2 + prev_byte2];
17891                    literal_htree_index = context_map[context_map_slice + context];
17892                    --block_length[0];
17893                    prev_byte2 = prev_byte1;
17894                    prev_byte1 = ReadSymbol(
17895                      hgroup[0].codes,
17896                      hgroup[0].htrees[literal_htree_index],
17897                      br
17898                    );
17899                    ringbuffer[pos & ringbuffer_mask] = prev_byte1;
17900                    if ((pos & ringbuffer_mask) === ringbuffer_mask) {
17901                      output.write(
17902                        ringbuffer,
17903                        ringbuffer_size
17904                      );
17905                    }
17906                    ++pos;
17907                  }
17908                  meta_block_remaining_len -= insert_length;
17909                  if (meta_block_remaining_len <= 0) break;
17910                  if (distance_code < 0) {
17911                    var context;
17912                    br.readMoreInput();
17913                    if (block_length[2] === 0) {
17914                      DecodeBlockType(
17915                        num_block_types[2],
17916                        block_type_trees,
17917                        2,
17918                        block_type,
17919                        block_type_rb,
17920                        block_type_rb_index,
17921                        br
17922                      );
17923                      block_length[2] = ReadBlockLength(
17924                        block_len_trees,
17925                        2 * HUFFMAN_MAX_TABLE_SIZE,
17926                        br
17927                      );
17928                      dist_context_offset = block_type[2] << kDistanceContextBits;
17929                      dist_context_map_slice = dist_context_offset;
17930                    }
17931                    --block_length[2];
17932                    context = (copy_length > 4 ? 3 : copy_length - 2) & 255;
17933                    dist_htree_index = dist_context_map[dist_context_map_slice + context];
17934                    distance_code = ReadSymbol(
17935                      hgroup[2].codes,
17936                      hgroup[2].htrees[dist_htree_index],
17937                      br
17938                    );
17939                    if (distance_code >= num_direct_distance_codes) {
17940                      var nbits;
17941                      var postfix;
17942                      var offset4;
17943                      distance_code -= num_direct_distance_codes;
17944                      postfix = distance_code & distance_postfix_mask;
17945                      distance_code >>= distance_postfix_bits;
17946                      nbits = (distance_code >> 1) + 1;
17947                      offset4 = (2 + (distance_code & 1) << nbits) - 4;
17948                      distance_code = num_direct_distance_codes + (offset4 + br.readBits(nbits) << distance_postfix_bits) + postfix;
17949                    }
17950                  }
17951                  distance = TranslateShortCodes(
17952                    distance_code,
17953                    dist_rb,
17954                    dist_rb_idx
17955                  );
17956                  if (distance < 0) {
17957                    throw new Error(
17958                      "[BrotliDecompress] invalid distance"
17959                    );
17960                  }
17961                  if (pos < max_backward_distance && max_distance !== max_backward_distance) {
17962                    max_distance = pos;
17963                  } else {
17964                    max_distance = max_backward_distance;
17965                  }
17966                  copy_dst = pos & ringbuffer_mask;
17967                  if (distance > max_distance) {
17968                    if (copy_length >= BrotliDictionary.minDictionaryWordLength && copy_length <= BrotliDictionary.maxDictionaryWordLength) {
17969                      var offset4 = BrotliDictionary.offsetsByLength[copy_length];
17970                      var word_id = distance - max_distance - 1;
17971                      var shift4 = BrotliDictionary.sizeBitsByLength[copy_length];
17972                      var mask = (1 << shift4) - 1;
17973                      var word_idx = word_id & mask;
17974                      var transform_idx = word_id >> shift4;
17975                      offset4 += word_idx * copy_length;
17976                      if (transform_idx < Transform.kNumTransforms) {
17977                        var len = Transform.transformDictionaryWord(
17978                          ringbuffer,
17979                          copy_dst,
17980                          offset4,
17981                          copy_length,
17982                          transform_idx
17983                        );
17984                        copy_dst += len;
17985                        pos += len;
17986                        meta_block_remaining_len -= len;
17987                        if (copy_dst >= ringbuffer_end) {
17988                          output.write(
17989                            ringbuffer,
17990                            ringbuffer_size
17991                          );
17992                          for (var _x9 = 0; _x9 < copy_dst - ringbuffer_end; _x9++)
17993                            ringbuffer[_x9] = ringbuffer[ringbuffer_end + _x9];
17994                        }
17995                      } else {
17996                        throw new Error(
17997                          "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
17998                        );
17999                      }
18000                    } else {
18001                      throw new Error(
18002                        "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
18003                      );
18004                    }
18005                  } else {
18006                    if (distance_code > 0) {
18007                      dist_rb[dist_rb_idx & 3] = distance;
18008                      ++dist_rb_idx;
18009                    }
18010                    if (copy_length > meta_block_remaining_len) {
18011                      throw new Error(
18012                        "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len
18013                      );
18014                    }
18015                    for (j2 = 0; j2 < copy_length; ++j2) {
18016                      ringbuffer[pos & ringbuffer_mask] = ringbuffer[pos - distance & ringbuffer_mask];
18017                      if ((pos & ringbuffer_mask) === ringbuffer_mask) {
18018                        output.write(
18019                          ringbuffer,
18020                          ringbuffer_size
18021                        );
18022                      }
18023                      ++pos;
18024                      --meta_block_remaining_len;
18025                    }
18026                  }
18027                  prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask];
18028                  prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask];
18029                }
18030                pos &= 1073741823;
18031              }
18032              output.write(ringbuffer, pos & ringbuffer_mask);
18033            }
18034            exports2.BrotliDecompress = BrotliDecompress;
18035            BrotliDictionary.init();
18036          },
18037          {
18038            "./bit_reader": 1,
18039            "./context": 2,
18040            "./dictionary": 6,
18041            "./huffman": 7,
18042            "./prefix": 9,
18043            "./streams": 10,
18044            "./transform": 11
18045          }
18046        ],
18047        4: [
18048          function(require2, module2, exports2) {
18049            var base64 = require2("base64-js");
18050            exports2.init = function() {
18051              var BrotliDecompressBuffer = require2("./decode").BrotliDecompressBuffer;
18052              var compressed = base64.toByteArray(
18053                require2("./dictionary.bin.js")
18054              );
18055              return BrotliDecompressBuffer(compressed);
18056            };
18057          },
18058          { "./decode": 3, "./dictionary.bin.js": 5, "base64-js": 8 }
18059        ],
18060        5: [
18061          function(require2, module2, exports2) {
18062            module2.exports = "W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdU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FDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg=";
18063          },
18064          {}
18065        ],
18066        6: [
18067          function(require2, module2, exports2) {
18068            var data = require2("./dictionary-browser");
18069            exports2.init = function() {
18070              exports2.dictionary = data.init();
18071            };
18072            exports2.offsetsByLength = new Uint32Array([
18073              0,
18074              0,
18075              0,
18076              0,
18077              0,
18078              4096,
18079              9216,
18080              21504,
18081              35840,
18082              44032,
18083              53248,
18084              63488,
18085              74752,
18086              87040,
18087              93696,
18088              100864,
18089              104704,
18090              106752,
18091              108928,
18092              113536,
18093              115968,
18094              118528,
18095              119872,
18096              121280,
18097              122016
18098            ]);
18099            exports2.sizeBitsByLength = new Uint8Array([
18100              0,
18101              0,
18102              0,
18103              0,
18104              10,
18105              10,
18106              11,
18107              11,
18108              10,
18109              10,
18110              10,
18111              10,
18112              10,
18113              9,
18114              9,
18115              8,
18116              7,
18117              7,
18118              8,
18119              7,
18120              7,
18121              6,
18122              6,
18123              5,
18124              5
18125            ]);
18126            exports2.minDictionaryWordLength = 4;
18127            exports2.maxDictionaryWordLength = 24;
18128          },
18129          { "./dictionary-browser": 4 }
18130        ],
18131        7: [
18132          function(require2, module2, exports2) {
18133            function HuffmanCode(bits, value) {
18134              this.bits = bits;
18135              this.value = value;
18136            }
18137            exports2.HuffmanCode = HuffmanCode;
18138            var MAX_LENGTH = 15;
18139            function GetNextKey(key, len) {
18140              var step = 1 << len - 1;
18141              while (key & step) {
18142                step >>= 1;
18143              }
18144              return (key & step - 1) + step;
18145            }
18146            function ReplicateValue(table, i, step, end, code) {
18147              do {
18148                end -= step;
18149                table[i + end] = new HuffmanCode(
18150                  code.bits,
18151                  code.value
18152                );
18153              } while (end > 0);
18154            }
18155            function NextTableBitSize(count, len, root_bits) {
18156              var left = 1 << len - root_bits;
18157              while (len < MAX_LENGTH) {
18158                left -= count[len];
18159                if (left <= 0) break;
18160                ++len;
18161                left <<= 1;
18162              }
18163              return len - root_bits;
18164            }
18165            exports2.BrotliBuildHuffmanTable = function(root_table, table, root_bits, code_lengths, code_lengths_size) {
18166              var start_table = table;
18167              var code;
18168              var len;
18169              var symbol;
18170              var key;
18171              var step;
18172              var low;
18173              var mask;
18174              var table_bits;
18175              var table_size;
18176              var total_size;
18177              var sorted;
18178              var count = new Int32Array(
18179                MAX_LENGTH + 1
18180              );
18181              var offset4 = new Int32Array(
18182                MAX_LENGTH + 1
18183              );
18184              sorted = new Int32Array(code_lengths_size);
18185              for (symbol = 0; symbol < code_lengths_size; symbol++) {
18186                count[code_lengths[symbol]]++;
18187              }
18188              offset4[1] = 0;
18189              for (len = 1; len < MAX_LENGTH; len++) {
18190                offset4[len + 1] = offset4[len] + count[len];
18191              }
18192              for (symbol = 0; symbol < code_lengths_size; symbol++) {
18193                if (code_lengths[symbol] !== 0) {
18194                  sorted[offset4[code_lengths[symbol]]++] = symbol;
18195                }
18196              }
18197              table_bits = root_bits;
18198              table_size = 1 << table_bits;
18199              total_size = table_size;
18200              if (offset4[MAX_LENGTH] === 1) {
18201                for (key = 0; key < total_size; ++key) {
18202                  root_table[table + key] = new HuffmanCode(
18203                    0,
18204                    sorted[0] & 65535
18205                  );
18206                }
18207                return total_size;
18208              }
18209              key = 0;
18210              symbol = 0;
18211              for (len = 1, step = 2; len <= root_bits; ++len, step <<= 1) {
18212                for (; count[len] > 0; --count[len]) {
18213                  code = new HuffmanCode(
18214                    len & 255,
18215                    sorted[symbol++] & 65535
18216                  );
18217                  ReplicateValue(
18218                    root_table,
18219                    table + key,
18220                    step,
18221                    table_size,
18222                    code
18223                  );
18224                  key = GetNextKey(key, len);
18225                }
18226              }
18227              mask = total_size - 1;
18228              low = -1;
18229              for (len = root_bits + 1, step = 2; len <= MAX_LENGTH; ++len, step <<= 1) {
18230                for (; count[len] > 0; --count[len]) {
18231                  if ((key & mask) !== low) {
18232                    table += table_size;
18233                    table_bits = NextTableBitSize(
18234                      count,
18235                      len,
18236                      root_bits
18237                    );
18238                    table_size = 1 << table_bits;
18239                    total_size += table_size;
18240                    low = key & mask;
18241                    root_table[start_table + low] = new HuffmanCode(
18242                      table_bits + root_bits & 255,
18243                      table - start_table - low & 65535
18244                    );
18245                  }
18246                  code = new HuffmanCode(
18247                    len - root_bits & 255,
18248                    sorted[symbol++] & 65535
18249                  );
18250                  ReplicateValue(
18251                    root_table,
18252                    table + (key >> root_bits),
18253                    step,
18254                    table_size,
18255                    code
18256                  );
18257                  key = GetNextKey(key, len);
18258                }
18259              }
18260              return total_size;
18261            };
18262          },
18263          {}
18264        ],
18265        8: [
18266          function(require2, module2, exports2) {
18267            "use strict";
18268            exports2.byteLength = byteLength;
18269            exports2.toByteArray = toByteArray;
18270            exports2.fromByteArray = fromByteArray;
18271            var lookup = [];
18272            var revLookup = [];
18273            var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
18274            var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
18275            for (var i = 0, len = code.length; i < len; ++i) {
18276              lookup[i] = code[i];
18277              revLookup[code.charCodeAt(i)] = i;
18278            }
18279            revLookup["-".charCodeAt(0)] = 62;
18280            revLookup["_".charCodeAt(0)] = 63;
18281            function getLens(b64) {
18282              var len2 = b64.length;
18283              if (len2 % 4 > 0) {
18284                throw new Error(
18285                  "Invalid string. Length must be a multiple of 4"
18286                );
18287              }
18288              var validLen = b64.indexOf("=");
18289              if (validLen === -1) validLen = len2;
18290              var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
18291              return [validLen, placeHoldersLen];
18292            }
18293            function byteLength(b64) {
18294              var lens = getLens(b64);
18295              var validLen = lens[0];
18296              var placeHoldersLen = lens[1];
18297              return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
18298            }
18299            function _byteLength(b64, validLen, placeHoldersLen) {
18300              return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
18301            }
18302            function toByteArray(b64) {
18303              var tmp;
18304              var lens = getLens(b64);
18305              var validLen = lens[0];
18306              var placeHoldersLen = lens[1];
18307              var arr = new Arr(
18308                _byteLength(b64, validLen, placeHoldersLen)
18309              );
18310              var curByte = 0;
18311              var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
18312              for (var i2 = 0; i2 < len2; i2 += 4) {
18313                tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];
18314                arr[curByte++] = tmp >> 16 & 255;
18315                arr[curByte++] = tmp >> 8 & 255;
18316                arr[curByte++] = tmp & 255;
18317              }
18318              if (placeHoldersLen === 2) {
18319                tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;
18320                arr[curByte++] = tmp & 255;
18321              }
18322              if (placeHoldersLen === 1) {
18323                tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;
18324                arr[curByte++] = tmp >> 8 & 255;
18325                arr[curByte++] = tmp & 255;
18326              }
18327              return arr;
18328            }
18329            function tripletToBase64(num) {
18330              return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
18331            }
18332            function encodeChunk(uint8, start, end) {
18333              var tmp;
18334              var output = [];
18335              for (var i2 = start; i2 < end; i2 += 3) {
18336                tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);
18337                output.push(tripletToBase64(tmp));
18338              }
18339              return output.join("");
18340            }
18341            function fromByteArray(uint8) {
18342              var tmp;
18343              var len2 = uint8.length;
18344              var extraBytes = len2 % 3;
18345              var parts = [];
18346              var maxChunkLength = 16383;
18347              for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {
18348                parts.push(
18349                  encodeChunk(
18350                    uint8,
18351                    i2,
18352                    i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength
18353                  )
18354                );
18355              }
18356              if (extraBytes === 1) {
18357                tmp = uint8[len2 - 1];
18358                parts.push(
18359                  lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
18360                );
18361              } else if (extraBytes === 2) {
18362                tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
18363                parts.push(
18364                  lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
18365                );
18366              }
18367              return parts.join("");
18368            }
18369          },
18370          {}
18371        ],
18372        9: [
18373          function(require2, module2, exports2) {
18374            function PrefixCodeRange(offset4, nbits) {
18375              this.offset = offset4;
18376              this.nbits = nbits;
18377            }
18378            exports2.kBlockLengthPrefixCode = [
18379              new PrefixCodeRange(1, 2),
18380              new PrefixCodeRange(5, 2),
18381              new PrefixCodeRange(9, 2),
18382              new PrefixCodeRange(13, 2),
18383              new PrefixCodeRange(17, 3),
18384              new PrefixCodeRange(25, 3),
18385              new PrefixCodeRange(33, 3),
18386              new PrefixCodeRange(41, 3),
18387              new PrefixCodeRange(49, 4),
18388              new PrefixCodeRange(65, 4),
18389              new PrefixCodeRange(81, 4),
18390              new PrefixCodeRange(97, 4),
18391              new PrefixCodeRange(113, 5),
18392              new PrefixCodeRange(145, 5),
18393              new PrefixCodeRange(177, 5),
18394              new PrefixCodeRange(209, 5),
18395              new PrefixCodeRange(241, 6),
18396              new PrefixCodeRange(305, 6),
18397              new PrefixCodeRange(369, 7),
18398              new PrefixCodeRange(497, 8),
18399              new PrefixCodeRange(753, 9),
18400              new PrefixCodeRange(1265, 10),
18401              new PrefixCodeRange(2289, 11),
18402              new PrefixCodeRange(4337, 12),
18403              new PrefixCodeRange(8433, 13),
18404              new PrefixCodeRange(16625, 24)
18405            ];
18406            exports2.kInsertLengthPrefixCode = [
18407              new PrefixCodeRange(0, 0),
18408              new PrefixCodeRange(1, 0),
18409              new PrefixCodeRange(2, 0),
18410              new PrefixCodeRange(3, 0),
18411              new PrefixCodeRange(4, 0),
18412              new PrefixCodeRange(5, 0),
18413              new PrefixCodeRange(6, 1),
18414              new PrefixCodeRange(8, 1),
18415              new PrefixCodeRange(10, 2),
18416              new PrefixCodeRange(14, 2),
18417              new PrefixCodeRange(18, 3),
18418              new PrefixCodeRange(26, 3),
18419              new PrefixCodeRange(34, 4),
18420              new PrefixCodeRange(50, 4),
18421              new PrefixCodeRange(66, 5),
18422              new PrefixCodeRange(98, 5),
18423              new PrefixCodeRange(130, 6),
18424              new PrefixCodeRange(194, 7),
18425              new PrefixCodeRange(322, 8),
18426              new PrefixCodeRange(578, 9),
18427              new PrefixCodeRange(1090, 10),
18428              new PrefixCodeRange(2114, 12),
18429              new PrefixCodeRange(6210, 14),
18430              new PrefixCodeRange(22594, 24)
18431            ];
18432            exports2.kCopyLengthPrefixCode = [
18433              new PrefixCodeRange(2, 0),
18434              new PrefixCodeRange(3, 0),
18435              new PrefixCodeRange(4, 0),
18436              new PrefixCodeRange(5, 0),
18437              new PrefixCodeRange(6, 0),
18438              new PrefixCodeRange(7, 0),
18439              new PrefixCodeRange(8, 0),
18440              new PrefixCodeRange(9, 0),
18441              new PrefixCodeRange(10, 1),
18442              new PrefixCodeRange(12, 1),
18443              new PrefixCodeRange(14, 2),
18444              new PrefixCodeRange(18, 2),
18445              new PrefixCodeRange(22, 3),
18446              new PrefixCodeRange(30, 3),
18447              new PrefixCodeRange(38, 4),
18448              new PrefixCodeRange(54, 4),
18449              new PrefixCodeRange(70, 5),
18450              new PrefixCodeRange(102, 5),
18451              new PrefixCodeRange(134, 6),
18452              new PrefixCodeRange(198, 7),
18453              new PrefixCodeRange(326, 8),
18454              new PrefixCodeRange(582, 9),
18455              new PrefixCodeRange(1094, 10),
18456              new PrefixCodeRange(2118, 24)
18457            ];
18458            exports2.kInsertRangeLut = [0, 0, 8, 8, 0, 16, 8, 16, 16];
18459            exports2.kCopyRangeLut = [0, 8, 0, 8, 16, 0, 16, 8, 16];
18460          },
18461          {}
18462        ],
18463        10: [
18464          function(require2, module2, exports2) {
18465            function BrotliInput(buffer) {
18466              this.buffer = buffer;
18467              this.pos = 0;
18468            }
18469            BrotliInput.prototype.read = function(buf, i, count) {
18470              if (this.pos + count > this.buffer.length) {
18471                count = this.buffer.length - this.pos;
18472              }
18473              for (var p3 = 0; p3 < count; p3++)
18474                buf[i + p3] = this.buffer[this.pos + p3];
18475              this.pos += count;
18476              return count;
18477            };
18478            exports2.BrotliInput = BrotliInput;
18479            function BrotliOutput(buf) {
18480              this.buffer = buf;
18481              this.pos = 0;
18482            }
18483            BrotliOutput.prototype.write = function(buf, count) {
18484              if (this.pos + count > this.buffer.length)
18485                throw new Error(
18486                  "Output buffer is not large enough"
18487                );
18488              this.buffer.set(buf.subarray(0, count), this.pos);
18489              this.pos += count;
18490              return count;
18491            };
18492            exports2.BrotliOutput = BrotliOutput;
18493          },
18494          {}
18495        ],
18496        11: [
18497          function(require2, module2, exports2) {
18498            var BrotliDictionary = require2("./dictionary");
18499            var kIdentity = 0;
18500            var kOmitLast1 = 1;
18501            var kOmitLast2 = 2;
18502            var kOmitLast3 = 3;
18503            var kOmitLast4 = 4;
18504            var kOmitLast5 = 5;
18505            var kOmitLast6 = 6;
18506            var kOmitLast7 = 7;
18507            var kOmitLast8 = 8;
18508            var kOmitLast9 = 9;
18509            var kUppercaseFirst = 10;
18510            var kUppercaseAll = 11;
18511            var kOmitFirst1 = 12;
18512            var kOmitFirst2 = 13;
18513            var kOmitFirst3 = 14;
18514            var kOmitFirst4 = 15;
18515            var kOmitFirst5 = 16;
18516            var kOmitFirst6 = 17;
18517            var kOmitFirst7 = 18;
18518            var kOmitFirst8 = 19;
18519            var kOmitFirst9 = 20;
18520            function Transform(prefix, transform, suffix) {
18521              this.prefix = new Uint8Array(prefix.length);
18522              this.transform = transform;
18523              this.suffix = new Uint8Array(suffix.length);
18524              for (var i = 0; i < prefix.length; i++)
18525                this.prefix[i] = prefix.charCodeAt(i);
18526              for (var i = 0; i < suffix.length; i++)
18527                this.suffix[i] = suffix.charCodeAt(i);
18528            }
18529            var kTransforms = [
18530              new Transform("", kIdentity, ""),
18531              new Transform("", kIdentity, " "),
18532              new Transform(" ", kIdentity, " "),
18533              new Transform("", kOmitFirst1, ""),
18534              new Transform("", kUppercaseFirst, " "),
18535              new Transform("", kIdentity, " the "),
18536              new Transform(" ", kIdentity, ""),
18537              new Transform("s ", kIdentity, " "),
18538              new Transform("", kIdentity, " of "),
18539              new Transform("", kUppercaseFirst, ""),
18540              new Transform("", kIdentity, " and "),
18541              new Transform("", kOmitFirst2, ""),
18542              new Transform("", kOmitLast1, ""),
18543              new Transform(", ", kIdentity, " "),
18544              new Transform("", kIdentity, ", "),
18545              new Transform(" ", kUppercaseFirst, " "),
18546              new Transform("", kIdentity, " in "),
18547              new Transform("", kIdentity, " to "),
18548              new Transform("e ", kIdentity, " "),
18549              new Transform("", kIdentity, '"'),
18550              new Transform("", kIdentity, "."),
18551              new Transform("", kIdentity, '">'),
18552              new Transform("", kIdentity, "\n"),
18553              new Transform("", kOmitLast3, ""),
18554              new Transform("", kIdentity, "]"),
18555              new Transform("", kIdentity, " for "),
18556              new Transform("", kOmitFirst3, ""),
18557              new Transform("", kOmitLast2, ""),
18558              new Transform("", kIdentity, " a "),
18559              new Transform("", kIdentity, " that "),
18560              new Transform(" ", kUppercaseFirst, ""),
18561              new Transform("", kIdentity, ". "),
18562              new Transform(".", kIdentity, ""),
18563              new Transform(" ", kIdentity, ", "),
18564              new Transform("", kOmitFirst4, ""),
18565              new Transform("", kIdentity, " with "),
18566              new Transform("", kIdentity, "'"),
18567              new Transform("", kIdentity, " from "),
18568              new Transform("", kIdentity, " by "),
18569              new Transform("", kOmitFirst5, ""),
18570              new Transform("", kOmitFirst6, ""),
18571              new Transform(" the ", kIdentity, ""),
18572              new Transform("", kOmitLast4, ""),
18573              new Transform("", kIdentity, ". The "),
18574              new Transform("", kUppercaseAll, ""),
18575              new Transform("", kIdentity, " on "),
18576              new Transform("", kIdentity, " as "),
18577              new Transform("", kIdentity, " is "),
18578              new Transform("", kOmitLast7, ""),
18579              new Transform("", kOmitLast1, "ing "),
18580              new Transform("", kIdentity, "\n    "),
18581              new Transform("", kIdentity, ":"),
18582              new Transform(" ", kIdentity, ". "),
18583              new Transform("", kIdentity, "ed "),
18584              new Transform("", kOmitFirst9, ""),
18585              new Transform("", kOmitFirst7, ""),
18586              new Transform("", kOmitLast6, ""),
18587              new Transform("", kIdentity, "("),
18588              new Transform("", kUppercaseFirst, ", "),
18589              new Transform("", kOmitLast8, ""),
18590              new Transform("", kIdentity, " at "),
18591              new Transform("", kIdentity, "ly "),
18592              new Transform(" the ", kIdentity, " of "),
18593              new Transform("", kOmitLast5, ""),
18594              new Transform("", kOmitLast9, ""),
18595              new Transform(" ", kUppercaseFirst, ", "),
18596              new Transform("", kUppercaseFirst, '"'),
18597              new Transform(".", kIdentity, "("),
18598              new Transform("", kUppercaseAll, " "),
18599              new Transform("", kUppercaseFirst, '">'),
18600              new Transform("", kIdentity, '="'),
18601              new Transform(" ", kIdentity, "."),
18602              new Transform(".com/", kIdentity, ""),
18603              new Transform(" the ", kIdentity, " of the "),
18604              new Transform("", kUppercaseFirst, "'"),
18605              new Transform("", kIdentity, ". This "),
18606              new Transform("", kIdentity, ","),
18607              new Transform(".", kIdentity, " "),
18608              new Transform("", kUppercaseFirst, "("),
18609              new Transform("", kUppercaseFirst, "."),
18610              new Transform("", kIdentity, " not "),
18611              new Transform(" ", kIdentity, '="'),
18612              new Transform("", kIdentity, "er "),
18613              new Transform(" ", kUppercaseAll, " "),
18614              new Transform("", kIdentity, "al "),
18615              new Transform(" ", kUppercaseAll, ""),
18616              new Transform("", kIdentity, "='"),
18617              new Transform("", kUppercaseAll, '"'),
18618              new Transform("", kUppercaseFirst, ". "),
18619              new Transform(" ", kIdentity, "("),
18620              new Transform("", kIdentity, "ful "),
18621              new Transform(" ", kUppercaseFirst, ". "),
18622              new Transform("", kIdentity, "ive "),
18623              new Transform("", kIdentity, "less "),
18624              new Transform("", kUppercaseAll, "'"),
18625              new Transform("", kIdentity, "est "),
18626              new Transform(" ", kUppercaseFirst, "."),
18627              new Transform("", kUppercaseAll, '">'),
18628              new Transform(" ", kIdentity, "='"),
18629              new Transform("", kUppercaseFirst, ","),
18630              new Transform("", kIdentity, "ize "),
18631              new Transform("", kUppercaseAll, "."),
18632              new Transform("\xC2\xA0", kIdentity, ""),
18633              new Transform(" ", kIdentity, ","),
18634              new Transform("", kUppercaseFirst, '="'),
18635              new Transform("", kUppercaseAll, '="'),
18636              new Transform("", kIdentity, "ous "),
18637              new Transform("", kUppercaseAll, ", "),
18638              new Transform("", kUppercaseFirst, "='"),
18639              new Transform(" ", kUppercaseFirst, ","),
18640              new Transform(" ", kUppercaseAll, '="'),
18641              new Transform(" ", kUppercaseAll, ", "),
18642              new Transform("", kUppercaseAll, ","),
18643              new Transform("", kUppercaseAll, "("),
18644              new Transform("", kUppercaseAll, ". "),
18645              new Transform(" ", kUppercaseAll, "."),
18646              new Transform("", kUppercaseAll, "='"),
18647              new Transform(" ", kUppercaseAll, ". "),
18648              new Transform(" ", kUppercaseFirst, '="'),
18649              new Transform(" ", kUppercaseAll, "='"),
18650              new Transform(" ", kUppercaseFirst, "='")
18651            ];
18652            exports2.kTransforms = kTransforms;
18653            exports2.kNumTransforms = kTransforms.length;
18654            function ToUpperCase(p3, i) {
18655              if (p3[i] < 192) {
18656                if (p3[i] >= 97 && p3[i] <= 122) {
18657                  p3[i] ^= 32;
18658                }
18659                return 1;
18660              }
18661              if (p3[i] < 224) {
18662                p3[i + 1] ^= 32;
18663                return 2;
18664              }
18665              p3[i + 2] ^= 5;
18666              return 3;
18667            }
18668            exports2.transformDictionaryWord = function(dst, idx, word, len, transform) {
18669              var prefix = kTransforms[transform].prefix;
18670              var suffix = kTransforms[transform].suffix;
18671              var t = kTransforms[transform].transform;
18672              var skip = t < kOmitFirst1 ? 0 : t - (kOmitFirst1 - 1);
18673              var i = 0;
18674              var start_idx = idx;
18675              var uppercase;
18676              if (skip > len) {
18677                skip = len;
18678              }
18679              var prefix_pos = 0;
18680              while (prefix_pos < prefix.length) {
18681                dst[idx++] = prefix[prefix_pos++];
18682              }
18683              word += skip;
18684              len -= skip;
18685              if (t <= kOmitLast9) {
18686                len -= t;
18687              }
18688              for (i = 0; i < len; i++) {
18689                dst[idx++] = BrotliDictionary.dictionary[word + i];
18690              }
18691              uppercase = idx - len;
18692              if (t === kUppercaseFirst) {
18693                ToUpperCase(dst, uppercase);
18694              } else if (t === kUppercaseAll) {
18695                while (len > 0) {
18696                  var step = ToUpperCase(dst, uppercase);
18697                  uppercase += step;
18698                  len -= step;
18699                }
18700              }
18701              var suffix_pos = 0;
18702              while (suffix_pos < suffix.length) {
18703                dst[idx++] = suffix[suffix_pos++];
18704              }
18705              return idx - start_idx;
18706            };
18707          },
18708          { "./dictionary": 6 }
18709        ],
18710        12: [
18711          function(require2, module2, exports2) {
18712            module2.exports = require2("./dec/decode").BrotliDecompressBuffer;
18713          },
18714          { "./dec/decode": 3 }
18715        ]
18716      },
18717      {},
18718      [12]
18719    )(12);
18720  })();
18721  
18722  // packages/global-styles-ui/build-module/font-library/lib/inflate.mjs
18723  var __require3 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, {
18724    get: (a, b) => (typeof __require !== "undefined" ? __require : a)[b]
18725  }) : x2)(function(x2) {
18726    if (typeof __require !== "undefined") return __require.apply(this, arguments);
18727    throw Error('Dynamic require of "' + x2 + '" is not supported');
18728  });
18729  var inflate_default = (function() {
18730    var define, module, exports;
18731    return (/* @__PURE__ */ (function() {
18732      function r2(e, n, t) {
18733        function o(i2, f) {
18734          if (!n[i2]) {
18735            if (!e[i2]) {
18736              var c2 = "function" == typeof __require3 && __require3;
18737              if (!f && c2) return c2(i2, true);
18738              if (u) return u(i2, true);
18739              var a = new Error("Cannot find module '" + i2 + "'");
18740              throw a.code = "MODULE_NOT_FOUND", a;
18741            }
18742            var p3 = n[i2] = { exports: {} };
18743            e[i2][0].call(
18744              p3.exports,
18745              function(r22) {
18746                var n2 = e[i2][1][r22];
18747                return o(n2 || r22);
18748              },
18749              p3,
18750              p3.exports,
18751              r2,
18752              e,
18753              n,
18754              t
18755            );
18756          }
18757          return n[i2].exports;
18758        }
18759        for (var u = "function" == typeof __require3 && __require3, i = 0; i < t.length; i++)
18760          o(t[i]);
18761        return o;
18762      }
18763      return r2;
18764    })())(
18765      {
18766        1: [
18767          function(require2, module2, exports2) {
18768            "use strict";
18769            var TYPED_OK = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Int32Array !== "undefined";
18770            function _has(obj, key) {
18771              return Object.prototype.hasOwnProperty.call(obj, key);
18772            }
18773            exports2.assign = function(obj) {
18774              var sources = Array.prototype.slice.call(
18775                arguments,
18776                1
18777              );
18778              while (sources.length) {
18779                var source = sources.shift();
18780                if (!source) {
18781                  continue;
18782                }
18783                if (typeof source !== "object") {
18784                  throw new TypeError(
18785                    source + "must be non-object"
18786                  );
18787                }
18788                for (var p3 in source) {
18789                  if (_has(source, p3)) {
18790                    obj[p3] = source[p3];
18791                  }
18792                }
18793              }
18794              return obj;
18795            };
18796            exports2.shrinkBuf = function(buf, size4) {
18797              if (buf.length === size4) {
18798                return buf;
18799              }
18800              if (buf.subarray) {
18801                return buf.subarray(0, size4);
18802              }
18803              buf.length = size4;
18804              return buf;
18805            };
18806            var fnTyped = {
18807              arraySet: function(dest, src, src_offs, len, dest_offs) {
18808                if (src.subarray && dest.subarray) {
18809                  dest.set(
18810                    src.subarray(src_offs, src_offs + len),
18811                    dest_offs
18812                  );
18813                  return;
18814                }
18815                for (var i = 0; i < len; i++) {
18816                  dest[dest_offs + i] = src[src_offs + i];
18817                }
18818              },
18819              // Join array of chunks to single array.
18820              flattenChunks: function(chunks) {
18821                var i, l2, len, pos, chunk, result;
18822                len = 0;
18823                for (i = 0, l2 = chunks.length; i < l2; i++) {
18824                  len += chunks[i].length;
18825                }
18826                result = new Uint8Array(len);
18827                pos = 0;
18828                for (i = 0, l2 = chunks.length; i < l2; i++) {
18829                  chunk = chunks[i];
18830                  result.set(chunk, pos);
18831                  pos += chunk.length;
18832                }
18833                return result;
18834              }
18835            };
18836            var fnUntyped = {
18837              arraySet: function(dest, src, src_offs, len, dest_offs) {
18838                for (var i = 0; i < len; i++) {
18839                  dest[dest_offs + i] = src[src_offs + i];
18840                }
18841              },
18842              // Join array of chunks to single array.
18843              flattenChunks: function(chunks) {
18844                return [].concat.apply([], chunks);
18845              }
18846            };
18847            exports2.setTyped = function(on) {
18848              if (on) {
18849                exports2.Buf8 = Uint8Array;
18850                exports2.Buf16 = Uint16Array;
18851                exports2.Buf32 = Int32Array;
18852                exports2.assign(exports2, fnTyped);
18853              } else {
18854                exports2.Buf8 = Array;
18855                exports2.Buf16 = Array;
18856                exports2.Buf32 = Array;
18857                exports2.assign(exports2, fnUntyped);
18858              }
18859            };
18860            exports2.setTyped(TYPED_OK);
18861          },
18862          {}
18863        ],
18864        2: [
18865          function(require2, module2, exports2) {
18866            "use strict";
18867            var utils = require2("./common");
18868            var STR_APPLY_OK = true;
18869            var STR_APPLY_UIA_OK = true;
18870            try {
18871              String.fromCharCode.apply(null, [0]);
18872            } catch (__47) {
18873              STR_APPLY_OK = false;
18874            }
18875            try {
18876              String.fromCharCode.apply(null, new Uint8Array(1));
18877            } catch (__47) {
18878              STR_APPLY_UIA_OK = false;
18879            }
18880            var _utf8len = new utils.Buf8(256);
18881            for (var q2 = 0; q2 < 256; q2++) {
18882              _utf8len[q2] = q2 >= 252 ? 6 : q2 >= 248 ? 5 : q2 >= 240 ? 4 : q2 >= 224 ? 3 : q2 >= 192 ? 2 : 1;
18883            }
18884            _utf8len[254] = _utf8len[254] = 1;
18885            exports2.string2buf = function(str) {
18886              var buf, c2, c22, m_pos, i, str_len = str.length, buf_len = 0;
18887              for (m_pos = 0; m_pos < str_len; m_pos++) {
18888                c2 = str.charCodeAt(m_pos);
18889                if ((c2 & 64512) === 55296 && m_pos + 1 < str_len) {
18890                  c22 = str.charCodeAt(m_pos + 1);
18891                  if ((c22 & 64512) === 56320) {
18892                    c2 = 65536 + (c2 - 55296 << 10) + (c22 - 56320);
18893                    m_pos++;
18894                  }
18895                }
18896                buf_len += c2 < 128 ? 1 : c2 < 2048 ? 2 : c2 < 65536 ? 3 : 4;
18897              }
18898              buf = new utils.Buf8(buf_len);
18899              for (i = 0, m_pos = 0; i < buf_len; m_pos++) {
18900                c2 = str.charCodeAt(m_pos);
18901                if ((c2 & 64512) === 55296 && m_pos + 1 < str_len) {
18902                  c22 = str.charCodeAt(m_pos + 1);
18903                  if ((c22 & 64512) === 56320) {
18904                    c2 = 65536 + (c2 - 55296 << 10) + (c22 - 56320);
18905                    m_pos++;
18906                  }
18907                }
18908                if (c2 < 128) {
18909                  buf[i++] = c2;
18910                } else if (c2 < 2048) {
18911                  buf[i++] = 192 | c2 >>> 6;
18912                  buf[i++] = 128 | c2 & 63;
18913                } else if (c2 < 65536) {
18914                  buf[i++] = 224 | c2 >>> 12;
18915                  buf[i++] = 128 | c2 >>> 6 & 63;
18916                  buf[i++] = 128 | c2 & 63;
18917                } else {
18918                  buf[i++] = 240 | c2 >>> 18;
18919                  buf[i++] = 128 | c2 >>> 12 & 63;
18920                  buf[i++] = 128 | c2 >>> 6 & 63;
18921                  buf[i++] = 128 | c2 & 63;
18922                }
18923              }
18924              return buf;
18925            };
18926            function buf2binstring(buf, len) {
18927              if (len < 65534) {
18928                if (buf.subarray && STR_APPLY_UIA_OK || !buf.subarray && STR_APPLY_OK) {
18929                  return String.fromCharCode.apply(
18930                    null,
18931                    utils.shrinkBuf(buf, len)
18932                  );
18933                }
18934              }
18935              var result = "";
18936              for (var i = 0; i < len; i++) {
18937                result += String.fromCharCode(buf[i]);
18938              }
18939              return result;
18940            }
18941            exports2.buf2binstring = function(buf) {
18942              return buf2binstring(buf, buf.length);
18943            };
18944            exports2.binstring2buf = function(str) {
18945              var buf = new utils.Buf8(str.length);
18946              for (var i = 0, len = buf.length; i < len; i++) {
18947                buf[i] = str.charCodeAt(i);
18948              }
18949              return buf;
18950            };
18951            exports2.buf2string = function(buf, max2) {
18952              var i, out, c2, c_len;
18953              var len = max2 || buf.length;
18954              var utf16buf = new Array(len * 2);
18955              for (out = 0, i = 0; i < len; ) {
18956                c2 = buf[i++];
18957                if (c2 < 128) {
18958                  utf16buf[out++] = c2;
18959                  continue;
18960                }
18961                c_len = _utf8len[c2];
18962                if (c_len > 4) {
18963                  utf16buf[out++] = 65533;
18964                  i += c_len - 1;
18965                  continue;
18966                }
18967                c2 &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7;
18968                while (c_len > 1 && i < len) {
18969                  c2 = c2 << 6 | buf[i++] & 63;
18970                  c_len--;
18971                }
18972                if (c_len > 1) {
18973                  utf16buf[out++] = 65533;
18974                  continue;
18975                }
18976                if (c2 < 65536) {
18977                  utf16buf[out++] = c2;
18978                } else {
18979                  c2 -= 65536;
18980                  utf16buf[out++] = 55296 | c2 >> 10 & 1023;
18981                  utf16buf[out++] = 56320 | c2 & 1023;
18982                }
18983              }
18984              return buf2binstring(utf16buf, out);
18985            };
18986            exports2.utf8border = function(buf, max2) {
18987              var pos;
18988              max2 = max2 || buf.length;
18989              if (max2 > buf.length) {
18990                max2 = buf.length;
18991              }
18992              pos = max2 - 1;
18993              while (pos >= 0 && (buf[pos] & 192) === 128) {
18994                pos--;
18995              }
18996              if (pos < 0) {
18997                return max2;
18998              }
18999              if (pos === 0) {
19000                return max2;
19001              }
19002              return pos + _utf8len[buf[pos]] > max2 ? pos : max2;
19003            };
19004          },
19005          { "./common": 1 }
19006        ],
19007        3: [
19008          function(require2, module2, exports2) {
19009            "use strict";
19010            function adler32(adler, buf, len, pos) {
19011              var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0;
19012              while (len !== 0) {
19013                n = len > 2e3 ? 2e3 : len;
19014                len -= n;
19015                do {
19016                  s1 = s1 + buf[pos++] | 0;
19017                  s2 = s2 + s1 | 0;
19018                } while (--n);
19019                s1 %= 65521;
19020                s2 %= 65521;
19021              }
19022              return s1 | s2 << 16 | 0;
19023            }
19024            module2.exports = adler32;
19025          },
19026          {}
19027        ],
19028        4: [
19029          function(require2, module2, exports2) {
19030            "use strict";
19031            module2.exports = {
19032              /* Allowed flush values; see deflate() and inflate() below for details */
19033              Z_NO_FLUSH: 0,
19034              Z_PARTIAL_FLUSH: 1,
19035              Z_SYNC_FLUSH: 2,
19036              Z_FULL_FLUSH: 3,
19037              Z_FINISH: 4,
19038              Z_BLOCK: 5,
19039              Z_TREES: 6,
19040              /* Return codes for the compression/decompression functions. Negative values
19041               * are errors, positive values are used for special but normal events.
19042               */
19043              Z_OK: 0,
19044              Z_STREAM_END: 1,
19045              Z_NEED_DICT: 2,
19046              Z_ERRNO: -1,
19047              Z_STREAM_ERROR: -2,
19048              Z_DATA_ERROR: -3,
19049              //Z_MEM_ERROR:     -4,
19050              Z_BUF_ERROR: -5,
19051              //Z_VERSION_ERROR: -6,
19052              /* compression levels */
19053              Z_NO_COMPRESSION: 0,
19054              Z_BEST_SPEED: 1,
19055              Z_BEST_COMPRESSION: 9,
19056              Z_DEFAULT_COMPRESSION: -1,
19057              Z_FILTERED: 1,
19058              Z_HUFFMAN_ONLY: 2,
19059              Z_RLE: 3,
19060              Z_FIXED: 4,
19061              Z_DEFAULT_STRATEGY: 0,
19062              /* Possible values of the data_type field (though see inflate()) */
19063              Z_BINARY: 0,
19064              Z_TEXT: 1,
19065              //Z_ASCII:                1, // = Z_TEXT (deprecated)
19066              Z_UNKNOWN: 2,
19067              /* The deflate compression method */
19068              Z_DEFLATED: 8
19069              //Z_NULL:                 null // Use -1 or null inline, depending on var type
19070            };
19071          },
19072          {}
19073        ],
19074        5: [
19075          function(require2, module2, exports2) {
19076            "use strict";
19077            function makeTable() {
19078              var c2, table = [];
19079              for (var n = 0; n < 256; n++) {
19080                c2 = n;
19081                for (var k2 = 0; k2 < 8; k2++) {
19082                  c2 = c2 & 1 ? 3988292384 ^ c2 >>> 1 : c2 >>> 1;
19083                }
19084                table[n] = c2;
19085              }
19086              return table;
19087            }
19088            var crcTable = makeTable();
19089            function crc32(crc, buf, len, pos) {
19090              var t = crcTable, end = pos + len;
19091              crc ^= -1;
19092              for (var i = pos; i < end; i++) {
19093                crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255];
19094              }
19095              return crc ^ -1;
19096            }
19097            module2.exports = crc32;
19098          },
19099          {}
19100        ],
19101        6: [
19102          function(require2, module2, exports2) {
19103            "use strict";
19104            function GZheader() {
19105              this.text = 0;
19106              this.time = 0;
19107              this.xflags = 0;
19108              this.os = 0;
19109              this.extra = null;
19110              this.extra_len = 0;
19111              this.name = "";
19112              this.comment = "";
19113              this.hcrc = 0;
19114              this.done = false;
19115            }
19116            module2.exports = GZheader;
19117          },
19118          {}
19119        ],
19120        7: [
19121          function(require2, module2, exports2) {
19122            "use strict";
19123            var BAD = 30;
19124            var TYPE = 12;
19125            module2.exports = function inflate_fast(strm, start) {
19126              var state;
19127              var _in;
19128              var last;
19129              var _out;
19130              var beg;
19131              var end;
19132              var dmax;
19133              var wsize;
19134              var whave;
19135              var wnext;
19136              var s_window;
19137              var hold;
19138              var bits;
19139              var lcode;
19140              var dcode;
19141              var lmask;
19142              var dmask;
19143              var here;
19144              var op;
19145              var len;
19146              var dist;
19147              var from;
19148              var from_source;
19149              var input, output;
19150              state = strm.state;
19151              _in = strm.next_in;
19152              input = strm.input;
19153              last = _in + (strm.avail_in - 5);
19154              _out = strm.next_out;
19155              output = strm.output;
19156              beg = _out - (start - strm.avail_out);
19157              end = _out + (strm.avail_out - 257);
19158              dmax = state.dmax;
19159              wsize = state.wsize;
19160              whave = state.whave;
19161              wnext = state.wnext;
19162              s_window = state.window;
19163              hold = state.hold;
19164              bits = state.bits;
19165              lcode = state.lencode;
19166              dcode = state.distcode;
19167              lmask = (1 << state.lenbits) - 1;
19168              dmask = (1 << state.distbits) - 1;
19169              top: do {
19170                if (bits < 15) {
19171                  hold += input[_in++] << bits;
19172                  bits += 8;
19173                  hold += input[_in++] << bits;
19174                  bits += 8;
19175                }
19176                here = lcode[hold & lmask];
19177                dolen: for (; ; ) {
19178                  op = here >>> 24;
19179                  hold >>>= op;
19180                  bits -= op;
19181                  op = here >>> 16 & 255;
19182                  if (op === 0) {
19183                    output[_out++] = here & 65535;
19184                  } else if (op & 16) {
19185                    len = here & 65535;
19186                    op &= 15;
19187                    if (op) {
19188                      if (bits < op) {
19189                        hold += input[_in++] << bits;
19190                        bits += 8;
19191                      }
19192                      len += hold & (1 << op) - 1;
19193                      hold >>>= op;
19194                      bits -= op;
19195                    }
19196                    if (bits < 15) {
19197                      hold += input[_in++] << bits;
19198                      bits += 8;
19199                      hold += input[_in++] << bits;
19200                      bits += 8;
19201                    }
19202                    here = dcode[hold & dmask];
19203                    dodist: for (; ; ) {
19204                      op = here >>> 24;
19205                      hold >>>= op;
19206                      bits -= op;
19207                      op = here >>> 16 & 255;
19208                      if (op & 16) {
19209                        dist = here & 65535;
19210                        op &= 15;
19211                        if (bits < op) {
19212                          hold += input[_in++] << bits;
19213                          bits += 8;
19214                          if (bits < op) {
19215                            hold += input[_in++] << bits;
19216                            bits += 8;
19217                          }
19218                        }
19219                        dist += hold & (1 << op) - 1;
19220                        if (dist > dmax) {
19221                          strm.msg = "invalid distance too far back";
19222                          state.mode = BAD;
19223                          break top;
19224                        }
19225                        hold >>>= op;
19226                        bits -= op;
19227                        op = _out - beg;
19228                        if (dist > op) {
19229                          op = dist - op;
19230                          if (op > whave) {
19231                            if (state.sane) {
19232                              strm.msg = "invalid distance too far back";
19233                              state.mode = BAD;
19234                              break top;
19235                            }
19236                          }
19237                          from = 0;
19238                          from_source = s_window;
19239                          if (wnext === 0) {
19240                            from += wsize - op;
19241                            if (op < len) {
19242                              len -= op;
19243                              do {
19244                                output[_out++] = s_window[from++];
19245                              } while (--op);
19246                              from = _out - dist;
19247                              from_source = output;
19248                            }
19249                          } else if (wnext < op) {
19250                            from += wsize + wnext - op;
19251                            op -= wnext;
19252                            if (op < len) {
19253                              len -= op;
19254                              do {
19255                                output[_out++] = s_window[from++];
19256                              } while (--op);
19257                              from = 0;
19258                              if (wnext < len) {
19259                                op = wnext;
19260                                len -= op;
19261                                do {
19262                                  output[_out++] = s_window[from++];
19263                                } while (--op);
19264                                from = _out - dist;
19265                                from_source = output;
19266                              }
19267                            }
19268                          } else {
19269                            from += wnext - op;
19270                            if (op < len) {
19271                              len -= op;
19272                              do {
19273                                output[_out++] = s_window[from++];
19274                              } while (--op);
19275                              from = _out - dist;
19276                              from_source = output;
19277                            }
19278                          }
19279                          while (len > 2) {
19280                            output[_out++] = from_source[from++];
19281                            output[_out++] = from_source[from++];
19282                            output[_out++] = from_source[from++];
19283                            len -= 3;
19284                          }
19285                          if (len) {
19286                            output[_out++] = from_source[from++];
19287                            if (len > 1) {
19288                              output[_out++] = from_source[from++];
19289                            }
19290                          }
19291                        } else {
19292                          from = _out - dist;
19293                          do {
19294                            output[_out++] = output[from++];
19295                            output[_out++] = output[from++];
19296                            output[_out++] = output[from++];
19297                            len -= 3;
19298                          } while (len > 2);
19299                          if (len) {
19300                            output[_out++] = output[from++];
19301                            if (len > 1) {
19302                              output[_out++] = output[from++];
19303                            }
19304                          }
19305                        }
19306                      } else if ((op & 64) === 0) {
19307                        here = dcode[(here & 65535) + (hold & (1 << op) - 1)];
19308                        continue dodist;
19309                      } else {
19310                        strm.msg = "invalid distance code";
19311                        state.mode = BAD;
19312                        break top;
19313                      }
19314                      break;
19315                    }
19316                  } else if ((op & 64) === 0) {
19317                    here = lcode[(here & 65535) + (hold & (1 << op) - 1)];
19318                    continue dolen;
19319                  } else if (op & 32) {
19320                    state.mode = TYPE;
19321                    break top;
19322                  } else {
19323                    strm.msg = "invalid literal/length code";
19324                    state.mode = BAD;
19325                    break top;
19326                  }
19327                  break;
19328                }
19329              } while (_in < last && _out < end);
19330              len = bits >> 3;
19331              _in -= len;
19332              bits -= len << 3;
19333              hold &= (1 << bits) - 1;
19334              strm.next_in = _in;
19335              strm.next_out = _out;
19336              strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last);
19337              strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end);
19338              state.hold = hold;
19339              state.bits = bits;
19340              return;
19341            };
19342          },
19343          {}
19344        ],
19345        8: [
19346          function(require2, module2, exports2) {
19347            "use strict";
19348            var utils = require2("../utils/common");
19349            var adler32 = require2("./adler32");
19350            var crc32 = require2("./crc32");
19351            var inflate_fast = require2("./inffast");
19352            var inflate_table = require2("./inftrees");
19353            var CODES = 0;
19354            var LENS = 1;
19355            var DISTS = 2;
19356            var Z_FINISH = 4;
19357            var Z_BLOCK = 5;
19358            var Z_TREES = 6;
19359            var Z_OK = 0;
19360            var Z_STREAM_END = 1;
19361            var Z_NEED_DICT = 2;
19362            var Z_STREAM_ERROR = -2;
19363            var Z_DATA_ERROR = -3;
19364            var Z_MEM_ERROR = -4;
19365            var Z_BUF_ERROR = -5;
19366            var Z_DEFLATED = 8;
19367            var HEAD = 1;
19368            var FLAGS = 2;
19369            var TIME = 3;
19370            var OS = 4;
19371            var EXLEN = 5;
19372            var EXTRA = 6;
19373            var NAME = 7;
19374            var COMMENT = 8;
19375            var HCRC = 9;
19376            var DICTID = 10;
19377            var DICT = 11;
19378            var TYPE = 12;
19379            var TYPEDO = 13;
19380            var STORED = 14;
19381            var COPY_ = 15;
19382            var COPY = 16;
19383            var TABLE = 17;
19384            var LENLENS = 18;
19385            var CODELENS = 19;
19386            var LEN_ = 20;
19387            var LEN = 21;
19388            var LENEXT = 22;
19389            var DIST = 23;
19390            var DISTEXT = 24;
19391            var MATCH = 25;
19392            var LIT = 26;
19393            var CHECK = 27;
19394            var LENGTH = 28;
19395            var DONE = 29;
19396            var BAD = 30;
19397            var MEM = 31;
19398            var SYNC = 32;
19399            var ENOUGH_LENS = 852;
19400            var ENOUGH_DISTS = 592;
19401            var MAX_WBITS = 15;
19402            var DEF_WBITS = MAX_WBITS;
19403            function zswap32(q2) {
19404              return (q2 >>> 24 & 255) + (q2 >>> 8 & 65280) + ((q2 & 65280) << 8) + ((q2 & 255) << 24);
19405            }
19406            function InflateState() {
19407              this.mode = 0;
19408              this.last = false;
19409              this.wrap = 0;
19410              this.havedict = false;
19411              this.flags = 0;
19412              this.dmax = 0;
19413              this.check = 0;
19414              this.total = 0;
19415              this.head = null;
19416              this.wbits = 0;
19417              this.wsize = 0;
19418              this.whave = 0;
19419              this.wnext = 0;
19420              this.window = null;
19421              this.hold = 0;
19422              this.bits = 0;
19423              this.length = 0;
19424              this.offset = 0;
19425              this.extra = 0;
19426              this.lencode = null;
19427              this.distcode = null;
19428              this.lenbits = 0;
19429              this.distbits = 0;
19430              this.ncode = 0;
19431              this.nlen = 0;
19432              this.ndist = 0;
19433              this.have = 0;
19434              this.next = null;
19435              this.lens = new utils.Buf16(
19436                320
19437              );
19438              this.work = new utils.Buf16(
19439                288
19440              );
19441              this.lendyn = null;
19442              this.distdyn = null;
19443              this.sane = 0;
19444              this.back = 0;
19445              this.was = 0;
19446            }
19447            function inflateResetKeep(strm) {
19448              var state;
19449              if (!strm || !strm.state) {
19450                return Z_STREAM_ERROR;
19451              }
19452              state = strm.state;
19453              strm.total_in = strm.total_out = state.total = 0;
19454              strm.msg = "";
19455              if (state.wrap) {
19456                strm.adler = state.wrap & 1;
19457              }
19458              state.mode = HEAD;
19459              state.last = 0;
19460              state.havedict = 0;
19461              state.dmax = 32768;
19462              state.head = null;
19463              state.hold = 0;
19464              state.bits = 0;
19465              state.lencode = state.lendyn = new utils.Buf32(
19466                ENOUGH_LENS
19467              );
19468              state.distcode = state.distdyn = new utils.Buf32(
19469                ENOUGH_DISTS
19470              );
19471              state.sane = 1;
19472              state.back = -1;
19473              return Z_OK;
19474            }
19475            function inflateReset(strm) {
19476              var state;
19477              if (!strm || !strm.state) {
19478                return Z_STREAM_ERROR;
19479              }
19480              state = strm.state;
19481              state.wsize = 0;
19482              state.whave = 0;
19483              state.wnext = 0;
19484              return inflateResetKeep(strm);
19485            }
19486            function inflateReset2(strm, windowBits) {
19487              var wrap;
19488              var state;
19489              if (!strm || !strm.state) {
19490                return Z_STREAM_ERROR;
19491              }
19492              state = strm.state;
19493              if (windowBits < 0) {
19494                wrap = 0;
19495                windowBits = -windowBits;
19496              } else {
19497                wrap = (windowBits >> 4) + 1;
19498                if (windowBits < 48) {
19499                  windowBits &= 15;
19500                }
19501              }
19502              if (windowBits && (windowBits < 8 || windowBits > 15)) {
19503                return Z_STREAM_ERROR;
19504              }
19505              if (state.window !== null && state.wbits !== windowBits) {
19506                state.window = null;
19507              }
19508              state.wrap = wrap;
19509              state.wbits = windowBits;
19510              return inflateReset(strm);
19511            }
19512            function inflateInit2(strm, windowBits) {
19513              var ret;
19514              var state;
19515              if (!strm) {
19516                return Z_STREAM_ERROR;
19517              }
19518              state = new InflateState();
19519              strm.state = state;
19520              state.window = null;
19521              ret = inflateReset2(strm, windowBits);
19522              if (ret !== Z_OK) {
19523                strm.state = null;
19524              }
19525              return ret;
19526            }
19527            function inflateInit(strm) {
19528              return inflateInit2(strm, DEF_WBITS);
19529            }
19530            var virgin = true;
19531            var lenfix, distfix;
19532            function fixedtables(state) {
19533              if (virgin) {
19534                var sym;
19535                lenfix = new utils.Buf32(512);
19536                distfix = new utils.Buf32(32);
19537                sym = 0;
19538                while (sym < 144) {
19539                  state.lens[sym++] = 8;
19540                }
19541                while (sym < 256) {
19542                  state.lens[sym++] = 9;
19543                }
19544                while (sym < 280) {
19545                  state.lens[sym++] = 7;
19546                }
19547                while (sym < 288) {
19548                  state.lens[sym++] = 8;
19549                }
19550                inflate_table(
19551                  LENS,
19552                  state.lens,
19553                  0,
19554                  288,
19555                  lenfix,
19556                  0,
19557                  state.work,
19558                  { bits: 9 }
19559                );
19560                sym = 0;
19561                while (sym < 32) {
19562                  state.lens[sym++] = 5;
19563                }
19564                inflate_table(
19565                  DISTS,
19566                  state.lens,
19567                  0,
19568                  32,
19569                  distfix,
19570                  0,
19571                  state.work,
19572                  { bits: 5 }
19573                );
19574                virgin = false;
19575              }
19576              state.lencode = lenfix;
19577              state.lenbits = 9;
19578              state.distcode = distfix;
19579              state.distbits = 5;
19580            }
19581            function updatewindow(strm, src, end, copy) {
19582              var dist;
19583              var state = strm.state;
19584              if (state.window === null) {
19585                state.wsize = 1 << state.wbits;
19586                state.wnext = 0;
19587                state.whave = 0;
19588                state.window = new utils.Buf8(state.wsize);
19589              }
19590              if (copy >= state.wsize) {
19591                utils.arraySet(
19592                  state.window,
19593                  src,
19594                  end - state.wsize,
19595                  state.wsize,
19596                  0
19597                );
19598                state.wnext = 0;
19599                state.whave = state.wsize;
19600              } else {
19601                dist = state.wsize - state.wnext;
19602                if (dist > copy) {
19603                  dist = copy;
19604                }
19605                utils.arraySet(
19606                  state.window,
19607                  src,
19608                  end - copy,
19609                  dist,
19610                  state.wnext
19611                );
19612                copy -= dist;
19613                if (copy) {
19614                  utils.arraySet(
19615                    state.window,
19616                    src,
19617                    end - copy,
19618                    copy,
19619                    0
19620                  );
19621                  state.wnext = copy;
19622                  state.whave = state.wsize;
19623                } else {
19624                  state.wnext += dist;
19625                  if (state.wnext === state.wsize) {
19626                    state.wnext = 0;
19627                  }
19628                  if (state.whave < state.wsize) {
19629                    state.whave += dist;
19630                  }
19631                }
19632              }
19633              return 0;
19634            }
19635            function inflate(strm, flush) {
19636              var state;
19637              var input, output;
19638              var next;
19639              var put;
19640              var have, left;
19641              var hold;
19642              var bits;
19643              var _in, _out;
19644              var copy;
19645              var from;
19646              var from_source;
19647              var here = 0;
19648              var here_bits, here_op, here_val;
19649              var last_bits, last_op, last_val;
19650              var len;
19651              var ret;
19652              var hbuf = new utils.Buf8(
19653                4
19654              );
19655              var opts;
19656              var n;
19657              var order = (
19658                /* permutation of code lengths */
19659                [
19660                  16,
19661                  17,
19662                  18,
19663                  0,
19664                  8,
19665                  7,
19666                  9,
19667                  6,
19668                  10,
19669                  5,
19670                  11,
19671                  4,
19672                  12,
19673                  3,
19674                  13,
19675                  2,
19676                  14,
19677                  1,
19678                  15
19679                ]
19680              );
19681              if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) {
19682                return Z_STREAM_ERROR;
19683              }
19684              state = strm.state;
19685              if (state.mode === TYPE) {
19686                state.mode = TYPEDO;
19687              }
19688              put = strm.next_out;
19689              output = strm.output;
19690              left = strm.avail_out;
19691              next = strm.next_in;
19692              input = strm.input;
19693              have = strm.avail_in;
19694              hold = state.hold;
19695              bits = state.bits;
19696              _in = have;
19697              _out = left;
19698              ret = Z_OK;
19699              inf_leave: for (; ; ) {
19700                switch (state.mode) {
19701                  case HEAD:
19702                    if (state.wrap === 0) {
19703                      state.mode = TYPEDO;
19704                      break;
19705                    }
19706                    while (bits < 16) {
19707                      if (have === 0) {
19708                        break inf_leave;
19709                      }
19710                      have--;
19711                      hold += input[next++] << bits;
19712                      bits += 8;
19713                    }
19714                    if (state.wrap & 2 && hold === 35615) {
19715                      state.check = 0;
19716                      hbuf[0] = hold & 255;
19717                      hbuf[1] = hold >>> 8 & 255;
19718                      state.check = crc32(
19719                        state.check,
19720                        hbuf,
19721                        2,
19722                        0
19723                      );
19724                      hold = 0;
19725                      bits = 0;
19726                      state.mode = FLAGS;
19727                      break;
19728                    }
19729                    state.flags = 0;
19730                    if (state.head) {
19731                      state.head.done = false;
19732                    }
19733                    if (!(state.wrap & 1) || (((hold & 255) << 8) + (hold >> 8)) % 31) {
19734                      strm.msg = "incorrect header check";
19735                      state.mode = BAD;
19736                      break;
19737                    }
19738                    if ((hold & 15) !== Z_DEFLATED) {
19739                      strm.msg = "unknown compression method";
19740                      state.mode = BAD;
19741                      break;
19742                    }
19743                    hold >>>= 4;
19744                    bits -= 4;
19745                    len = (hold & 15) + 8;
19746                    if (state.wbits === 0) {
19747                      state.wbits = len;
19748                    } else if (len > state.wbits) {
19749                      strm.msg = "invalid window size";
19750                      state.mode = BAD;
19751                      break;
19752                    }
19753                    state.dmax = 1 << len;
19754                    strm.adler = state.check = 1;
19755                    state.mode = hold & 512 ? DICTID : TYPE;
19756                    hold = 0;
19757                    bits = 0;
19758                    break;
19759                  case FLAGS:
19760                    while (bits < 16) {
19761                      if (have === 0) {
19762                        break inf_leave;
19763                      }
19764                      have--;
19765                      hold += input[next++] << bits;
19766                      bits += 8;
19767                    }
19768                    state.flags = hold;
19769                    if ((state.flags & 255) !== Z_DEFLATED) {
19770                      strm.msg = "unknown compression method";
19771                      state.mode = BAD;
19772                      break;
19773                    }
19774                    if (state.flags & 57344) {
19775                      strm.msg = "unknown header flags set";
19776                      state.mode = BAD;
19777                      break;
19778                    }
19779                    if (state.head) {
19780                      state.head.text = hold >> 8 & 1;
19781                    }
19782                    if (state.flags & 512) {
19783                      hbuf[0] = hold & 255;
19784                      hbuf[1] = hold >>> 8 & 255;
19785                      state.check = crc32(
19786                        state.check,
19787                        hbuf,
19788                        2,
19789                        0
19790                      );
19791                    }
19792                    hold = 0;
19793                    bits = 0;
19794                    state.mode = TIME;
19795                  /* falls through */
19796                  case TIME:
19797                    while (bits < 32) {
19798                      if (have === 0) {
19799                        break inf_leave;
19800                      }
19801                      have--;
19802                      hold += input[next++] << bits;
19803                      bits += 8;
19804                    }
19805                    if (state.head) {
19806                      state.head.time = hold;
19807                    }
19808                    if (state.flags & 512) {
19809                      hbuf[0] = hold & 255;
19810                      hbuf[1] = hold >>> 8 & 255;
19811                      hbuf[2] = hold >>> 16 & 255;
19812                      hbuf[3] = hold >>> 24 & 255;
19813                      state.check = crc32(
19814                        state.check,
19815                        hbuf,
19816                        4,
19817                        0
19818                      );
19819                    }
19820                    hold = 0;
19821                    bits = 0;
19822                    state.mode = OS;
19823                  /* falls through */
19824                  case OS:
19825                    while (bits < 16) {
19826                      if (have === 0) {
19827                        break inf_leave;
19828                      }
19829                      have--;
19830                      hold += input[next++] << bits;
19831                      bits += 8;
19832                    }
19833                    if (state.head) {
19834                      state.head.xflags = hold & 255;
19835                      state.head.os = hold >> 8;
19836                    }
19837                    if (state.flags & 512) {
19838                      hbuf[0] = hold & 255;
19839                      hbuf[1] = hold >>> 8 & 255;
19840                      state.check = crc32(
19841                        state.check,
19842                        hbuf,
19843                        2,
19844                        0
19845                      );
19846                    }
19847                    hold = 0;
19848                    bits = 0;
19849                    state.mode = EXLEN;
19850                  /* falls through */
19851                  case EXLEN:
19852                    if (state.flags & 1024) {
19853                      while (bits < 16) {
19854                        if (have === 0) {
19855                          break inf_leave;
19856                        }
19857                        have--;
19858                        hold += input[next++] << bits;
19859                        bits += 8;
19860                      }
19861                      state.length = hold;
19862                      if (state.head) {
19863                        state.head.extra_len = hold;
19864                      }
19865                      if (state.flags & 512) {
19866                        hbuf[0] = hold & 255;
19867                        hbuf[1] = hold >>> 8 & 255;
19868                        state.check = crc32(
19869                          state.check,
19870                          hbuf,
19871                          2,
19872                          0
19873                        );
19874                      }
19875                      hold = 0;
19876                      bits = 0;
19877                    } else if (state.head) {
19878                      state.head.extra = null;
19879                    }
19880                    state.mode = EXTRA;
19881                  /* falls through */
19882                  case EXTRA:
19883                    if (state.flags & 1024) {
19884                      copy = state.length;
19885                      if (copy > have) {
19886                        copy = have;
19887                      }
19888                      if (copy) {
19889                        if (state.head) {
19890                          len = state.head.extra_len - state.length;
19891                          if (!state.head.extra) {
19892                            state.head.extra = new Array(
19893                              state.head.extra_len
19894                            );
19895                          }
19896                          utils.arraySet(
19897                            state.head.extra,
19898                            input,
19899                            next,
19900                            // extra field is limited to 65536 bytes
19901                            // - no need for additional size check
19902                            copy,
19903                            /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
19904                            len
19905                          );
19906                        }
19907                        if (state.flags & 512) {
19908                          state.check = crc32(
19909                            state.check,
19910                            input,
19911                            copy,
19912                            next
19913                          );
19914                        }
19915                        have -= copy;
19916                        next += copy;
19917                        state.length -= copy;
19918                      }
19919                      if (state.length) {
19920                        break inf_leave;
19921                      }
19922                    }
19923                    state.length = 0;
19924                    state.mode = NAME;
19925                  /* falls through */
19926                  case NAME:
19927                    if (state.flags & 2048) {
19928                      if (have === 0) {
19929                        break inf_leave;
19930                      }
19931                      copy = 0;
19932                      do {
19933                        len = input[next + copy++];
19934                        if (state.head && len && state.length < 65536) {
19935                          state.head.name += String.fromCharCode(len);
19936                        }
19937                      } while (len && copy < have);
19938                      if (state.flags & 512) {
19939                        state.check = crc32(
19940                          state.check,
19941                          input,
19942                          copy,
19943                          next
19944                        );
19945                      }
19946                      have -= copy;
19947                      next += copy;
19948                      if (len) {
19949                        break inf_leave;
19950                      }
19951                    } else if (state.head) {
19952                      state.head.name = null;
19953                    }
19954                    state.length = 0;
19955                    state.mode = COMMENT;
19956                  /* falls through */
19957                  case COMMENT:
19958                    if (state.flags & 4096) {
19959                      if (have === 0) {
19960                        break inf_leave;
19961                      }
19962                      copy = 0;
19963                      do {
19964                        len = input[next + copy++];
19965                        if (state.head && len && state.length < 65536) {
19966                          state.head.comment += String.fromCharCode(len);
19967                        }
19968                      } while (len && copy < have);
19969                      if (state.flags & 512) {
19970                        state.check = crc32(
19971                          state.check,
19972                          input,
19973                          copy,
19974                          next
19975                        );
19976                      }
19977                      have -= copy;
19978                      next += copy;
19979                      if (len) {
19980                        break inf_leave;
19981                      }
19982                    } else if (state.head) {
19983                      state.head.comment = null;
19984                    }
19985                    state.mode = HCRC;
19986                  /* falls through */
19987                  case HCRC:
19988                    if (state.flags & 512) {
19989                      while (bits < 16) {
19990                        if (have === 0) {
19991                          break inf_leave;
19992                        }
19993                        have--;
19994                        hold += input[next++] << bits;
19995                        bits += 8;
19996                      }
19997                      if (hold !== (state.check & 65535)) {
19998                        strm.msg = "header crc mismatch";
19999                        state.mode = BAD;
20000                        break;
20001                      }
20002                      hold = 0;
20003                      bits = 0;
20004                    }
20005                    if (state.head) {
20006                      state.head.hcrc = state.flags >> 9 & 1;
20007                      state.head.done = true;
20008                    }
20009                    strm.adler = state.check = 0;
20010                    state.mode = TYPE;
20011                    break;
20012                  case DICTID:
20013                    while (bits < 32) {
20014                      if (have === 0) {
20015                        break inf_leave;
20016                      }
20017                      have--;
20018                      hold += input[next++] << bits;
20019                      bits += 8;
20020                    }
20021                    strm.adler = state.check = zswap32(hold);
20022                    hold = 0;
20023                    bits = 0;
20024                    state.mode = DICT;
20025                  /* falls through */
20026                  case DICT:
20027                    if (state.havedict === 0) {
20028                      strm.next_out = put;
20029                      strm.avail_out = left;
20030                      strm.next_in = next;
20031                      strm.avail_in = have;
20032                      state.hold = hold;
20033                      state.bits = bits;
20034                      return Z_NEED_DICT;
20035                    }
20036                    strm.adler = state.check = 1;
20037                    state.mode = TYPE;
20038                  /* falls through */
20039                  case TYPE:
20040                    if (flush === Z_BLOCK || flush === Z_TREES) {
20041                      break inf_leave;
20042                    }
20043                  /* falls through */
20044                  case TYPEDO:
20045                    if (state.last) {
20046                      hold >>>= bits & 7;
20047                      bits -= bits & 7;
20048                      state.mode = CHECK;
20049                      break;
20050                    }
20051                    while (bits < 3) {
20052                      if (have === 0) {
20053                        break inf_leave;
20054                      }
20055                      have--;
20056                      hold += input[next++] << bits;
20057                      bits += 8;
20058                    }
20059                    state.last = hold & 1;
20060                    hold >>>= 1;
20061                    bits -= 1;
20062                    switch (hold & 3) {
20063                      case 0:
20064                        state.mode = STORED;
20065                        break;
20066                      case 1:
20067                        fixedtables(state);
20068                        state.mode = LEN_;
20069                        if (flush === Z_TREES) {
20070                          hold >>>= 2;
20071                          bits -= 2;
20072                          break inf_leave;
20073                        }
20074                        break;
20075                      case 2:
20076                        state.mode = TABLE;
20077                        break;
20078                      case 3:
20079                        strm.msg = "invalid block type";
20080                        state.mode = BAD;
20081                    }
20082                    hold >>>= 2;
20083                    bits -= 2;
20084                    break;
20085                  case STORED:
20086                    hold >>>= bits & 7;
20087                    bits -= bits & 7;
20088                    while (bits < 32) {
20089                      if (have === 0) {
20090                        break inf_leave;
20091                      }
20092                      have--;
20093                      hold += input[next++] << bits;
20094                      bits += 8;
20095                    }
20096                    if ((hold & 65535) !== (hold >>> 16 ^ 65535)) {
20097                      strm.msg = "invalid stored block lengths";
20098                      state.mode = BAD;
20099                      break;
20100                    }
20101                    state.length = hold & 65535;
20102                    hold = 0;
20103                    bits = 0;
20104                    state.mode = COPY_;
20105                    if (flush === Z_TREES) {
20106                      break inf_leave;
20107                    }
20108                  /* falls through */
20109                  case COPY_:
20110                    state.mode = COPY;
20111                  /* falls through */
20112                  case COPY:
20113                    copy = state.length;
20114                    if (copy) {
20115                      if (copy > have) {
20116                        copy = have;
20117                      }
20118                      if (copy > left) {
20119                        copy = left;
20120                      }
20121                      if (copy === 0) {
20122                        break inf_leave;
20123                      }
20124                      utils.arraySet(
20125                        output,
20126                        input,
20127                        next,
20128                        copy,
20129                        put
20130                      );
20131                      have -= copy;
20132                      next += copy;
20133                      left -= copy;
20134                      put += copy;
20135                      state.length -= copy;
20136                      break;
20137                    }
20138                    state.mode = TYPE;
20139                    break;
20140                  case TABLE:
20141                    while (bits < 14) {
20142                      if (have === 0) {
20143                        break inf_leave;
20144                      }
20145                      have--;
20146                      hold += input[next++] << bits;
20147                      bits += 8;
20148                    }
20149                    state.nlen = (hold & 31) + 257;
20150                    hold >>>= 5;
20151                    bits -= 5;
20152                    state.ndist = (hold & 31) + 1;
20153                    hold >>>= 5;
20154                    bits -= 5;
20155                    state.ncode = (hold & 15) + 4;
20156                    hold >>>= 4;
20157                    bits -= 4;
20158                    if (state.nlen > 286 || state.ndist > 30) {
20159                      strm.msg = "too many length or distance symbols";
20160                      state.mode = BAD;
20161                      break;
20162                    }
20163                    state.have = 0;
20164                    state.mode = LENLENS;
20165                  /* falls through */
20166                  case LENLENS:
20167                    while (state.have < state.ncode) {
20168                      while (bits < 3) {
20169                        if (have === 0) {
20170                          break inf_leave;
20171                        }
20172                        have--;
20173                        hold += input[next++] << bits;
20174                        bits += 8;
20175                      }
20176                      state.lens[order[state.have++]] = hold & 7;
20177                      hold >>>= 3;
20178                      bits -= 3;
20179                    }
20180                    while (state.have < 19) {
20181                      state.lens[order[state.have++]] = 0;
20182                    }
20183                    state.lencode = state.lendyn;
20184                    state.lenbits = 7;
20185                    opts = { bits: state.lenbits };
20186                    ret = inflate_table(
20187                      CODES,
20188                      state.lens,
20189                      0,
20190                      19,
20191                      state.lencode,
20192                      0,
20193                      state.work,
20194                      opts
20195                    );
20196                    state.lenbits = opts.bits;
20197                    if (ret) {
20198                      strm.msg = "invalid code lengths set";
20199                      state.mode = BAD;
20200                      break;
20201                    }
20202                    state.have = 0;
20203                    state.mode = CODELENS;
20204                  /* falls through */
20205                  case CODELENS:
20206                    while (state.have < state.nlen + state.ndist) {
20207                      for (; ; ) {
20208                        here = state.lencode[hold & (1 << state.lenbits) - 1];
20209                        here_bits = here >>> 24;
20210                        here_op = here >>> 16 & 255;
20211                        here_val = here & 65535;
20212                        if (here_bits <= bits) {
20213                          break;
20214                        }
20215                        if (have === 0) {
20216                          break inf_leave;
20217                        }
20218                        have--;
20219                        hold += input[next++] << bits;
20220                        bits += 8;
20221                      }
20222                      if (here_val < 16) {
20223                        hold >>>= here_bits;
20224                        bits -= here_bits;
20225                        state.lens[state.have++] = here_val;
20226                      } else {
20227                        if (here_val === 16) {
20228                          n = here_bits + 2;
20229                          while (bits < n) {
20230                            if (have === 0) {
20231                              break inf_leave;
20232                            }
20233                            have--;
20234                            hold += input[next++] << bits;
20235                            bits += 8;
20236                          }
20237                          hold >>>= here_bits;
20238                          bits -= here_bits;
20239                          if (state.have === 0) {
20240                            strm.msg = "invalid bit length repeat";
20241                            state.mode = BAD;
20242                            break;
20243                          }
20244                          len = state.lens[state.have - 1];
20245                          copy = 3 + (hold & 3);
20246                          hold >>>= 2;
20247                          bits -= 2;
20248                        } else if (here_val === 17) {
20249                          n = here_bits + 3;
20250                          while (bits < n) {
20251                            if (have === 0) {
20252                              break inf_leave;
20253                            }
20254                            have--;
20255                            hold += input[next++] << bits;
20256                            bits += 8;
20257                          }
20258                          hold >>>= here_bits;
20259                          bits -= here_bits;
20260                          len = 0;
20261                          copy = 3 + (hold & 7);
20262                          hold >>>= 3;
20263                          bits -= 3;
20264                        } else {
20265                          n = here_bits + 7;
20266                          while (bits < n) {
20267                            if (have === 0) {
20268                              break inf_leave;
20269                            }
20270                            have--;
20271                            hold += input[next++] << bits;
20272                            bits += 8;
20273                          }
20274                          hold >>>= here_bits;
20275                          bits -= here_bits;
20276                          len = 0;
20277                          copy = 11 + (hold & 127);
20278                          hold >>>= 7;
20279                          bits -= 7;
20280                        }
20281                        if (state.have + copy > state.nlen + state.ndist) {
20282                          strm.msg = "invalid bit length repeat";
20283                          state.mode = BAD;
20284                          break;
20285                        }
20286                        while (copy--) {
20287                          state.lens[state.have++] = len;
20288                        }
20289                      }
20290                    }
20291                    if (state.mode === BAD) {
20292                      break;
20293                    }
20294                    if (state.lens[256] === 0) {
20295                      strm.msg = "invalid code -- missing end-of-block";
20296                      state.mode = BAD;
20297                      break;
20298                    }
20299                    state.lenbits = 9;
20300                    opts = { bits: state.lenbits };
20301                    ret = inflate_table(
20302                      LENS,
20303                      state.lens,
20304                      0,
20305                      state.nlen,
20306                      state.lencode,
20307                      0,
20308                      state.work,
20309                      opts
20310                    );
20311                    state.lenbits = opts.bits;
20312                    if (ret) {
20313                      strm.msg = "invalid literal/lengths set";
20314                      state.mode = BAD;
20315                      break;
20316                    }
20317                    state.distbits = 6;
20318                    state.distcode = state.distdyn;
20319                    opts = { bits: state.distbits };
20320                    ret = inflate_table(
20321                      DISTS,
20322                      state.lens,
20323                      state.nlen,
20324                      state.ndist,
20325                      state.distcode,
20326                      0,
20327                      state.work,
20328                      opts
20329                    );
20330                    state.distbits = opts.bits;
20331                    if (ret) {
20332                      strm.msg = "invalid distances set";
20333                      state.mode = BAD;
20334                      break;
20335                    }
20336                    state.mode = LEN_;
20337                    if (flush === Z_TREES) {
20338                      break inf_leave;
20339                    }
20340                  /* falls through */
20341                  case LEN_:
20342                    state.mode = LEN;
20343                  /* falls through */
20344                  case LEN:
20345                    if (have >= 6 && left >= 258) {
20346                      strm.next_out = put;
20347                      strm.avail_out = left;
20348                      strm.next_in = next;
20349                      strm.avail_in = have;
20350                      state.hold = hold;
20351                      state.bits = bits;
20352                      inflate_fast(strm, _out);
20353                      put = strm.next_out;
20354                      output = strm.output;
20355                      left = strm.avail_out;
20356                      next = strm.next_in;
20357                      input = strm.input;
20358                      have = strm.avail_in;
20359                      hold = state.hold;
20360                      bits = state.bits;
20361                      if (state.mode === TYPE) {
20362                        state.back = -1;
20363                      }
20364                      break;
20365                    }
20366                    state.back = 0;
20367                    for (; ; ) {
20368                      here = state.lencode[hold & (1 << state.lenbits) - 1];
20369                      here_bits = here >>> 24;
20370                      here_op = here >>> 16 & 255;
20371                      here_val = here & 65535;
20372                      if (here_bits <= bits) {
20373                        break;
20374                      }
20375                      if (have === 0) {
20376                        break inf_leave;
20377                      }
20378                      have--;
20379                      hold += input[next++] << bits;
20380                      bits += 8;
20381                    }
20382                    if (here_op && (here_op & 240) === 0) {
20383                      last_bits = here_bits;
20384                      last_op = here_op;
20385                      last_val = here_val;
20386                      for (; ; ) {
20387                        here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)];
20388                        here_bits = here >>> 24;
20389                        here_op = here >>> 16 & 255;
20390                        here_val = here & 65535;
20391                        if (last_bits + here_bits <= bits) {
20392                          break;
20393                        }
20394                        if (have === 0) {
20395                          break inf_leave;
20396                        }
20397                        have--;
20398                        hold += input[next++] << bits;
20399                        bits += 8;
20400                      }
20401                      hold >>>= last_bits;
20402                      bits -= last_bits;
20403                      state.back += last_bits;
20404                    }
20405                    hold >>>= here_bits;
20406                    bits -= here_bits;
20407                    state.back += here_bits;
20408                    state.length = here_val;
20409                    if (here_op === 0) {
20410                      state.mode = LIT;
20411                      break;
20412                    }
20413                    if (here_op & 32) {
20414                      state.back = -1;
20415                      state.mode = TYPE;
20416                      break;
20417                    }
20418                    if (here_op & 64) {
20419                      strm.msg = "invalid literal/length code";
20420                      state.mode = BAD;
20421                      break;
20422                    }
20423                    state.extra = here_op & 15;
20424                    state.mode = LENEXT;
20425                  /* falls through */
20426                  case LENEXT:
20427                    if (state.extra) {
20428                      n = state.extra;
20429                      while (bits < n) {
20430                        if (have === 0) {
20431                          break inf_leave;
20432                        }
20433                        have--;
20434                        hold += input[next++] << bits;
20435                        bits += 8;
20436                      }
20437                      state.length += hold & (1 << state.extra) - 1;
20438                      hold >>>= state.extra;
20439                      bits -= state.extra;
20440                      state.back += state.extra;
20441                    }
20442                    state.was = state.length;
20443                    state.mode = DIST;
20444                  /* falls through */
20445                  case DIST:
20446                    for (; ; ) {
20447                      here = state.distcode[hold & (1 << state.distbits) - 1];
20448                      here_bits = here >>> 24;
20449                      here_op = here >>> 16 & 255;
20450                      here_val = here & 65535;
20451                      if (here_bits <= bits) {
20452                        break;
20453                      }
20454                      if (have === 0) {
20455                        break inf_leave;
20456                      }
20457                      have--;
20458                      hold += input[next++] << bits;
20459                      bits += 8;
20460                    }
20461                    if ((here_op & 240) === 0) {
20462                      last_bits = here_bits;
20463                      last_op = here_op;
20464                      last_val = here_val;
20465                      for (; ; ) {
20466                        here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)];
20467                        here_bits = here >>> 24;
20468                        here_op = here >>> 16 & 255;
20469                        here_val = here & 65535;
20470                        if (last_bits + here_bits <= bits) {
20471                          break;
20472                        }
20473                        if (have === 0) {
20474                          break inf_leave;
20475                        }
20476                        have--;
20477                        hold += input[next++] << bits;
20478                        bits += 8;
20479                      }
20480                      hold >>>= last_bits;
20481                      bits -= last_bits;
20482                      state.back += last_bits;
20483                    }
20484                    hold >>>= here_bits;
20485                    bits -= here_bits;
20486                    state.back += here_bits;
20487                    if (here_op & 64) {
20488                      strm.msg = "invalid distance code";
20489                      state.mode = BAD;
20490                      break;
20491                    }
20492                    state.offset = here_val;
20493                    state.extra = here_op & 15;
20494                    state.mode = DISTEXT;
20495                  /* falls through */
20496                  case DISTEXT:
20497                    if (state.extra) {
20498                      n = state.extra;
20499                      while (bits < n) {
20500                        if (have === 0) {
20501                          break inf_leave;
20502                        }
20503                        have--;
20504                        hold += input[next++] << bits;
20505                        bits += 8;
20506                      }
20507                      state.offset += hold & (1 << state.extra) - 1;
20508                      hold >>>= state.extra;
20509                      bits -= state.extra;
20510                      state.back += state.extra;
20511                    }
20512                    if (state.offset > state.dmax) {
20513                      strm.msg = "invalid distance too far back";
20514                      state.mode = BAD;
20515                      break;
20516                    }
20517                    state.mode = MATCH;
20518                  /* falls through */
20519                  case MATCH:
20520                    if (left === 0) {
20521                      break inf_leave;
20522                    }
20523                    copy = _out - left;
20524                    if (state.offset > copy) {
20525                      copy = state.offset - copy;
20526                      if (copy > state.whave) {
20527                        if (state.sane) {
20528                          strm.msg = "invalid distance too far back";
20529                          state.mode = BAD;
20530                          break;
20531                        }
20532                      }
20533                      if (copy > state.wnext) {
20534                        copy -= state.wnext;
20535                        from = state.wsize - copy;
20536                      } else {
20537                        from = state.wnext - copy;
20538                      }
20539                      if (copy > state.length) {
20540                        copy = state.length;
20541                      }
20542                      from_source = state.window;
20543                    } else {
20544                      from_source = output;
20545                      from = put - state.offset;
20546                      copy = state.length;
20547                    }
20548                    if (copy > left) {
20549                      copy = left;
20550                    }
20551                    left -= copy;
20552                    state.length -= copy;
20553                    do {
20554                      output[put++] = from_source[from++];
20555                    } while (--copy);
20556                    if (state.length === 0) {
20557                      state.mode = LEN;
20558                    }
20559                    break;
20560                  case LIT:
20561                    if (left === 0) {
20562                      break inf_leave;
20563                    }
20564                    output[put++] = state.length;
20565                    left--;
20566                    state.mode = LEN;
20567                    break;
20568                  case CHECK:
20569                    if (state.wrap) {
20570                      while (bits < 32) {
20571                        if (have === 0) {
20572                          break inf_leave;
20573                        }
20574                        have--;
20575                        hold |= input[next++] << bits;
20576                        bits += 8;
20577                      }
20578                      _out -= left;
20579                      strm.total_out += _out;
20580                      state.total += _out;
20581                      if (_out) {
20582                        strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/
20583                        state.flags ? crc32(
20584                          state.check,
20585                          output,
20586                          _out,
20587                          put - _out
20588                        ) : adler32(
20589                          state.check,
20590                          output,
20591                          _out,
20592                          put - _out
20593                        );
20594                      }
20595                      _out = left;
20596                      if ((state.flags ? hold : zswap32(hold)) !== state.check) {
20597                        strm.msg = "incorrect data check";
20598                        state.mode = BAD;
20599                        break;
20600                      }
20601                      hold = 0;
20602                      bits = 0;
20603                    }
20604                    state.mode = LENGTH;
20605                  /* falls through */
20606                  case LENGTH:
20607                    if (state.wrap && state.flags) {
20608                      while (bits < 32) {
20609                        if (have === 0) {
20610                          break inf_leave;
20611                        }
20612                        have--;
20613                        hold += input[next++] << bits;
20614                        bits += 8;
20615                      }
20616                      if (hold !== (state.total & 4294967295)) {
20617                        strm.msg = "incorrect length check";
20618                        state.mode = BAD;
20619                        break;
20620                      }
20621                      hold = 0;
20622                      bits = 0;
20623                    }
20624                    state.mode = DONE;
20625                  /* falls through */
20626                  case DONE:
20627                    ret = Z_STREAM_END;
20628                    break inf_leave;
20629                  case BAD:
20630                    ret = Z_DATA_ERROR;
20631                    break inf_leave;
20632                  case MEM:
20633                    return Z_MEM_ERROR;
20634                  case SYNC:
20635                  /* falls through */
20636                  default:
20637                    return Z_STREAM_ERROR;
20638                }
20639              }
20640              strm.next_out = put;
20641              strm.avail_out = left;
20642              strm.next_in = next;
20643              strm.avail_in = have;
20644              state.hold = hold;
20645              state.bits = bits;
20646              if (state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) {
20647                if (updatewindow(
20648                  strm,
20649                  strm.output,
20650                  strm.next_out,
20651                  _out - strm.avail_out
20652                )) {
20653                  state.mode = MEM;
20654                  return Z_MEM_ERROR;
20655                }
20656              }
20657              _in -= strm.avail_in;
20658              _out -= strm.avail_out;
20659              strm.total_in += _in;
20660              strm.total_out += _out;
20661              state.total += _out;
20662              if (state.wrap && _out) {
20663                strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
20664                state.flags ? crc32(
20665                  state.check,
20666                  output,
20667                  _out,
20668                  strm.next_out - _out
20669                ) : adler32(
20670                  state.check,
20671                  output,
20672                  _out,
20673                  strm.next_out - _out
20674                );
20675              }
20676              strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
20677              if ((_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK) {
20678                ret = Z_BUF_ERROR;
20679              }
20680              return ret;
20681            }
20682            function inflateEnd(strm) {
20683              if (!strm || !strm.state) {
20684                return Z_STREAM_ERROR;
20685              }
20686              var state = strm.state;
20687              if (state.window) {
20688                state.window = null;
20689              }
20690              strm.state = null;
20691              return Z_OK;
20692            }
20693            function inflateGetHeader(strm, head2) {
20694              var state;
20695              if (!strm || !strm.state) {
20696                return Z_STREAM_ERROR;
20697              }
20698              state = strm.state;
20699              if ((state.wrap & 2) === 0) {
20700                return Z_STREAM_ERROR;
20701              }
20702              state.head = head2;
20703              head2.done = false;
20704              return Z_OK;
20705            }
20706            function inflateSetDictionary(strm, dictionary) {
20707              var dictLength = dictionary.length;
20708              var state;
20709              var dictid;
20710              var ret;
20711              if (!strm || !strm.state) {
20712                return Z_STREAM_ERROR;
20713              }
20714              state = strm.state;
20715              if (state.wrap !== 0 && state.mode !== DICT) {
20716                return Z_STREAM_ERROR;
20717              }
20718              if (state.mode === DICT) {
20719                dictid = 1;
20720                dictid = adler32(
20721                  dictid,
20722                  dictionary,
20723                  dictLength,
20724                  0
20725                );
20726                if (dictid !== state.check) {
20727                  return Z_DATA_ERROR;
20728                }
20729              }
20730              ret = updatewindow(
20731                strm,
20732                dictionary,
20733                dictLength,
20734                dictLength
20735              );
20736              if (ret) {
20737                state.mode = MEM;
20738                return Z_MEM_ERROR;
20739              }
20740              state.havedict = 1;
20741              return Z_OK;
20742            }
20743            exports2.inflateReset = inflateReset;
20744            exports2.inflateReset2 = inflateReset2;
20745            exports2.inflateResetKeep = inflateResetKeep;
20746            exports2.inflateInit = inflateInit;
20747            exports2.inflateInit2 = inflateInit2;
20748            exports2.inflate = inflate;
20749            exports2.inflateEnd = inflateEnd;
20750            exports2.inflateGetHeader = inflateGetHeader;
20751            exports2.inflateSetDictionary = inflateSetDictionary;
20752            exports2.inflateInfo = "pako inflate (from Nodeca project)";
20753          },
20754          {
20755            "../utils/common": 1,
20756            "./adler32": 3,
20757            "./crc32": 5,
20758            "./inffast": 7,
20759            "./inftrees": 9
20760          }
20761        ],
20762        9: [
20763          function(require2, module2, exports2) {
20764            "use strict";
20765            var utils = require2("../utils/common");
20766            var MAXBITS = 15;
20767            var ENOUGH_LENS = 852;
20768            var ENOUGH_DISTS = 592;
20769            var CODES = 0;
20770            var LENS = 1;
20771            var DISTS = 2;
20772            var lbase = [
20773              /* Length codes 257..285 base */
20774              3,
20775              4,
20776              5,
20777              6,
20778              7,
20779              8,
20780              9,
20781              10,
20782              11,
20783              13,
20784              15,
20785              17,
20786              19,
20787              23,
20788              27,
20789              31,
20790              35,
20791              43,
20792              51,
20793              59,
20794              67,
20795              83,
20796              99,
20797              115,
20798              131,
20799              163,
20800              195,
20801              227,
20802              258,
20803              0,
20804              0
20805            ];
20806            var lext = [
20807              /* Length codes 257..285 extra */
20808              16,
20809              16,
20810              16,
20811              16,
20812              16,
20813              16,
20814              16,
20815              16,
20816              17,
20817              17,
20818              17,
20819              17,
20820              18,
20821              18,
20822              18,
20823              18,
20824              19,
20825              19,
20826              19,
20827              19,
20828              20,
20829              20,
20830              20,
20831              20,
20832              21,
20833              21,
20834              21,
20835              21,
20836              16,
20837              72,
20838              78
20839            ];
20840            var dbase = [
20841              /* Distance codes 0..29 base */
20842              1,
20843              2,
20844              3,
20845              4,
20846              5,
20847              7,
20848              9,
20849              13,
20850              17,
20851              25,
20852              33,
20853              49,
20854              65,
20855              97,
20856              129,
20857              193,
20858              257,
20859              385,
20860              513,
20861              769,
20862              1025,
20863              1537,
20864              2049,
20865              3073,
20866              4097,
20867              6145,
20868              8193,
20869              12289,
20870              16385,
20871              24577,
20872              0,
20873              0
20874            ];
20875            var dext = [
20876              /* Distance codes 0..29 extra */
20877              16,
20878              16,
20879              16,
20880              16,
20881              17,
20882              17,
20883              18,
20884              18,
20885              19,
20886              19,
20887              20,
20888              20,
20889              21,
20890              21,
20891              22,
20892              22,
20893              23,
20894              23,
20895              24,
20896              24,
20897              25,
20898              25,
20899              26,
20900              26,
20901              27,
20902              27,
20903              28,
20904              28,
20905              29,
20906              29,
20907              64,
20908              64
20909            ];
20910            module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {
20911              var bits = opts.bits;
20912              var len = 0;
20913              var sym = 0;
20914              var min2 = 0, max2 = 0;
20915              var root = 0;
20916              var curr = 0;
20917              var drop = 0;
20918              var left = 0;
20919              var used = 0;
20920              var huff = 0;
20921              var incr;
20922              var fill;
20923              var low;
20924              var mask;
20925              var next;
20926              var base = null;
20927              var base_index = 0;
20928              var end;
20929              var count = new utils.Buf16(MAXBITS + 1);
20930              var offs = new utils.Buf16(MAXBITS + 1);
20931              var extra = null;
20932              var extra_index = 0;
20933              var here_bits, here_op, here_val;
20934              for (len = 0; len <= MAXBITS; len++) {
20935                count[len] = 0;
20936              }
20937              for (sym = 0; sym < codes; sym++) {
20938                count[lens[lens_index + sym]]++;
20939              }
20940              root = bits;
20941              for (max2 = MAXBITS; max2 >= 1; max2--) {
20942                if (count[max2] !== 0) {
20943                  break;
20944                }
20945              }
20946              if (root > max2) {
20947                root = max2;
20948              }
20949              if (max2 === 0) {
20950                table[table_index++] = 1 << 24 | 64 << 16 | 0;
20951                table[table_index++] = 1 << 24 | 64 << 16 | 0;
20952                opts.bits = 1;
20953                return 0;
20954              }
20955              for (min2 = 1; min2 < max2; min2++) {
20956                if (count[min2] !== 0) {
20957                  break;
20958                }
20959              }
20960              if (root < min2) {
20961                root = min2;
20962              }
20963              left = 1;
20964              for (len = 1; len <= MAXBITS; len++) {
20965                left <<= 1;
20966                left -= count[len];
20967                if (left < 0) {
20968                  return -1;
20969                }
20970              }
20971              if (left > 0 && (type === CODES || max2 !== 1)) {
20972                return -1;
20973              }
20974              offs[1] = 0;
20975              for (len = 1; len < MAXBITS; len++) {
20976                offs[len + 1] = offs[len] + count[len];
20977              }
20978              for (sym = 0; sym < codes; sym++) {
20979                if (lens[lens_index + sym] !== 0) {
20980                  work[offs[lens[lens_index + sym]]++] = sym;
20981                }
20982              }
20983              if (type === CODES) {
20984                base = extra = work;
20985                end = 19;
20986              } else if (type === LENS) {
20987                base = lbase;
20988                base_index -= 257;
20989                extra = lext;
20990                extra_index -= 257;
20991                end = 256;
20992              } else {
20993                base = dbase;
20994                extra = dext;
20995                end = -1;
20996              }
20997              huff = 0;
20998              sym = 0;
20999              len = min2;
21000              next = table_index;
21001              curr = root;
21002              drop = 0;
21003              low = -1;
21004              used = 1 << root;
21005              mask = used - 1;
21006              if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) {
21007                return 1;
21008              }
21009              for (; ; ) {
21010                here_bits = len - drop;
21011                if (work[sym] < end) {
21012                  here_op = 0;
21013                  here_val = work[sym];
21014                } else if (work[sym] > end) {
21015                  here_op = extra[extra_index + work[sym]];
21016                  here_val = base[base_index + work[sym]];
21017                } else {
21018                  here_op = 32 + 64;
21019                  here_val = 0;
21020                }
21021                incr = 1 << len - drop;
21022                fill = 1 << curr;
21023                min2 = fill;
21024                do {
21025                  fill -= incr;
21026                  table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;
21027                } while (fill !== 0);
21028                incr = 1 << len - 1;
21029                while (huff & incr) {
21030                  incr >>= 1;
21031                }
21032                if (incr !== 0) {
21033                  huff &= incr - 1;
21034                  huff += incr;
21035                } else {
21036                  huff = 0;
21037                }
21038                sym++;
21039                if (--count[len] === 0) {
21040                  if (len === max2) {
21041                    break;
21042                  }
21043                  len = lens[lens_index + work[sym]];
21044                }
21045                if (len > root && (huff & mask) !== low) {
21046                  if (drop === 0) {
21047                    drop = root;
21048                  }
21049                  next += min2;
21050                  curr = len - drop;
21051                  left = 1 << curr;
21052                  while (curr + drop < max2) {
21053                    left -= count[curr + drop];
21054                    if (left <= 0) {
21055                      break;
21056                    }
21057                    curr++;
21058                    left <<= 1;
21059                  }
21060                  used += 1 << curr;
21061                  if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) {
21062                    return 1;
21063                  }
21064                  low = huff & mask;
21065                  table[low] = root << 24 | curr << 16 | next - table_index | 0;
21066                }
21067              }
21068              if (huff !== 0) {
21069                table[next + huff] = len - drop << 24 | 64 << 16 | 0;
21070              }
21071              opts.bits = root;
21072              return 0;
21073            };
21074          },
21075          { "../utils/common": 1 }
21076        ],
21077        10: [
21078          function(require2, module2, exports2) {
21079            "use strict";
21080            module2.exports = {
21081              2: "need dictionary",
21082              1: "stream end",
21083              0: "",
21084              "-1": "file error",
21085              "-2": "stream error",
21086              "-3": "data error",
21087              "-4": "insufficient memory",
21088              "-5": "buffer error",
21089              "-6": "incompatible version"
21090            };
21091          },
21092          {}
21093        ],
21094        11: [
21095          function(require2, module2, exports2) {
21096            "use strict";
21097            function ZStream() {
21098              this.input = null;
21099              this.next_in = 0;
21100              this.avail_in = 0;
21101              this.total_in = 0;
21102              this.output = null;
21103              this.next_out = 0;
21104              this.avail_out = 0;
21105              this.total_out = 0;
21106              this.msg = "";
21107              this.state = null;
21108              this.data_type = 2;
21109              this.adler = 0;
21110            }
21111            module2.exports = ZStream;
21112          },
21113          {}
21114        ],
21115        "/lib/inflate.js": [
21116          function(require2, module2, exports2) {
21117            "use strict";
21118            var zlib_inflate = require2("./zlib/inflate");
21119            var utils = require2("./utils/common");
21120            var strings = require2("./utils/strings");
21121            var c2 = require2("./zlib/constants");
21122            var msg = require2("./zlib/messages");
21123            var ZStream = require2("./zlib/zstream");
21124            var GZheader = require2("./zlib/gzheader");
21125            var toString = Object.prototype.toString;
21126            function Inflate(options) {
21127              if (!(this instanceof Inflate))
21128                return new Inflate(options);
21129              this.options = utils.assign(
21130                {
21131                  chunkSize: 16384,
21132                  windowBits: 0,
21133                  to: ""
21134                },
21135                options || {}
21136              );
21137              var opt = this.options;
21138              if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) {
21139                opt.windowBits = -opt.windowBits;
21140                if (opt.windowBits === 0) {
21141                  opt.windowBits = -15;
21142                }
21143              }
21144              if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) {
21145                opt.windowBits += 32;
21146              }
21147              if (opt.windowBits > 15 && opt.windowBits < 48) {
21148                if ((opt.windowBits & 15) === 0) {
21149                  opt.windowBits |= 15;
21150                }
21151              }
21152              this.err = 0;
21153              this.msg = "";
21154              this.ended = false;
21155              this.chunks = [];
21156              this.strm = new ZStream();
21157              this.strm.avail_out = 0;
21158              var status = zlib_inflate.inflateInit2(
21159                this.strm,
21160                opt.windowBits
21161              );
21162              if (status !== c2.Z_OK) {
21163                throw new Error(msg[status]);
21164              }
21165              this.header = new GZheader();
21166              zlib_inflate.inflateGetHeader(this.strm, this.header);
21167              if (opt.dictionary) {
21168                if (typeof opt.dictionary === "string") {
21169                  opt.dictionary = strings.string2buf(
21170                    opt.dictionary
21171                  );
21172                } else if (toString.call(opt.dictionary) === "[object ArrayBuffer]") {
21173                  opt.dictionary = new Uint8Array(
21174                    opt.dictionary
21175                  );
21176                }
21177                if (opt.raw) {
21178                  status = zlib_inflate.inflateSetDictionary(
21179                    this.strm,
21180                    opt.dictionary
21181                  );
21182                  if (status !== c2.Z_OK) {
21183                    throw new Error(msg[status]);
21184                  }
21185                }
21186              }
21187            }
21188            Inflate.prototype.push = function(data, mode) {
21189              var strm = this.strm;
21190              var chunkSize = this.options.chunkSize;
21191              var dictionary = this.options.dictionary;
21192              var status, _mode;
21193              var next_out_utf8, tail, utf8str;
21194              var allowBufError = false;
21195              if (this.ended) {
21196                return false;
21197              }
21198              _mode = mode === ~~mode ? mode : mode === true ? c2.Z_FINISH : c2.Z_NO_FLUSH;
21199              if (typeof data === "string") {
21200                strm.input = strings.binstring2buf(data);
21201              } else if (toString.call(data) === "[object ArrayBuffer]") {
21202                strm.input = new Uint8Array(data);
21203              } else {
21204                strm.input = data;
21205              }
21206              strm.next_in = 0;
21207              strm.avail_in = strm.input.length;
21208              do {
21209                if (strm.avail_out === 0) {
21210                  strm.output = new utils.Buf8(chunkSize);
21211                  strm.next_out = 0;
21212                  strm.avail_out = chunkSize;
21213                }
21214                status = zlib_inflate.inflate(
21215                  strm,
21216                  c2.Z_NO_FLUSH
21217                );
21218                if (status === c2.Z_NEED_DICT && dictionary) {
21219                  status = zlib_inflate.inflateSetDictionary(
21220                    this.strm,
21221                    dictionary
21222                  );
21223                }
21224                if (status === c2.Z_BUF_ERROR && allowBufError === true) {
21225                  status = c2.Z_OK;
21226                  allowBufError = false;
21227                }
21228                if (status !== c2.Z_STREAM_END && status !== c2.Z_OK) {
21229                  this.onEnd(status);
21230                  this.ended = true;
21231                  return false;
21232                }
21233                if (strm.next_out) {
21234                  if (strm.avail_out === 0 || status === c2.Z_STREAM_END || strm.avail_in === 0 && (_mode === c2.Z_FINISH || _mode === c2.Z_SYNC_FLUSH)) {
21235                    if (this.options.to === "string") {
21236                      next_out_utf8 = strings.utf8border(
21237                        strm.output,
21238                        strm.next_out
21239                      );
21240                      tail = strm.next_out - next_out_utf8;
21241                      utf8str = strings.buf2string(
21242                        strm.output,
21243                        next_out_utf8
21244                      );
21245                      strm.next_out = tail;
21246                      strm.avail_out = chunkSize - tail;
21247                      if (tail) {
21248                        utils.arraySet(
21249                          strm.output,
21250                          strm.output,
21251                          next_out_utf8,
21252                          tail,
21253                          0
21254                        );
21255                      }
21256                      this.onData(utf8str);
21257                    } else {
21258                      this.onData(
21259                        utils.shrinkBuf(
21260                          strm.output,
21261                          strm.next_out
21262                        )
21263                      );
21264                    }
21265                  }
21266                }
21267                if (strm.avail_in === 0 && strm.avail_out === 0) {
21268                  allowBufError = true;
21269                }
21270              } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c2.Z_STREAM_END);
21271              if (status === c2.Z_STREAM_END) {
21272                _mode = c2.Z_FINISH;
21273              }
21274              if (_mode === c2.Z_FINISH) {
21275                status = zlib_inflate.inflateEnd(this.strm);
21276                this.onEnd(status);
21277                this.ended = true;
21278                return status === c2.Z_OK;
21279              }
21280              if (_mode === c2.Z_SYNC_FLUSH) {
21281                this.onEnd(c2.Z_OK);
21282                strm.avail_out = 0;
21283                return true;
21284              }
21285              return true;
21286            };
21287            Inflate.prototype.onData = function(chunk) {
21288              this.chunks.push(chunk);
21289            };
21290            Inflate.prototype.onEnd = function(status) {
21291              if (status === c2.Z_OK) {
21292                if (this.options.to === "string") {
21293                  this.result = this.chunks.join("");
21294                } else {
21295                  this.result = utils.flattenChunks(
21296                    this.chunks
21297                  );
21298                }
21299              }
21300              this.chunks = [];
21301              this.err = status;
21302              this.msg = this.strm.msg;
21303            };
21304            function inflate(input, options) {
21305              var inflator = new Inflate(options);
21306              inflator.push(input, true);
21307              if (inflator.err) {
21308                throw inflator.msg || msg[inflator.err];
21309              }
21310              return inflator.result;
21311            }
21312            function inflateRaw(input, options) {
21313              options = options || {};
21314              options.raw = true;
21315              return inflate(input, options);
21316            }
21317            exports2.Inflate = Inflate;
21318            exports2.inflate = inflate;
21319            exports2.inflateRaw = inflateRaw;
21320            exports2.ungzip = inflate;
21321          },
21322          {
21323            "./utils/common": 1,
21324            "./utils/strings": 2,
21325            "./zlib/constants": 4,
21326            "./zlib/gzheader": 6,
21327            "./zlib/inflate": 8,
21328            "./zlib/messages": 10,
21329            "./zlib/zstream": 11
21330          }
21331        ]
21332      },
21333      {},
21334      []
21335    )("/lib/inflate.js");
21336  })();
21337  
21338  // packages/global-styles-ui/build-module/font-library/lib/lib-font.browser.mjs
21339  var fetchFunction = globalThis.fetch;
21340  var Event2 = class {
21341    constructor(type, detail = {}, msg) {
21342      this.type = type;
21343      this.detail = detail;
21344      this.msg = msg;
21345      Object.defineProperty(this, `__mayPropagate`, {
21346        enumerable: false,
21347        writable: true
21348      });
21349      this.__mayPropagate = true;
21350    }
21351    preventDefault() {
21352    }
21353    stopPropagation() {
21354      this.__mayPropagate = false;
21355    }
21356    valueOf() {
21357      return this;
21358    }
21359    toString() {
21360      return this.msg ? `[$this.type} event]: $this.msg}` : `[$this.type} event]`;
21361    }
21362  };
21363  var EventManager = class {
21364    constructor() {
21365      this.listeners = {};
21366    }
21367    addEventListener(type, listener, useCapture) {
21368      let bin = this.listeners[type] || [];
21369      if (useCapture) bin.unshift(listener);
21370      else bin.push(listener);
21371      this.listeners[type] = bin;
21372    }
21373    removeEventListener(type, listener) {
21374      let bin = this.listeners[type] || [];
21375      let pos = bin.findIndex((e) => e === listener);
21376      if (pos > -1) {
21377        bin.splice(pos, 1);
21378        this.listeners[type] = bin;
21379      }
21380    }
21381    dispatch(event) {
21382      let bin = this.listeners[event.type];
21383      if (bin) {
21384        for (let l2 = 0, e = bin.length; l2 < e; l2++) {
21385          if (!event.__mayPropagate) break;
21386          bin[l2](event);
21387        }
21388      }
21389    }
21390  };
21391  var startDate = (/* @__PURE__ */ new Date(`1904-01-01T00:00:00+0000`)).getTime();
21392  function asText(data) {
21393    return Array.from(data).map((v2) => String.fromCharCode(v2)).join(``);
21394  }
21395  var Parser = class {
21396    constructor(dict, dataview, name2) {
21397      this.name = (name2 || dict.tag || ``).trim();
21398      this.length = dict.length;
21399      this.start = dict.offset;
21400      this.offset = 0;
21401      this.data = dataview;
21402      [
21403        `getInt8`,
21404        `getUint8`,
21405        `getInt16`,
21406        `getUint16`,
21407        `getInt32`,
21408        `getUint32`,
21409        `getBigInt64`,
21410        `getBigUint64`
21411      ].forEach((name3) => {
21412        let fn = name3.replace(/get(Big)?/, "").toLowerCase();
21413        let increment = parseInt(name3.replace(/[^\d]/g, "")) / 8;
21414        Object.defineProperty(this, fn, {
21415          get: () => this.getValue(name3, increment)
21416        });
21417      });
21418    }
21419    get currentPosition() {
21420      return this.start + this.offset;
21421    }
21422    set currentPosition(position) {
21423      this.start = position;
21424      this.offset = 0;
21425    }
21426    skip(n = 0, bits = 8) {
21427      this.offset += n * bits / 8;
21428    }
21429    getValue(type, increment) {
21430      let pos = this.start + this.offset;
21431      this.offset += increment;
21432      try {
21433        return this.data[type](pos);
21434      } catch (e) {
21435        console.error(`parser`, type, increment, this);
21436        console.error(`parser`, this.start, this.offset);
21437        throw e;
21438      }
21439    }
21440    flags(n) {
21441      if (n === 8 || n === 16 || n === 32 || n === 64) {
21442        return this[`uint$n}`].toString(2).padStart(n, 0).split(``).map((v2) => v2 === "1");
21443      }
21444      console.error(
21445        `Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long`
21446      );
21447      console.trace();
21448    }
21449    get tag() {
21450      const t = this.uint32;
21451      return asText([
21452        t >> 24 & 255,
21453        t >> 16 & 255,
21454        t >> 8 & 255,
21455        t & 255
21456      ]);
21457    }
21458    get fixed() {
21459      let major = this.int16;
21460      let minor = Math.round(1e3 * this.uint16 / 65356);
21461      return major + minor / 1e3;
21462    }
21463    get legacyFixed() {
21464      let major = this.uint16;
21465      let minor = this.uint16.toString(16).padStart(4, 0);
21466      return parseFloat(`$major}.$minor}`);
21467    }
21468    get uint24() {
21469      return (this.uint8 << 16) + (this.uint8 << 8) + this.uint8;
21470    }
21471    get uint128() {
21472      let value = 0;
21473      for (let i = 0; i < 5; i++) {
21474        let byte = this.uint8;
21475        value = value * 128 + (byte & 127);
21476        if (byte < 128) break;
21477      }
21478      return value;
21479    }
21480    get longdatetime() {
21481      return new Date(startDate + 1e3 * parseInt(this.int64.toString()));
21482    }
21483    get fword() {
21484      return this.int16;
21485    }
21486    get ufword() {
21487      return this.uint16;
21488    }
21489    get Offset16() {
21490      return this.uint16;
21491    }
21492    get Offset32() {
21493      return this.uint32;
21494    }
21495    get F2DOT14() {
21496      const bits = p.uint16;
21497      const integer = [0, 1, -2, -1][bits >> 14];
21498      const fraction = bits & 16383;
21499      return integer + fraction / 16384;
21500    }
21501    verifyLength() {
21502      if (this.offset != this.length) {
21503        console.error(
21504          `unexpected parsed table size ($this.offset}) for "$this.name}" (expected $this.length})`
21505        );
21506      }
21507    }
21508    readBytes(n = 0, position = 0, bits = 8, signed = false) {
21509      n = n || this.length;
21510      if (n === 0) return [];
21511      if (position) this.currentPosition = position;
21512      const fn = `$signed ? `` : `u`}int$bits}`, slice = [];
21513      while (n--) slice.push(this[fn]);
21514      return slice;
21515    }
21516  };
21517  var ParsedData = class {
21518    constructor(parser) {
21519      const pGetter = { enumerable: false, get: () => parser };
21520      Object.defineProperty(this, `parser`, pGetter);
21521      const start = parser.currentPosition;
21522      const startGetter = { enumerable: false, get: () => start };
21523      Object.defineProperty(this, `start`, startGetter);
21524    }
21525    load(struct) {
21526      Object.keys(struct).forEach((p22) => {
21527        let props = Object.getOwnPropertyDescriptor(struct, p22);
21528        if (props.get) {
21529          this[p22] = props.get.bind(this);
21530        } else if (props.value !== void 0) {
21531          this[p22] = props.value;
21532        }
21533      });
21534      if (this.parser.length) {
21535        this.parser.verifyLength();
21536      }
21537    }
21538  };
21539  var SimpleTable = class extends ParsedData {
21540    constructor(dict, dataview, name2) {
21541      const { parser, start } = super(
21542        new Parser(dict, dataview, name2)
21543      );
21544      const pGetter = { enumerable: false, get: () => parser };
21545      Object.defineProperty(this, `p`, pGetter);
21546      const startGetter = { enumerable: false, get: () => start };
21547      Object.defineProperty(this, `tableStart`, startGetter);
21548    }
21549  };
21550  function lazy$1(object, property, getter) {
21551    let val;
21552    Object.defineProperty(object, property, {
21553      get: () => {
21554        if (val) return val;
21555        val = getter();
21556        return val;
21557      },
21558      enumerable: true
21559    });
21560  }
21561  var SFNT = class extends SimpleTable {
21562    constructor(font2, dataview, createTable2) {
21563      const { p: p22 } = super({ offset: 0, length: 12 }, dataview, `sfnt`);
21564      this.version = p22.uint32;
21565      this.numTables = p22.uint16;
21566      this.searchRange = p22.uint16;
21567      this.entrySelector = p22.uint16;
21568      this.rangeShift = p22.uint16;
21569      p22.verifyLength();
21570      this.directory = [...new Array(this.numTables)].map(
21571        (_) => new TableRecord(p22)
21572      );
21573      this.tables = {};
21574      this.directory.forEach((entry) => {
21575        const getter = () => createTable2(
21576          this.tables,
21577          {
21578            tag: entry.tag,
21579            offset: entry.offset,
21580            length: entry.length
21581          },
21582          dataview
21583        );
21584        lazy$1(this.tables, entry.tag.trim(), getter);
21585      });
21586    }
21587  };
21588  var TableRecord = class {
21589    constructor(p22) {
21590      this.tag = p22.tag;
21591      this.checksum = p22.uint32;
21592      this.offset = p22.uint32;
21593      this.length = p22.uint32;
21594    }
21595  };
21596  var gzipDecode = inflate_default.inflate || void 0;
21597  var nativeGzipDecode = void 0;
21598  var WOFF$1 = class extends SimpleTable {
21599    constructor(font2, dataview, createTable2) {
21600      const { p: p22 } = super({ offset: 0, length: 44 }, dataview, `woff`);
21601      this.signature = p22.tag;
21602      this.flavor = p22.uint32;
21603      this.length = p22.uint32;
21604      this.numTables = p22.uint16;
21605      p22.uint16;
21606      this.totalSfntSize = p22.uint32;
21607      this.majorVersion = p22.uint16;
21608      this.minorVersion = p22.uint16;
21609      this.metaOffset = p22.uint32;
21610      this.metaLength = p22.uint32;
21611      this.metaOrigLength = p22.uint32;
21612      this.privOffset = p22.uint32;
21613      this.privLength = p22.uint32;
21614      p22.verifyLength();
21615      this.directory = [...new Array(this.numTables)].map(
21616        (_) => new WoffTableDirectoryEntry(p22)
21617      );
21618      buildWoffLazyLookups(this, dataview, createTable2);
21619    }
21620  };
21621  var WoffTableDirectoryEntry = class {
21622    constructor(p22) {
21623      this.tag = p22.tag;
21624      this.offset = p22.uint32;
21625      this.compLength = p22.uint32;
21626      this.origLength = p22.uint32;
21627      this.origChecksum = p22.uint32;
21628    }
21629  };
21630  function buildWoffLazyLookups(woff, dataview, createTable2) {
21631    woff.tables = {};
21632    woff.directory.forEach((entry) => {
21633      lazy$1(woff.tables, entry.tag.trim(), () => {
21634        let offset4 = 0;
21635        let view = dataview;
21636        if (entry.compLength !== entry.origLength) {
21637          const data = dataview.buffer.slice(
21638            entry.offset,
21639            entry.offset + entry.compLength
21640          );
21641          let unpacked;
21642          if (gzipDecode) {
21643            unpacked = gzipDecode(new Uint8Array(data));
21644          } else if (nativeGzipDecode) {
21645            unpacked = nativeGzipDecode(new Uint8Array(data));
21646          } else {
21647            const msg = `no brotli decoder available to decode WOFF2 font`;
21648            if (font.onerror) font.onerror(msg);
21649            throw new Error(msg);
21650          }
21651          view = new DataView(unpacked.buffer);
21652        } else {
21653          offset4 = entry.offset;
21654        }
21655        return createTable2(
21656          woff.tables,
21657          { tag: entry.tag, offset: offset4, length: entry.origLength },
21658          view
21659        );
21660      });
21661    });
21662  }
21663  var brotliDecode = unbrotli_default;
21664  var nativeBrotliDecode = void 0;
21665  var WOFF2$1 = class extends SimpleTable {
21666    constructor(font2, dataview, createTable2) {
21667      const { p: p22 } = super({ offset: 0, length: 48 }, dataview, `woff2`);
21668      this.signature = p22.tag;
21669      this.flavor = p22.uint32;
21670      this.length = p22.uint32;
21671      this.numTables = p22.uint16;
21672      p22.uint16;
21673      this.totalSfntSize = p22.uint32;
21674      this.totalCompressedSize = p22.uint32;
21675      this.majorVersion = p22.uint16;
21676      this.minorVersion = p22.uint16;
21677      this.metaOffset = p22.uint32;
21678      this.metaLength = p22.uint32;
21679      this.metaOrigLength = p22.uint32;
21680      this.privOffset = p22.uint32;
21681      this.privLength = p22.uint32;
21682      p22.verifyLength();
21683      this.directory = [...new Array(this.numTables)].map(
21684        (_) => new Woff2TableDirectoryEntry(p22)
21685      );
21686      let dictOffset = p22.currentPosition;
21687      this.directory[0].offset = 0;
21688      this.directory.forEach((e, i) => {
21689        let next = this.directory[i + 1];
21690        if (next) {
21691          next.offset = e.offset + (e.transformLength !== void 0 ? e.transformLength : e.origLength);
21692        }
21693      });
21694      let decoded;
21695      let buffer = dataview.buffer.slice(dictOffset);
21696      if (brotliDecode) {
21697        decoded = brotliDecode(new Uint8Array(buffer));
21698      } else if (nativeBrotliDecode) {
21699        decoded = new Uint8Array(nativeBrotliDecode(buffer));
21700      } else {
21701        const msg = `no brotli decoder available to decode WOFF2 font`;
21702        if (font2.onerror) font2.onerror(msg);
21703        throw new Error(msg);
21704      }
21705      buildWoff2LazyLookups(this, decoded, createTable2);
21706    }
21707  };
21708  var Woff2TableDirectoryEntry = class {
21709    constructor(p22) {
21710      this.flags = p22.uint8;
21711      const tagNumber = this.tagNumber = this.flags & 63;
21712      if (tagNumber === 63) {
21713        this.tag = p22.tag;
21714      } else {
21715        this.tag = getWOFF2Tag(tagNumber);
21716      }
21717      const transformVersion = this.transformVersion = (this.flags & 192) >> 6;
21718      let hasTransforms = transformVersion !== 0;
21719      if (this.tag === `glyf` || this.tag === `loca`) {
21720        hasTransforms = this.transformVersion !== 3;
21721      }
21722      this.origLength = p22.uint128;
21723      if (hasTransforms) {
21724        this.transformLength = p22.uint128;
21725      }
21726    }
21727  };
21728  function buildWoff2LazyLookups(woff2, decoded, createTable2) {
21729    woff2.tables = {};
21730    woff2.directory.forEach((entry) => {
21731      lazy$1(woff2.tables, entry.tag.trim(), () => {
21732        const start = entry.offset;
21733        const end = start + (entry.transformLength ? entry.transformLength : entry.origLength);
21734        const data = new DataView(decoded.slice(start, end).buffer);
21735        try {
21736          return createTable2(
21737            woff2.tables,
21738            { tag: entry.tag, offset: 0, length: entry.origLength },
21739            data
21740          );
21741        } catch (e) {
21742          console.error(e);
21743        }
21744      });
21745    });
21746  }
21747  function getWOFF2Tag(flag) {
21748    return [
21749      `cmap`,
21750      `head`,
21751      `hhea`,
21752      `hmtx`,
21753      `maxp`,
21754      `name`,
21755      `OS/2`,
21756      `post`,
21757      `cvt `,
21758      `fpgm`,
21759      `glyf`,
21760      `loca`,
21761      `prep`,
21762      `CFF `,
21763      `VORG`,
21764      `EBDT`,
21765      `EBLC`,
21766      `gasp`,
21767      `hdmx`,
21768      `kern`,
21769      `LTSH`,
21770      `PCLT`,
21771      `VDMX`,
21772      `vhea`,
21773      `vmtx`,
21774      `BASE`,
21775      `GDEF`,
21776      `GPOS`,
21777      `GSUB`,
21778      `EBSC`,
21779      `JSTF`,
21780      `MATH`,
21781      `CBDT`,
21782      `CBLC`,
21783      `COLR`,
21784      `CPAL`,
21785      `SVG `,
21786      `sbix`,
21787      `acnt`,
21788      `avar`,
21789      `bdat`,
21790      `bloc`,
21791      `bsln`,
21792      `cvar`,
21793      `fdsc`,
21794      `feat`,
21795      `fmtx`,
21796      `fvar`,
21797      `gvar`,
21798      `hsty`,
21799      `just`,
21800      `lcar`,
21801      `mort`,
21802      `morx`,
21803      `opbd`,
21804      `prop`,
21805      `trak`,
21806      `Zapf`,
21807      `Silf`,
21808      `Glat`,
21809      `Gloc`,
21810      `Feat`,
21811      `Sill`
21812    ][flag & 63];
21813  }
21814  var tableClasses = {};
21815  var tableClassesLoaded = false;
21816  Promise.all([
21817    Promise.resolve().then(function() {
21818      return cmap$1;
21819    }),
21820    Promise.resolve().then(function() {
21821      return head$1;
21822    }),
21823    Promise.resolve().then(function() {
21824      return hhea$1;
21825    }),
21826    Promise.resolve().then(function() {
21827      return hmtx$1;
21828    }),
21829    Promise.resolve().then(function() {
21830      return maxp$1;
21831    }),
21832    Promise.resolve().then(function() {
21833      return name$1;
21834    }),
21835    Promise.resolve().then(function() {
21836      return OS2$1;
21837    }),
21838    Promise.resolve().then(function() {
21839      return post$1;
21840    }),
21841    Promise.resolve().then(function() {
21842      return BASE$1;
21843    }),
21844    Promise.resolve().then(function() {
21845      return GDEF$1;
21846    }),
21847    Promise.resolve().then(function() {
21848      return GSUB$1;
21849    }),
21850    Promise.resolve().then(function() {
21851      return GPOS$1;
21852    }),
21853    Promise.resolve().then(function() {
21854      return SVG$1;
21855    }),
21856    Promise.resolve().then(function() {
21857      return fvar$1;
21858    }),
21859    Promise.resolve().then(function() {
21860      return cvt$1;
21861    }),
21862    Promise.resolve().then(function() {
21863      return fpgm$1;
21864    }),
21865    Promise.resolve().then(function() {
21866      return gasp$1;
21867    }),
21868    Promise.resolve().then(function() {
21869      return glyf$1;
21870    }),
21871    Promise.resolve().then(function() {
21872      return loca$1;
21873    }),
21874    Promise.resolve().then(function() {
21875      return prep$1;
21876    }),
21877    Promise.resolve().then(function() {
21878      return CFF$1;
21879    }),
21880    Promise.resolve().then(function() {
21881      return CFF2$1;
21882    }),
21883    Promise.resolve().then(function() {
21884      return VORG$1;
21885    }),
21886    Promise.resolve().then(function() {
21887      return EBLC$1;
21888    }),
21889    Promise.resolve().then(function() {
21890      return EBDT$1;
21891    }),
21892    Promise.resolve().then(function() {
21893      return EBSC$1;
21894    }),
21895    Promise.resolve().then(function() {
21896      return CBLC$1;
21897    }),
21898    Promise.resolve().then(function() {
21899      return CBDT$1;
21900    }),
21901    Promise.resolve().then(function() {
21902      return sbix$1;
21903    }),
21904    Promise.resolve().then(function() {
21905      return COLR$1;
21906    }),
21907    Promise.resolve().then(function() {
21908      return CPAL$1;
21909    }),
21910    Promise.resolve().then(function() {
21911      return DSIG$1;
21912    }),
21913    Promise.resolve().then(function() {
21914      return hdmx$1;
21915    }),
21916    Promise.resolve().then(function() {
21917      return kern$1;
21918    }),
21919    Promise.resolve().then(function() {
21920      return LTSH$1;
21921    }),
21922    Promise.resolve().then(function() {
21923      return MERG$1;
21924    }),
21925    Promise.resolve().then(function() {
21926      return meta$1;
21927    }),
21928    Promise.resolve().then(function() {
21929      return PCLT$1;
21930    }),
21931    Promise.resolve().then(function() {
21932      return VDMX$1;
21933    }),
21934    Promise.resolve().then(function() {
21935      return vhea$1;
21936    }),
21937    Promise.resolve().then(function() {
21938      return vmtx$1;
21939    })
21940  ]).then((data) => {
21941    data.forEach((e) => {
21942      let name2 = Object.keys(e)[0];
21943      tableClasses[name2] = e[name2];
21944    });
21945    tableClassesLoaded = true;
21946  });
21947  function createTable(tables, dict, dataview) {
21948    let name2 = dict.tag.replace(/[^\w\d]/g, ``);
21949    let Type = tableClasses[name2];
21950    if (Type) return new Type(dict, dataview, tables);
21951    console.warn(
21952      `lib-font has no definition for $name2}. The table was skipped.`
21953    );
21954    return {};
21955  }
21956  function loadTableClasses() {
21957    let count = 0;
21958    function checkLoaded(resolve, reject) {
21959      if (!tableClassesLoaded) {
21960        if (count > 10) {
21961          return reject(new Error(`loading took too long`));
21962        }
21963        count++;
21964        return setTimeout(() => checkLoaded(resolve), 250);
21965      }
21966      resolve(createTable);
21967    }
21968    return new Promise((resolve, reject) => checkLoaded(resolve));
21969  }
21970  function getFontCSSFormat(path, errorOnStyle) {
21971    let pos = path.lastIndexOf(`.`);
21972    let ext = (path.substring(pos + 1) || ``).toLowerCase();
21973    let format = {
21974      ttf: `truetype`,
21975      otf: `opentype`,
21976      woff: `woff`,
21977      woff2: `woff2`
21978    }[ext];
21979    if (format) return format;
21980    let msg = {
21981      eot: `The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.`,
21982      svg: `The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.`,
21983      fon: `The .fon format is not supported: this is an ancient Windows bitmap font format.`,
21984      ttc: `Based on the current CSS specification, font collections are not (yet?) supported.`
21985    }[ext];
21986    if (!msg) msg = `$path} is not a known webfont format.`;
21987    if (errorOnStyle) {
21988      throw new Error(msg);
21989    } else {
21990      console.warn(`Could not load font: $msg}`);
21991    }
21992  }
21993  async function setupFontFace(name2, url, options = {}) {
21994    if (!globalThis.document) return;
21995    let format = getFontCSSFormat(url, options.errorOnStyle);
21996    if (!format) return;
21997    let style = document.createElement(`style`);
21998    style.className = `injected-by-Font-js`;
21999    let rules = [];
22000    if (options.styleRules) {
22001      rules = Object.entries(options.styleRules).map(
22002        ([key, value]) => `$key}: $value};`
22003      );
22004    }
22005    style.textContent = `
22006  @font-face {
22007      font-family: "$name2}";
22008      $rules.join(
22009      `
22010      `
22011    )}
22012      src: url("$url}") format("$format}");
22013  }`;
22014    globalThis.document.head.appendChild(style);
22015    return style;
22016  }
22017  var TTF = [0, 1, 0, 0];
22018  var OTF = [79, 84, 84, 79];
22019  var WOFF = [119, 79, 70, 70];
22020  var WOFF2 = [119, 79, 70, 50];
22021  function match(ar1, ar2) {
22022    if (ar1.length !== ar2.length) return;
22023    for (let i = 0; i < ar1.length; i++) {
22024      if (ar1[i] !== ar2[i]) return;
22025    }
22026    return true;
22027  }
22028  function validFontFormat(dataview) {
22029    const LEAD_BYTES = [
22030      dataview.getUint8(0),
22031      dataview.getUint8(1),
22032      dataview.getUint8(2),
22033      dataview.getUint8(3)
22034    ];
22035    if (match(LEAD_BYTES, TTF) || match(LEAD_BYTES, OTF)) return `SFNT`;
22036    if (match(LEAD_BYTES, WOFF)) return `WOFF`;
22037    if (match(LEAD_BYTES, WOFF2)) return `WOFF2`;
22038  }
22039  function checkFetchResponseStatus(response) {
22040    if (!response.ok) {
22041      throw new Error(
22042        `HTTP $response.status} - $response.statusText}`
22043      );
22044    }
22045    return response;
22046  }
22047  var Font = class extends EventManager {
22048    constructor(name2, options = {}) {
22049      super();
22050      this.name = name2;
22051      this.options = options;
22052      this.metrics = false;
22053    }
22054    get src() {
22055      return this.__src;
22056    }
22057    set src(src) {
22058      this.__src = src;
22059      (async () => {
22060        if (globalThis.document && !this.options.skipStyleSheet) {
22061          await setupFontFace(this.name, src, this.options);
22062        }
22063        this.loadFont(src);
22064      })();
22065    }
22066    async loadFont(url, filename) {
22067      fetch(url).then(
22068        (response) => checkFetchResponseStatus(response) && response.arrayBuffer()
22069      ).then(
22070        (buffer) => this.fromDataBuffer(buffer, filename || url)
22071      ).catch((err) => {
22072        const evt = new Event2(
22073          `error`,
22074          err,
22075          `Failed to load font at $filename || url}`
22076        );
22077        this.dispatch(evt);
22078        if (this.onerror) this.onerror(evt);
22079      });
22080    }
22081    async fromDataBuffer(buffer, filenameOrUrL) {
22082      this.fontData = new DataView(buffer);
22083      let type = validFontFormat(this.fontData);
22084      if (!type) {
22085        throw new Error(
22086          `$filenameOrUrL} is either an unsupported font format, or not a font at all.`
22087        );
22088      }
22089      await this.parseBasicData(type);
22090      const evt = new Event2("load", { font: this });
22091      this.dispatch(evt);
22092      if (this.onload) this.onload(evt);
22093    }
22094    async parseBasicData(type) {
22095      return loadTableClasses().then((createTable2) => {
22096        if (type === `SFNT`) {
22097          this.opentype = new SFNT(this, this.fontData, createTable2);
22098        }
22099        if (type === `WOFF`) {
22100          this.opentype = new WOFF$1(this, this.fontData, createTable2);
22101        }
22102        if (type === `WOFF2`) {
22103          this.opentype = new WOFF2$1(this, this.fontData, createTable2);
22104        }
22105        return this.opentype;
22106      });
22107    }
22108    getGlyphId(char) {
22109      return this.opentype.tables.cmap.getGlyphId(char);
22110    }
22111    reverse(glyphid) {
22112      return this.opentype.tables.cmap.reverse(glyphid);
22113    }
22114    supports(char) {
22115      return this.getGlyphId(char) !== 0;
22116    }
22117    supportsVariation(variation) {
22118      return this.opentype.tables.cmap.supportsVariation(variation) !== false;
22119    }
22120    measureText(text, size4 = 16) {
22121      if (this.__unloaded)
22122        throw new Error(
22123          "Cannot measure text: font was unloaded. Please reload before calling measureText()"
22124        );
22125      let d = document.createElement("div");
22126      d.textContent = text;
22127      d.style.fontFamily = this.name;
22128      d.style.fontSize = `$size4}px`;
22129      d.style.color = `transparent`;
22130      d.style.background = `transparent`;
22131      d.style.top = `0`;
22132      d.style.left = `0`;
22133      d.style.position = `absolute`;
22134      document.body.appendChild(d);
22135      let bbox = d.getBoundingClientRect();
22136      document.body.removeChild(d);
22137      const OS22 = this.opentype.tables["OS/2"];
22138      bbox.fontSize = size4;
22139      bbox.ascender = OS22.sTypoAscender;
22140      bbox.descender = OS22.sTypoDescender;
22141      return bbox;
22142    }
22143    unload() {
22144      if (this.styleElement.parentNode) {
22145        this.styleElement.parentNode.removeElement(this.styleElement);
22146        const evt = new Event2("unload", { font: this });
22147        this.dispatch(evt);
22148        if (this.onunload) this.onunload(evt);
22149      }
22150      this._unloaded = true;
22151    }
22152    load() {
22153      if (this.__unloaded) {
22154        delete this.__unloaded;
22155        document.head.appendChild(this.styleElement);
22156        const evt = new Event2("load", { font: this });
22157        this.dispatch(evt);
22158        if (this.onload) this.onload(evt);
22159      }
22160    }
22161  };
22162  globalThis.Font = Font;
22163  var Subtable = class extends ParsedData {
22164    constructor(p22, plaformID, encodingID) {
22165      super(p22);
22166      this.plaformID = plaformID;
22167      this.encodingID = encodingID;
22168    }
22169  };
22170  var Format0 = class extends Subtable {
22171    constructor(p22, platformID, encodingID) {
22172      super(p22, platformID, encodingID);
22173      this.format = 0;
22174      this.length = p22.uint16;
22175      this.language = p22.uint16;
22176      this.glyphIdArray = [...new Array(256)].map((_) => p22.uint8);
22177    }
22178    supports(charCode) {
22179      if (charCode.charCodeAt) {
22180        charCode = -1;
22181        console.warn(
22182          `supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.`
22183        );
22184      }
22185      return 0 <= charCode && charCode <= 255;
22186    }
22187    reverse(glyphID) {
22188      console.warn(`reverse not implemented for cmap subtable format 0`);
22189      return {};
22190    }
22191    getSupportedCharCodes() {
22192      return [{ start: 1, end: 256 }];
22193    }
22194  };
22195  var Format2 = class extends Subtable {
22196    constructor(p22, platformID, encodingID) {
22197      super(p22, platformID, encodingID);
22198      this.format = 2;
22199      this.length = p22.uint16;
22200      this.language = p22.uint16;
22201      this.subHeaderKeys = [...new Array(256)].map((_) => p22.uint16);
22202      const subHeaderCount = Math.max(...this.subHeaderKeys);
22203      const subHeaderOffset = p22.currentPosition;
22204      lazy$1(this, `subHeaders`, () => {
22205        p22.currentPosition = subHeaderOffset;
22206        return [...new Array(subHeaderCount)].map(
22207          (_) => new SubHeader(p22)
22208        );
22209      });
22210      const glyphIndexOffset = subHeaderOffset + subHeaderCount * 8;
22211      lazy$1(this, `glyphIndexArray`, () => {
22212        p22.currentPosition = glyphIndexOffset;
22213        return [...new Array(subHeaderCount)].map((_) => p22.uint16);
22214      });
22215    }
22216    supports(charCode) {
22217      if (charCode.charCodeAt) {
22218        charCode = -1;
22219        console.warn(
22220          `supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented.`
22221        );
22222      }
22223      const low = charCode && 255;
22224      const high = charCode && 65280;
22225      const subHeaderKey = this.subHeaders[high];
22226      const subheader = this.subHeaders[subHeaderKey];
22227      const first = subheader.firstCode;
22228      const last = first + subheader.entryCount;
22229      return first <= low && low <= last;
22230    }
22231    reverse(glyphID) {
22232      console.warn(`reverse not implemented for cmap subtable format 2`);
22233      return {};
22234    }
22235    getSupportedCharCodes(preservePropNames = false) {
22236      if (preservePropNames) {
22237        return this.subHeaders.map((h) => ({
22238          firstCode: h.firstCode,
22239          lastCode: h.lastCode
22240        }));
22241      }
22242      return this.subHeaders.map((h) => ({
22243        start: h.firstCode,
22244        end: h.lastCode
22245      }));
22246    }
22247  };
22248  var SubHeader = class {
22249    constructor(p22) {
22250      this.firstCode = p22.uint16;
22251      this.entryCount = p22.uint16;
22252      this.lastCode = this.first + this.entryCount;
22253      this.idDelta = p22.int16;
22254      this.idRangeOffset = p22.uint16;
22255    }
22256  };
22257  var Format4 = class extends Subtable {
22258    constructor(p22, platformID, encodingID) {
22259      super(p22, platformID, encodingID);
22260      this.format = 4;
22261      this.length = p22.uint16;
22262      this.language = p22.uint16;
22263      this.segCountX2 = p22.uint16;
22264      this.segCount = this.segCountX2 / 2;
22265      this.searchRange = p22.uint16;
22266      this.entrySelector = p22.uint16;
22267      this.rangeShift = p22.uint16;
22268      const endCodePosition = p22.currentPosition;
22269      lazy$1(
22270        this,
22271        `endCode`,
22272        () => p22.readBytes(this.segCount, endCodePosition, 16)
22273      );
22274      const startCodePosition = endCodePosition + 2 + this.segCountX2;
22275      lazy$1(
22276        this,
22277        `startCode`,
22278        () => p22.readBytes(this.segCount, startCodePosition, 16)
22279      );
22280      const idDeltaPosition = startCodePosition + this.segCountX2;
22281      lazy$1(
22282        this,
22283        `idDelta`,
22284        () => p22.readBytes(this.segCount, idDeltaPosition, 16, true)
22285      );
22286      const idRangePosition = idDeltaPosition + this.segCountX2;
22287      lazy$1(
22288        this,
22289        `idRangeOffset`,
22290        () => p22.readBytes(this.segCount, idRangePosition, 16)
22291      );
22292      const glyphIdArrayPosition = idRangePosition + this.segCountX2;
22293      const glyphIdArrayLength = this.length - (glyphIdArrayPosition - this.tableStart);
22294      lazy$1(
22295        this,
22296        `glyphIdArray`,
22297        () => p22.readBytes(glyphIdArrayLength, glyphIdArrayPosition, 16)
22298      );
22299      lazy$1(
22300        this,
22301        `segments`,
22302        () => this.buildSegments(idRangePosition, glyphIdArrayPosition, p22)
22303      );
22304    }
22305    buildSegments(idRangePosition, glyphIdArrayPosition, p22) {
22306      const build = (_, i) => {
22307        let startCode = this.startCode[i], endCode = this.endCode[i], idDelta = this.idDelta[i], idRangeOffset = this.idRangeOffset[i], idRangeOffsetPointer = idRangePosition + 2 * i, glyphIDs = [];
22308        if (idRangeOffset === 0) {
22309          for (let i2 = startCode + idDelta, e = endCode + idDelta; i2 <= e; i2++) {
22310            glyphIDs.push(i2);
22311          }
22312        } else {
22313          for (let i2 = 0, e = endCode - startCode; i2 <= e; i2++) {
22314            p22.currentPosition = idRangeOffsetPointer + idRangeOffset + i2 * 2;
22315            glyphIDs.push(p22.uint16);
22316          }
22317        }
22318        return {
22319          startCode,
22320          endCode,
22321          idDelta,
22322          idRangeOffset,
22323          glyphIDs
22324        };
22325      };
22326      return [...new Array(this.segCount)].map(build);
22327    }
22328    reverse(glyphID) {
22329      let s = this.segments.find((v2) => v2.glyphIDs.includes(glyphID));
22330      if (!s) return {};
22331      const code = s.startCode + s.glyphIDs.indexOf(glyphID);
22332      return { code, unicode: String.fromCodePoint(code) };
22333    }
22334    getGlyphId(charCode) {
22335      if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
22336      if (55296 <= charCode && charCode <= 57343) return 0;
22337      if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535)
22338        return 0;
22339      let segment = this.segments.find(
22340        (s) => s.startCode <= charCode && charCode <= s.endCode
22341      );
22342      if (!segment) return 0;
22343      return segment.glyphIDs[charCode - segment.startCode];
22344    }
22345    supports(charCode) {
22346      return this.getGlyphId(charCode) !== 0;
22347    }
22348    getSupportedCharCodes(preservePropNames = false) {
22349      if (preservePropNames) return this.segments;
22350      return this.segments.map((v2) => ({
22351        start: v2.startCode,
22352        end: v2.endCode
22353      }));
22354    }
22355  };
22356  var Format6 = class extends Subtable {
22357    constructor(p22, platformID, encodingID) {
22358      super(p22, platformID, encodingID);
22359      this.format = 6;
22360      this.length = p22.uint16;
22361      this.language = p22.uint16;
22362      this.firstCode = p22.uint16;
22363      this.entryCount = p22.uint16;
22364      this.lastCode = this.firstCode + this.entryCount - 1;
22365      const getter = () => [...new Array(this.entryCount)].map((_) => p22.uint16);
22366      lazy$1(this, `glyphIdArray`, getter);
22367    }
22368    supports(charCode) {
22369      if (charCode.charCodeAt) {
22370        charCode = -1;
22371        console.warn(
22372          `supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.`
22373        );
22374      }
22375      if (charCode < this.firstCode) return {};
22376      if (charCode > this.firstCode + this.entryCount) return {};
22377      const code = charCode - this.firstCode;
22378      return { code, unicode: String.fromCodePoint(code) };
22379    }
22380    reverse(glyphID) {
22381      let pos = this.glyphIdArray.indexOf(glyphID);
22382      if (pos > -1) return this.firstCode + pos;
22383    }
22384    getSupportedCharCodes(preservePropNames = false) {
22385      if (preservePropNames) {
22386        return [{ firstCode: this.firstCode, lastCode: this.lastCode }];
22387      }
22388      return [{ start: this.firstCode, end: this.lastCode }];
22389    }
22390  };
22391  var Format8 = class extends Subtable {
22392    constructor(p22, platformID, encodingID) {
22393      super(p22, platformID, encodingID);
22394      this.format = 8;
22395      p22.uint16;
22396      this.length = p22.uint32;
22397      this.language = p22.uint32;
22398      this.is32 = [...new Array(8192)].map((_) => p22.uint8);
22399      this.numGroups = p22.uint32;
22400      const getter = () => [...new Array(this.numGroups)].map(
22401        (_) => new SequentialMapGroup$1(p22)
22402      );
22403      lazy$1(this, `groups`, getter);
22404    }
22405    supports(charCode) {
22406      if (charCode.charCodeAt) {
22407        charCode = -1;
22408        console.warn(
22409          `supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.`
22410        );
22411      }
22412      return this.groups.findIndex(
22413        (s) => s.startcharCode <= charCode && charCode <= s.endcharCode
22414      ) !== -1;
22415    }
22416    reverse(glyphID) {
22417      console.warn(`reverse not implemented for cmap subtable format 8`);
22418      return {};
22419    }
22420    getSupportedCharCodes(preservePropNames = false) {
22421      if (preservePropNames) return this.groups;
22422      return this.groups.map((v2) => ({
22423        start: v2.startcharCode,
22424        end: v2.endcharCode
22425      }));
22426    }
22427  };
22428  var SequentialMapGroup$1 = class {
22429    constructor(p22) {
22430      this.startcharCode = p22.uint32;
22431      this.endcharCode = p22.uint32;
22432      this.startGlyphID = p22.uint32;
22433    }
22434  };
22435  var Format10 = class extends Subtable {
22436    constructor(p22, platformID, encodingID) {
22437      super(p22, platformID, encodingID);
22438      this.format = 10;
22439      p22.uint16;
22440      this.length = p22.uint32;
22441      this.language = p22.uint32;
22442      this.startCharCode = p22.uint32;
22443      this.numChars = p22.uint32;
22444      this.endCharCode = this.startCharCode + this.numChars;
22445      const getter = () => [...new Array(this.numChars)].map((_) => p22.uint16);
22446      lazy$1(this, `glyphs`, getter);
22447    }
22448    supports(charCode) {
22449      if (charCode.charCodeAt) {
22450        charCode = -1;
22451        console.warn(
22452          `supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.`
22453        );
22454      }
22455      if (charCode < this.startCharCode) return false;
22456      if (charCode > this.startCharCode + this.numChars) return false;
22457      return charCode - this.startCharCode;
22458    }
22459    reverse(glyphID) {
22460      console.warn(`reverse not implemented for cmap subtable format 10`);
22461      return {};
22462    }
22463    getSupportedCharCodes(preservePropNames = false) {
22464      if (preservePropNames) {
22465        return [
22466          {
22467            startCharCode: this.startCharCode,
22468            endCharCode: this.endCharCode
22469          }
22470        ];
22471      }
22472      return [{ start: this.startCharCode, end: this.endCharCode }];
22473    }
22474  };
22475  var Format12 = class extends Subtable {
22476    constructor(p22, platformID, encodingID) {
22477      super(p22, platformID, encodingID);
22478      this.format = 12;
22479      p22.uint16;
22480      this.length = p22.uint32;
22481      this.language = p22.uint32;
22482      this.numGroups = p22.uint32;
22483      const getter = () => [...new Array(this.numGroups)].map(
22484        (_) => new SequentialMapGroup(p22)
22485      );
22486      lazy$1(this, `groups`, getter);
22487    }
22488    supports(charCode) {
22489      if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
22490      if (55296 <= charCode && charCode <= 57343) return 0;
22491      if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535)
22492        return 0;
22493      return this.groups.findIndex(
22494        (s) => s.startCharCode <= charCode && charCode <= s.endCharCode
22495      ) !== -1;
22496    }
22497    reverse(glyphID) {
22498      for (let group of this.groups) {
22499        let start = group.startGlyphID;
22500        if (start > glyphID) continue;
22501        if (start === glyphID) return group.startCharCode;
22502        let end = start + (group.endCharCode - group.startCharCode);
22503        if (end < glyphID) continue;
22504        const code = group.startCharCode + (glyphID - start);
22505        return { code, unicode: String.fromCodePoint(code) };
22506      }
22507      return {};
22508    }
22509    getSupportedCharCodes(preservePropNames = false) {
22510      if (preservePropNames) return this.groups;
22511      return this.groups.map((v2) => ({
22512        start: v2.startCharCode,
22513        end: v2.endCharCode
22514      }));
22515    }
22516  };
22517  var SequentialMapGroup = class {
22518    constructor(p22) {
22519      this.startCharCode = p22.uint32;
22520      this.endCharCode = p22.uint32;
22521      this.startGlyphID = p22.uint32;
22522    }
22523  };
22524  var Format13 = class extends Subtable {
22525    constructor(p22, platformID, encodingID) {
22526      super(p22, platformID, encodingID);
22527      this.format = 13;
22528      p22.uint16;
22529      this.length = p22.uint32;
22530      this.language = p22.uint32;
22531      this.numGroups = p22.uint32;
22532      const getter = [...new Array(this.numGroups)].map(
22533        (_) => new ConstantMapGroup(p22)
22534      );
22535      lazy$1(this, `groups`, getter);
22536    }
22537    supports(charCode) {
22538      if (charCode.charCodeAt) charCode = charCode.charCodeAt(0);
22539      return this.groups.findIndex(
22540        (s) => s.startCharCode <= charCode && charCode <= s.endCharCode
22541      ) !== -1;
22542    }
22543    reverse(glyphID) {
22544      console.warn(`reverse not implemented for cmap subtable format 13`);
22545      return {};
22546    }
22547    getSupportedCharCodes(preservePropNames = false) {
22548      if (preservePropNames) return this.groups;
22549      return this.groups.map((v2) => ({
22550        start: v2.startCharCode,
22551        end: v2.endCharCode
22552      }));
22553    }
22554  };
22555  var ConstantMapGroup = class {
22556    constructor(p22) {
22557      this.startCharCode = p22.uint32;
22558      this.endCharCode = p22.uint32;
22559      this.glyphID = p22.uint32;
22560    }
22561  };
22562  var Format14 = class extends Subtable {
22563    constructor(p22, platformID, encodingID) {
22564      super(p22, platformID, encodingID);
22565      this.subTableStart = p22.currentPosition;
22566      this.format = 14;
22567      this.length = p22.uint32;
22568      this.numVarSelectorRecords = p22.uint32;
22569      lazy$1(
22570        this,
22571        `varSelectors`,
22572        () => [...new Array(this.numVarSelectorRecords)].map(
22573          (_) => new VariationSelector(p22)
22574        )
22575      );
22576    }
22577    supports() {
22578      console.warn(`supports not implemented for cmap subtable format 14`);
22579      return 0;
22580    }
22581    getSupportedCharCodes() {
22582      console.warn(
22583        `getSupportedCharCodes not implemented for cmap subtable format 14`
22584      );
22585      return [];
22586    }
22587    reverse(glyphID) {
22588      console.warn(`reverse not implemented for cmap subtable format 14`);
22589      return {};
22590    }
22591    supportsVariation(variation) {
22592      let v2 = this.varSelector.find(
22593        (uvs) => uvs.varSelector === variation
22594      );
22595      return v2 ? v2 : false;
22596    }
22597    getSupportedVariations() {
22598      return this.varSelectors.map((v2) => v2.varSelector);
22599    }
22600  };
22601  var VariationSelector = class {
22602    constructor(p22) {
22603      this.varSelector = p22.uint24;
22604      this.defaultUVSOffset = p22.Offset32;
22605      this.nonDefaultUVSOffset = p22.Offset32;
22606    }
22607  };
22608  function createSubTable(parser, platformID, encodingID) {
22609    const format = parser.uint16;
22610    if (format === 0) return new Format0(parser, platformID, encodingID);
22611    if (format === 2) return new Format2(parser, platformID, encodingID);
22612    if (format === 4) return new Format4(parser, platformID, encodingID);
22613    if (format === 6) return new Format6(parser, platformID, encodingID);
22614    if (format === 8) return new Format8(parser, platformID, encodingID);
22615    if (format === 10) return new Format10(parser, platformID, encodingID);
22616    if (format === 12) return new Format12(parser, platformID, encodingID);
22617    if (format === 13) return new Format13(parser, platformID, encodingID);
22618    if (format === 14) return new Format14(parser, platformID, encodingID);
22619    return {};
22620  }
22621  var cmap = class extends SimpleTable {
22622    constructor(dict, dataview) {
22623      const { p: p22 } = super(dict, dataview);
22624      this.version = p22.uint16;
22625      this.numTables = p22.uint16;
22626      this.encodingRecords = [...new Array(this.numTables)].map(
22627        (_) => new EncodingRecord(p22, this.tableStart)
22628      );
22629    }
22630    getSubTable(tableID) {
22631      return this.encodingRecords[tableID].table;
22632    }
22633    getSupportedEncodings() {
22634      return this.encodingRecords.map((r2) => ({
22635        platformID: r2.platformID,
22636        encodingId: r2.encodingID
22637      }));
22638    }
22639    getSupportedCharCodes(platformID, encodingID) {
22640      const recordID = this.encodingRecords.findIndex(
22641        (r2) => r2.platformID === platformID && r2.encodingID === encodingID
22642      );
22643      if (recordID === -1) return false;
22644      const subtable = this.getSubTable(recordID);
22645      return subtable.getSupportedCharCodes();
22646    }
22647    reverse(glyphid) {
22648      for (let i = 0; i < this.numTables; i++) {
22649        let code = this.getSubTable(i).reverse(glyphid);
22650        if (code) return code;
22651      }
22652    }
22653    getGlyphId(char) {
22654      let last = 0;
22655      this.encodingRecords.some((_, tableID) => {
22656        let t = this.getSubTable(tableID);
22657        if (!t.getGlyphId) return false;
22658        last = t.getGlyphId(char);
22659        return last !== 0;
22660      });
22661      return last;
22662    }
22663    supports(char) {
22664      return this.encodingRecords.some((_, tableID) => {
22665        const t = this.getSubTable(tableID);
22666        return t.supports && t.supports(char) !== false;
22667      });
22668    }
22669    supportsVariation(variation) {
22670      return this.encodingRecords.some((_, tableID) => {
22671        const t = this.getSubTable(tableID);
22672        return t.supportsVariation && t.supportsVariation(variation) !== false;
22673      });
22674    }
22675  };
22676  var EncodingRecord = class {
22677    constructor(p22, tableStart) {
22678      const platformID = this.platformID = p22.uint16;
22679      const encodingID = this.encodingID = p22.uint16;
22680      const offset4 = this.offset = p22.Offset32;
22681      lazy$1(this, `table`, () => {
22682        p22.currentPosition = tableStart + offset4;
22683        return createSubTable(p22, platformID, encodingID);
22684      });
22685    }
22686  };
22687  var cmap$1 = Object.freeze({ __proto__: null, cmap });
22688  var head = class extends SimpleTable {
22689    constructor(dict, dataview) {
22690      const { p: p22 } = super(dict, dataview);
22691      this.load({
22692        majorVersion: p22.uint16,
22693        minorVersion: p22.uint16,
22694        fontRevision: p22.fixed,
22695        checkSumAdjustment: p22.uint32,
22696        magicNumber: p22.uint32,
22697        flags: p22.flags(16),
22698        unitsPerEm: p22.uint16,
22699        created: p22.longdatetime,
22700        modified: p22.longdatetime,
22701        xMin: p22.int16,
22702        yMin: p22.int16,
22703        xMax: p22.int16,
22704        yMax: p22.int16,
22705        macStyle: p22.flags(16),
22706        lowestRecPPEM: p22.uint16,
22707        fontDirectionHint: p22.uint16,
22708        indexToLocFormat: p22.uint16,
22709        glyphDataFormat: p22.uint16
22710      });
22711    }
22712  };
22713  var head$1 = Object.freeze({ __proto__: null, head });
22714  var hhea = class extends SimpleTable {
22715    constructor(dict, dataview) {
22716      const { p: p22 } = super(dict, dataview);
22717      this.majorVersion = p22.uint16;
22718      this.minorVersion = p22.uint16;
22719      this.ascender = p22.fword;
22720      this.descender = p22.fword;
22721      this.lineGap = p22.fword;
22722      this.advanceWidthMax = p22.ufword;
22723      this.minLeftSideBearing = p22.fword;
22724      this.minRightSideBearing = p22.fword;
22725      this.xMaxExtent = p22.fword;
22726      this.caretSlopeRise = p22.int16;
22727      this.caretSlopeRun = p22.int16;
22728      this.caretOffset = p22.int16;
22729      p22.int16;
22730      p22.int16;
22731      p22.int16;
22732      p22.int16;
22733      this.metricDataFormat = p22.int16;
22734      this.numberOfHMetrics = p22.uint16;
22735      p22.verifyLength();
22736    }
22737  };
22738  var hhea$1 = Object.freeze({ __proto__: null, hhea });
22739  var hmtx = class extends SimpleTable {
22740    constructor(dict, dataview, tables) {
22741      const { p: p22 } = super(dict, dataview);
22742      const numberOfHMetrics = tables.hhea.numberOfHMetrics;
22743      const numGlyphs = tables.maxp.numGlyphs;
22744      const metricsStart = p22.currentPosition;
22745      lazy$1(this, `hMetrics`, () => {
22746        p22.currentPosition = metricsStart;
22747        return [...new Array(numberOfHMetrics)].map(
22748          (_) => new LongHorMetric(p22.uint16, p22.int16)
22749        );
22750      });
22751      if (numberOfHMetrics < numGlyphs) {
22752        const lsbStart = metricsStart + numberOfHMetrics * 4;
22753        lazy$1(this, `leftSideBearings`, () => {
22754          p22.currentPosition = lsbStart;
22755          return [...new Array(numGlyphs - numberOfHMetrics)].map(
22756            (_) => p22.int16
22757          );
22758        });
22759      }
22760    }
22761  };
22762  var LongHorMetric = class {
22763    constructor(w2, b) {
22764      this.advanceWidth = w2;
22765      this.lsb = b;
22766    }
22767  };
22768  var hmtx$1 = Object.freeze({ __proto__: null, hmtx });
22769  var maxp = class extends SimpleTable {
22770    constructor(dict, dataview) {
22771      const { p: p22 } = super(dict, dataview);
22772      this.version = p22.legacyFixed;
22773      this.numGlyphs = p22.uint16;
22774      if (this.version === 1) {
22775        this.maxPoints = p22.uint16;
22776        this.maxContours = p22.uint16;
22777        this.maxCompositePoints = p22.uint16;
22778        this.maxCompositeContours = p22.uint16;
22779        this.maxZones = p22.uint16;
22780        this.maxTwilightPoints = p22.uint16;
22781        this.maxStorage = p22.uint16;
22782        this.maxFunctionDefs = p22.uint16;
22783        this.maxInstructionDefs = p22.uint16;
22784        this.maxStackElements = p22.uint16;
22785        this.maxSizeOfInstructions = p22.uint16;
22786        this.maxComponentElements = p22.uint16;
22787        this.maxComponentDepth = p22.uint16;
22788      }
22789      p22.verifyLength();
22790    }
22791  };
22792  var maxp$1 = Object.freeze({ __proto__: null, maxp });
22793  var name = class extends SimpleTable {
22794    constructor(dict, dataview) {
22795      const { p: p22 } = super(dict, dataview);
22796      this.format = p22.uint16;
22797      this.count = p22.uint16;
22798      this.stringOffset = p22.Offset16;
22799      this.nameRecords = [...new Array(this.count)].map(
22800        (_) => new NameRecord(p22, this)
22801      );
22802      if (this.format === 1) {
22803        this.langTagCount = p22.uint16;
22804        this.langTagRecords = [...new Array(this.langTagCount)].map(
22805          (_) => new LangTagRecord(p22.uint16, p22.Offset16)
22806        );
22807      }
22808      this.stringStart = this.tableStart + this.stringOffset;
22809    }
22810    get(nameID) {
22811      let record = this.nameRecords.find(
22812        (record2) => record2.nameID === nameID
22813      );
22814      if (record) return record.string;
22815    }
22816  };
22817  var LangTagRecord = class {
22818    constructor(length, offset4) {
22819      this.length = length;
22820      this.offset = offset4;
22821    }
22822  };
22823  var NameRecord = class {
22824    constructor(p22, nameTable) {
22825      this.platformID = p22.uint16;
22826      this.encodingID = p22.uint16;
22827      this.languageID = p22.uint16;
22828      this.nameID = p22.uint16;
22829      this.length = p22.uint16;
22830      this.offset = p22.Offset16;
22831      lazy$1(this, `string`, () => {
22832        p22.currentPosition = nameTable.stringStart + this.offset;
22833        return decodeString(p22, this);
22834      });
22835    }
22836  };
22837  function decodeString(p22, record) {
22838    const { platformID, length } = record;
22839    if (length === 0) return ``;
22840    if (platformID === 0 || platformID === 3) {
22841      const str2 = [];
22842      for (let i = 0, e = length / 2; i < e; i++)
22843        str2[i] = String.fromCharCode(p22.uint16);
22844      return str2.join(``);
22845    }
22846    const bytes = p22.readBytes(length);
22847    const str = [];
22848    bytes.forEach(function(b, i) {
22849      str[i] = String.fromCharCode(b);
22850    });
22851    return str.join(``);
22852  }
22853  var name$1 = Object.freeze({ __proto__: null, name });
22854  var OS2 = class extends SimpleTable {
22855    constructor(dict, dataview) {
22856      const { p: p22 } = super(dict, dataview);
22857      this.version = p22.uint16;
22858      this.xAvgCharWidth = p22.int16;
22859      this.usWeightClass = p22.uint16;
22860      this.usWidthClass = p22.uint16;
22861      this.fsType = p22.uint16;
22862      this.ySubscriptXSize = p22.int16;
22863      this.ySubscriptYSize = p22.int16;
22864      this.ySubscriptXOffset = p22.int16;
22865      this.ySubscriptYOffset = p22.int16;
22866      this.ySuperscriptXSize = p22.int16;
22867      this.ySuperscriptYSize = p22.int16;
22868      this.ySuperscriptXOffset = p22.int16;
22869      this.ySuperscriptYOffset = p22.int16;
22870      this.yStrikeoutSize = p22.int16;
22871      this.yStrikeoutPosition = p22.int16;
22872      this.sFamilyClass = p22.int16;
22873      this.panose = [...new Array(10)].map((_) => p22.uint8);
22874      this.ulUnicodeRange1 = p22.flags(32);
22875      this.ulUnicodeRange2 = p22.flags(32);
22876      this.ulUnicodeRange3 = p22.flags(32);
22877      this.ulUnicodeRange4 = p22.flags(32);
22878      this.achVendID = p22.tag;
22879      this.fsSelection = p22.uint16;
22880      this.usFirstCharIndex = p22.uint16;
22881      this.usLastCharIndex = p22.uint16;
22882      this.sTypoAscender = p22.int16;
22883      this.sTypoDescender = p22.int16;
22884      this.sTypoLineGap = p22.int16;
22885      this.usWinAscent = p22.uint16;
22886      this.usWinDescent = p22.uint16;
22887      if (this.version === 0) return p22.verifyLength();
22888      this.ulCodePageRange1 = p22.flags(32);
22889      this.ulCodePageRange2 = p22.flags(32);
22890      if (this.version === 1) return p22.verifyLength();
22891      this.sxHeight = p22.int16;
22892      this.sCapHeight = p22.int16;
22893      this.usDefaultChar = p22.uint16;
22894      this.usBreakChar = p22.uint16;
22895      this.usMaxContext = p22.uint16;
22896      if (this.version <= 4) return p22.verifyLength();
22897      this.usLowerOpticalPointSize = p22.uint16;
22898      this.usUpperOpticalPointSize = p22.uint16;
22899      if (this.version === 5) return p22.verifyLength();
22900    }
22901  };
22902  var OS2$1 = Object.freeze({ __proto__: null, OS2 });
22903  var post = class extends SimpleTable {
22904    constructor(dict, dataview) {
22905      const { p: p22 } = super(dict, dataview);
22906      this.version = p22.legacyFixed;
22907      this.italicAngle = p22.fixed;
22908      this.underlinePosition = p22.fword;
22909      this.underlineThickness = p22.fword;
22910      this.isFixedPitch = p22.uint32;
22911      this.minMemType42 = p22.uint32;
22912      this.maxMemType42 = p22.uint32;
22913      this.minMemType1 = p22.uint32;
22914      this.maxMemType1 = p22.uint32;
22915      if (this.version === 1 || this.version === 3) return p22.verifyLength();
22916      this.numGlyphs = p22.uint16;
22917      if (this.version === 2) {
22918        this.glyphNameIndex = [...new Array(this.numGlyphs)].map(
22919          (_) => p22.uint16
22920        );
22921        this.namesOffset = p22.currentPosition;
22922        this.glyphNameOffsets = [1];
22923        for (let i = 0; i < this.numGlyphs; i++) {
22924          let index2 = this.glyphNameIndex[i];
22925          if (index2 < macStrings.length) {
22926            this.glyphNameOffsets.push(this.glyphNameOffsets[i]);
22927            continue;
22928          }
22929          let bytelength = p22.int8;
22930          p22.skip(bytelength);
22931          this.glyphNameOffsets.push(
22932            this.glyphNameOffsets[i] + bytelength + 1
22933          );
22934        }
22935      }
22936      if (this.version === 2.5) {
22937        this.offset = [...new Array(this.numGlyphs)].map(
22938          (_) => p22.int8
22939        );
22940      }
22941    }
22942    getGlyphName(glyphid) {
22943      if (this.version !== 2) {
22944        console.warn(
22945          `post table version $this.version} does not support glyph name lookups`
22946        );
22947        return ``;
22948      }
22949      let index2 = this.glyphNameIndex[glyphid];
22950      if (index2 < 258) return macStrings[index2];
22951      let offset4 = this.glyphNameOffsets[glyphid];
22952      let next = this.glyphNameOffsets[glyphid + 1];
22953      let len = next - offset4 - 1;
22954      if (len === 0) return `.notdef.`;
22955      this.parser.currentPosition = this.namesOffset + offset4;
22956      const data = this.parser.readBytes(
22957        len,
22958        this.namesOffset + offset4,
22959        8,
22960        true
22961      );
22962      return data.map((b) => String.fromCharCode(b)).join(``);
22963    }
22964  };
22965  var macStrings = [
22966    `.notdef`,
22967    `.null`,
22968    `nonmarkingreturn`,
22969    `space`,
22970    `exclam`,
22971    `quotedbl`,
22972    `numbersign`,
22973    `dollar`,
22974    `percent`,
22975    `ampersand`,
22976    `quotesingle`,
22977    `parenleft`,
22978    `parenright`,
22979    `asterisk`,
22980    `plus`,
22981    `comma`,
22982    `hyphen`,
22983    `period`,
22984    `slash`,
22985    `zero`,
22986    `one`,
22987    `two`,
22988    `three`,
22989    `four`,
22990    `five`,
22991    `six`,
22992    `seven`,
22993    `eight`,
22994    `nine`,
22995    `colon`,
22996    `semicolon`,
22997    `less`,
22998    `equal`,
22999    `greater`,
23000    `question`,
23001    `at`,
23002    `A`,
23003    `B`,
23004    `C`,
23005    `D`,
23006    `E`,
23007    `F`,
23008    `G`,
23009    `H`,
23010    `I`,
23011    `J`,
23012    `K`,
23013    `L`,
23014    `M`,
23015    `N`,
23016    `O`,
23017    `P`,
23018    `Q`,
23019    `R`,
23020    `S`,
23021    `T`,
23022    `U`,
23023    `V`,
23024    `W`,
23025    `X`,
23026    `Y`,
23027    `Z`,
23028    `bracketleft`,
23029    `backslash`,
23030    `bracketright`,
23031    `asciicircum`,
23032    `underscore`,
23033    `grave`,
23034    `a`,
23035    `b`,
23036    `c`,
23037    `d`,
23038    `e`,
23039    `f`,
23040    `g`,
23041    `h`,
23042    `i`,
23043    `j`,
23044    `k`,
23045    `l`,
23046    `m`,
23047    `n`,
23048    `o`,
23049    `p`,
23050    `q`,
23051    `r`,
23052    `s`,
23053    `t`,
23054    `u`,
23055    `v`,
23056    `w`,
23057    `x`,
23058    `y`,
23059    `z`,
23060    `braceleft`,
23061    `bar`,
23062    `braceright`,
23063    `asciitilde`,
23064    `Adieresis`,
23065    `Aring`,
23066    `Ccedilla`,
23067    `Eacute`,
23068    `Ntilde`,
23069    `Odieresis`,
23070    `Udieresis`,
23071    `aacute`,
23072    `agrave`,
23073    `acircumflex`,
23074    `adieresis`,
23075    `atilde`,
23076    `aring`,
23077    `ccedilla`,
23078    `eacute`,
23079    `egrave`,
23080    `ecircumflex`,
23081    `edieresis`,
23082    `iacute`,
23083    `igrave`,
23084    `icircumflex`,
23085    `idieresis`,
23086    `ntilde`,
23087    `oacute`,
23088    `ograve`,
23089    `ocircumflex`,
23090    `odieresis`,
23091    `otilde`,
23092    `uacute`,
23093    `ugrave`,
23094    `ucircumflex`,
23095    `udieresis`,
23096    `dagger`,
23097    `degree`,
23098    `cent`,
23099    `sterling`,
23100    `section`,
23101    `bullet`,
23102    `paragraph`,
23103    `germandbls`,
23104    `registered`,
23105    `copyright`,
23106    `trademark`,
23107    `acute`,
23108    `dieresis`,
23109    `notequal`,
23110    `AE`,
23111    `Oslash`,
23112    `infinity`,
23113    `plusminus`,
23114    `lessequal`,
23115    `greaterequal`,
23116    `yen`,
23117    `mu`,
23118    `partialdiff`,
23119    `summation`,
23120    `product`,
23121    `pi`,
23122    `integral`,
23123    `ordfeminine`,
23124    `ordmasculine`,
23125    `Omega`,
23126    `ae`,
23127    `oslash`,
23128    `questiondown`,
23129    `exclamdown`,
23130    `logicalnot`,
23131    `radical`,
23132    `florin`,
23133    `approxequal`,
23134    `Delta`,
23135    `guillemotleft`,
23136    `guillemotright`,
23137    `ellipsis`,
23138    `nonbreakingspace`,
23139    `Agrave`,
23140    `Atilde`,
23141    `Otilde`,
23142    `OE`,
23143    `oe`,
23144    `endash`,
23145    `emdash`,
23146    `quotedblleft`,
23147    `quotedblright`,
23148    `quoteleft`,
23149    `quoteright`,
23150    `divide`,
23151    `lozenge`,
23152    `ydieresis`,
23153    `Ydieresis`,
23154    `fraction`,
23155    `currency`,
23156    `guilsinglleft`,
23157    `guilsinglright`,
23158    `fi`,
23159    `fl`,
23160    `daggerdbl`,
23161    `periodcentered`,
23162    `quotesinglbase`,
23163    `quotedblbase`,
23164    `perthousand`,
23165    `Acircumflex`,
23166    `Ecircumflex`,
23167    `Aacute`,
23168    `Edieresis`,
23169    `Egrave`,
23170    `Iacute`,
23171    `Icircumflex`,
23172    `Idieresis`,
23173    `Igrave`,
23174    `Oacute`,
23175    `Ocircumflex`,
23176    `apple`,
23177    `Ograve`,
23178    `Uacute`,
23179    `Ucircumflex`,
23180    `Ugrave`,
23181    `dotlessi`,
23182    `circumflex`,
23183    `tilde`,
23184    `macron`,
23185    `breve`,
23186    `dotaccent`,
23187    `ring`,
23188    `cedilla`,
23189    `hungarumlaut`,
23190    `ogonek`,
23191    `caron`,
23192    `Lslash`,
23193    `lslash`,
23194    `Scaron`,
23195    `scaron`,
23196    `Zcaron`,
23197    `zcaron`,
23198    `brokenbar`,
23199    `Eth`,
23200    `eth`,
23201    `Yacute`,
23202    `yacute`,
23203    `Thorn`,
23204    `thorn`,
23205    `minus`,
23206    `multiply`,
23207    `onesuperior`,
23208    `twosuperior`,
23209    `threesuperior`,
23210    `onehalf`,
23211    `onequarter`,
23212    `threequarters`,
23213    `franc`,
23214    `Gbreve`,
23215    `gbreve`,
23216    `Idotaccent`,
23217    `Scedilla`,
23218    `scedilla`,
23219    `Cacute`,
23220    `cacute`,
23221    `Ccaron`,
23222    `ccaron`,
23223    `dcroat`
23224  ];
23225  var post$1 = Object.freeze({ __proto__: null, post });
23226  var BASE = class extends SimpleTable {
23227    constructor(dict, dataview) {
23228      const { p: p22 } = super(dict, dataview);
23229      this.majorVersion = p22.uint16;
23230      this.minorVersion = p22.uint16;
23231      this.horizAxisOffset = p22.Offset16;
23232      this.vertAxisOffset = p22.Offset16;
23233      lazy$1(
23234        this,
23235        `horizAxis`,
23236        () => new AxisTable(
23237          { offset: dict.offset + this.horizAxisOffset },
23238          dataview
23239        )
23240      );
23241      lazy$1(
23242        this,
23243        `vertAxis`,
23244        () => new AxisTable(
23245          { offset: dict.offset + this.vertAxisOffset },
23246          dataview
23247        )
23248      );
23249      if (this.majorVersion === 1 && this.minorVersion === 1) {
23250        this.itemVarStoreOffset = p22.Offset32;
23251        lazy$1(
23252          this,
23253          `itemVarStore`,
23254          () => new AxisTable(
23255            { offset: dict.offset + this.itemVarStoreOffset },
23256            dataview
23257          )
23258        );
23259      }
23260    }
23261  };
23262  var AxisTable = class extends SimpleTable {
23263    constructor(dict, dataview) {
23264      const { p: p22 } = super(dict, dataview, `AxisTable`);
23265      this.baseTagListOffset = p22.Offset16;
23266      this.baseScriptListOffset = p22.Offset16;
23267      lazy$1(
23268        this,
23269        `baseTagList`,
23270        () => new BaseTagListTable(
23271          { offset: dict.offset + this.baseTagListOffset },
23272          dataview
23273        )
23274      );
23275      lazy$1(
23276        this,
23277        `baseScriptList`,
23278        () => new BaseScriptListTable(
23279          { offset: dict.offset + this.baseScriptListOffset },
23280          dataview
23281        )
23282      );
23283    }
23284  };
23285  var BaseTagListTable = class extends SimpleTable {
23286    constructor(dict, dataview) {
23287      const { p: p22 } = super(dict, dataview, `BaseTagListTable`);
23288      this.baseTagCount = p22.uint16;
23289      this.baselineTags = [...new Array(this.baseTagCount)].map(
23290        (_) => p22.tag
23291      );
23292    }
23293  };
23294  var BaseScriptListTable = class extends SimpleTable {
23295    constructor(dict, dataview) {
23296      const { p: p22 } = super(dict, dataview, `BaseScriptListTable`);
23297      this.baseScriptCount = p22.uint16;
23298      const recordStart = p22.currentPosition;
23299      lazy$1(this, `baseScriptRecords`, () => {
23300        p22.currentPosition = recordStart;
23301        return [...new Array(this.baseScriptCount)].map(
23302          (_) => new BaseScriptRecord(this.start, p22)
23303        );
23304      });
23305    }
23306  };
23307  var BaseScriptRecord = class {
23308    constructor(baseScriptListTableStart, p22) {
23309      this.baseScriptTag = p22.tag;
23310      this.baseScriptOffset = p22.Offset16;
23311      lazy$1(this, `baseScriptTable`, () => {
23312        p22.currentPosition = baseScriptListTableStart + this.baseScriptOffset;
23313        return new BaseScriptTable(p22);
23314      });
23315    }
23316  };
23317  var BaseScriptTable = class {
23318    constructor(p22) {
23319      this.start = p22.currentPosition;
23320      this.baseValuesOffset = p22.Offset16;
23321      this.defaultMinMaxOffset = p22.Offset16;
23322      this.baseLangSysCount = p22.uint16;
23323      this.baseLangSysRecords = [...new Array(this.baseLangSysCount)].map(
23324        (_) => new BaseLangSysRecord(this.start, p22)
23325      );
23326      lazy$1(this, `baseValues`, () => {
23327        p22.currentPosition = this.start + this.baseValuesOffset;
23328        return new BaseValuesTable(p22);
23329      });
23330      lazy$1(this, `defaultMinMax`, () => {
23331        p22.currentPosition = this.start + this.defaultMinMaxOffset;
23332        return new MinMaxTable(p22);
23333      });
23334    }
23335  };
23336  var BaseLangSysRecord = class {
23337    constructor(baseScriptTableStart, p22) {
23338      this.baseLangSysTag = p22.tag;
23339      this.minMaxOffset = p22.Offset16;
23340      lazy$1(this, `minMax`, () => {
23341        p22.currentPosition = baseScriptTableStart + this.minMaxOffset;
23342        return new MinMaxTable(p22);
23343      });
23344    }
23345  };
23346  var BaseValuesTable = class {
23347    constructor(p22) {
23348      this.parser = p22;
23349      this.start = p22.currentPosition;
23350      this.defaultBaselineIndex = p22.uint16;
23351      this.baseCoordCount = p22.uint16;
23352      this.baseCoords = [...new Array(this.baseCoordCount)].map(
23353        (_) => p22.Offset16
23354      );
23355    }
23356    getTable(id) {
23357      this.parser.currentPosition = this.start + this.baseCoords[id];
23358      return new BaseCoordTable(this.parser);
23359    }
23360  };
23361  var MinMaxTable = class {
23362    constructor(p22) {
23363      this.minCoord = p22.Offset16;
23364      this.maxCoord = p22.Offset16;
23365      this.featMinMaxCount = p22.uint16;
23366      const recordStart = p22.currentPosition;
23367      lazy$1(this, `featMinMaxRecords`, () => {
23368        p22.currentPosition = recordStart;
23369        return [...new Array(this.featMinMaxCount)].map(
23370          (_) => new FeatMinMaxRecord(p22)
23371        );
23372      });
23373    }
23374  };
23375  var FeatMinMaxRecord = class {
23376    constructor(p22) {
23377      this.featureTableTag = p22.tag;
23378      this.minCoord = p22.Offset16;
23379      this.maxCoord = p22.Offset16;
23380    }
23381  };
23382  var BaseCoordTable = class {
23383    constructor(p22) {
23384      this.baseCoordFormat = p22.uint16;
23385      this.coordinate = p22.int16;
23386      if (this.baseCoordFormat === 2) {
23387        this.referenceGlyph = p22.uint16;
23388        this.baseCoordPoint = p22.uint16;
23389      }
23390      if (this.baseCoordFormat === 3) {
23391        this.deviceTable = p22.Offset16;
23392      }
23393    }
23394  };
23395  var BASE$1 = Object.freeze({ __proto__: null, BASE });
23396  var ClassDefinition = class {
23397    constructor(p22) {
23398      this.classFormat = p22.uint16;
23399      if (this.classFormat === 1) {
23400        this.startGlyphID = p22.uint16;
23401        this.glyphCount = p22.uint16;
23402        this.classValueArray = [...new Array(this.glyphCount)].map(
23403          (_) => p22.uint16
23404        );
23405      }
23406      if (this.classFormat === 2) {
23407        this.classRangeCount = p22.uint16;
23408        this.classRangeRecords = [
23409          ...new Array(this.classRangeCount)
23410        ].map((_) => new ClassRangeRecord(p22));
23411      }
23412    }
23413  };
23414  var ClassRangeRecord = class {
23415    constructor(p22) {
23416      this.startGlyphID = p22.uint16;
23417      this.endGlyphID = p22.uint16;
23418      this.class = p22.uint16;
23419    }
23420  };
23421  var CoverageTable = class extends ParsedData {
23422    constructor(p22) {
23423      super(p22);
23424      this.coverageFormat = p22.uint16;
23425      if (this.coverageFormat === 1) {
23426        this.glyphCount = p22.uint16;
23427        this.glyphArray = [...new Array(this.glyphCount)].map(
23428          (_) => p22.uint16
23429        );
23430      }
23431      if (this.coverageFormat === 2) {
23432        this.rangeCount = p22.uint16;
23433        this.rangeRecords = [...new Array(this.rangeCount)].map(
23434          (_) => new CoverageRangeRecord(p22)
23435        );
23436      }
23437    }
23438  };
23439  var CoverageRangeRecord = class {
23440    constructor(p22) {
23441      this.startGlyphID = p22.uint16;
23442      this.endGlyphID = p22.uint16;
23443      this.startCoverageIndex = p22.uint16;
23444    }
23445  };
23446  var ItemVariationStoreTable = class {
23447    constructor(table, p22) {
23448      this.table = table;
23449      this.parser = p22;
23450      this.start = p22.currentPosition;
23451      this.format = p22.uint16;
23452      this.variationRegionListOffset = p22.Offset32;
23453      this.itemVariationDataCount = p22.uint16;
23454      this.itemVariationDataOffsets = [
23455        ...new Array(this.itemVariationDataCount)
23456      ].map((_) => p22.Offset32);
23457    }
23458  };
23459  var GDEF = class extends SimpleTable {
23460    constructor(dict, dataview) {
23461      const { p: p22 } = super(dict, dataview);
23462      this.majorVersion = p22.uint16;
23463      this.minorVersion = p22.uint16;
23464      this.glyphClassDefOffset = p22.Offset16;
23465      lazy$1(this, `glyphClassDefs`, () => {
23466        if (this.glyphClassDefOffset === 0) return void 0;
23467        p22.currentPosition = this.tableStart + this.glyphClassDefOffset;
23468        return new ClassDefinition(p22);
23469      });
23470      this.attachListOffset = p22.Offset16;
23471      lazy$1(this, `attachList`, () => {
23472        if (this.attachListOffset === 0) return void 0;
23473        p22.currentPosition = this.tableStart + this.attachListOffset;
23474        return new AttachList(p22);
23475      });
23476      this.ligCaretListOffset = p22.Offset16;
23477      lazy$1(this, `ligCaretList`, () => {
23478        if (this.ligCaretListOffset === 0) return void 0;
23479        p22.currentPosition = this.tableStart + this.ligCaretListOffset;
23480        return new LigCaretList(p22);
23481      });
23482      this.markAttachClassDefOffset = p22.Offset16;
23483      lazy$1(this, `markAttachClassDef`, () => {
23484        if (this.markAttachClassDefOffset === 0) return void 0;
23485        p22.currentPosition = this.tableStart + this.markAttachClassDefOffset;
23486        return new ClassDefinition(p22);
23487      });
23488      if (this.minorVersion >= 2) {
23489        this.markGlyphSetsDefOffset = p22.Offset16;
23490        lazy$1(this, `markGlyphSetsDef`, () => {
23491          if (this.markGlyphSetsDefOffset === 0) return void 0;
23492          p22.currentPosition = this.tableStart + this.markGlyphSetsDefOffset;
23493          return new MarkGlyphSetsTable(p22);
23494        });
23495      }
23496      if (this.minorVersion === 3) {
23497        this.itemVarStoreOffset = p22.Offset32;
23498        lazy$1(this, `itemVarStore`, () => {
23499          if (this.itemVarStoreOffset === 0) return void 0;
23500          p22.currentPosition = this.tableStart + this.itemVarStoreOffset;
23501          return new ItemVariationStoreTable(p22);
23502        });
23503      }
23504    }
23505  };
23506  var AttachList = class extends ParsedData {
23507    constructor(p22) {
23508      super(p22);
23509      this.coverageOffset = p22.Offset16;
23510      this.glyphCount = p22.uint16;
23511      this.attachPointOffsets = [...new Array(this.glyphCount)].map(
23512        (_) => p22.Offset16
23513      );
23514    }
23515    getPoint(pointID) {
23516      this.parser.currentPosition = this.start + this.attachPointOffsets[pointID];
23517      return new AttachPoint(this.parser);
23518    }
23519  };
23520  var AttachPoint = class {
23521    constructor(p22) {
23522      this.pointCount = p22.uint16;
23523      this.pointIndices = [...new Array(this.pointCount)].map(
23524        (_) => p22.uint16
23525      );
23526    }
23527  };
23528  var LigCaretList = class extends ParsedData {
23529    constructor(p22) {
23530      super(p22);
23531      this.coverageOffset = p22.Offset16;
23532      lazy$1(this, `coverage`, () => {
23533        p22.currentPosition = this.start + this.coverageOffset;
23534        return new CoverageTable(p22);
23535      });
23536      this.ligGlyphCount = p22.uint16;
23537      this.ligGlyphOffsets = [...new Array(this.ligGlyphCount)].map(
23538        (_) => p22.Offset16
23539      );
23540    }
23541    getLigGlyph(ligGlyphID) {
23542      this.parser.currentPosition = this.start + this.ligGlyphOffsets[ligGlyphID];
23543      return new LigGlyph(this.parser);
23544    }
23545  };
23546  var LigGlyph = class extends ParsedData {
23547    constructor(p22) {
23548      super(p22);
23549      this.caretCount = p22.uint16;
23550      this.caretValueOffsets = [...new Array(this.caretCount)].map(
23551        (_) => p22.Offset16
23552      );
23553    }
23554    getCaretValue(caretID) {
23555      this.parser.currentPosition = this.start + this.caretValueOffsets[caretID];
23556      return new CaretValue(this.parser);
23557    }
23558  };
23559  var CaretValue = class {
23560    constructor(p22) {
23561      this.caretValueFormat = p22.uint16;
23562      if (this.caretValueFormat === 1) {
23563        this.coordinate = p22.int16;
23564      }
23565      if (this.caretValueFormat === 2) {
23566        this.caretValuePointIndex = p22.uint16;
23567      }
23568      if (this.caretValueFormat === 3) {
23569        this.coordinate = p22.int16;
23570        this.deviceOffset = p22.Offset16;
23571      }
23572    }
23573  };
23574  var MarkGlyphSetsTable = class extends ParsedData {
23575    constructor(p22) {
23576      super(p22);
23577      this.markGlyphSetTableFormat = p22.uint16;
23578      this.markGlyphSetCount = p22.uint16;
23579      this.coverageOffsets = [...new Array(this.markGlyphSetCount)].map(
23580        (_) => p22.Offset32
23581      );
23582    }
23583    getMarkGlyphSet(markGlyphSetID) {
23584      this.parser.currentPosition = this.start + this.coverageOffsets[markGlyphSetID];
23585      return new CoverageTable(this.parser);
23586    }
23587  };
23588  var GDEF$1 = Object.freeze({ __proto__: null, GDEF });
23589  var ScriptList = class extends ParsedData {
23590    static EMPTY = { scriptCount: 0, scriptRecords: [] };
23591    constructor(p22) {
23592      super(p22);
23593      this.scriptCount = p22.uint16;
23594      this.scriptRecords = [...new Array(this.scriptCount)].map(
23595        (_) => new ScriptRecord(p22)
23596      );
23597    }
23598  };
23599  var ScriptRecord = class {
23600    constructor(p22) {
23601      this.scriptTag = p22.tag;
23602      this.scriptOffset = p22.Offset16;
23603    }
23604  };
23605  var ScriptTable = class extends ParsedData {
23606    constructor(p22) {
23607      super(p22);
23608      this.defaultLangSys = p22.Offset16;
23609      this.langSysCount = p22.uint16;
23610      this.langSysRecords = [...new Array(this.langSysCount)].map(
23611        (_) => new LangSysRecord(p22)
23612      );
23613    }
23614  };
23615  var LangSysRecord = class {
23616    constructor(p22) {
23617      this.langSysTag = p22.tag;
23618      this.langSysOffset = p22.Offset16;
23619    }
23620  };
23621  var LangSysTable = class {
23622    constructor(p22) {
23623      this.lookupOrder = p22.Offset16;
23624      this.requiredFeatureIndex = p22.uint16;
23625      this.featureIndexCount = p22.uint16;
23626      this.featureIndices = [...new Array(this.featureIndexCount)].map(
23627        (_) => p22.uint16
23628      );
23629    }
23630  };
23631  var FeatureList = class extends ParsedData {
23632    static EMPTY = { featureCount: 0, featureRecords: [] };
23633    constructor(p22) {
23634      super(p22);
23635      this.featureCount = p22.uint16;
23636      this.featureRecords = [...new Array(this.featureCount)].map(
23637        (_) => new FeatureRecord(p22)
23638      );
23639    }
23640  };
23641  var FeatureRecord = class {
23642    constructor(p22) {
23643      this.featureTag = p22.tag;
23644      this.featureOffset = p22.Offset16;
23645    }
23646  };
23647  var FeatureTable = class extends ParsedData {
23648    constructor(p22) {
23649      super(p22);
23650      this.featureParams = p22.Offset16;
23651      this.lookupIndexCount = p22.uint16;
23652      this.lookupListIndices = [...new Array(this.lookupIndexCount)].map(
23653        (_) => p22.uint16
23654      );
23655    }
23656    getFeatureParams() {
23657      if (this.featureParams > 0) {
23658        const p22 = this.parser;
23659        p22.currentPosition = this.start + this.featureParams;
23660        const tag = this.featureTag;
23661        if (tag === `size`) return new Size(p22);
23662        if (tag.startsWith(`cc`)) return new CharacterVariant(p22);
23663        if (tag.startsWith(`ss`)) return new StylisticSet(p22);
23664      }
23665    }
23666  };
23667  var CharacterVariant = class {
23668    constructor(p22) {
23669      this.format = p22.uint16;
23670      this.featUiLabelNameId = p22.uint16;
23671      this.featUiTooltipTextNameId = p22.uint16;
23672      this.sampleTextNameId = p22.uint16;
23673      this.numNamedParameters = p22.uint16;
23674      this.firstParamUiLabelNameId = p22.uint16;
23675      this.charCount = p22.uint16;
23676      this.character = [...new Array(this.charCount)].map(
23677        (_) => p22.uint24
23678      );
23679    }
23680  };
23681  var Size = class {
23682    constructor(p22) {
23683      this.designSize = p22.uint16;
23684      this.subfamilyIdentifier = p22.uint16;
23685      this.subfamilyNameID = p22.uint16;
23686      this.smallEnd = p22.uint16;
23687      this.largeEnd = p22.uint16;
23688    }
23689  };
23690  var StylisticSet = class {
23691    constructor(p22) {
23692      this.version = p22.uint16;
23693      this.UINameID = p22.uint16;
23694    }
23695  };
23696  function undoCoverageOffsetParsing(instance) {
23697    instance.parser.currentPosition -= 2;
23698    delete instance.coverageOffset;
23699    delete instance.getCoverageTable;
23700  }
23701  var LookupType$1 = class extends ParsedData {
23702    constructor(p22) {
23703      super(p22);
23704      this.substFormat = p22.uint16;
23705      this.coverageOffset = p22.Offset16;
23706    }
23707    getCoverageTable() {
23708      let p22 = this.parser;
23709      p22.currentPosition = this.start + this.coverageOffset;
23710      return new CoverageTable(p22);
23711    }
23712  };
23713  var SubstLookupRecord = class {
23714    constructor(p22) {
23715      this.glyphSequenceIndex = p22.uint16;
23716      this.lookupListIndex = p22.uint16;
23717    }
23718  };
23719  var LookupType1$1 = class extends LookupType$1 {
23720    constructor(p22) {
23721      super(p22);
23722      this.deltaGlyphID = p22.int16;
23723    }
23724  };
23725  var LookupType2$1 = class extends LookupType$1 {
23726    constructor(p22) {
23727      super(p22);
23728      this.sequenceCount = p22.uint16;
23729      this.sequenceOffsets = [...new Array(this.sequenceCount)].map(
23730        (_) => p22.Offset16
23731      );
23732    }
23733    getSequence(index2) {
23734      let p22 = this.parser;
23735      p22.currentPosition = this.start + this.sequenceOffsets[index2];
23736      return new SequenceTable(p22);
23737    }
23738  };
23739  var SequenceTable = class {
23740    constructor(p22) {
23741      this.glyphCount = p22.uint16;
23742      this.substituteGlyphIDs = [...new Array(this.glyphCount)].map(
23743        (_) => p22.uint16
23744      );
23745    }
23746  };
23747  var LookupType3$1 = class extends LookupType$1 {
23748    constructor(p22) {
23749      super(p22);
23750      this.alternateSetCount = p22.uint16;
23751      this.alternateSetOffsets = [
23752        ...new Array(this.alternateSetCount)
23753      ].map((_) => p22.Offset16);
23754    }
23755    getAlternateSet(index2) {
23756      let p22 = this.parser;
23757      p22.currentPosition = this.start + this.alternateSetOffsets[index2];
23758      return new AlternateSetTable(p22);
23759    }
23760  };
23761  var AlternateSetTable = class {
23762    constructor(p22) {
23763      this.glyphCount = p22.uint16;
23764      this.alternateGlyphIDs = [...new Array(this.glyphCount)].map(
23765        (_) => p22.uint16
23766      );
23767    }
23768  };
23769  var LookupType4$1 = class extends LookupType$1 {
23770    constructor(p22) {
23771      super(p22);
23772      this.ligatureSetCount = p22.uint16;
23773      this.ligatureSetOffsets = [...new Array(this.ligatureSetCount)].map(
23774        (_) => p22.Offset16
23775      );
23776    }
23777    getLigatureSet(index2) {
23778      let p22 = this.parser;
23779      p22.currentPosition = this.start + this.ligatureSetOffsets[index2];
23780      return new LigatureSetTable(p22);
23781    }
23782  };
23783  var LigatureSetTable = class extends ParsedData {
23784    constructor(p22) {
23785      super(p22);
23786      this.ligatureCount = p22.uint16;
23787      this.ligatureOffsets = [...new Array(this.ligatureCount)].map(
23788        (_) => p22.Offset16
23789      );
23790    }
23791    getLigature(index2) {
23792      let p22 = this.parser;
23793      p22.currentPosition = this.start + this.ligatureOffsets[index2];
23794      return new LigatureTable(p22);
23795    }
23796  };
23797  var LigatureTable = class {
23798    constructor(p22) {
23799      this.ligatureGlyph = p22.uint16;
23800      this.componentCount = p22.uint16;
23801      this.componentGlyphIDs = [
23802        ...new Array(this.componentCount - 1)
23803      ].map((_) => p22.uint16);
23804    }
23805  };
23806  var LookupType5$1 = class extends LookupType$1 {
23807    constructor(p22) {
23808      super(p22);
23809      if (this.substFormat === 1) {
23810        this.subRuleSetCount = p22.uint16;
23811        this.subRuleSetOffsets = [
23812          ...new Array(this.subRuleSetCount)
23813        ].map((_) => p22.Offset16);
23814      }
23815      if (this.substFormat === 2) {
23816        this.classDefOffset = p22.Offset16;
23817        this.subClassSetCount = p22.uint16;
23818        this.subClassSetOffsets = [
23819          ...new Array(this.subClassSetCount)
23820        ].map((_) => p22.Offset16);
23821      }
23822      if (this.substFormat === 3) {
23823        undoCoverageOffsetParsing(this);
23824        this.glyphCount = p22.uint16;
23825        this.substitutionCount = p22.uint16;
23826        this.coverageOffsets = [...new Array(this.glyphCount)].map(
23827          (_) => p22.Offset16
23828        );
23829        this.substLookupRecords = [
23830          ...new Array(this.substitutionCount)
23831        ].map((_) => new SubstLookupRecord(p22));
23832      }
23833    }
23834    getSubRuleSet(index2) {
23835      if (this.substFormat !== 1)
23836        throw new Error(
23837          `lookup type 5.$this.substFormat} has no subrule sets.`
23838        );
23839      let p22 = this.parser;
23840      p22.currentPosition = this.start + this.subRuleSetOffsets[index2];
23841      return new SubRuleSetTable(p22);
23842    }
23843    getSubClassSet(index2) {
23844      if (this.substFormat !== 2)
23845        throw new Error(
23846          `lookup type 5.$this.substFormat} has no subclass sets.`
23847        );
23848      let p22 = this.parser;
23849      p22.currentPosition = this.start + this.subClassSetOffsets[index2];
23850      return new SubClassSetTable(p22);
23851    }
23852    getCoverageTable(index2) {
23853      if (this.substFormat !== 3 && !index2)
23854        return super.getCoverageTable();
23855      if (!index2)
23856        throw new Error(
23857          `lookup type 5.$this.substFormat} requires an coverage table index.`
23858        );
23859      let p22 = this.parser;
23860      p22.currentPosition = this.start + this.coverageOffsets[index2];
23861      return new CoverageTable(p22);
23862    }
23863  };
23864  var SubRuleSetTable = class extends ParsedData {
23865    constructor(p22) {
23866      super(p22);
23867      this.subRuleCount = p22.uint16;
23868      this.subRuleOffsets = [...new Array(this.subRuleCount)].map(
23869        (_) => p22.Offset16
23870      );
23871    }
23872    getSubRule(index2) {
23873      let p22 = this.parser;
23874      p22.currentPosition = this.start + this.subRuleOffsets[index2];
23875      return new SubRuleTable(p22);
23876    }
23877  };
23878  var SubRuleTable = class {
23879    constructor(p22) {
23880      this.glyphCount = p22.uint16;
23881      this.substitutionCount = p22.uint16;
23882      this.inputSequence = [...new Array(this.glyphCount - 1)].map(
23883        (_) => p22.uint16
23884      );
23885      this.substLookupRecords = [
23886        ...new Array(this.substitutionCount)
23887      ].map((_) => new SubstLookupRecord(p22));
23888    }
23889  };
23890  var SubClassSetTable = class extends ParsedData {
23891    constructor(p22) {
23892      super(p22);
23893      this.subClassRuleCount = p22.uint16;
23894      this.subClassRuleOffsets = [
23895        ...new Array(this.subClassRuleCount)
23896      ].map((_) => p22.Offset16);
23897    }
23898    getSubClass(index2) {
23899      let p22 = this.parser;
23900      p22.currentPosition = this.start + this.subClassRuleOffsets[index2];
23901      return new SubClassRuleTable(p22);
23902    }
23903  };
23904  var SubClassRuleTable = class extends SubRuleTable {
23905    constructor(p22) {
23906      super(p22);
23907    }
23908  };
23909  var LookupType6$1 = class extends LookupType$1 {
23910    constructor(p22) {
23911      super(p22);
23912      if (this.substFormat === 1) {
23913        this.chainSubRuleSetCount = p22.uint16;
23914        this.chainSubRuleSetOffsets = [
23915          ...new Array(this.chainSubRuleSetCount)
23916        ].map((_) => p22.Offset16);
23917      }
23918      if (this.substFormat === 2) {
23919        this.backtrackClassDefOffset = p22.Offset16;
23920        this.inputClassDefOffset = p22.Offset16;
23921        this.lookaheadClassDefOffset = p22.Offset16;
23922        this.chainSubClassSetCount = p22.uint16;
23923        this.chainSubClassSetOffsets = [
23924          ...new Array(this.chainSubClassSetCount)
23925        ].map((_) => p22.Offset16);
23926      }
23927      if (this.substFormat === 3) {
23928        undoCoverageOffsetParsing(this);
23929        this.backtrackGlyphCount = p22.uint16;
23930        this.backtrackCoverageOffsets = [
23931          ...new Array(this.backtrackGlyphCount)
23932        ].map((_) => p22.Offset16);
23933        this.inputGlyphCount = p22.uint16;
23934        this.inputCoverageOffsets = [
23935          ...new Array(this.inputGlyphCount)
23936        ].map((_) => p22.Offset16);
23937        this.lookaheadGlyphCount = p22.uint16;
23938        this.lookaheadCoverageOffsets = [
23939          ...new Array(this.lookaheadGlyphCount)
23940        ].map((_) => p22.Offset16);
23941        this.seqLookupCount = p22.uint16;
23942        this.seqLookupRecords = [
23943          ...new Array(this.substitutionCount)
23944        ].map((_) => new SequenceLookupRecord(p22));
23945      }
23946    }
23947    getChainSubRuleSet(index2) {
23948      if (this.substFormat !== 1)
23949        throw new Error(
23950          `lookup type 6.$this.substFormat} has no chainsubrule sets.`
23951        );
23952      let p22 = this.parser;
23953      p22.currentPosition = this.start + this.chainSubRuleSetOffsets[index2];
23954      return new ChainSubRuleSetTable(p22);
23955    }
23956    getChainSubClassSet(index2) {
23957      if (this.substFormat !== 2)
23958        throw new Error(
23959          `lookup type 6.$this.substFormat} has no chainsubclass sets.`
23960        );
23961      let p22 = this.parser;
23962      p22.currentPosition = this.start + this.chainSubClassSetOffsets[index2];
23963      return new ChainSubClassSetTable(p22);
23964    }
23965    getCoverageFromOffset(offset4) {
23966      if (this.substFormat !== 3)
23967        throw new Error(
23968          `lookup type 6.$this.substFormat} does not use contextual coverage offsets.`
23969        );
23970      let p22 = this.parser;
23971      p22.currentPosition = this.start + offset4;
23972      return new CoverageTable(p22);
23973    }
23974  };
23975  var ChainSubRuleSetTable = class extends ParsedData {
23976    constructor(p22) {
23977      super(p22);
23978      this.chainSubRuleCount = p22.uint16;
23979      this.chainSubRuleOffsets = [
23980        ...new Array(this.chainSubRuleCount)
23981      ].map((_) => p22.Offset16);
23982    }
23983    getSubRule(index2) {
23984      let p22 = this.parser;
23985      p22.currentPosition = this.start + this.chainSubRuleOffsets[index2];
23986      return new ChainSubRuleTable(p22);
23987    }
23988  };
23989  var ChainSubRuleTable = class {
23990    constructor(p22) {
23991      this.backtrackGlyphCount = p22.uint16;
23992      this.backtrackSequence = [
23993        ...new Array(this.backtrackGlyphCount)
23994      ].map((_) => p22.uint16);
23995      this.inputGlyphCount = p22.uint16;
23996      this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map(
23997        (_) => p22.uint16
23998      );
23999      this.lookaheadGlyphCount = p22.uint16;
24000      this.lookAheadSequence = [
24001        ...new Array(this.lookAheadGlyphCount)
24002      ].map((_) => p22.uint16);
24003      this.substitutionCount = p22.uint16;
24004      this.substLookupRecords = [...new Array(this.SubstCount)].map(
24005        (_) => new SubstLookupRecord(p22)
24006      );
24007    }
24008  };
24009  var ChainSubClassSetTable = class extends ParsedData {
24010    constructor(p22) {
24011      super(p22);
24012      this.chainSubClassRuleCount = p22.uint16;
24013      this.chainSubClassRuleOffsets = [
24014        ...new Array(this.chainSubClassRuleCount)
24015      ].map((_) => p22.Offset16);
24016    }
24017    getSubClass(index2) {
24018      let p22 = this.parser;
24019      p22.currentPosition = this.start + this.chainSubRuleOffsets[index2];
24020      return new ChainSubClassRuleTable(p22);
24021    }
24022  };
24023  var ChainSubClassRuleTable = class {
24024    constructor(p22) {
24025      this.backtrackGlyphCount = p22.uint16;
24026      this.backtrackSequence = [
24027        ...new Array(this.backtrackGlyphCount)
24028      ].map((_) => p22.uint16);
24029      this.inputGlyphCount = p22.uint16;
24030      this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map(
24031        (_) => p22.uint16
24032      );
24033      this.lookaheadGlyphCount = p22.uint16;
24034      this.lookAheadSequence = [
24035        ...new Array(this.lookAheadGlyphCount)
24036      ].map((_) => p22.uint16);
24037      this.substitutionCount = p22.uint16;
24038      this.substLookupRecords = [
24039        ...new Array(this.substitutionCount)
24040      ].map((_) => new SequenceLookupRecord(p22));
24041    }
24042  };
24043  var SequenceLookupRecord = class extends ParsedData {
24044    constructor(p22) {
24045      super(p22);
24046      this.sequenceIndex = p22.uint16;
24047      this.lookupListIndex = p22.uint16;
24048    }
24049  };
24050  var LookupType7$1 = class extends ParsedData {
24051    constructor(p22) {
24052      super(p22);
24053      this.substFormat = p22.uint16;
24054      this.extensionLookupType = p22.uint16;
24055      this.extensionOffset = p22.Offset32;
24056    }
24057  };
24058  var LookupType8$1 = class extends LookupType$1 {
24059    constructor(p22) {
24060      super(p22);
24061      this.backtrackGlyphCount = p22.uint16;
24062      this.backtrackCoverageOffsets = [
24063        ...new Array(this.backtrackGlyphCount)
24064      ].map((_) => p22.Offset16);
24065      this.lookaheadGlyphCount = p22.uint16;
24066      this.lookaheadCoverageOffsets = [
24067        new Array(this.lookaheadGlyphCount)
24068      ].map((_) => p22.Offset16);
24069      this.glyphCount = p22.uint16;
24070      this.substituteGlyphIDs = [...new Array(this.glyphCount)].map(
24071        (_) => p22.uint16
24072      );
24073    }
24074  };
24075  var GSUBtables = {
24076    buildSubtable: function(type, p22) {
24077      const subtable = new [
24078        void 0,
24079        LookupType1$1,
24080        LookupType2$1,
24081        LookupType3$1,
24082        LookupType4$1,
24083        LookupType5$1,
24084        LookupType6$1,
24085        LookupType7$1,
24086        LookupType8$1
24087      ][type](p22);
24088      subtable.type = type;
24089      return subtable;
24090    }
24091  };
24092  var LookupType = class extends ParsedData {
24093    constructor(p22) {
24094      super(p22);
24095    }
24096  };
24097  var LookupType1 = class extends LookupType {
24098    constructor(p22) {
24099      super(p22);
24100      console.log(`lookup type 1`);
24101    }
24102  };
24103  var LookupType2 = class extends LookupType {
24104    constructor(p22) {
24105      super(p22);
24106      console.log(`lookup type 2`);
24107    }
24108  };
24109  var LookupType3 = class extends LookupType {
24110    constructor(p22) {
24111      super(p22);
24112      console.log(`lookup type 3`);
24113    }
24114  };
24115  var LookupType4 = class extends LookupType {
24116    constructor(p22) {
24117      super(p22);
24118      console.log(`lookup type 4`);
24119    }
24120  };
24121  var LookupType5 = class extends LookupType {
24122    constructor(p22) {
24123      super(p22);
24124      console.log(`lookup type 5`);
24125    }
24126  };
24127  var LookupType6 = class extends LookupType {
24128    constructor(p22) {
24129      super(p22);
24130      console.log(`lookup type 6`);
24131    }
24132  };
24133  var LookupType7 = class extends LookupType {
24134    constructor(p22) {
24135      super(p22);
24136      console.log(`lookup type 7`);
24137    }
24138  };
24139  var LookupType8 = class extends LookupType {
24140    constructor(p22) {
24141      super(p22);
24142      console.log(`lookup type 8`);
24143    }
24144  };
24145  var LookupType9 = class extends LookupType {
24146    constructor(p22) {
24147      super(p22);
24148      console.log(`lookup type 9`);
24149    }
24150  };
24151  var GPOStables = {
24152    buildSubtable: function(type, p22) {
24153      const subtable = new [
24154        void 0,
24155        LookupType1,
24156        LookupType2,
24157        LookupType3,
24158        LookupType4,
24159        LookupType5,
24160        LookupType6,
24161        LookupType7,
24162        LookupType8,
24163        LookupType9
24164      ][type](p22);
24165      subtable.type = type;
24166      return subtable;
24167    }
24168  };
24169  var LookupList = class extends ParsedData {
24170    static EMPTY = { lookupCount: 0, lookups: [] };
24171    constructor(p22) {
24172      super(p22);
24173      this.lookupCount = p22.uint16;
24174      this.lookups = [...new Array(this.lookupCount)].map(
24175        (_) => p22.Offset16
24176      );
24177    }
24178  };
24179  var LookupTable = class extends ParsedData {
24180    constructor(p22, type) {
24181      super(p22);
24182      this.ctType = type;
24183      this.lookupType = p22.uint16;
24184      this.lookupFlag = p22.uint16;
24185      this.subTableCount = p22.uint16;
24186      this.subtableOffsets = [...new Array(this.subTableCount)].map(
24187        (_) => p22.Offset16
24188      );
24189      this.markFilteringSet = p22.uint16;
24190    }
24191    get rightToLeft() {
24192      return this.lookupFlag & true;
24193    }
24194    get ignoreBaseGlyphs() {
24195      return this.lookupFlag & true;
24196    }
24197    get ignoreLigatures() {
24198      return this.lookupFlag & true;
24199    }
24200    get ignoreMarks() {
24201      return this.lookupFlag & true;
24202    }
24203    get useMarkFilteringSet() {
24204      return this.lookupFlag & true;
24205    }
24206    get markAttachmentType() {
24207      return this.lookupFlag & true;
24208    }
24209    getSubTable(index2) {
24210      const builder = this.ctType === `GSUB` ? GSUBtables : GPOStables;
24211      this.parser.currentPosition = this.start + this.subtableOffsets[index2];
24212      return builder.buildSubtable(this.lookupType, this.parser);
24213    }
24214  };
24215  var CommonLayoutTable = class extends SimpleTable {
24216    constructor(dict, dataview, name2) {
24217      const { p: p22, tableStart } = super(dict, dataview, name2);
24218      this.majorVersion = p22.uint16;
24219      this.minorVersion = p22.uint16;
24220      this.scriptListOffset = p22.Offset16;
24221      this.featureListOffset = p22.Offset16;
24222      this.lookupListOffset = p22.Offset16;
24223      if (this.majorVersion === 1 && this.minorVersion === 1) {
24224        this.featureVariationsOffset = p22.Offset32;
24225      }
24226      const no_content = !(this.scriptListOffset || this.featureListOffset || this.lookupListOffset);
24227      lazy$1(this, `scriptList`, () => {
24228        if (no_content) return ScriptList.EMPTY;
24229        p22.currentPosition = tableStart + this.scriptListOffset;
24230        return new ScriptList(p22);
24231      });
24232      lazy$1(this, `featureList`, () => {
24233        if (no_content) return FeatureList.EMPTY;
24234        p22.currentPosition = tableStart + this.featureListOffset;
24235        return new FeatureList(p22);
24236      });
24237      lazy$1(this, `lookupList`, () => {
24238        if (no_content) return LookupList.EMPTY;
24239        p22.currentPosition = tableStart + this.lookupListOffset;
24240        return new LookupList(p22);
24241      });
24242      if (this.featureVariationsOffset) {
24243        lazy$1(this, `featureVariations`, () => {
24244          if (no_content) return FeatureVariations.EMPTY;
24245          p22.currentPosition = tableStart + this.featureVariationsOffset;
24246          return new FeatureVariations(p22);
24247        });
24248      }
24249    }
24250    getSupportedScripts() {
24251      return this.scriptList.scriptRecords.map((r2) => r2.scriptTag);
24252    }
24253    getScriptTable(scriptTag) {
24254      let record = this.scriptList.scriptRecords.find(
24255        (r2) => r2.scriptTag === scriptTag
24256      );
24257      this.parser.currentPosition = this.scriptList.start + record.scriptOffset;
24258      let table = new ScriptTable(this.parser);
24259      table.scriptTag = scriptTag;
24260      return table;
24261    }
24262    ensureScriptTable(arg) {
24263      if (typeof arg === "string") {
24264        return this.getScriptTable(arg);
24265      }
24266      return arg;
24267    }
24268    getSupportedLangSys(scriptTable) {
24269      scriptTable = this.ensureScriptTable(scriptTable);
24270      const hasDefault = scriptTable.defaultLangSys !== 0;
24271      const supported = scriptTable.langSysRecords.map(
24272        (l2) => l2.langSysTag
24273      );
24274      if (hasDefault) supported.unshift(`dflt`);
24275      return supported;
24276    }
24277    getDefaultLangSysTable(scriptTable) {
24278      scriptTable = this.ensureScriptTable(scriptTable);
24279      let offset4 = scriptTable.defaultLangSys;
24280      if (offset4 !== 0) {
24281        this.parser.currentPosition = scriptTable.start + offset4;
24282        let table = new LangSysTable(this.parser);
24283        table.langSysTag = ``;
24284        table.defaultForScript = scriptTable.scriptTag;
24285        return table;
24286      }
24287    }
24288    getLangSysTable(scriptTable, langSysTag = `dflt`) {
24289      if (langSysTag === `dflt`)
24290        return this.getDefaultLangSysTable(scriptTable);
24291      scriptTable = this.ensureScriptTable(scriptTable);
24292      let record = scriptTable.langSysRecords.find(
24293        (l2) => l2.langSysTag === langSysTag
24294      );
24295      this.parser.currentPosition = scriptTable.start + record.langSysOffset;
24296      let table = new LangSysTable(this.parser);
24297      table.langSysTag = langSysTag;
24298      return table;
24299    }
24300    getFeatures(langSysTable) {
24301      return langSysTable.featureIndices.map(
24302        (index2) => this.getFeature(index2)
24303      );
24304    }
24305    getFeature(indexOrTag) {
24306      let record;
24307      if (parseInt(indexOrTag) == indexOrTag) {
24308        record = this.featureList.featureRecords[indexOrTag];
24309      } else {
24310        record = this.featureList.featureRecords.find(
24311          (f) => f.featureTag === indexOrTag
24312        );
24313      }
24314      if (!record) return;
24315      this.parser.currentPosition = this.featureList.start + record.featureOffset;
24316      let table = new FeatureTable(this.parser);
24317      table.featureTag = record.featureTag;
24318      return table;
24319    }
24320    getLookups(featureTable) {
24321      return featureTable.lookupListIndices.map(
24322        (index2) => this.getLookup(index2)
24323      );
24324    }
24325    getLookup(lookupIndex, type) {
24326      let lookupOffset = this.lookupList.lookups[lookupIndex];
24327      this.parser.currentPosition = this.lookupList.start + lookupOffset;
24328      return new LookupTable(this.parser, type);
24329    }
24330  };
24331  var GSUB = class extends CommonLayoutTable {
24332    constructor(dict, dataview) {
24333      super(dict, dataview, `GSUB`);
24334    }
24335    getLookup(lookupIndex) {
24336      return super.getLookup(lookupIndex, `GSUB`);
24337    }
24338  };
24339  var GSUB$1 = Object.freeze({ __proto__: null, GSUB });
24340  var GPOS = class extends CommonLayoutTable {
24341    constructor(dict, dataview) {
24342      super(dict, dataview, `GPOS`);
24343    }
24344    getLookup(lookupIndex) {
24345      return super.getLookup(lookupIndex, `GPOS`);
24346    }
24347  };
24348  var GPOS$1 = Object.freeze({ __proto__: null, GPOS });
24349  var SVG6 = class extends SimpleTable {
24350    constructor(dict, dataview) {
24351      const { p: p22 } = super(dict, dataview);
24352      this.version = p22.uint16;
24353      this.offsetToSVGDocumentList = p22.Offset32;
24354      p22.currentPosition = this.tableStart + this.offsetToSVGDocumentList;
24355      this.documentList = new SVGDocumentList(p22);
24356    }
24357  };
24358  var SVGDocumentList = class extends ParsedData {
24359    constructor(p22) {
24360      super(p22);
24361      this.numEntries = p22.uint16;
24362      this.documentRecords = [...new Array(this.numEntries)].map(
24363        (_) => new SVGDocumentRecord(p22)
24364      );
24365    }
24366    getDocument(documentID) {
24367      let record = this.documentRecords[documentID];
24368      if (!record) return "";
24369      let offset4 = this.start + record.svgDocOffset;
24370      this.parser.currentPosition = offset4;
24371      return this.parser.readBytes(record.svgDocLength);
24372    }
24373    getDocumentForGlyph(glyphID) {
24374      let id = this.documentRecords.findIndex(
24375        (d) => d.startGlyphID <= glyphID && glyphID <= d.endGlyphID
24376      );
24377      if (id === -1) return "";
24378      return this.getDocument(id);
24379    }
24380  };
24381  var SVGDocumentRecord = class {
24382    constructor(p22) {
24383      this.startGlyphID = p22.uint16;
24384      this.endGlyphID = p22.uint16;
24385      this.svgDocOffset = p22.Offset32;
24386      this.svgDocLength = p22.uint32;
24387    }
24388  };
24389  var SVG$1 = Object.freeze({ __proto__: null, SVG: SVG6 });
24390  var fvar = class extends SimpleTable {
24391    constructor(dict, dataview) {
24392      const { p: p22 } = super(dict, dataview);
24393      this.majorVersion = p22.uint16;
24394      this.minorVersion = p22.uint16;
24395      this.axesArrayOffset = p22.Offset16;
24396      p22.uint16;
24397      this.axisCount = p22.uint16;
24398      this.axisSize = p22.uint16;
24399      this.instanceCount = p22.uint16;
24400      this.instanceSize = p22.uint16;
24401      const axisStart = this.tableStart + this.axesArrayOffset;
24402      lazy$1(this, `axes`, () => {
24403        p22.currentPosition = axisStart;
24404        return [...new Array(this.axisCount)].map(
24405          (_) => new VariationAxisRecord(p22)
24406        );
24407      });
24408      const instanceStart = axisStart + this.axisCount * this.axisSize;
24409      lazy$1(this, `instances`, () => {
24410        let instances = [];
24411        for (let i = 0; i < this.instanceCount; i++) {
24412          p22.currentPosition = instanceStart + i * this.instanceSize;
24413          instances.push(
24414            new InstanceRecord(p22, this.axisCount, this.instanceSize)
24415          );
24416        }
24417        return instances;
24418      });
24419    }
24420    getSupportedAxes() {
24421      return this.axes.map((a) => a.tag);
24422    }
24423    getAxis(name2) {
24424      return this.axes.find((a) => a.tag === name2);
24425    }
24426  };
24427  var VariationAxisRecord = class {
24428    constructor(p22) {
24429      this.tag = p22.tag;
24430      this.minValue = p22.fixed;
24431      this.defaultValue = p22.fixed;
24432      this.maxValue = p22.fixed;
24433      this.flags = p22.flags(16);
24434      this.axisNameID = p22.uint16;
24435    }
24436  };
24437  var InstanceRecord = class {
24438    constructor(p22, axisCount, size4) {
24439      let start = p22.currentPosition;
24440      this.subfamilyNameID = p22.uint16;
24441      p22.uint16;
24442      this.coordinates = [...new Array(axisCount)].map(
24443        (_) => p22.fixed
24444      );
24445      if (p22.currentPosition - start < size4) {
24446        this.postScriptNameID = p22.uint16;
24447      }
24448    }
24449  };
24450  var fvar$1 = Object.freeze({ __proto__: null, fvar });
24451  var cvt = class extends SimpleTable {
24452    constructor(dict, dataview) {
24453      const { p: p22 } = super(dict, dataview);
24454      const n = dict.length / 2;
24455      lazy$1(
24456        this,
24457        `items`,
24458        () => [...new Array(n)].map((_) => p22.fword)
24459      );
24460    }
24461  };
24462  var cvt$1 = Object.freeze({ __proto__: null, cvt });
24463  var fpgm = class extends SimpleTable {
24464    constructor(dict, dataview) {
24465      const { p: p22 } = super(dict, dataview);
24466      lazy$1(
24467        this,
24468        `instructions`,
24469        () => [...new Array(dict.length)].map((_) => p22.uint8)
24470      );
24471    }
24472  };
24473  var fpgm$1 = Object.freeze({ __proto__: null, fpgm });
24474  var gasp = class extends SimpleTable {
24475    constructor(dict, dataview) {
24476      const { p: p22 } = super(dict, dataview);
24477      this.version = p22.uint16;
24478      this.numRanges = p22.uint16;
24479      const getter = () => [...new Array(this.numRanges)].map(
24480        (_) => new GASPRange(p22)
24481      );
24482      lazy$1(this, `gaspRanges`, getter);
24483    }
24484  };
24485  var GASPRange = class {
24486    constructor(p22) {
24487      this.rangeMaxPPEM = p22.uint16;
24488      this.rangeGaspBehavior = p22.uint16;
24489    }
24490  };
24491  var gasp$1 = Object.freeze({ __proto__: null, gasp });
24492  var glyf = class extends SimpleTable {
24493    constructor(dict, dataview) {
24494      super(dict, dataview);
24495    }
24496    getGlyphData(offset4, length) {
24497      this.parser.currentPosition = this.tableStart + offset4;
24498      return this.parser.readBytes(length);
24499    }
24500  };
24501  var glyf$1 = Object.freeze({ __proto__: null, glyf });
24502  var loca = class extends SimpleTable {
24503    constructor(dict, dataview, tables) {
24504      const { p: p22 } = super(dict, dataview);
24505      const n = tables.maxp.numGlyphs + 1;
24506      if (tables.head.indexToLocFormat === 0) {
24507        this.x2 = true;
24508        lazy$1(
24509          this,
24510          `offsets`,
24511          () => [...new Array(n)].map((_) => p22.Offset16)
24512        );
24513      } else {
24514        lazy$1(
24515          this,
24516          `offsets`,
24517          () => [...new Array(n)].map((_) => p22.Offset32)
24518        );
24519      }
24520    }
24521    getGlyphDataOffsetAndLength(glyphID) {
24522      let offset4 = this.offsets[glyphID] * this.x2 ? 2 : 1;
24523      let nextOffset = this.offsets[glyphID + 1] * this.x2 ? 2 : 1;
24524      return { offset: offset4, length: nextOffset - offset4 };
24525    }
24526  };
24527  var loca$1 = Object.freeze({ __proto__: null, loca });
24528  var prep = class extends SimpleTable {
24529    constructor(dict, dataview) {
24530      const { p: p22 } = super(dict, dataview);
24531      lazy$1(
24532        this,
24533        `instructions`,
24534        () => [...new Array(dict.length)].map((_) => p22.uint8)
24535      );
24536    }
24537  };
24538  var prep$1 = Object.freeze({ __proto__: null, prep });
24539  var CFF = class extends SimpleTable {
24540    constructor(dict, dataview) {
24541      const { p: p22 } = super(dict, dataview);
24542      lazy$1(this, `data`, () => p22.readBytes());
24543    }
24544  };
24545  var CFF$1 = Object.freeze({ __proto__: null, CFF });
24546  var CFF2 = class extends SimpleTable {
24547    constructor(dict, dataview) {
24548      const { p: p22 } = super(dict, dataview);
24549      lazy$1(this, `data`, () => p22.readBytes());
24550    }
24551  };
24552  var CFF2$1 = Object.freeze({ __proto__: null, CFF2 });
24553  var VORG = class extends SimpleTable {
24554    constructor(dict, dataview) {
24555      const { p: p22 } = super(dict, dataview);
24556      this.majorVersion = p22.uint16;
24557      this.minorVersion = p22.uint16;
24558      this.defaultVertOriginY = p22.int16;
24559      this.numVertOriginYMetrics = p22.uint16;
24560      lazy$1(
24561        this,
24562        `vertORiginYMetrics`,
24563        () => [...new Array(this.numVertOriginYMetrics)].map(
24564          (_) => new VertOriginYMetric(p22)
24565        )
24566      );
24567    }
24568  };
24569  var VertOriginYMetric = class {
24570    constructor(p22) {
24571      this.glyphIndex = p22.uint16;
24572      this.vertOriginY = p22.int16;
24573    }
24574  };
24575  var VORG$1 = Object.freeze({ __proto__: null, VORG });
24576  var BitmapSize = class {
24577    constructor(p22) {
24578      this.indexSubTableArrayOffset = p22.Offset32;
24579      this.indexTablesSize = p22.uint32;
24580      this.numberofIndexSubTables = p22.uint32;
24581      this.colorRef = p22.uint32;
24582      this.hori = new SbitLineMetrics(p22);
24583      this.vert = new SbitLineMetrics(p22);
24584      this.startGlyphIndex = p22.uint16;
24585      this.endGlyphIndex = p22.uint16;
24586      this.ppemX = p22.uint8;
24587      this.ppemY = p22.uint8;
24588      this.bitDepth = p22.uint8;
24589      this.flags = p22.int8;
24590    }
24591  };
24592  var BitmapScale = class {
24593    constructor(p22) {
24594      this.hori = new SbitLineMetrics(p22);
24595      this.vert = new SbitLineMetrics(p22);
24596      this.ppemX = p22.uint8;
24597      this.ppemY = p22.uint8;
24598      this.substitutePpemX = p22.uint8;
24599      this.substitutePpemY = p22.uint8;
24600    }
24601  };
24602  var SbitLineMetrics = class {
24603    constructor(p22) {
24604      this.ascender = p22.int8;
24605      this.descender = p22.int8;
24606      this.widthMax = p22.uint8;
24607      this.caretSlopeNumerator = p22.int8;
24608      this.caretSlopeDenominator = p22.int8;
24609      this.caretOffset = p22.int8;
24610      this.minOriginSB = p22.int8;
24611      this.minAdvanceSB = p22.int8;
24612      this.maxBeforeBL = p22.int8;
24613      this.minAfterBL = p22.int8;
24614      this.pad1 = p22.int8;
24615      this.pad2 = p22.int8;
24616    }
24617  };
24618  var EBLC = class extends SimpleTable {
24619    constructor(dict, dataview, name2) {
24620      const { p: p22 } = super(dict, dataview, name2);
24621      this.majorVersion = p22.uint16;
24622      this.minorVersion = p22.uint16;
24623      this.numSizes = p22.uint32;
24624      lazy$1(
24625        this,
24626        `bitMapSizes`,
24627        () => [...new Array(this.numSizes)].map(
24628          (_) => new BitmapSize(p22)
24629        )
24630      );
24631    }
24632  };
24633  var EBLC$1 = Object.freeze({ __proto__: null, EBLC });
24634  var EBDT = class extends SimpleTable {
24635    constructor(dict, dataview, name2) {
24636      const { p: p22 } = super(dict, dataview, name2);
24637      this.majorVersion = p22.uint16;
24638      this.minorVersion = p22.uint16;
24639    }
24640  };
24641  var EBDT$1 = Object.freeze({ __proto__: null, EBDT });
24642  var EBSC = class extends SimpleTable {
24643    constructor(dict, dataview) {
24644      const { p: p22 } = super(dict, dataview);
24645      this.majorVersion = p22.uint16;
24646      this.minorVersion = p22.uint16;
24647      this.numSizes = p22.uint32;
24648      lazy$1(
24649        this,
24650        `bitmapScales`,
24651        () => [...new Array(this.numSizes)].map(
24652          (_) => new BitmapScale(p22)
24653        )
24654      );
24655    }
24656  };
24657  var EBSC$1 = Object.freeze({ __proto__: null, EBSC });
24658  var CBLC = class extends EBLC {
24659    constructor(dict, dataview) {
24660      super(dict, dataview, `CBLC`);
24661    }
24662  };
24663  var CBLC$1 = Object.freeze({ __proto__: null, CBLC });
24664  var CBDT = class extends EBDT {
24665    constructor(dict, dataview) {
24666      super(dict, dataview, `CBDT`);
24667    }
24668  };
24669  var CBDT$1 = Object.freeze({ __proto__: null, CBDT });
24670  var sbix = class extends SimpleTable {
24671    constructor(dict, dataview) {
24672      const { p: p22 } = super(dict, dataview);
24673      this.version = p22.uint16;
24674      this.flags = p22.flags(16);
24675      this.numStrikes = p22.uint32;
24676      lazy$1(
24677        this,
24678        `strikeOffsets`,
24679        () => [...new Array(this.numStrikes)].map((_) => p22.Offset32)
24680      );
24681    }
24682  };
24683  var sbix$1 = Object.freeze({ __proto__: null, sbix });
24684  var COLR = class extends SimpleTable {
24685    constructor(dict, dataview) {
24686      const { p: p22 } = super(dict, dataview);
24687      this.version = p22.uint16;
24688      this.numBaseGlyphRecords = p22.uint16;
24689      this.baseGlyphRecordsOffset = p22.Offset32;
24690      this.layerRecordsOffset = p22.Offset32;
24691      this.numLayerRecords = p22.uint16;
24692    }
24693    getBaseGlyphRecord(glyphID) {
24694      let start = this.tableStart + this.baseGlyphRecordsOffset;
24695      this.parser.currentPosition = start;
24696      let first = new BaseGlyphRecord(this.parser);
24697      let firstID = first.gID;
24698      let end = this.tableStart + this.layerRecordsOffset - 6;
24699      this.parser.currentPosition = end;
24700      let last = new BaseGlyphRecord(this.parser);
24701      let lastID = last.gID;
24702      if (firstID === glyphID) return first;
24703      if (lastID === glyphID) return last;
24704      while (true) {
24705        if (start === end) break;
24706        let mid = start + (end - start) / 12;
24707        this.parser.currentPosition = mid;
24708        let middle = new BaseGlyphRecord(this.parser);
24709        let midID = middle.gID;
24710        if (midID === glyphID) return middle;
24711        else if (midID > glyphID) {
24712          end = mid;
24713        } else if (midID < glyphID) {
24714          start = mid;
24715        }
24716      }
24717      return false;
24718    }
24719    getLayers(glyphID) {
24720      let record = this.getBaseGlyphRecord(glyphID);
24721      this.parser.currentPosition = this.tableStart + this.layerRecordsOffset + 4 * record.firstLayerIndex;
24722      return [...new Array(record.numLayers)].map(
24723        (_) => new LayerRecord(p)
24724      );
24725    }
24726  };
24727  var BaseGlyphRecord = class {
24728    constructor(p22) {
24729      this.gID = p22.uint16;
24730      this.firstLayerIndex = p22.uint16;
24731      this.numLayers = p22.uint16;
24732    }
24733  };
24734  var LayerRecord = class {
24735    constructor(p22) {
24736      this.gID = p22.uint16;
24737      this.paletteIndex = p22.uint16;
24738    }
24739  };
24740  var COLR$1 = Object.freeze({ __proto__: null, COLR });
24741  var CPAL = class extends SimpleTable {
24742    constructor(dict, dataview) {
24743      const { p: p22 } = super(dict, dataview);
24744      this.version = p22.uint16;
24745      this.numPaletteEntries = p22.uint16;
24746      const numPalettes = this.numPalettes = p22.uint16;
24747      this.numColorRecords = p22.uint16;
24748      this.offsetFirstColorRecord = p22.Offset32;
24749      this.colorRecordIndices = [...new Array(this.numPalettes)].map(
24750        (_) => p22.uint16
24751      );
24752      lazy$1(this, `colorRecords`, () => {
24753        p22.currentPosition = this.tableStart + this.offsetFirstColorRecord;
24754        return [...new Array(this.numColorRecords)].map(
24755          (_) => new ColorRecord(p22)
24756        );
24757      });
24758      if (this.version === 1) {
24759        this.offsetPaletteTypeArray = p22.Offset32;
24760        this.offsetPaletteLabelArray = p22.Offset32;
24761        this.offsetPaletteEntryLabelArray = p22.Offset32;
24762        lazy$1(this, `paletteTypeArray`, () => {
24763          p22.currentPosition = this.tableStart + this.offsetPaletteTypeArray;
24764          return new PaletteTypeArray(p22, numPalettes);
24765        });
24766        lazy$1(this, `paletteLabelArray`, () => {
24767          p22.currentPosition = this.tableStart + this.offsetPaletteLabelArray;
24768          return new PaletteLabelsArray(p22, numPalettes);
24769        });
24770        lazy$1(this, `paletteEntryLabelArray`, () => {
24771          p22.currentPosition = this.tableStart + this.offsetPaletteEntryLabelArray;
24772          return new PaletteEntryLabelArray(p22, numPalettes);
24773        });
24774      }
24775    }
24776  };
24777  var ColorRecord = class {
24778    constructor(p22) {
24779      this.blue = p22.uint8;
24780      this.green = p22.uint8;
24781      this.red = p22.uint8;
24782      this.alpha = p22.uint8;
24783    }
24784  };
24785  var PaletteTypeArray = class {
24786    constructor(p22, numPalettes) {
24787      this.paletteTypes = [...new Array(numPalettes)].map(
24788        (_) => p22.uint32
24789      );
24790    }
24791  };
24792  var PaletteLabelsArray = class {
24793    constructor(p22, numPalettes) {
24794      this.paletteLabels = [...new Array(numPalettes)].map(
24795        (_) => p22.uint16
24796      );
24797    }
24798  };
24799  var PaletteEntryLabelArray = class {
24800    constructor(p22, numPalettes) {
24801      this.paletteEntryLabels = [...new Array(numPalettes)].map(
24802        (_) => p22.uint16
24803      );
24804    }
24805  };
24806  var CPAL$1 = Object.freeze({ __proto__: null, CPAL });
24807  var DSIG = class extends SimpleTable {
24808    constructor(dict, dataview) {
24809      const { p: p22 } = super(dict, dataview);
24810      this.version = p22.uint32;
24811      this.numSignatures = p22.uint16;
24812      this.flags = p22.uint16;
24813      this.signatureRecords = [...new Array(this.numSignatures)].map(
24814        (_) => new SignatureRecord(p22)
24815      );
24816    }
24817    getData(signatureID) {
24818      const record = this.signatureRecords[signatureID];
24819      this.parser.currentPosition = this.tableStart + record.offset;
24820      return new SignatureBlockFormat1(this.parser);
24821    }
24822  };
24823  var SignatureRecord = class {
24824    constructor(p22) {
24825      this.format = p22.uint32;
24826      this.length = p22.uint32;
24827      this.offset = p22.Offset32;
24828    }
24829  };
24830  var SignatureBlockFormat1 = class {
24831    constructor(p22) {
24832      p22.uint16;
24833      p22.uint16;
24834      this.signatureLength = p22.uint32;
24835      this.signature = p22.readBytes(this.signatureLength);
24836    }
24837  };
24838  var DSIG$1 = Object.freeze({ __proto__: null, DSIG });
24839  var hdmx = class extends SimpleTable {
24840    constructor(dict, dataview, tables) {
24841      const { p: p22 } = super(dict, dataview);
24842      const numGlyphs = tables.hmtx.numGlyphs;
24843      this.version = p22.uint16;
24844      this.numRecords = p22.int16;
24845      this.sizeDeviceRecord = p22.int32;
24846      this.records = [...new Array(numRecords)].map(
24847        (_) => new DeviceRecord(p22, numGlyphs)
24848      );
24849    }
24850  };
24851  var DeviceRecord = class {
24852    constructor(p22, numGlyphs) {
24853      this.pixelSize = p22.uint8;
24854      this.maxWidth = p22.uint8;
24855      this.widths = p22.readBytes(numGlyphs);
24856    }
24857  };
24858  var hdmx$1 = Object.freeze({ __proto__: null, hdmx });
24859  var kern = class extends SimpleTable {
24860    constructor(dict, dataview) {
24861      const { p: p22 } = super(dict, dataview);
24862      this.version = p22.uint16;
24863      this.nTables = p22.uint16;
24864      lazy$1(this, `tables`, () => {
24865        let offset4 = this.tableStart + 4;
24866        const tables = [];
24867        for (let i = 0; i < this.nTables; i++) {
24868          p22.currentPosition = offset4;
24869          let subtable = new KernSubTable(p22);
24870          tables.push(subtable);
24871          offset4 += subtable;
24872        }
24873        return tables;
24874      });
24875    }
24876  };
24877  var KernSubTable = class {
24878    constructor(p22) {
24879      this.version = p22.uint16;
24880      this.length = p22.uint16;
24881      this.coverage = p22.flags(8);
24882      this.format = p22.uint8;
24883      if (this.format === 0) {
24884        this.nPairs = p22.uint16;
24885        this.searchRange = p22.uint16;
24886        this.entrySelector = p22.uint16;
24887        this.rangeShift = p22.uint16;
24888        lazy$1(
24889          this,
24890          `pairs`,
24891          () => [...new Array(this.nPairs)].map((_) => new Pair(p22))
24892        );
24893      }
24894      if (this.format === 2) {
24895        console.warn(
24896          `Kern subtable format 2 is not supported: this parser currently only parses universal table data.`
24897        );
24898      }
24899    }
24900    get horizontal() {
24901      return this.coverage[0];
24902    }
24903    get minimum() {
24904      return this.coverage[1];
24905    }
24906    get crossstream() {
24907      return this.coverage[2];
24908    }
24909    get override() {
24910      return this.coverage[3];
24911    }
24912  };
24913  var Pair = class {
24914    constructor(p22) {
24915      this.left = p22.uint16;
24916      this.right = p22.uint16;
24917      this.value = p22.fword;
24918    }
24919  };
24920  var kern$1 = Object.freeze({ __proto__: null, kern });
24921  var LTSH = class extends SimpleTable {
24922    constructor(dict, dataview) {
24923      const { p: p22 } = super(dict, dataview);
24924      this.version = p22.uint16;
24925      this.numGlyphs = p22.uint16;
24926      this.yPels = p22.readBytes(this.numGlyphs);
24927    }
24928  };
24929  var LTSH$1 = Object.freeze({ __proto__: null, LTSH });
24930  var MERG = class extends SimpleTable {
24931    constructor(dict, dataview) {
24932      const { p: p22 } = super(dict, dataview);
24933      this.version = p22.uint16;
24934      this.mergeClassCount = p22.uint16;
24935      this.mergeDataOffset = p22.Offset16;
24936      this.classDefCount = p22.uint16;
24937      this.offsetToClassDefOffsets = p22.Offset16;
24938      lazy$1(
24939        this,
24940        `mergeEntryMatrix`,
24941        () => [...new Array(this.mergeClassCount)].map(
24942          (_) => p22.readBytes(this.mergeClassCount)
24943        )
24944      );
24945      console.warn(`Full MERG parsing is currently not supported.`);
24946      console.warn(
24947        `If you need this table parsed, please file an issue, or better yet, a PR.`
24948      );
24949    }
24950  };
24951  var MERG$1 = Object.freeze({ __proto__: null, MERG });
24952  var meta = class extends SimpleTable {
24953    constructor(dict, dataview) {
24954      const { p: p22 } = super(dict, dataview);
24955      this.version = p22.uint32;
24956      this.flags = p22.uint32;
24957      p22.uint32;
24958      this.dataMapsCount = p22.uint32;
24959      this.dataMaps = [...new Array(this.dataMapsCount)].map(
24960        (_) => new DataMap(this.tableStart, p22)
24961      );
24962    }
24963  };
24964  var DataMap = class {
24965    constructor(tableStart, p22) {
24966      this.tableStart = tableStart;
24967      this.parser = p22;
24968      this.tag = p22.tag;
24969      this.dataOffset = p22.Offset32;
24970      this.dataLength = p22.uint32;
24971    }
24972    getData() {
24973      this.parser.currentField = this.tableStart + this.dataOffset;
24974      return this.parser.readBytes(this.dataLength);
24975    }
24976  };
24977  var meta$1 = Object.freeze({ __proto__: null, meta });
24978  var PCLT = class extends SimpleTable {
24979    constructor(dict, dataview) {
24980      super(dict, dataview);
24981      console.warn(
24982        `This font uses a PCLT table, which is currently not supported by this parser.`
24983      );
24984      console.warn(
24985        `If you need this table parsed, please file an issue, or better yet, a PR.`
24986      );
24987    }
24988  };
24989  var PCLT$1 = Object.freeze({ __proto__: null, PCLT });
24990  var VDMX = class extends SimpleTable {
24991    constructor(dict, dataview) {
24992      const { p: p22 } = super(dict, dataview);
24993      this.version = p22.uint16;
24994      this.numRecs = p22.uint16;
24995      this.numRatios = p22.uint16;
24996      this.ratRanges = [...new Array(this.numRatios)].map(
24997        (_) => new RatioRange(p22)
24998      );
24999      this.offsets = [...new Array(this.numRatios)].map(
25000        (_) => p22.Offset16
25001      );
25002      this.VDMXGroups = [...new Array(this.numRecs)].map(
25003        (_) => new VDMXGroup(p22)
25004      );
25005    }
25006  };
25007  var RatioRange = class {
25008    constructor(p22) {
25009      this.bCharSet = p22.uint8;
25010      this.xRatio = p22.uint8;
25011      this.yStartRatio = p22.uint8;
25012      this.yEndRatio = p22.uint8;
25013    }
25014  };
25015  var VDMXGroup = class {
25016    constructor(p22) {
25017      this.recs = p22.uint16;
25018      this.startsz = p22.uint8;
25019      this.endsz = p22.uint8;
25020      this.records = [...new Array(this.recs)].map(
25021        (_) => new vTable(p22)
25022      );
25023    }
25024  };
25025  var vTable = class {
25026    constructor(p22) {
25027      this.yPelHeight = p22.uint16;
25028      this.yMax = p22.int16;
25029      this.yMin = p22.int16;
25030    }
25031  };
25032  var VDMX$1 = Object.freeze({ __proto__: null, VDMX });
25033  var vhea = class extends SimpleTable {
25034    constructor(dict, dataview) {
25035      const { p: p22 } = super(dict, dataview);
25036      this.version = p22.fixed;
25037      this.ascent = this.vertTypoAscender = p22.int16;
25038      this.descent = this.vertTypoDescender = p22.int16;
25039      this.lineGap = this.vertTypoLineGap = p22.int16;
25040      this.advanceHeightMax = p22.int16;
25041      this.minTopSideBearing = p22.int16;
25042      this.minBottomSideBearing = p22.int16;
25043      this.yMaxExtent = p22.int16;
25044      this.caretSlopeRise = p22.int16;
25045      this.caretSlopeRun = p22.int16;
25046      this.caretOffset = p22.int16;
25047      this.reserved = p22.int16;
25048      this.reserved = p22.int16;
25049      this.reserved = p22.int16;
25050      this.reserved = p22.int16;
25051      this.metricDataFormat = p22.int16;
25052      this.numOfLongVerMetrics = p22.uint16;
25053      p22.verifyLength();
25054    }
25055  };
25056  var vhea$1 = Object.freeze({ __proto__: null, vhea });
25057  var vmtx = class extends SimpleTable {
25058    constructor(dict, dataview, tables) {
25059      super(dict, dataview);
25060      const numOfLongVerMetrics = tables.vhea.numOfLongVerMetrics;
25061      const numGlyphs = tables.maxp.numGlyphs;
25062      const metricsStart = p.currentPosition;
25063      lazy(this, `vMetrics`, () => {
25064        p.currentPosition = metricsStart;
25065        return [...new Array(numOfLongVerMetrics)].map(
25066          (_) => new LongVertMetric(p.uint16, p.int16)
25067        );
25068      });
25069      if (numOfLongVerMetrics < numGlyphs) {
25070        const tsbStart = metricsStart + numOfLongVerMetrics * 4;
25071        lazy(this, `topSideBearings`, () => {
25072          p.currentPosition = tsbStart;
25073          return [...new Array(numGlyphs - numOfLongVerMetrics)].map(
25074            (_) => p.int16
25075          );
25076        });
25077      }
25078    }
25079  };
25080  var LongVertMetric = class {
25081    constructor(h, b) {
25082      this.advanceHeight = h;
25083      this.topSideBearing = b;
25084    }
25085  };
25086  var vmtx$1 = Object.freeze({ __proto__: null, vmtx });
25087  
25088  // packages/global-styles-ui/build-module/font-library/utils/make-families-from-faces.mjs
25089  function makeFamiliesFromFaces(fontFaces) {
25090    const fontFamiliesObject = fontFaces.reduce(
25091      (acc, item) => {
25092        if (!acc[item.fontFamily]) {
25093          acc[item.fontFamily] = {
25094            name: item.fontFamily,
25095            fontFamily: item.fontFamily,
25096            slug: kebabCase(item.fontFamily.toLowerCase()),
25097            fontFace: []
25098          };
25099        }
25100        acc[item.fontFamily].fontFace.push(item);
25101        return acc;
25102      },
25103      {}
25104    );
25105    return Object.values(fontFamiliesObject);
25106  }
25107  
25108  // packages/global-styles-ui/build-module/font-library/upload-fonts.mjs
25109  var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
25110  function UploadFonts() {
25111    const { installFonts } = (0, import_element38.useContext)(FontLibraryContext);
25112    const [isUploading, setIsUploading] = (0, import_element38.useState)(false);
25113    const [notice, setNotice] = (0, import_element38.useState)(null);
25114    const handleDropZone = (files) => {
25115      handleFilesUpload(files);
25116    };
25117    const onFilesUpload = (event) => {
25118      handleFilesUpload(event.target.files);
25119    };
25120    const handleFilesUpload = async (files) => {
25121      if (!files) {
25122        return;
25123      }
25124      setNotice(null);
25125      setIsUploading(true);
25126      const uniqueFilenames = /* @__PURE__ */ new Set();
25127      const selectedFiles = [...files];
25128      let hasInvalidFiles = false;
25129      const checkFilesPromises = selectedFiles.map(async (file) => {
25130        const isFont = await isFontFile(file);
25131        if (!isFont) {
25132          hasInvalidFiles = true;
25133          return null;
25134        }
25135        if (uniqueFilenames.has(file.name)) {
25136          return null;
25137        }
25138        const fileExtension = (((file.name ?? "").split(".") ?? []).pop() ?? "").toLowerCase();
25139        if (ALLOWED_FILE_EXTENSIONS.includes(fileExtension)) {
25140          uniqueFilenames.add(file.name);
25141          return file;
25142        }
25143        return null;
25144      });
25145      const allowedFiles = (await Promise.all(checkFilesPromises)).filter((file) => null !== file);
25146      if (allowedFiles.length > 0) {
25147        loadFiles(allowedFiles);
25148      } else {
25149        const message = hasInvalidFiles ? (0, import_i18n20.__)("Sorry, you are not allowed to upload this file type.") : (0, import_i18n20.__)("No fonts found to install.");
25150        setNotice({
25151          type: "error",
25152          message
25153        });
25154        setIsUploading(false);
25155      }
25156    };
25157    const loadFiles = async (files) => {
25158      const fontFacesLoaded = await Promise.all(
25159        files.map(async (fontFile) => {
25160          const fontFaceData = await getFontFaceMetadata(fontFile);
25161          await loadFontFaceInBrowser(
25162            fontFaceData,
25163            fontFaceData.file,
25164            "all"
25165          );
25166          return fontFaceData;
25167        })
25168      );
25169      handleInstall(fontFacesLoaded);
25170    };
25171    async function isFontFile(file) {
25172      const font2 = new Font("Uploaded Font");
25173      try {
25174        const buffer = await readFileAsArrayBuffer(file);
25175        await font2.fromDataBuffer(buffer, "font");
25176        return true;
25177      } catch {
25178        return false;
25179      }
25180    }
25181    async function readFileAsArrayBuffer(file) {
25182      return new Promise((resolve, reject) => {
25183        const reader = new window.FileReader();
25184        reader.readAsArrayBuffer(file);
25185        reader.onload = () => resolve(reader.result);
25186        reader.onerror = reject;
25187      });
25188    }
25189    const getFontFaceMetadata = async (fontFile) => {
25190      const buffer = await readFileAsArrayBuffer(fontFile);
25191      const fontObj = new Font("Uploaded Font");
25192      fontObj.fromDataBuffer(buffer, fontFile.name);
25193      const onloadEvent = await new Promise(
25194        (resolve) => fontObj.onload = resolve
25195      );
25196      const font2 = onloadEvent.detail.font;
25197      const { name: name2 } = font2.opentype.tables;
25198      const fontName = name2.get(16) || name2.get(1);
25199      const isItalic = name2.get(2).toLowerCase().includes("italic");
25200      const fontWeight = font2.opentype.tables["OS/2"].usWeightClass || "normal";
25201      const isVariable = !!font2.opentype.tables.fvar;
25202      const weightAxis = isVariable && font2.opentype.tables.fvar.axes.find(
25203        ({ tag }) => tag === "wght"
25204      );
25205      const weightRange = weightAxis ? `$weightAxis.minValue} $weightAxis.maxValue}` : null;
25206      return {
25207        file: fontFile,
25208        fontFamily: fontName,
25209        fontStyle: isItalic ? "italic" : "normal",
25210        fontWeight: weightRange || fontWeight
25211      };
25212    };
25213    const handleInstall = async (fontFaces) => {
25214      const fontFamilies = makeFamiliesFromFaces(fontFaces);
25215      try {
25216        await installFonts(fontFamilies);
25217        setNotice({
25218          type: "success",
25219          message: (0, import_i18n20.__)("Fonts were installed successfully.")
25220        });
25221      } catch (error) {
25222        const typedError = error;
25223        setNotice({
25224          type: "error",
25225          message: typedError.message,
25226          errors: typedError?.installationErrors
25227        });
25228      }
25229      setIsUploading(false);
25230    };
25231    return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "font-library__tabpanel-layout", children: [
25232      /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components25.DropZone, { onFilesDrop: handleDropZone }),
25233      /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_components25.__experimentalVStack, { className: "font-library__local-fonts", justify: "start", children: [
25234        notice && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
25235          import_components25.Notice,
25236          {
25237            status: notice.type,
25238            __unstableHTML: true,
25239            onRemove: () => setNotice(null),
25240            children: [
25241              notice.message,
25242              notice.errors && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { children: notice.errors.map((error, index2) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { children: error }, index2)) })
25243            ]
25244          }
25245        ),
25246        isUploading && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components25.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "font-library__upload-area", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components25.ProgressBar, {}) }) }),
25247        !isUploading && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
25248          import_components25.FormFileUpload,
25249          {
25250            accept: ALLOWED_FILE_EXTENSIONS.map(
25251              (ext) => `.$ext}`
25252            ).join(","),
25253            multiple: true,
25254            onChange: onFilesUpload,
25255            render: ({ openFileDialog }) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
25256              import_components25.Button,
25257              {
25258                __next40pxDefaultSize: true,
25259                className: "font-library__upload-area",
25260                onClick: openFileDialog,
25261                children: (0, import_i18n20.__)("Upload font")
25262              }
25263            )
25264          }
25265        ),
25266        /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components25.__experimentalText, { className: "font-library__upload-area__text", children: (0, import_i18n20.__)(
25267          "Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2."
25268        ) })
25269      ] })
25270    ] });
25271  }
25272  var upload_fonts_default = UploadFonts;
25273  
25274  // packages/global-styles-ui/build-module/font-library/modal.mjs
25275  var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
25276  var { Tabs } = unlock3(import_components26.privateApis);
25277  var DEFAULT_TAB = {
25278    id: "installed-fonts",
25279    title: (0, import_i18n21._x)("Library", "Font library")
25280  };
25281  var UPLOAD_TAB = {
25282    id: "upload-fonts",
25283    title: (0, import_i18n21._x)("Upload", "noun")
25284  };
25285  
25286  // packages/global-styles-ui/build-module/font-family-item.mjs
25287  var import_i18n22 = __toESM(require_i18n(), 1);
25288  var import_components27 = __toESM(require_components(), 1);
25289  var import_element39 = __toESM(require_element(), 1);
25290  var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
25291  
25292  // packages/global-styles-ui/build-module/font-families.mjs
25293  var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
25294  
25295  // packages/global-styles-ui/build-module/font-sizes/font-sizes-count.mjs
25296  var import_i18n24 = __toESM(require_i18n(), 1);
25297  var import_components29 = __toESM(require_components(), 1);
25298  var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
25299  
25300  // packages/global-styles-ui/build-module/text-shadows.mjs
25301  var import_i18n25 = __toESM(require_i18n(), 1);
25302  var import_components30 = __toESM(require_components(), 1);
25303  var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
25304  
25305  // packages/global-styles-ui/build-module/screen-typography.mjs
25306  var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
25307  
25308  // packages/global-styles-ui/build-module/screen-typography-element.mjs
25309  var import_i18n27 = __toESM(require_i18n(), 1);
25310  var import_components31 = __toESM(require_components(), 1);
25311  var import_element42 = __toESM(require_element(), 1);
25312  
25313  // packages/global-styles-ui/build-module/typography-panel.mjs
25314  var import_block_editor6 = __toESM(require_block_editor(), 1);
25315  var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
25316  var { useSettingsForBlockElement: useSettingsForBlockElement4, TypographyPanel: StylesTypographyPanel2 } = unlock3(import_block_editor6.privateApis);
25317  
25318  // packages/global-styles-ui/build-module/typography-preview.mjs
25319  var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
25320  
25321  // packages/global-styles-ui/build-module/screen-typography-element.mjs
25322  var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
25323  var elements = {
25324    text: {
25325      description: (0, import_i18n27.__)("Manage the fonts used on the site."),
25326      title: (0, import_i18n27.__)("Text")
25327    },
25328    link: {
25329      description: (0, import_i18n27.__)("Manage the fonts and typography used on the links."),
25330      title: (0, import_i18n27.__)("Links")
25331    },
25332    heading: {
25333      description: (0, import_i18n27.__)("Manage the fonts and typography used on headings."),
25334      title: (0, import_i18n27.__)("Headings")
25335    },
25336    caption: {
25337      description: (0, import_i18n27.__)("Manage the fonts and typography used on captions."),
25338      title: (0, import_i18n27.__)("Captions")
25339    },
25340    cite: {
25341      description: (0, import_i18n27.__)("Manage the fonts and typography used on citations."),
25342      title: (0, import_i18n27.__)("Citations")
25343    },
25344    button: {
25345      description: (0, import_i18n27.__)("Manage the fonts and typography used on buttons."),
25346      title: (0, import_i18n27.__)("Buttons")
25347    },
25348    textInput: {
25349      description: (0, import_i18n27.__)("Manage the fonts and typography used on inputs."),
25350      title: (0, import_i18n27.__)("Inputs")
25351    },
25352    select: {
25353      description: (0, import_i18n27.__)("Manage the fonts and typography used on selects."),
25354      title: (0, import_i18n27.__)("Selects")
25355    }
25356  };
25357  
25358  // packages/global-styles-ui/build-module/screen-colors.mjs
25359  var import_i18n29 = __toESM(require_i18n(), 1);
25360  var import_components33 = __toESM(require_components(), 1);
25361  var import_block_editor7 = __toESM(require_block_editor(), 1);
25362  
25363  // packages/global-styles-ui/build-module/palette.mjs
25364  var import_components32 = __toESM(require_components(), 1);
25365  var import_i18n28 = __toESM(require_i18n(), 1);
25366  var import_element43 = __toESM(require_element(), 1);
25367  
25368  // packages/global-styles-ui/build-module/color-indicator-wrapper.mjs
25369  var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
25370  
25371  // packages/global-styles-ui/build-module/palette.mjs
25372  var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
25373  
25374  // packages/global-styles-ui/build-module/screen-colors.mjs
25375  var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
25376  var { useSettingsForBlockElement: useSettingsForBlockElement5, ColorPanel: StylesColorPanel2 } = unlock3(
25377    import_block_editor7.privateApis
25378  );
25379  var ADDITIONAL_ELEMENTS = [
25380    { name: "cite", label: (0, import_i18n29.__)("Citations") },
25381    { name: "textInput", label: (0, import_i18n29.__)("Inputs") },
25382    { name: "select", label: (0, import_i18n29.__)("Selects") }
25383  ];
25384  
25385  // packages/global-styles-ui/build-module/screen-color-palette.mjs
25386  var import_i18n33 = __toESM(require_i18n(), 1);
25387  
25388  // packages/global-styles-ui/build-module/color-palette-panel.mjs
25389  var import_compose4 = __toESM(require_compose(), 1);
25390  var import_components36 = __toESM(require_components(), 1);
25391  var import_i18n30 = __toESM(require_i18n(), 1);
25392  
25393  // packages/global-styles-ui/build-module/variations/variations-color.mjs
25394  var import_components35 = __toESM(require_components(), 1);
25395  
25396  // packages/global-styles-ui/build-module/preview-colors.mjs
25397  var import_components34 = __toESM(require_components(), 1);
25398  
25399  // packages/global-styles-ui/build-module/preset-colors.mjs
25400  var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
25401  function PresetColors() {
25402    const { paletteColors } = useStylesPreviewColors();
25403    return paletteColors.slice(0, 4).map(({ slug, color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
25404      "div",
25405      {
25406        style: {
25407          flexGrow: 1,
25408          height: "100%",
25409          background: color
25410        }
25411      },
25412      `$slug}-$index2}`
25413    ));
25414  }
25415  
25416  // packages/global-styles-ui/build-module/preview-colors.mjs
25417  var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
25418  var firstFrameVariants2 = {
25419    start: {
25420      scale: 1,
25421      opacity: 1
25422    },
25423    hover: {
25424      scale: 0,
25425      opacity: 0
25426    }
25427  };
25428  var StylesPreviewColors = ({
25429    label,
25430    isFocused,
25431    withHoverView
25432  }) => {
25433    return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
25434      preview_wrapper_default,
25435      {
25436        label,
25437        isFocused,
25438        withHoverView,
25439        children: ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
25440          import_components34.__unstableMotion.div,
25441          {
25442            variants: firstFrameVariants2,
25443            style: {
25444              height: "100%",
25445              overflow: "hidden"
25446            },
25447            children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
25448              import_components34.__experimentalHStack,
25449              {
25450                spacing: 0,
25451                justify: "center",
25452                style: {
25453                  height: "100%",
25454                  overflow: "hidden"
25455                },
25456                children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(PresetColors, {})
25457              }
25458            )
25459          },
25460          key
25461        )
25462      }
25463    );
25464  };
25465  var preview_colors_default = StylesPreviewColors;
25466  
25467  // packages/global-styles-ui/build-module/variations/variations-color.mjs
25468  var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
25469  var propertiesToFilter2 = ["color"];
25470  function ColorVariations({
25471    title,
25472    gap = 2
25473  }) {
25474    const colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter2);
25475    if (colorVariations?.length <= 1) {
25476      return null;
25477    }
25478    return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_components35.__experimentalVStack, { spacing: 3, children: [
25479      title && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Subtitle, { level: 3, children: title }),
25480      /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components35.__experimentalGrid, { gap, children: colorVariations.map((variation, index2) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
25481        Variation,
25482        {
25483          variation,
25484          isPill: true,
25485          properties: propertiesToFilter2,
25486          showTooltip: true,
25487          children: () => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(preview_colors_default, {})
25488        },
25489        index2
25490      )) })
25491    ] });
25492  }
25493  
25494  // packages/global-styles-ui/build-module/color-palette-panel.mjs
25495  var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
25496  
25497  // packages/global-styles-ui/build-module/gradients-palette-panel.mjs
25498  var import_compose5 = __toESM(require_compose(), 1);
25499  var import_components37 = __toESM(require_components(), 1);
25500  var import_i18n31 = __toESM(require_i18n(), 1);
25501  var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
25502  
25503  // packages/global-styles-ui/build-module/duotone-palette-panel.mjs
25504  var import_compose6 = __toESM(require_compose(), 1);
25505  var import_element44 = __toESM(require_element(), 1);
25506  var import_components38 = __toESM(require_components(), 1);
25507  var import_i18n32 = __toESM(require_i18n(), 1);
25508  var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1);
25509  
25510  // packages/global-styles-ui/build-module/screen-color-palette.mjs
25511  var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1);
25512  
25513  // packages/global-styles-ui/build-module/screen-background.mjs
25514  var import_i18n34 = __toESM(require_i18n(), 1);
25515  var import_block_editor9 = __toESM(require_block_editor(), 1);
25516  var import_components39 = __toESM(require_components(), 1);
25517  
25518  // packages/global-styles-ui/build-module/background-panel.mjs
25519  var import_block_editor8 = __toESM(require_block_editor(), 1);
25520  var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
25521  var { BackgroundPanel: StylesBackgroundPanel2 } = unlock3(
25522    import_block_editor8.privateApis
25523  );
25524  
25525  // packages/global-styles-ui/build-module/screen-background.mjs
25526  var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1);
25527  var { useHasBackgroundPanel: useHasBackgroundPanel4 } = unlock3(import_block_editor9.privateApis);
25528  
25529  // packages/global-styles-ui/build-module/shadows-panel.mjs
25530  var import_i18n37 = __toESM(require_i18n(), 1);
25531  
25532  // packages/global-styles-ui/build-module/presets/preset-group.mjs
25533  var import_components41 = __toESM(require_components(), 1);
25534  var import_i18n36 = __toESM(require_i18n(), 1);
25535  var import_element45 = __toESM(require_element(), 1);
25536  
25537  // packages/global-styles-ui/build-module/presets/dialogs/confirm-reset-dialog.mjs
25538  var import_components40 = __toESM(require_components(), 1);
25539  var import_i18n35 = __toESM(require_i18n(), 1);
25540  var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
25541  
25542  // packages/global-styles-ui/build-module/presets/preset-group.mjs
25543  var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
25544  
25545  // packages/global-styles-ui/build-module/shadows-panel.mjs
25546  var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
25547  
25548  // packages/global-styles-ui/build-module/shadows-edit-panel.mjs
25549  var import_components45 = __toESM(require_components(), 1);
25550  var import_i18n40 = __toESM(require_i18n(), 1);
25551  var import_element47 = __toESM(require_element(), 1);
25552  
25553  // packages/global-styles-ui/build-module/presets/preset-edit-header.mjs
25554  var import_components42 = __toESM(require_components(), 1);
25555  var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1);
25556  
25557  // packages/global-styles-ui/build-module/presets/dialogs/confirm-delete-dialog.mjs
25558  var import_components43 = __toESM(require_components(), 1);
25559  var import_i18n38 = __toESM(require_i18n(), 1);
25560  var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1);
25561  
25562  // packages/global-styles-ui/build-module/presets/dialogs/rename-dialog.mjs
25563  var import_components44 = __toESM(require_components(), 1);
25564  var import_i18n39 = __toESM(require_i18n(), 1);
25565  var import_element46 = __toESM(require_element(), 1);
25566  var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1);
25567  
25568  // packages/global-styles-ui/build-module/shadows-edit-panel.mjs
25569  var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1);
25570  
25571  // packages/global-styles-ui/build-module/screen-shadows.mjs
25572  var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1);
25573  
25574  // packages/global-styles-ui/build-module/screen-text-shadows.mjs
25575  var import_i18n41 = __toESM(require_i18n(), 1);
25576  var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1);
25577  
25578  // packages/global-styles-ui/build-module/screen-text-shadows-edit.mjs
25579  var import_components46 = __toESM(require_components(), 1);
25580  var import_i18n42 = __toESM(require_i18n(), 1);
25581  var import_element48 = __toESM(require_element(), 1);
25582  var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
25583  
25584  // packages/global-styles-ui/build-module/screen-layout.mjs
25585  var import_i18n43 = __toESM(require_i18n(), 1);
25586  var import_block_editor11 = __toESM(require_block_editor(), 1);
25587  
25588  // packages/global-styles-ui/build-module/dimensions-panel.mjs
25589  var import_block_editor10 = __toESM(require_block_editor(), 1);
25590  var import_element49 = __toESM(require_element(), 1);
25591  var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
25592  var { useSettingsForBlockElement: useSettingsForBlockElement6, DimensionsPanel: StylesDimensionsPanel2 } = unlock3(import_block_editor10.privateApis);
25593  
25594  // packages/global-styles-ui/build-module/screen-layout.mjs
25595  var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
25596  var { useHasDimensionsPanel: useHasDimensionsPanel4, useSettingsForBlockElement: useSettingsForBlockElement7 } = unlock3(
25597    import_block_editor11.privateApis
25598  );
25599  
25600  // packages/global-styles-ui/build-module/screen-style-variations.mjs
25601  var import_components49 = __toESM(require_components(), 1);
25602  var import_i18n46 = __toESM(require_i18n(), 1);
25603  
25604  // packages/global-styles-ui/build-module/style-variations-content.mjs
25605  var import_i18n45 = __toESM(require_i18n(), 1);
25606  var import_components48 = __toESM(require_components(), 1);
25607  
25608  // packages/global-styles-ui/build-module/style-variations-container.mjs
25609  var import_core_data9 = __toESM(require_core_data(), 1);
25610  var import_data9 = __toESM(require_data(), 1);
25611  var import_element50 = __toESM(require_element(), 1);
25612  var import_components47 = __toESM(require_components(), 1);
25613  var import_i18n44 = __toESM(require_i18n(), 1);
25614  var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
25615  function StyleVariationsContainer({
25616    gap = 2
25617  }) {
25618    const { user } = (0, import_element50.useContext)(GlobalStylesContext);
25619    const userStyles = user?.styles;
25620    const variations = (0, import_data9.useSelect)((select) => {
25621      const result = select(
25622        import_core_data9.store
25623      ).__experimentalGetCurrentThemeGlobalStylesVariations();
25624      return Array.isArray(result) ? result : void 0;
25625    }, []);
25626    const fullStyleVariations = variations?.filter(
25627      (variation) => {
25628        return !isVariationWithProperties(variation, ["color"]) && !isVariationWithProperties(variation, [
25629          "typography",
25630          "spacing"
25631        ]);
25632      }
25633    );
25634    const themeVariations = (0, import_element50.useMemo)(() => {
25635      const withEmptyVariation = [
25636        {
25637          title: (0, import_i18n44.__)("Default"),
25638          settings: {},
25639          styles: {}
25640        },
25641        ...fullStyleVariations ?? []
25642      ];
25643      return [
25644        ...withEmptyVariation.map((variation) => {
25645          const blockStyles = variation?.styles?.blocks ? { ...variation.styles.blocks } : {};
25646          if (userStyles?.blocks) {
25647            Object.keys(userStyles.blocks).forEach((blockName) => {
25648              if (userStyles.blocks?.[blockName]?.css) {
25649                const variationBlockStyles = blockStyles[blockName] || {};
25650                const customCSS = {
25651                  css: `$blockStyles[blockName]?.css || ""} $userStyles.blocks?.[blockName]?.css?.trim() || ""}`
25652                };
25653                blockStyles[blockName] = {
25654                  ...variationBlockStyles,
25655                  ...customCSS
25656                };
25657              }
25658            });
25659          }
25660          const css = userStyles?.css || variation.styles?.css ? {
25661            css: `$variation.styles?.css || ""} $userStyles?.css || ""}`
25662          } : {};
25663          const blocks = Object.keys(blockStyles).length > 0 ? { blocks: blockStyles } : {};
25664          const styles = {
25665            ...variation.styles,
25666            ...css,
25667            ...blocks
25668          };
25669          return {
25670            ...variation,
25671            settings: variation.settings ?? {},
25672            styles
25673          };
25674        })
25675      ];
25676    }, [fullStyleVariations, userStyles?.blocks, userStyles?.css]);
25677    if (!fullStyleVariations || fullStyleVariations.length < 1) {
25678      return null;
25679    }
25680    return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
25681      import_components47.__experimentalGrid,
25682      {
25683        columns: 2,
25684        className: "global-styles-ui-style-variations-container",
25685        gap,
25686        children: themeVariations.map(
25687          (variation, index2) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Variation, { variation, children: (isFocused) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
25688            preview_styles_default,
25689            {
25690              label: variation?.title,
25691              withHoverView: true,
25692              isFocused,
25693              variation
25694            }
25695          ) }, index2)
25696        )
25697      }
25698    );
25699  }
25700  var style_variations_container_default = StyleVariationsContainer;
25701  
25702  // packages/global-styles-ui/build-module/style-variations-content.mjs
25703  var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
25704  
25705  // packages/global-styles-ui/build-module/screen-style-variations.mjs
25706  var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
25707  
25708  // packages/global-styles-ui/build-module/screen-css.mjs
25709  var import_i18n47 = __toESM(require_i18n(), 1);
25710  var import_components50 = __toESM(require_components(), 1);
25711  var import_block_editor12 = __toESM(require_block_editor(), 1);
25712  var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
25713  var { AdvancedPanel: StylesAdvancedPanel2 } = unlock3(import_block_editor12.privateApis);
25714  
25715  // packages/global-styles-ui/build-module/screen-revisions/index.mjs
25716  var import_i18n49 = __toESM(require_i18n(), 1);
25717  var import_components51 = __toESM(require_components(), 1);
25718  var import_element53 = __toESM(require_element(), 1);
25719  
25720  // packages/global-styles-ui/build-module/screen-revisions/use-global-styles-revisions.mjs
25721  var import_data10 = __toESM(require_data(), 1);
25722  var import_core_data10 = __toESM(require_core_data(), 1);
25723  var import_element51 = __toESM(require_element(), 1);
25724  
25725  // packages/global-styles-ui/build-module/screen-revisions/revisions-list.mjs
25726  var import_i18n48 = __toESM(require_i18n(), 1);
25727  var import_date = __toESM(require_date(), 1);
25728  var import_core_data11 = __toESM(require_core_data(), 1);
25729  var import_data11 = __toESM(require_data(), 1);
25730  var import_element52 = __toESM(require_element(), 1);
25731  var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
25732  var DAY_IN_MILLISECONDS = 60 * 60 * 1e3 * 24;
25733  
25734  // packages/global-styles-ui/build-module/screen-revisions/index.mjs
25735  var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
25736  
25737  // packages/global-styles-ui/build-module/font-sizes/font-sizes.mjs
25738  var import_i18n50 = __toESM(require_i18n(), 1);
25739  var import_components52 = __toESM(require_components(), 1);
25740  var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
25741  
25742  // packages/global-styles-ui/build-module/font-sizes/font-size.mjs
25743  var import_i18n52 = __toESM(require_i18n(), 1);
25744  var import_components54 = __toESM(require_components(), 1);
25745  var import_element54 = __toESM(require_element(), 1);
25746  
25747  // packages/global-styles-ui/build-module/font-sizes/font-size-preview.mjs
25748  var import_block_editor13 = __toESM(require_block_editor(), 1);
25749  var import_i18n51 = __toESM(require_i18n(), 1);
25750  var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
25751  
25752  // packages/global-styles-ui/build-module/size-control/index.mjs
25753  var import_components53 = __toESM(require_components(), 1);
25754  var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
25755  
25756  // packages/global-styles-ui/build-module/font-sizes/font-size.mjs
25757  var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
25758  
25759  // packages/global-styles-ui/build-module/global-styles-ui.mjs
25760  var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
25761  
25762  // packages/global-styles-ui/build-module/with-global-styles-provider.mjs
25763  var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
25764  function withGlobalStylesProvider(Component) {
25765    return function WrappedComponent({
25766      value,
25767      baseValue,
25768      onChange,
25769      ...props
25770    }) {
25771      return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
25772        GlobalStylesProvider,
25773        {
25774          value,
25775          baseValue,
25776          onChange,
25777          children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Component, { ...props })
25778        }
25779      );
25780    };
25781  }
25782  
25783  // packages/global-styles-ui/build-module/style-variations.mjs
25784  var StyleVariations = withGlobalStylesProvider(style_variations_container_default);
25785  
25786  // packages/global-styles-ui/build-module/color-variations.mjs
25787  var ColorVariations2 = withGlobalStylesProvider(ColorVariations);
25788  
25789  // packages/global-styles-ui/build-module/typography-variations.mjs
25790  var TypographyVariations2 = withGlobalStylesProvider(TypographyVariations);
25791  
25792  // packages/global-styles-ui/build-module/font-library/font-library.mjs
25793  var import_jsx_runtime103 = __toESM(require_jsx_runtime(), 1);
25794  function FontLibrary({
25795    value,
25796    baseValue,
25797    onChange,
25798    activeTab = "installed-fonts"
25799  }) {
25800    let content;
25801    switch (activeTab) {
25802      case "upload-fonts":
25803        content = /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(upload_fonts_default, {});
25804        break;
25805      case "installed-fonts":
25806        content = /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(installed_fonts_default, {});
25807        break;
25808      default:
25809        content = /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(font_collection_default, { slug: activeTab });
25810    }
25811    return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
25812      GlobalStylesProvider,
25813      {
25814        value,
25815        baseValue,
25816        onChange,
25817        children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(context_default, { children: content })
25818      }
25819    );
25820  }
25821  
25822  // routes/font-list/lock-unlock.ts
25823  var import_private_apis5 = __toESM(require_private_apis());
25824  var { unlock: unlock4 } = (0, import_private_apis5.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
25825    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
25826    "@wordpress/font-list-route"
25827  );
25828  
25829  // routes/font-list/style.scss
25830  if (typeof document !== "undefined" && (typeof process === "undefined" || true) && !document.head.querySelector("style[data-wp-hash='8cdcc9529b']")) {
25831    const style = document.createElement("style");
25832    style.setAttribute("data-wp-hash", "8cdcc9529b");
25833    style.appendChild(document.createTextNode("@media (min-width:782px){.font-library-modal.font-library-modal{width:65vw}}.font-library-modal .components-modal__header{border-bottom:none}.font-library-modal .components-modal__content{margin-bottom:90px;padding:0}.font-library-modal .font-library__subtitle{font-size:11px;font-weight:var(--wpds-typography-font-weight-emphasis,600);text-transform:uppercase}.font-library-modal__tab-panel{height:calc(100% - 50px)}.font-library__tabpanel-layout{display:flex;flex-direction:column;height:100%}.font-library__tabpanel-layout>div{flex-grow:1}.font-library__tabpanel-layout .font-library__loading{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;left:0;padding-top:124px;position:absolute;top:0;width:100%}.font-library__footer,.font-library__tabpanel-layout .components-navigator-screen{padding:24px;width:100%}.font-library__footer{background-color:#fff;border-top:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);bottom:0;box-sizing:border-box;flex-grow:0!important;flex-shrink:0;height:90px;position:absolute}.font-library__page-selection{font-size:11px;font-weight:var(--wpds-typography-font-weight-emphasis,600);text-transform:uppercase}@media (min-width:600px){.font-library__page-selection .components-select-control__input{font-size:11px!important;font-weight:var(--wpds-typography-font-weight-emphasis,600)}}.font-library__search{width:240px}.font-library__fonts-title{font-size:11px;font-weight:var(--wpds-typography-font-weight-emphasis,600);margin-bottom:0;margin-top:0;text-transform:uppercase}.font-library__fonts-list{list-style:none;margin-bottom:0;margin-top:0;padding:0}.font-library__fonts-list-item{margin-bottom:0}.font-library__font-demo{position:relative}.font-library__font-card{border:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);box-sizing:border-box;height:auto!important;margin-top:-1px;padding:16px;width:100%}.font-library__font-card:hover{background-color:#f0f0f0}.font-library__font-card:focus{position:relative}.font-library__font-card .font-library__font-card__name{font-weight:700}.font-library__font-card .font-library__font-card__count{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.font-library__font-card .font-library__font-variant_demo-image{display:block;height:24px;width:auto}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-image{transition:opacity var(--wpds-motion-duration-lg,.3s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1))}}.font-library__font-card .font-library__font-variant_demo-image.is-loading{left:0;opacity:0;position:absolute;top:0}.font-library__font-card .font-library__font-variant-demo-skeleton{border-radius:var(--wpds-border-radius-sm,2px);height:24px}.font-library__font-card .font-library__font-variant_demo-text{flex-shrink:0;white-space:nowrap}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-text{transition:opacity .3s ease-in-out}}.font-library-modal__tablist-container{background:#fff;border-bottom:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);position:sticky;top:0;z-index:1}.font-library__upload-area{align-items:center;display:flex;height:256px!important;justify-content:center;width:100%}button.font-library__upload-area{background-color:#f0f0f0}.font-library__local-fonts{margin:24px auto;width:80%}.font-library__local-fonts .font-library__upload-area__text{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.font-library__google-fonts-confirm{align-items:center;display:flex;justify-content:center;margin-top:64px}.font-library__google-fonts-confirm p{line-height:1.4}.font-library__google-fonts-confirm h2{font-size:1.2rem;font-weight:400}.font-library__google-fonts-confirm .components-card{padding:16px;width:400px}.font-library__google-fonts-confirm .components-button{justify-content:center;width:100%}.font-library__select-all{padding:16px 16px 16px 17px}.font-library__select-all .components-checkbox-control__label{padding-left:16px}.global-styles-ui-screen-revisions{display:flex;flex-direction:column;flex-grow:1;min-height:0}.global-styles-ui-screen-revisions__actions{margin-inline-start:auto}.global-styles-ui-screen-revisions__date{font-size:12px;font-weight:var(--wpds-typography-font-weight-emphasis,600);text-transform:uppercase}.global-styles-ui-screen-revisions__description{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.global-styles-ui-screen-revisions__changes,.global-styles-ui-screen-revisions__meta{color:#2f2f2f;font-size:12px}.global-styles-ui-screen-revisions__meta{align-items:center;display:flex;justify-content:start;text-align:left;width:100%}.global-styles-ui-screen-revisions__meta img{border-radius:100%;height:16px;margin-right:8px;width:16px}.global-styles-ui-screen-revisions__changes{line-height:1.4;list-style:disc;margin:0 0 0 12px;text-align:left}.global-styles-ui-screen-revisions__changes li{margin-bottom:4px}.global-styles-ui-variations_item{box-sizing:border-box;cursor:var(--wpds-cursor-control,pointer)}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{border-radius:2px;outline:1px solid rgba(0,0,0,.1);outline-offset:-1px;overflow:hidden;position:relative}@media not (prefers-reduced-motion){.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{transition:outline .1s linear}}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill{height:32px}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill .block-editor-iframe__scale-container{overflow:hidden}.global-styles-ui-variations_item:not(.is-active):hover .global-styles-ui-variations_item-preview{outline-color:rgba(0,0,0,.3)}.global-styles-ui-variations_item.is-active .global-styles-ui-variations_item-preview,.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:#1e1e1e;outline-offset:1px;outline-width:var(--wp-admin-border-width-focus)}.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.global-styles-ui-preview__wrapper{display:block;max-width:100%;width:100%}.global-styles-ui-preview__wrapper.is-hoverable{cursor:var(--wpds-cursor-control,pointer)}.global-styles-ui-typography-preview{align-items:center;background:#f0f0f0;border-radius:2px;display:flex;justify-content:center;margin-bottom:20px;min-height:100px;overflow:hidden}.global-styles-ui-font-size__item{line-break:anywhere;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-styles-ui-font-size__item-value{color:#757575}.global-styles-ui-screen-typography__indicator{align-items:center;border-radius:2px;display:flex!important;font-size:14px;height:24px;justify-content:center;width:24px}.global-styles-ui-block-types-filter{margin-bottom:12px;padding:0 16px}.global-styles-ui-block-types-search{flex-grow:1}.global-styles-ui-block-types-item-list .global-styles-ui-block-types-item__icon{min-width:24px}.global-styles-ui-block-types-item-list__no-results{padding-top:16px}.global-styles-ui-block-types-item__indicator{background:var(--wp-admin-theme-color);border-radius:50%;flex:none;height:6px;margin-left:auto;width:6px}.global-styles-ui-screen-typography__font-variants-count{color:#757575}.global-styles-ui-font-families__manage-fonts{justify-content:center}.global-styles-ui-screen .color-block-support-panel{border-top:none;padding-left:0;padding-right:0;padding-top:0;row-gap:12px}.global-styles-ui-header{line-height:1.9!important;margin-bottom:0!important}.global-styles-ui-subtitle{font-size:11px!important;font-weight:var(--wpds-typography-font-weight-emphasis,600)!important;margin-bottom:0!important;text-transform:uppercase}.global-styles-ui-section-title{color:#2f2f2f;font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:1.2;margin:0;padding:16px 16px 0}.global-styles-ui-icon-with-current-color{fill:currentColor}.global-styles-ui__color-indicator-wrapper{align-items:center;display:flex;flex-shrink:0;height:24px}.global-styles-ui__palette-preview{display:inline-flex}.global-styles-ui__palette-preview>*+*{margin-inline-start:-8px}.global-styles-ui__shadows-panel__options-container,.global-styles-ui__typography-panel__options-container{height:24px}.global-styles-ui__block-preview-panel{border:1px solid #ddd;border-radius:2px;overflow:hidden;position:relative;width:100%}.global-styles-ui__shadow-preview-panel,.global-styles-ui__text-shadow-preview-panel{background-image:repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0);background-position:0 0,8px 8px;background-size:16px 16px;border:1px solid #ddd;border-radius:2px;height:144px;overflow:auto}.global-styles-ui__shadow-preview-block{background-color:#fff;border:1px solid #ddd;border-radius:2px;height:60px;width:60%}.global-styles-ui__text-shadow-preview-panel{margin-block:-8px 16px}.global-styles-ui__text-shadow-preview-text{font-size:24px}.global-styles-ui__text-shadow-editor__header{margin-block-end:8px}.global-styles-ui__text-shadow-editor__inputs{display:grid;gap:16px;grid-template-columns:repeat(2,1fr)}.global-styles-ui__shadow-editor__dropdown-content,.global-styles-ui__text-shadow-editor__dropdown-content{width:280px}.global-styles-ui__shadow-editor-panel,.global-styles-ui__text-shadow-editor-panel{margin-bottom:4px}.global-styles-ui__shadow-editor__dropdown,.global-styles-ui__text-shadow-editor__dropdown{position:relative;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle,.global-styles-ui__text-shadow-editor__dropdown-toggle{border-radius:inherit;height:auto;padding-bottom:8px;padding-top:8px;text-align:left;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle.is-open,.global-styles-ui__text-shadow-editor__dropdown-toggle.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__text-shadow-editor__remove-button{opacity:0;position:absolute;right:8px;top:8px}.global-styles-ui__shadow-editor__dropdown-toggle:hover+.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__shadow-editor__dropdown-toggle:hover+.global-styles-ui__text-shadow-editor__remove-button,.global-styles-ui__shadow-editor__remove-button:focus,.global-styles-ui__shadow-editor__remove-button:hover,.global-styles-ui__text-shadow-editor__dropdown-toggle:hover+.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__text-shadow-editor__dropdown-toggle:hover+.global-styles-ui__text-shadow-editor__remove-button,.global-styles-ui__text-shadow-editor__remove-button:focus,.global-styles-ui__text-shadow-editor__remove-button:hover{opacity:1}@media (hover:none){.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__text-shadow-editor__remove-button{opacity:1}}.global-styles-ui-screen-css{display:flex;flex:1 1 auto;flex-direction:column;margin:16px}.global-styles-ui-screen-css .block-editor-global-styles-advanced-panel{flex:1 1 auto}.global-styles-ui-screen-css .block-editor-global-styles-advanced-panel__custom-css-input,.global-styles-ui-screen-css .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{display:flex;flex:1 1 auto;flex-direction:column}.global-styles-ui-screen-css .block-editor-global-styles-advanced-panel__custom-css-input textarea{flex:1 1 auto}.global-styles-ui-screen-css-help-link{display:inline-block;margin-top:8px}.global-styles-ui-screen-variations{border-top:1px solid #ddd;margin-top:16px}.global-styles-ui-screen-variations>*{margin:24px 16px}.global-styles-ui-sidebar__navigator-provider{height:100%}.global-styles-ui-sidebar__navigator-screen{display:flex;flex-direction:column;height:100%}.global-styles-ui-color-palette__tablist-container{border-bottom:1px solid #ddd}.global-styles-ui-color-palette__tablist{margin-bottom:-1px}.global-styles-ui-sidebar__navigator-screen .single-column{grid-column:span 1}.global-styles-ui-screen-root.global-styles-ui-screen-root,.global-styles-ui-screen-style-variations.global-styles-ui-screen-style-variations{background:unset;color:inherit}.global-styles-ui-sidebar__panel .block-editor-block-icon svg{fill:currentColor}.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile,.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile .global-styles-ui-screen-root__active-style-tile-preview{border-radius:2px}.global-styles-ui-screen-root__active-style-tile-preview{clip-path:border-box}.global-styles-ui-color-palette-panel,.global-styles-ui-duotone-palette-panel,.global-styles-ui-gradient-palette-panel{padding:16px}.font-library-page__content{display:flex;flex-direction:column;flex-grow:1;min-height:0}.font-library-page:has(.font-library__footer) .font-library-page__content{padding-bottom:90px}.font-library-page__tablist{border-bottom:1px solid #f0f0f0;flex-shrink:0;padding:0 24px}.font-library-page__tab-panel{flex-grow:1;min-height:0;overflow:auto}"));
25834    document.head.appendChild(style);
25835  }
25836  
25837  // routes/font-list/stage.tsx
25838  var import_jsx_runtime104 = __toESM(require_jsx_runtime());
25839  var { Tabs: Tabs2 } = unlock4(import_components56.privateApis);
25840  var { useGlobalStyles } = unlock4(import_editor.privateApis);
25841  function FontLibraryPage() {
25842    const { records: collections = [] } = (0, import_core_data12.useEntityRecords)("root", "fontCollection", {
25843      _fields: "slug,name,description"
25844    });
25845    const [activeTab, setActiveTab] = (0, import_element56.useState)("installed-fonts");
25846    const { base, user, setUser, isReady } = useGlobalStyles();
25847    const canUserCreate = (0, import_data13.useSelect)((select) => {
25848      return select(import_core_data12.store).canUser("create", {
25849        kind: "postType",
25850        name: "wp_font_family"
25851      });
25852    }, []);
25853    if (!isReady) {
25854      return null;
25855    }
25856    const tabs = [
25857      {
25858        id: "installed-fonts",
25859        title: (0, import_i18n53._x)("Library", "Font library")
25860      }
25861    ];
25862    if (canUserCreate) {
25863      tabs.push({
25864        id: "upload-fonts",
25865        title: (0, import_i18n53._x)("Upload", "noun")
25866      });
25867      tabs.push(
25868        ...(collections || []).map(({ slug, name: name2 }) => ({
25869          id: slug,
25870          title: collections && collections.length === 1 && slug === "google-fonts" ? (0, import_i18n53.__)("Install Fonts") : name2
25871        }))
25872      );
25873    }
25874    return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(page_default, { title: (0, import_i18n53.__)("Fonts"), className: "font-library-page", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "font-library-page__content", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
25875      Tabs2,
25876      {
25877        selectedTabId: activeTab,
25878        onSelect: (tabId) => setActiveTab(tabId),
25879        children: [
25880          /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "font-library-page__tablist", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Tabs2.TabList, { children: tabs.map(({ id, title }) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Tabs2.Tab, { tabId: id, children: title }, id)) }) }),
25881          tabs.map(({ id }) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
25882            Tabs2.TabPanel,
25883            {
25884              tabId: id,
25885              focusable: false,
25886              className: "font-library-page__tab-panel",
25887              children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
25888                FontLibrary,
25889                {
25890                  value: user,
25891                  baseValue: base,
25892                  onChange: setUser,
25893                  activeTab: id
25894                }
25895              )
25896            },
25897            id
25898          ))
25899        ]
25900      }
25901    ) }) });
25902  }
25903  function Stage() {
25904    return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(FontLibraryPage, {});
25905  }
25906  var stage = Stage;
25907  export {
25908    stage
25909  };
25910  /*! Bundled license information:
25911  
25912  use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
25913    (**
25914     * @license React
25915     * use-sync-external-store-shim.development.js
25916     *
25917     * Copyright (c) Meta Platforms, Inc. and affiliates.
25918     *
25919     * This source code is licensed under the MIT license found in the
25920     * LICENSE file in the root directory of this source tree.
25921     *)
25922  
25923  use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
25924    (**
25925     * @license React
25926     * use-sync-external-store-shim/with-selector.development.js
25927     *
25928     * Copyright (c) Meta Platforms, Inc. and affiliates.
25929     *
25930     * This source code is licensed under the MIT license found in the
25931     * LICENSE file in the root directory of this source tree.
25932     *)
25933  
25934  is-plain-object/dist/is-plain-object.mjs:
25935    (*!
25936     * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
25937     *
25938     * Copyright (c) 2014-2017, Jon Schlinkert.
25939     * Released under the MIT License.
25940     *)
25941  */


Generated : Wed Oct 14 08:20:33 2026 Cross-referenced by PHPXref